CN103248652A - Method and system for data transmission between client and webpage end - Google Patents

Method and system for data transmission between client and webpage end Download PDF

Info

Publication number
CN103248652A
CN103248652A CN2012100288804A CN201210028880A CN103248652A CN 103248652 A CN103248652 A CN 103248652A CN 2012100288804 A CN2012100288804 A CN 2012100288804A CN 201210028880 A CN201210028880 A CN 201210028880A CN 103248652 A CN103248652 A CN 103248652A
Authority
CN
China
Prior art keywords
client
data
webpage end
event
webpage
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.)
Granted
Application number
CN2012100288804A
Other languages
Chinese (zh)
Other versions
CN103248652B (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210028880.4A priority Critical patent/CN103248652B/en
Publication of CN103248652A publication Critical patent/CN103248652A/en
Application granted granted Critical
Publication of CN103248652B publication Critical patent/CN103248652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and system for data transmission between a client and a webpage end, and relates to the field of communication. The method reduces the cost and communication burden of data transmission between the client and the webpage end. The method comprises the following steps: a webpage end receives data, executes an event corresponding to the data, invokes a first interface provided by the client and performing data transmission with the webpage end, and sends the data to the client; and after learning that the webpage end invokes the first interface, the client receives the data, handles the data, and executes the event corresponding to the data. The method and the system both disclosed by the embodiment of the invention are mainly used for data transmission between the client and the webpage end so as to realize a synchronous data display process of the webpage end and the client.

Description

The method and system of client and webpage end transmission data
Technical field
The present invention relates to the communications field, relate in particular to the method and system of a kind of client and webpage end transmission data.
Background technology
Web game has just constantly been groped middle development since releasing, various new technologies also constantly incorporate.The particularly realization of the data interchange technology of client and webpage end makes the network game industry scintillating.This interworking technology has been broken the fixed pattern that web game exploitation is in the past only played at the webpage end, makes web game that the lifting of matter all arranged on technology, the fine arts, the recreation quality, has overcome the restriction of current browser technology to greatest extent.
The data sync of client and webpage end is embodied on the data interchange of client and webpage, make and to carry out intercommunication between user by the login of the Web page and the user by the client login, be in webpage end or the client resulting data of playing no matter reached, can remain on the other end.The technology of present client and web data intercommunication is mainly passed through the data center of server device, the data of client or webpage are transmitted to the opposite end realizes, concrete, when client sends data to the webpage end, client sends this data center with data earlier, and by this data center these data is sent to the webpage end; Same, when the webpage end sent data to client, the webpage end sent the data to this data center earlier, sends the data to client by this data center again.
State in realization in the process of data sync of client and webpage end, the inventor finds that there are the following problems at least in the prior art: realize the mutual of client and webpage end data, must data be transmitted and could realize by data center, thereby the mutual a large amount of bandwidth of use that needs of the client of making and webpage end, and, when the user is many, need to increase more server and support the mutual of client and webpage end data, make that the cost of realizing client and webpage end transmission data is higher, and the communication burden is heavier.
Summary of the invention
Embodiments of the invention provide the method and system of a kind of client and webpage end transmission data, have reduced cost and the communication burden of client and webpage end transmission data.
For achieving the above object, embodiments of the invention adopt following technical scheme:
The method of a kind of client and webpage end transmission data comprises:
The webpage termination is received data, carries out the event of described data correspondence, and call that client provides carry out first interface of transfer of data with described webpage end, send described data to described client;
Described client receives described data, and described data is handled after knowing that described webpage end calls described first interface, carries out the event of described data correspondence.
The system of a kind of client and webpage end transmission data comprises: webpage end and client;
Described webpage end be used for to receive data, carries out the event of described data correspondence, and call that described client provides carry out first interface of transfer of data with described webpage end, send described data to described client;
Described client is used for receiving described data, and described data being handled after knowing that described webpage end calls described first interface, carries out the event of described data correspondence.
The method and system of the client that the embodiment of the invention provides and webpage end transmission data, with transmit data by data center in the prior art and could realize that transfer of data between the two compares, it can be after the webpage termination be received data, by first interface that carries out transfer of data with described webpage end that provides with client these data are sent to client, the data that make the webpage end send to client do not need through the forwarding of data center and directly transmission, make the mutual needed bandwidth of client and webpage end reduce, and then when the user is many, do not need to increase more server and support the mutual of client and webpage end data, thereby the cost and the communication that have reduced client and webpage end transmission data are born.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow diagram of a kind of client and webpage end transmission data in the embodiment of the invention 1;
Fig. 2 shows the design sketch that receives the corresponding event of data simultaneously for client in the embodiment of the invention 1 and webpage end;
Fig. 3 is the method flow diagram of another kind of client and webpage end transmission data in the embodiment of the invention 1;
Fig. 4 is the method flow diagram of another kind of client and webpage end transmission data in the embodiment of the invention 1;
Fig. 5 stops to carry out the design sketch that receives the corresponding event of data simultaneously for client in the embodiment of the invention 1 and webpage end;
Fig. 6 is the block diagram of system of client and webpage end transmission data in the embodiment of the invention 2.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment 1
The embodiment of the invention provides the method for a kind of client and webpage end transmission data, and as shown in Figure 1, this method comprises:
101, the webpage termination is received data, carries out the event of described data correspondence, and call that client provides carry out first interface of transfer of data with described webpage end, send described data to described client.
Wherein, first interface that carries out transfer of data with the webpage end that described client provides can be physical interface; also can be software interface; the concrete embodiment of the invention does not limit this; as long as it can realize the interface of the transfer of data of webpage end and client, all belong to the scope of embodiment of the invention protection.When it is software interface, for example, when the script of described client Web exploitation is that (JavaScript, it is a kind of based on object and event-driven and have the client script language of relative safety to JS.Simultaneously also be a kind of script that is widely used in client Web exploitation) time, described first interface that calls is for revising the location attribute of client; When the script of client Web exploitation was other language, it can be the attribute with corresponding function, and the embodiment of the invention does not limit this.
102, described client receives described data, and described data is handled after knowing that described webpage end calls described first interface, carries out the event of described data correspondence.
Based on the method for above-mentioned client and webpage end transmission data, be for user's experience: the webpage end shows the corresponding event of data that receives simultaneously with client.For example, as shown in Figure 2, when QQ user receives message, the prompting that all can initiate a message simultaneously of webpage end and client.Wherein, when the user receives good friend's "~evil U.S. " the message of sending, prompting message 1 is the icon of "~evil beautiful " among my good friend and the information indicating icon on the good friend left side that prompting message 2 is me, and prompting message 3 is the application program in the client task hurdle (the lower left corner circle of Fig. 2 is schemed), and prompting simultaneously all can initiate a message.Wherein, the prompting message of the icon of "~evil U.S. " among my good friend and the information indicating icon on my good friend left side is the prompting message of webpage end, and the prompting message in the client task hurdle is the prompting message of client.
After webpage end and client were all carried out the event of described data correspondence, the user both can carry out operation response to described event at the webpage end, also can carry out operation response to described event in client, and the concrete embodiment of the invention does not limit this; Though but at any end described event is carried out operation response, the other end all can be carried out this operation response.Concrete,
When client receives when receiving the response of the corresponding event of data, the embodiment of the invention also provides following client and webpage end to transmit the method for data, and as shown in Figure 3, this method comprises:
201, described client stops the execution of described event after the response that receives described event, and call that described webpage end provides carry out second interface of transfer of data with described client, send the response of described event to described webpage end.
Need to prove, after the event of the described data correspondence of client executing, this event can be shown to the user, after the user sees this event, can carry out a response to this event, namely this event is had the operation of a client, client can stop the execution of this event after the response that receives described event; And in order to make the webpage end know that the client user is to the response of this event, also stop the execution of this event of webpage end, what client can call that described webpage end provides carries out second interface of transfer of data with described client, sends the response of described event to described webpage end.
202, after described webpage termination is received the response of described event, stop carrying out described event.
Receive that when the webpage termination when receiving the response of the corresponding event of data, the embodiment of the invention also provides following client and webpage end to transmit the method for data, as shown in Figure 4, this method comprises:
301, described webpage end stops the execution of described event after the response that receives described event, and sends the response of described event to described client by described first interface.
302, after described client receives the response of described event, stop carrying out described event.
Method based on above-mentioned client and webpage end transmission data, be for user's experience: after webpage end and client show the corresponding event of reception data simultaneously, no matter the user carries out operation response at the webpage end or in client to described event, the other end also can be carried out this operation response.For example, as shown in Figure 5, after QQ user receives message, and webpage end and client all can initiate a message simultaneously and remind; The user clicks this prompting message 3 in client, and the prompting message of client disappears, and the prompting message 1 and 2 of webpage end also disappears simultaneously, and all returns to and can receive the good friend and do not send message state before.
The embodiment of the invention, with transmit data by data center in the prior art and could realize that transfer of data between the two compares, it can be after the webpage termination be received data, by first interface that carries out transfer of data with described webpage end that provides with client these data are sent to client, the data that make the webpage end send to client do not need through the forwarding of data center and directly transmission, make the mutual needed bandwidth of client and webpage end reduce, and then when the user is many, do not need to increase more server and support the mutual of client and webpage end data, thereby the cost and the communication that have reduced client and webpage end transmission data are born.
And, in the embodiment of the invention, when client is transmitted data to the webpage end, second interface that carries out transfer of data with described client that client also can provide by the webpage end transfers data to the webpage end, the data that make client send to the webpage end do not need through the forwarding of data center and directly transmission, make the mutual needed bandwidth of client and webpage end further reduce, when the user is many, more do not need to increase more server and support data interaction between client and the webpage end, thereby further reduced cost and the communication burden of client and webpage end transmission data.
Embodiment 2
The embodiment of the invention provides the system of a kind of client and webpage end transmission data, and as shown in Figure 6, this system comprises: webpage end 41 and client 42.
Described webpage end 41 is used for receiving data, carries out the event of described data correspondence, and first interface that described client 42 webpage ends 41 that provide and described carry out transfer of data is provided, and sends described data to described client 42.Wherein, first interface that carries out transfer of data with the webpage end that described client provides can be physical interface; also can be software interface; the concrete embodiment of the invention does not limit this; as long as it can realize the interface of the transfer of data of webpage end and client, all belong to the scope of embodiment of the invention protection.When it is software interface, for example, when the script of described client Web exploitation is that (JavaScript, it is a kind of based on object and event-driven and have the client script language of relative safety to JS.Simultaneously also be a kind of script that is widely used in client Web exploitation) time, described first interface that calls is for revising the location attribute of client; When the script of client Web exploitation was other language, it can be the attribute with corresponding function, and the embodiment of the invention does not limit this.
Described client 42 is used for receiving described data, and described data being handled after knowing that described webpage end 41 calls described first interface, carries out the event of described data correspondence.
Further alternative, after webpage end and client are all carried out the event of described data correspondence, the user both can carry out operation response to described event at the webpage end, also can carry out operation response to described event in client, and the concrete embodiment of the invention does not limit this; Though but at any end described event is carried out operation response, the other end all can be carried out this operation response.
When client 42 receives when receiving the response of the corresponding event of data, described client 42 also is used for, after the response that receives described event, stop the execution of described event, and second interface that described webpage end 41 clients 42 that provide and described are carried out transfer of data is provided, send the response of described event to described webpage end 41; Described webpage end 41 also is used for, receive the response of described event after, stop to carry out described event.
When webpage end 41 receives when receiving the response of the corresponding event of data, described webpage end 41 also is used for, after the response that receives described event, stop the execution of described event, and send the response of described event by described first interface to described client 42; Described client 42 also is used for, receive the response of described event after, stop to carry out described event.
Need to prove, the related client of system of client and webpage end transmission data and other descriptions of webpage end are provided in the embodiment of the invention, the associated description in can reference example 1, the embodiment of the invention will repeat no more herein.
The embodiment of the invention, with transmit data by data center in the prior art and could realize that transfer of data between the two compares, it can be after the webpage termination be received data, by first interface that carries out transfer of data with described webpage end that provides with client these data are sent to client, the data that make the webpage end send to client do not need through the forwarding of data center and directly transmission, make the mutual needed bandwidth of client and webpage end reduce, and then when the user is many, do not need to increase more server and support the mutual of client and webpage end data, thereby the cost and the communication that have reduced client and webpage end transmission data are born.
And, in the embodiment of the invention, when client is transmitted data to the webpage end, second interface that carries out transfer of data with described client that client also can provide by the webpage end transfers data to the webpage end, the data that make client send to the webpage end do not need through the forwarding of data center and directly transmission, make the mutual needed bandwidth of client and webpage end further reduce, when the user is many, more do not need to increase more server and support data interaction between client and the webpage end, thereby further reduced cost and the communication burden of client and webpage end transmission data.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk as computer, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (8)

1. the method for a client and webpage end transmission data is characterized in that, comprising:
The webpage termination is received data, carries out the event of described data correspondence, and call that client provides carry out first interface of transfer of data with described webpage end, send described data to described client;
Described client receives described data, and described data is handled after knowing that described webpage end calls described first interface, carries out the event of described data correspondence.
2. the method for client according to claim 1 and webpage end transmission data is characterized in that, also comprises:
Described client stops the execution of described event after the response that receives described event, and call that described webpage end provides carry out second interface of transfer of data with described client, send the response of described event to described webpage end;
After described webpage termination is received the response of described event, stop carrying out described event.
3. the method for client according to claim 1 and webpage end transmission data is characterized in that, also comprises:
Described webpage end stops the execution of described event after the response that receives described event, and sends the response of described event to described client by described first interface;
After described client receives the response of described event, stop carrying out described event.
4. according to the method for each described client of claim 1-3 and webpage end transmission data, it is characterized in that when the script of described client Web exploitation was JS, described first interface that calls was for revising the location attribute of client.
5. the system of a client and webpage end transmission data is characterized in that, comprising: webpage end and client;
Described webpage end be used for to receive data, carries out the event of described data correspondence, and call that described client provides carry out first interface of transfer of data with described webpage end, send described data to described client;
Described client is used for receiving described data, and described data being handled after knowing that described webpage end calls described first interface, carries out the event of described data correspondence.
6. the system of client according to claim 5 and webpage end transmission data is characterized in that,
Described client also is used for, and after the response that receives described event, stops the execution of described event, and call that described webpage end provides carry out second interface of transfer of data with described client, send the response of described event to described webpage end;
Described webpage end also is used for, receive the response of described event after, stop to carry out described event.
7. the system of client according to claim 6 and webpage end transmission data is characterized in that, also comprises:
Described webpage end also is used for, and after the response that receives described event, stops the execution of described event, and sends the response of described event to described client by described first interface;
Described client also is used for, receive the response of described event after, stop to carry out described event.
8. according to the system of each described client of claim 5-7 and webpage end transmission data, it is characterized in that when the script of described client Web exploitation was JS, described first interface that calls was for revising the location attribute of client.
CN201210028880.4A 2012-02-09 2012-02-09 Client transmits the method and system of data with page end Active CN103248652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210028880.4A CN103248652B (en) 2012-02-09 2012-02-09 Client transmits the method and system of data with page end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210028880.4A CN103248652B (en) 2012-02-09 2012-02-09 Client transmits the method and system of data with page end

Publications (2)

Publication Number Publication Date
CN103248652A true CN103248652A (en) 2013-08-14
CN103248652B CN103248652B (en) 2016-09-28

Family

ID=48927874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210028880.4A Active CN103248652B (en) 2012-02-09 2012-02-09 Client transmits the method and system of data with page end

Country Status (1)

Country Link
CN (1) CN103248652B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484186A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Design method based on web front end for data analysis
CN106293731A (en) * 2016-08-05 2017-01-04 浙江慧脑信息科技有限公司 A kind of client software method for designing to embedded webpage transmission much information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470773A (en) * 2007-12-25 2009-07-01 山东易通商业经纪有限公司 Method for implementing web page game system based on WEB browser
US20110126220A1 (en) * 2000-02-01 2011-05-26 Charles Schwab & Co., Inc. Method and Apparatus for Integrating Distributed Shared Services System
US20110295868A1 (en) * 2005-03-21 2011-12-01 O'farrell Robert Adapter architecture for mobile data system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110126220A1 (en) * 2000-02-01 2011-05-26 Charles Schwab & Co., Inc. Method and Apparatus for Integrating Distributed Shared Services System
US20110295868A1 (en) * 2005-03-21 2011-12-01 O'farrell Robert Adapter architecture for mobile data system
CN101470773A (en) * 2007-12-25 2009-07-01 山东易通商业经纪有限公司 Method for implementing web page game system based on WEB browser

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484186A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Design method based on web front end for data analysis
CN106293731A (en) * 2016-08-05 2017-01-04 浙江慧脑信息科技有限公司 A kind of client software method for designing to embedded webpage transmission much information
CN106293731B (en) * 2016-08-05 2019-06-28 浙江慧脑信息科技有限公司 A kind of client software design method to embedded webpage transmitting much information

Also Published As

Publication number Publication date
CN103248652B (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN103475953B (en) A kind of media control method and equipment based on desktop cloud
CN103067292A (en) Websocket-transmission-based load balancing method and device
CN111031058A (en) Websocket-based distributed server cluster interaction method and device
CN102308560B (en) Transmission method and device of media stream data in cloud calculative system
CN104348697B (en) The processing method of video communication information, apparatus and system
CN104394191A (en) Method, control terminal, and system for remotely controlling mobile terminal
CN103650458A (en) Transmission method, device and system of media streams
CN104426583A (en) Data transmission method based on near field communication and device thereof and near field communication equipment
CN104243281A (en) Voice communication method based on mobile Internet
CN103430489A (en) File download method, device, and system in content delivery network
CN101431520A (en) Method for establishing connection, method for re-orienting connection and correlated equipment
CN103973778A (en) Information pushing method and device
CN104244084A (en) Method and system for controlling playing of audio files and mobile terminal
CN110582998A (en) Group communication method and device, computer storage medium and computer equipment
CN110234140A (en) A kind of communication means, device, entity and storage medium
CN105682242A (en) Network resource scheduling method, device, system and network node
CN102137104B (en) Transmission control protocol (TCP) long-connection access control method and device
CN102882772A (en) Instant messaging data transmission method, client, server and system
CN105100150A (en) Cloud desktop migration method and apparatus, and distributed cloud desktop system
CN103248652A (en) Method and system for data transmission between client and webpage end
CN104753816A (en) RDMA (remote direct memory access) connection message processing method and related device
CN102065143A (en) Communication method and system based on HTTP (hyper Text Transfer Protocol), HTTP server and HTTP client
CN101938427B (en) Re-directing method and device in global load balance
CN105556905A (en) Page insertion method and device
CN111629020A (en) Remote input method, device, PC (personal computer) terminal, android device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190731

Address after: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: Tencent cloud computing (Beijing) limited liability company

Patentee after: Tencent Technology (Shenzhen) Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Futian District SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.

TR01 Transfer of patent right