CN104683403B - For the method for resource-sharing, Resource Server and system - Google Patents
For the method for resource-sharing, Resource Server and system Download PDFInfo
- Publication number
- CN104683403B CN104683403B CN201310629143.4A CN201310629143A CN104683403B CN 104683403 B CN104683403 B CN 104683403B CN 201310629143 A CN201310629143 A CN 201310629143A CN 104683403 B CN104683403 B CN 104683403B
- Authority
- CN
- China
- Prior art keywords
- resource
- user terminal
- information
- connection
- server
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses a kind of for the method for resource-sharing, Resource Server and system.Wherein in the method for resource-sharing, explorer is when receiving the resource inquiry request of the first user terminal transmission, the resource information that resource inquiry request includes is extracted, resource identification associated with resource information is inquired, resource identifier lists is sent to the first user terminal;When receiving the specified resource identification of the first user terminal transmission, second user terminal associated with specified resource identification is inquired;The first connection, which is sent, to second user terminal establishes information, after the confirmation for receiving the transmission of second user terminal receives information, information is established into second connection and is sent to the first user terminal, it establishes and connects so as to the first user terminal and second user terminal, and resource information associated with specified resource identification is obtained from second user terminal.Other side's location information is transmitted by Resource Server, both sides is instructed while initiating the connection, to realize the transmission of resource.
Description
Technical field
The present invention relates to the communications fields, more particularly to a kind of for the method for resource-sharing, Resource Server and system.
Background technology
WebRTC(Web based Real-Time Communications, the real-time Communication for Power based on Web)Technology will be more
Media real-time Communication for Power ability is built in browser.Web application developers only pass through simple JavaScript API
(Application Program Interface, application programming interfaces)It calls, you can easily realized between two browsers double
To multimedia realtime communication or other data transmissions.
Distributed structure/architecture is relative to traditional C/S(Client/Server, client/server)Framework, by network transmission
Load is distributed to other servers or client from central server, can greatly save the bandwidth of server end and resource disappears
Consumption, and improve the resource of user terminal(File, video)Speed of download.
Traditional browser is to be based on " request/response " pattern, this brings both sides to limit:
1)Server cannot be to browser active push data;
2)Direct communication is unable between browser, all data must pass through transit server.
Therefore, conventional browser is not in the case where depending on plug-in unit such as Java, ActiveX, Flash, cannot achieve point
Cloth application.The technologies such as WebSocket, WebRTC that HTML5 specifications are recently introduced change such case, are mainly reflected in:
1) long connection can be established between browser and server by WebSocket, server can be to browser actively
Issue data;
2)It can be bi-directionally connected by the PeerConnection foundation of WebRTC technology terminals between browser and browser
It is communicated.
This makes the distributed system based on browser be achieved.But only above 2 points are inadequate.Problem is
In above-mentioned mechanism, browser will not receive the connection that another browser is unilaterally initiated, and necessary both sides initiate to other side simultaneously
It can just establish and be bi-directionally connected when connection.
Invention content
The embodiment of the present invention provides a kind of for the method for resource-sharing, Resource Server and system, passes through resource service
Device transmits other side's location information, instructs both sides while initiating the connection, to realize the transmission of resource.
According to an aspect of the present invention, a kind of method for resource-sharing is provided, including:
When receiving the resource inquiry request of the first user terminal transmission, the money that resource inquiry request includes is extracted
Source information;
Inquiry resource identification associated with resource information;
Resource identifier lists are sent to the first user terminal, wherein resource identifier lists include the resource mark inquired
Know;
When receiving the specified resource identification of the first user terminal transmission, inquiry associated with specified resource identification the
Two user terminals, wherein specified resource identification is the resource identification that user selects from resource identifier lists;
The first connection is sent to second user terminal and establishes information, and it includes the first user terminal that information is established in the first connection
Session initiation protocol SDP information;
After the confirmation for receiving the transmission of second user terminal receives information, information is established into the second connection and is sent to first
The SDP information that information includes second user terminal is established in user terminal, the second connection, and wherein second user terminal is receiving
First connection, which is established after information, to be sent the confirmation and receives information, so that the first user terminal and second user terminal are established and connected
It connects, and resource information associated with specified resource identification is obtained from second user terminal.
Preferably, when receiving the update request of the first user terminal transmission, by specified resource identification and the first user
Terminal is associated, wherein the first user terminal obtains resource information associated with specified resource identification from second user terminal
When send update request.
According to another aspect of the present invention, a kind of Resource Server for resource-sharing, including first interface list are provided
Member, extraction unit, the first query unit, the second query unit and second interface unit, wherein:
First interface unit, the resource inquiry request for receiving the transmission of the first user terminal;According to the first query unit
Instruction, resource identifier lists are sent to the first user terminal, wherein resource identifier lists include that the first query unit is looked into
The resource identification ask;
Extraction unit, for when first interface unit receives the resource inquiry request that the first user terminal is sent, carrying
Take out the resource information that resource inquiry request includes;
First query unit, for inquiring resource identification associated with resource information, instruction first interface unit will provide
Source identification list is sent to the first user terminal;
Second query unit, the specified resource identification for receiving the transmission of the first user terminal when first interface unit
When, second user terminal associated with specified resource identification is inquired, is arranged from resource identification wherein specified resource identification is user
The resource identification selected in table;
Second interface unit establishes information for sending the first connection to second user terminal, and information is established in the first connection
It include the session initiation protocol SDP information of the first user terminal;When the confirmation for receiving the transmission of second user terminal receives
After information, the second connection is established information and is sent to the first user terminal by instruction first interface unit, and information is established in the second connection
Include the SDP information of second user terminal, wherein second user terminal sends institute after receiving the first connection and establishing information
State confirmation and receive information, establish and connect so as to the first user terminal and second user terminal, and from second user terminal obtain with
The associated resource information of specified resource identification.
Preferably, Resource Server further includes associative cell, wherein:
Associative cell will specify when the update for receiving the transmission of the first user terminal when first interface unit is asked
Resource identification is associated with the first user terminal, wherein the first user terminal obtains and specified resource mark from second user terminal
The update request is sent when sensible associated resource information.
According to another aspect of the present invention, a kind of system for resource-sharing, including Resource Server, at least two are provided
A user terminal being connect with Resource Server, the user terminal being connect with Resource Server include the first user terminal and
Two user terminals, wherein:
First user terminal, for sending resource inquiry request to Resource Server, resource inquiry request includes resource
Information;After the resource identifier lists for receiving Resource Server transmission, money that user is selected from resource identifier lists
Specified resource identification is sent to Resource Server by source mark as specified resource identification;Receiving Resource Server hair
After information is established in the second connection sent, establishes and connect with second user terminal, and obtained and specified resource from second user terminal
Identify associated resource information;
Resource Server, for when receiving the resource inquiry request of the first user terminal transmission, extracting resource and looking into
The resource information that request includes is ask, associated with resource information resource identification is inquired, resource identifier lists are sent to the
One user terminal, wherein resource identifier lists include the resource identification inquired;When receive the first user terminal transmission
When specified resource identification, second user terminal associated with specified resource identification is inquired;First is sent to second user terminal
Information is established in connection, and the session initiation protocol SDP information that information includes the first user terminal is established in the first connection;Work as reception
After the confirmation sent to second user terminal receives information, information is established into the second connection and is sent to the first user terminal, wherein
The SDP information that information includes second user terminal is established in second connection;
Second user terminal takes after establishing information in the first connection for receiving Resource Server transmission to resource
Business device sends confirmation and receives information.
Preferably, Resource Server is the Resource Server that any of the above-described embodiment is related to.
Preferably, it further includes specified resource identification that the first connection, which is established in information,;
Second user terminal is additionally operable to after information is established in the first connection for receiving Resource Server transmission, judges second
Whether user terminal is local has resource information associated with specified resource identification, if second user terminal local has and finger
Determine the associated resource information of resource identification, then sending confirmation to Resource Server receives information.
Preferably, the first user terminal is specifically established PeerConnection with second user terminal and is connect.
Preferably, which further includes Web server, wherein:
Web server, for when the access request for receiving the user terminal transmission for not establishing connection with Resource Server
When, the user authentication information that access request includes is extracted, user authentication information is verified, when the authentication succeeds, to
The user terminal for not establishing connection with Resource Server sends Resource Server address information, is not taken with resource so as to described
The user terminal that business device establishes connection sends connection request using Resource Server address information to Resource Server;
Resource Server is additionally operable in the company for receiving the user terminal transmission for not establishing connection with Resource Server
When connecing request, establishes and connect with the user terminal for not establishing connection with Resource Server.
Preferably, resource service implement body is established with the user terminal for not establishing connection with Resource Server
WebSocket connections.
The present invention is instructed both sides while being initiated the connection by both sides' transmission other side's location information for progress resource-sharing,
The transmission for realizing resource, to realize distribution of the Various types of data resource under internet or other networks and share.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art
With obtain other attached drawings according to these attached drawings.
Fig. 1 is schematic diagram of the present invention for method one embodiment of resource-sharing.
Fig. 2 is schematic diagram of the present invention for Resource Server one embodiment of resource-sharing.
Fig. 3 is schematic diagram of the present invention for another embodiment of Resource Server of resource-sharing.
Fig. 4 is schematic diagram of the present invention for system one embodiment of resource-sharing.
Fig. 5 is schematic diagram of the present invention for another embodiment of system of resource-sharing.
Fig. 6 is the schematic diagram that user terminal of the present invention establishes connection one embodiment with Resource Server.
Fig. 7 is the schematic diagram of resource-sharing one embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Below
Description only actually at least one exemplary embodiment is illustrative, is never used as to the present invention and its application or makes
Any restrictions.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
Unless specifically stated otherwise, positioned opposite, the digital table of the component and step that otherwise illustrate in these embodiments
It is not limited the scope of the invention up to formula and numerical value.
Simultaneously, it should be appreciated that for ease of description, the size of attached various pieces shown in the drawings is not according to reality
Proportionate relationship draw.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
In shown here and discussion all examples, any occurrence should be construed as merely illustrative, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it need not be further discussed in subsequent attached drawing in a attached drawing.
Fig. 1 is schematic diagram of the present invention for method one embodiment of resource-sharing.Preferably, the method for the present embodiment
Step can be executed by Resource Server.
Step 101, it when receiving the resource inquiry request of the first user terminal transmission, extracts in resource inquiry request
Including resource information.
Step 102, resource identification associated with resource information is inquired.
Resource is stored in the form of binary file in the server, and each file can be divided into multiple files
Block, each blocks of files can correspond to a resource identification(A for example, integer).
Step 103, resource identifier lists are sent to the first user terminal, wherein resource identifier lists include inquiring
Resource identification.
Step 104, when receiving the specified resource identification of the first user terminal transmission, inquiry and specified resource identification phase
Associated second user terminal.Wherein specified resource identification is the resource identification that user selects from resource identifier lists.
Determine that the resource is stored in second user terminal by the step.
Step 105, it sends the first connection to second user terminal and establishes information, it includes first that information is established in the first connection
The SDP of user terminal(Session Description Protocol, session initiation protocol)Information.
Step 106, after the confirmation for receiving the transmission of second user terminal receives information, information hair is established into the second connection
The first user terminal is given, the SDP information that information includes second user terminal is established in the second connection.
Wherein second user terminal sends the confirmation after receiving the first connection and establishing information and receives information, so as to the
One user terminal is established with second user terminal and is connected, and obtains money associated with specified resource identification from second user terminal
Source information.
That is, the first user terminal utilizes the SDP information of second user terminal, second user terminal to utilize the first user terminal
SDP information, to realize that the connection of the first user terminal and second user terminal is established.
Based on the method for resource-sharing that the above embodiment of the present invention provides, pass through the both sides for progress resource-sharing
Other side's location information is transmitted, both sides is instructed while initiating the connection, realize the transmission of resource, exist to realize Various types of data resource
Distribution under internet or other networks with it is shared.
Preferably, when receiving the update request of the first user terminal transmission, by specified resource identification and the first user
Terminal is associated, wherein the first user terminal obtains resource information associated with specified resource identification from second user terminal
When send update request.
That is, after the first user terminal and second user terminal establish connection, and the first user terminal is from second user
When terminal obtains resource information associated with specified resource identification, update request is sent to Resource Server, that is, notify
Resource Server is also stored with resource information associated with specified resource identification in the first user terminal, consequently facilitating resource
Server is managed distributed resource.
Fig. 2 is schematic diagram of the present invention for Resource Server one embodiment of resource-sharing.As shown in Fig. 2, resource
Server includes that first interface unit 201, extraction unit 202, the first query unit 203, the second query unit 204 and second connect
Mouth unit 205.Wherein:
First interface unit 201, the resource inquiry request for receiving the transmission of the first user terminal;According to the first cargo tracer
Resource identifier lists are sent to the first user terminal, wherein resource identifier lists include the first cargo tracer by the instruction of member 203
The resource identification that member inquires.
Extraction unit 202, for connecing 201 resource inquiry requests for receiving the transmission of the first user terminal when first interface unit
When, extract the resource information that resource inquiry request includes.
First query unit 203 indicates first interface unit for inquiring resource identification associated with resource information
Resource identifier lists are sent to the first user terminal by 201;
Second query unit 204, the specified resource for receiving the transmission of the first user terminal when first interface unit 201
When mark, associated with specified resource identification second user terminal is inquired, wherein specified resource identification is user from resource mark
Know the resource identification selected in list;
Second interface unit 205 establishes information for sending the first connection to second user terminal, and letter is established in the first connection
Breath includes the session initiation protocol SDP information of the first user terminal;When the confirmation for receiving the transmission of second user terminal connects
After by information, the second connection is established information and is sent to the first user terminal by instruction first interface unit 201, and the second connection is established
Information includes the SDP information of second user terminal, and wherein second user terminal is sent out after receiving the first connection and establishing information
It send the confirmation to receive information, so that the first user terminal and second user terminal are established and connected, and is obtained from second user terminal
Take resource information associated with specified resource identification.
Based on the above embodiment of the present invention provide the Resource Server for resource-sharing, by for progress resource-sharing
Both sides transmit other side's location information, instruct both sides while initiating the connection, realize the transmission of resource, to realize Various types of data
Distribution of the resource under internet or other networks with it is shared.
Preferably, Resource Server is established WebSocket with the first user terminal and second user terminal and is connect, and first uses
Family terminal is established PeerConnection with second user terminal and is connected.
Fig. 3 is schematic diagram of the present invention for another embodiment of Resource Server of resource-sharing.With embodiment illustrated in fig. 2
It compares, in the embodiment shown in fig. 3, Resource Server further includes associative cell 301.Wherein:
Associative cell 301, when the update for receiving the transmission of the first user terminal when first interface unit 201 is asked,
Specified resource identification and the first user terminal are associated, wherein the first user terminal is obtained and specified from second user terminal
The update request is sent when the associated resource information of resource identification.
Fig. 4 is schematic diagram of the present invention for system one embodiment of resource-sharing.As shown in figure 4, the system includes
The user terminal that Resource Server 403, at least two is connect with Resource Server, in the user terminal being connect with Resource Server
Including the first user terminal 401 and second user terminal 402.Wherein:
First user terminal 401, for sending resource inquiry request to Resource Server, resource inquiry request includes money
Source information;After the resource identifier lists for receiving Resource Server transmission, user is selected from resource identifier lists
Specified resource identification is sent to Resource Server 403 by resource identification as specified resource identification;Receiving resource service
After information is established in the second connection that device 403 is sent, establishes and connect with second user terminal 402, and obtained from second user terminal 402
Take resource information associated with specified resource identification.
Resource Server 403, for when receiving the resource inquiry request of the first user terminal 401 transmission, extracting
The resource information that resource inquiry request includes inquires resource identification associated with resource information, resource identifier lists is sent out
The first user terminal 401 is given, wherein resource identifier lists include the resource identification inquired;It is whole when receiving the first user
When the specified resource identification that end 401 is sent, second user terminal associated with specified resource identification 402 is inquired;It is used to second
Family terminal 402 sends the first connection and establishes information, and the conversation initial that information includes the first user terminal 401 is established in the first connection
Change agreement SDP information;After the confirmation for receiving the transmission of second user terminal 402 receives information, information is established into the second connection
It is sent to the first user terminal 401, wherein the SDP information that information includes second user terminal 402 is established in the second connection;
Second user terminal 402, after establishing information in the first connection for receiving the transmission of Resource Server 403, to
Resource Server 403 sends confirmation and receives information.
Based on the system for resource-sharing that the above embodiment of the present invention provides, pass through the both sides for progress resource-sharing
Other side's location information is transmitted, both sides is instructed while initiating the connection, realize the transmission of resource, exist to realize Various types of data resource
Distribution under internet or other networks with it is shared.
It is attached with Resource Server 403 in general, also having other user terminals, as an example, being shown in FIG. 4
The third user terminal 404 being connect with Resource Server 403.
Preferably, Resource Server 403 is the Resource Server that any embodiment is related in Fig. 2 or Fig. 3.
Preferably, the first connection for second user terminal 402 being sent in Resource Server 403 is established in information, is also wrapped
Include specified resource identification.Second user terminal 402 is additionally operable to establish letter in the first connection for receiving the transmission of Resource Server 403
After breath, judge whether second user terminal local has resource information associated with specified resource identification, if second user is whole
End is local to have resource information associated with specified resource identification, then sending confirmation to Resource Server 403 receives information.
Pass through the verification to specifying resource identification as a result, it can be ensured that the first user terminal can be from second user terminal
Obtain corresponding resource information.
Preferably, Resource Server establishes WebSocket connections, the first user terminal tool with user terminal connected to it
Body is established PeerConnection with second user terminal and is connect.
Fig. 5 is schematic diagram of the present invention for another embodiment of system of resource-sharing.If as shown in figure 5, not with resource
The user terminal 501 that server establishes connection wishes to connect with the foundation of Resource Server 503, can be carried out by Web server 502
Connection.Concrete operations are as follows:
When receiving the access request of the transmission of user terminal 501, extract access request includes Web server 502
User authentication information, user authentication information is verified, when the authentication succeeds, to user terminal 501 send resource service
Device address information, so that user terminal 501 sends connection request using Resource Server address information to Resource Server 503.
Resource Server 503 is additionally operable to when receiving the connection request of the transmission of user terminal 501, with user terminal 501
Establish connection.
Preferably, resource service implement body is established with the user terminal for not establishing connection with Resource Server
WebSocket connections.
Below by specific example, the present invention will be described.
Fig. 6 is the schematic diagram that user terminal of the present invention establishes connection one embodiment with Resource Server.System architecture is:
Web server is configured to Apache+PHP, network address www.abc.com, and Resource Server is configured to Node.js, IP
Location is 10.11.12.13, and user terminal is configured with Web browser, is configured to Chrome28.
Step 601, user terminal sends access request to Web server.
Chrome browsers pass through HTML protocol access Web server network address www.abc.com.User is in logging in wire side
It inputs the authentication informations such as user name, password and submits.
Step 602, Web server extracts the user authentication information that access request includes, to user authentication information into
Row verification.
Step 603, when the authentication succeeds, Resource Server address information is sent to user terminal.
Address information includes the HTML and JavaScript of Resource Server address and port information and user terminal
Realization code.
If the authentication is passed, client.html files are issued to client, client.html files are generally using as follows
The JavaScript that mode loads client realizes code.
Resource Server address information is contained in client.html files, such as IP address 10.11.12.13 and port
1337。
Step 604, user terminal is established WebSocket with Resource Server using Resource Server address information and is connect.
The browser of user terminal executes Web client JavaScript code, and according to Resource Server address, with money
Source server establishes WebSocket connections(Based on TCP).The JavaScript code for creating WebSocket client objects is logical
Often there is following form:
var socket=new WebSocket('ws://10.11.12.13:1337/')
Equally, Resource Server is also required to establish the company that WebSocket Sever objects monitor client in 1337 ports
Connect application.Both sides establish WebSocket connections by protocol handshake, can send instruction mutually by send functions later.Refer to
Order is the message format that both sides pre-define, and may include JSON objects, text or arbitrary binary data etc..
The addEventListener function registration Message Processing call back functions that client passes through calling socket objects.
OnMessage functions carry out respective handling operation according to the message content that parameter is passed to, specially:
socket.addEventListener("message",onMessage,false)
Resource Server can connect multiple client simultaneously.
Local SDP information is obtained by browser client using the createOffer functions of PeerConnection objects,
Wherein:
var offer=pc1.createOffer(null);
varsdpMessg=offer.toSdp();
SdpMessg variables save local SDP information in the form of text.Client should by WebSocket connections
SDP message is sent to Resource Server, and Resource Server stores the SDP message.
Fig. 7 is the schematic diagram of resource-sharing one embodiment of the present invention.
Step 701, the first user terminal sends resource inquiry request to Resource Server, is wherein wrapped in resource inquiry request
Include resource information;
Step 702, Resource Server is when receiving the resource inquiry request of the first user terminal transmission, inquiry and resource
The associated resource identification of information.
Step 703, resource identifier lists are sent to the first user terminal by Resource Server, wherein in resource identifier lists
Including the resource identification inquired.
Step 704, when user selects specified resource identification from resource identifier lists, specified resource identification is sent
To Resource Server.
Step 705, Resource Server is inquired and specified when receiving the specified resource identification of the first user terminal transmission
The associated second user terminal of resource identification.
Step 706, Resource Server sends the first connection to second user terminal and establishes information, and information is established in the first connection
It include the SDP information of the first user terminal.
Step 707, second user terminal confirms to Resource Server transmission receives information.
Preferably, the first connection, which is established in information, may include specified resource identification, and second user terminal is determining local tool
After having resource information associated with specified resource identification, sends confirmation to Resource Server and receive information.
Step 708, Resource Server is after the confirmation for receiving the transmission of second user terminal receives information, by the second connection
It establishes information and is sent to the first user terminal, the SDP information that information includes second user terminal is established in the second connection.
Step 709, the first user terminal and second user terminal are utilized respectively the SDP information and first of second user terminal
The SDP information of user terminal establishes PeerConnection connections, and carries out resource transmission with DataChannel.
The concrete mode for establishing PeerConnection is:
The mode of establishing of PeerConnection objects is:
var pc=new webkitPeerConnection("STUN stun.l.google.com:19302",
onSignal)
Wherein " STUN stun.l.google.com:19302 " be STUN server address, for carry out fire wall or
NAT is passed through.
Step 710, the first user terminal the resource block of reception is written using the File System API of HTML5 local
The corresponding position of cache file.Specific processing is as follows:
var tempFS=requestFileSystem(TEMPORARY,1024*1024);// to file system application magnetic
Disk space
var logFile=tempFS.root.getFile("local.txt",{create:true});// create locally
File
var fileWriter=logFile.createWriter();// initialization written document object
fileWriter.seek(idx*nBlockLen);// it is moved to the corresponding writing position of resource piecemeal
var bb=new BlobBuilder();// initialization write-in data
bb.append('Lorem Ipsum');
fileWriter.write(bb.getBlob('text/plain'))
Step 711, the first user terminal to Resource Server send update request, with notify Resource Server transmission at
Work(.
Step 712, the incidence relation of Resource Server update resource identification and user terminal.
It present invention can apply to distribution of the various data resources under internet or other networks and shares, as file is total
Enjoy, file download, multimedia broadcasting, multimedia communication, the application scenarios such as Distributed Calculation.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
Description of the invention provides for the sake of example and description, and is not exhaustively or will be of the invention
It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches
It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those skilled in the art is enable to manage
Various embodiments with various modifications of the solution present invention to design suitable for special-purpose.
Claims (10)
1. a kind of method for resource-sharing, which is characterized in that the method is executed by explorer, wherein:
When receiving the resource inquiry request of the first user terminal transmission, the resource letter that resource inquiry request includes is extracted
Breath;
Inquiry resource identification associated with resource information;
Resource identifier lists are sent to the first user terminal, wherein resource identifier lists include the resource identification inquired;
When receiving the specified resource identification of the first user terminal transmission, inquiry associated with specified resource identification second is used
Family terminal, wherein specified resource identification is the resource identification that user selects from resource identifier lists;
The first connection is sent to second user terminal and establishes information, and the meeting that information includes the first user terminal is established in the first connection
Talk about initializtion protocol SDP information;
After the confirmation for receiving the transmission of second user terminal receives information, information is established into the second connection and is sent to the first user
The SDP information that information includes second user terminal is established in terminal, the second connection, and wherein second user terminal is receiving first
Connection, which is established after information, to be sent the confirmation and receives information, so that the first user terminal and second user terminal are established and are connected, and
Resource information associated with specified resource identification is obtained from second user terminal.
2. according to the method described in claim 1, it is characterized in that,
When receiving the update request of the first user terminal transmission, specified resource identification and the first user terminal are closed
Connection, wherein when the first user terminal obtains resource information associated with specified resource identification from second user terminal described in transmission
Update request.
3. a kind of Resource Server for resource-sharing, which is characterized in that including first interface unit, extraction unit, first
Query unit, the second query unit and second interface unit, wherein:
First interface unit, the resource inquiry request for receiving the transmission of the first user terminal;According to the finger of the first query unit
Show, resource identifier lists is sent to the first user terminal, wherein resource identifier lists include that the first query unit inquires
Resource identification;
Extraction unit, for when first interface unit receives the resource inquiry request that the first user terminal is sent, extracting
The resource information that resource inquiry request includes;
First query unit indicates first interface unit by resource mark for inquiring resource identification associated with resource information
Know list and is sent to the first user terminal;
Second query unit, for when first interface unit receives the specified resource identification that the first user terminal is sent, looking into
Second user terminal associated with specified resource identification is ask, is selected from resource identifier lists wherein specified resource identification is user
The resource identification selected out;
Second interface unit establishes information for sending the first connection to second user terminal, and the first connection, which is established in information, wraps
Include the session initiation protocol SDP information of the first user terminal;When the confirmation for receiving the transmission of second user terminal receives information
Afterwards, the second connection is established information and is sent to the first user terminal by instruction first interface unit, and the second connection, which is established in information, wraps
The SDP information of second user terminal is included, wherein second user terminal sends described true after receiving the first connection and establishing information
Recognize and receive information, establish and connect with second user terminal so as to the first user terminal, and obtains and specify from second user terminal
The associated resource information of resource identification.
4. Resource Server according to claim 3, which is characterized in that Resource Server further includes associative cell, wherein:
Associative cell, when the update for receiving the transmission of the first user terminal when first interface unit is asked, by specified resource
Mark is associated with the first user terminal, wherein the first user terminal obtains and specified resource identification phase from second user terminal
The update request is sent when associated resource information.
5. a kind of system for resource-sharing, which is characterized in that connect with Resource Server including Resource Server, at least two
The user terminal connect, the user terminal being connect with Resource Server include the first user terminal and second user terminal, wherein:
First user terminal, for sending resource inquiry request to Resource Server, resource inquiry request includes resource information;
After the resource identifier lists for receiving Resource Server transmission, resource identification that user is selected from resource identifier lists
It is sent to Resource Server as specified resource identification, and by specified resource identification;Receiving the of Resource Server transmission
It after information is established in two connections, establishes and connects with second user terminal, and obtained and specified resource identification phase from second user terminal
Associated resource information;
Resource Server, for when receiving the resource inquiry request of the first user terminal transmission, extracting resource query and asking
The resource information for including is sought, resource identification associated with resource information is inquired, resource identifier lists is sent to the first use
Family terminal, wherein resource identifier lists include the resource identification inquired;When receiving the specified of the first user terminal transmission
When resource identification, second user terminal associated with specified resource identification is inquired;The first connection is sent to second user terminal
Information is established, the session initiation protocol SDP information that information includes the first user terminal is established in the first connection;When receiving
After the confirmation that two user terminals are sent receives information, information is established into the second connection and is sent to the first user terminal, wherein second
The SDP information that information includes second user terminal is established in connection;
Second user terminal, after establishing information in the first connection for receiving Resource Server transmission, to Resource Server
It sends confirmation and receives information.
6. system according to claim 5, which is characterized in that
Resource Server is the Resource Server involved in claim 3 or 4.
7. system according to claim 5, which is characterized in that
It further includes specified resource identification that first connection, which is established in information,;
Second user terminal is additionally operable to after information is established in the first connection for receiving Resource Server transmission, judges second user
Whether terminal local has resource information associated with specified resource identification, if second user terminal local has and specified money
Source identifies associated resource information, then sending confirmation to Resource Server receives information.
8. system according to claim 5, which is characterized in that
First user terminal is specifically established PeerConnection with second user terminal and is connect.
9. system according to claim 5, which is characterized in that further include Web server, wherein:
Web server, for when receiving the access request that the user terminal for not establishing connection with Resource Server is sent, carrying
Take out the access request user authentication information that includes, user authentication information verified, when the authentication succeeds, to it is described not
The user terminal that connection is established with Resource Server sends Resource Server address information, is not built with Resource Server so as to described
The user terminal of vertical connection sends connection request using Resource Server address information to Resource Server;
Resource Server is additionally operable to ask in the connection for receiving the user terminal transmission for not establishing connection with Resource Server
When asking, establishes and connect with the user terminal for not establishing connection with Resource Server.
10. system according to claim 9, which is characterized in that
Resource service implement body establishes WebSocket connections with the user terminal for not establishing connection with Resource Server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310629143.4A CN104683403B (en) | 2013-11-29 | 2013-11-29 | For the method for resource-sharing, Resource Server and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310629143.4A CN104683403B (en) | 2013-11-29 | 2013-11-29 | For the method for resource-sharing, Resource Server and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104683403A CN104683403A (en) | 2015-06-03 |
CN104683403B true CN104683403B (en) | 2018-09-14 |
Family
ID=53317991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310629143.4A Active CN104683403B (en) | 2013-11-29 | 2013-11-29 | For the method for resource-sharing, Resource Server and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104683403B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105245508B (en) * | 2015-09-23 | 2018-08-10 | 暴风集团股份有限公司 | A kind of method and system that cross-platform data is shared |
CN105959827A (en) * | 2016-04-22 | 2016-09-21 | 深圳市茁壮网络股份有限公司 | Data interaction method, set top box, and front-end server |
CN107135531A (en) * | 2017-04-21 | 2017-09-05 | 努比亚技术有限公司 | Resource share method and device |
CN107945855A (en) * | 2017-11-29 | 2018-04-20 | 湖南暄程科技有限公司 | A kind of Medical data sharing method and system |
CN111050186A (en) * | 2019-11-06 | 2020-04-21 | 石家庄微泽科技有限公司 | Method for improving reliability of VR panoramic live broadcast system |
CN112788090B (en) * | 2020-05-08 | 2023-06-23 | 珠海金山办公软件有限公司 | Network resource transmission method, device and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101132340A (en) * | 2006-08-22 | 2008-02-27 | 中国科学院声学研究所 | Signaling control method for P2P network sharing service based on IMS |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7853939B2 (en) * | 2005-09-21 | 2010-12-14 | Qwikker, Inc. | Device-aware content delivery |
-
2013
- 2013-11-29 CN CN201310629143.4A patent/CN104683403B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101132340A (en) * | 2006-08-22 | 2008-02-27 | 中国科学院声学研究所 | Signaling control method for P2P network sharing service based on IMS |
Also Published As
Publication number | Publication date |
---|---|
CN104683403A (en) | 2015-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109274634B (en) | Multimedia communication method and device, and storage medium | |
CN104683403B (en) | For the method for resource-sharing, Resource Server and system | |
KR102153645B1 (en) | Data transmission method and apparatus | |
US9467650B2 (en) | Method and apparatus for transmitting media stream in video conference | |
KR101877188B1 (en) | Service layer interworking using mqtt protocol | |
CN104253857B (en) | Virtual WEB real-time Communication for Power agency is with and related methods, system back-to-back | |
CN108259542B (en) | Resource transmission method and device | |
CN105282008B (en) | Enhance the method and system of media characteristic during real-time Communication for Power Network interactive sessions | |
CN114095557B (en) | Data processing method, device, equipment and medium | |
CN104253742A (en) | Virtual web real-time communications (WEBRTC) gateways, and related methods and systems | |
CN106105158B (en) | For establishing the method and system of connection between searchers's device and destination apparatus | |
CN102868728A (en) | Network proxy method based on virtual channel in virtual desktop infrastructure (VDI) environment | |
KR20120071576A (en) | Method, device and system for real-time publish subscribe discovery based on distributed hash table | |
WO2022002069A1 (en) | Method for accessing network, media gateway, electronic device, and storage medium | |
CN112165449B (en) | Control method of real-time authority of web application, electronic device and storage medium | |
CN114666306B (en) | WebRTC network connection establishment method, server, electronic device and computer readable storage medium | |
CN104601649A (en) | Method and system for providing origin insight for web applications | |
CN116055473A (en) | Distributed deployment cloud rendering method and system based on WEB | |
US8171147B1 (en) | System, method, and/or apparatus for establishing peer-to-peer communication | |
KR20220006605A (en) | Cloud communication method and device, user device, network device | |
JP6393475B2 (en) | Communication adapter device, communication system, tunnel communication method, and program | |
EP2671366B1 (en) | Determining a location address for shared data | |
Benomar et al. | A cloud-based and dynamic dns approach to enable the web of things | |
CN104168302B (en) | Equipment manipulation implementation method, system and proxy gateway | |
CN110430478B (en) | Networking communication method, device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |