CN102075531B - Method for transmitting data to client - Google Patents

Method for transmitting data to client Download PDF

Info

Publication number
CN102075531B
CN102075531B CN 201010621861 CN201010621861A CN102075531B CN 102075531 B CN102075531 B CN 102075531B CN 201010621861 CN201010621861 CN 201010621861 CN 201010621861 A CN201010621861 A CN 201010621861A CN 102075531 B CN102075531 B CN 102075531B
Authority
CN
China
Prior art keywords
data
client
content
server
propelling movement
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
CN 201010621861
Other languages
Chinese (zh)
Other versions
CN102075531A (en
Inventor
张昊阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN 201010621861 priority Critical patent/CN102075531B/en
Publication of CN102075531A publication Critical patent/CN102075531A/en
Application granted granted Critical
Publication of CN102075531B publication Critical patent/CN102075531B/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 for transmitting data to a client. The method comprises the following steps that: a server receives a transmission content data activation request transmitted by the client and sets a push content data event corresponding to the client initiating the request, wherein the push content data event comprises push time and push frequency, and the push time and the push frequency are set according to data quantity of the content data and the activity of the client; and the server executes the push content data event to push self-updated content data to the client according to the push frequency set in the push content data event after monitoring that the set time of the push content data event is up. By the method provided by the invention, the data quantity of the content data transmitted to the client by the server is balanced, and the client is not required to wait for receiving the content data, so that the fluency for a player to acquire corresponding information is effectively improved, the network flow of the client is reduced, congestion is avoided, and the experience of the player using the client is improved.

Description

A kind of is the method for client transmissions data
Technical field
The present invention relates to client in the computer realm and the interaction technique between the server, particularly a kind of is the method for client transmissions data.
Background technology
Along with the development of computer technology, also getting more and more alternately between client and the server.Such as, in MMOPRG (MMORPG), the client that the player uses need to be carried out data interaction with server.In reciprocal process, the efficient of transfer of data directly affects client that server usefulness and player use and the data transfer throughput between the server, and the delay when directly affecting player of the client that the player uses and the size of the data transfer throughput between the server.For MMORPG, the time length that postpones in blood-and-thunder fight has directly determined the player Experience Degree, so the data transfer throughput that reduces as far as possible between the client that server and player use is the important content of game developer when design games.
In carrying out game process, the data of transmitting between the client that the player uses and the server mainly contain two classes, one class is the action command interaction data, moves such as: player's self role and moves with the role who fights, controls other players and fight or player's self attribute change etc.This class data transfer data volume is smaller, processes behind direct requirement client or the server receive data, and does not need self storage; Another kind of is the content-data of bulk, this content-data can not be stored on the client and server as fixed resource, but dynamic change ground, need frequently to upgrade, and need to regularly or aperiodically be transferred to by server the client of request, such as, player's mail of the server event in the various notice informations in the game, the game or the tabulation of the server activity in the game or use client.
At present, in game process, for the content-data of bulk, transmission course is between the server and client side:
At first, user end to server sends and obtains the content-data request, and the sign that will obtain content-data is carried in this request;
Secondly, after server receives this request of client transmission, will be to all or part of client that sends to of the content-data that should ask;
In this step, the sign that will obtain content-data that server carries according to this request that client sends finds the content-data to asking;
At last, client upgrades the content-data of the correspondence of self storing behind the content-data of server transmission.
Although the employing said method can be in game process, be the content-data that sends bulk as player's client by server, but, but exist shortcoming: after receiving client-requested, just send, can cause the moment mass data amount between server and the client, and upgrade again after needing client awaits to receive data, so that use player's Experience Degree of client to reduce.
Summary of the invention
In view of this, the invention provides a kind of method of client transmissions data that is, the method can send the data volume of content-data by equalization server to client, and need not client awaits reception content-data, improves player's Experience Degree of using client.
For achieving the above object, technical scheme of the invention process specifically is achieved in that
A kind of is the method for client transmissions data, and the method comprises:
Server receives the activation transmitting content data request that client sends;
The corresponding client of initiating this request of server arranges the content-data event that pushes, and this propelling movement content-data event comprises propelling movement opportunity and propelling movement frequency, and propelling movement opportunity and propelling movement frequency are according to the liveness setting of data volume and the client of content-data;
After setting up the opportunity of the propelling movement content-data event that server monitoring is set, carry out the content-data event that pushes, according to pushing the propelling movement frequency of setting in the content-data event content-data that self upgrades is pushed to this client.
Whether described propelling movement opportunity also uses this content-data setting according to client is current, when server receive that client sends do not accept to push instruction the time, just propelling movement is set to endless opportunity.
The propelling movement frequency of described setting can adopt following formula to calculate:
Meta-sqrt(current time when abs(expection pushes-this client was enlivened the time last time)) the * weights;
Wherein, the expection propelling movement time sends the average frequency setting that activates the transmitting content data request according to generated frequency and the client of content-data; Enlivened last time of this client is this client liveness of the client liveness table record set up time on server; Weights are determined according to the amount of content data size; Sqrt represents to round behind the extraction of square root, and abs is for taking absolute value, and * represents to multiply each other, and-expression is subtracted each other.
When described client sent and activates transmitting content data request time interval and push the time greater than the expection that arranges, the propelling movement frequency in the set propelling movement content-data event of server reduced until be 0.
The process that the described content-data that self is upgraded is pushed to this client is:
Set up respectively the content-data storage queue on the server and client side, in the content-data storage queue, with the storage of content-data piecemeal corresponding blocks sign, when the server update content-data, the content-data piece that upgrades is stored in the front end of the content-data storage queue of server;
When server is pushed to this client with the content-data that self upgrades, after obtaining the block identification of current content data in the set content storage queue of client, the block identification all the elements data block before that is positioned at this content-data in the content storage queue that self is set sends to client.
As seen from the above technical solution, the present invention adopts the mode of active push that the content-data that upgrades on the server is sent to client, on propelling movement opportunity and frequency are selected, according to the liveness of client and will send amount of content data and determine.Like this, the present invention is just unlike prior art, causes the data volume of moment to increase during transmitting content data between the server and client side, and balanced server sends the data volume of content-data to client.Because the present invention adopts the mode transmitting content data of active push, rather than adopt prior art first by after the client-requested, received again the mode of content-data by client awaits, receive content-data so need not client awaits, improved player's Experience Degree of using client.In addition, when server sends the content-data that upgrades to client, only send the content-data of incremental update, so that the content-data transmission quantity between server and the client reduces, further improve the Experience Degree of player in game process of using client.
Description of drawings
Fig. 1 is the method flow diagram of client transmissions data that is provided by the invention;
Fig. 2 is the present invention when adopting formula (1) to push the content-data event, the client liveness that obtains and the schematic diagram that pushes frequency.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, referring to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
Can find out from prior art, in game process, when being the client transmissions content-data, can cause server the data volume moment increase between the server and client side, because server is when sending content-data, do not consider the data volume currency between the server and client side, and the content-data request that just sends according to client sends, like this, when sending content-data, meeting that just there is a strong possibility is so that transmission rate is slack-off, perhaps affect other transfer of data between the server and client side, so that use player's Experience Degree of client to reduce.
In order to overcome this problem, the present invention adopts the mode of active push that the content-data that upgrades on the server is sent to client, selects on the opportunity that pushes and frequency, according to the liveness of client and will send amount of content data and determine.Like this, the data volume of server to client transmission content-data that the present invention is just balanced.
Because the present invention adopts the mode transmitting content data of active push, rather than adopt first by after the client-requested, received again the mode of content-data by client awaits, after request, wait for the reception content-data so need not client, improved player's Experience Degree of using client.
When the present invention sends the content-data that upgrades at server to client, only send the content-data of incremental update, so that the content-data transmission quantity between server and the client reduces, further improve the Experience Degree of player in game process of using client.
Fig. 1 is the method flow diagram of client transmissions data that is provided by the invention, and its concrete steps are:
Step 101, server receive the activation transmitting content data request that client sends.
In this step, during such as the bulletin board that uses as the player who uses client in the game, server just can detect, and has determined to have activated the content-data event of transmitting bulletin board.
Repeatedly execution in step 101, and namely same client may repeatedly send the transmitting content data request that activates.
In this step, this request can be carried and will be activated the transferring content sign, so that server can identify the activation transmitting content data that this client is asked.
Step 102, the corresponding client of initiating this request of server arrange the content-data event that pushes, this propelling movement content-data event comprises propelling movement opportunity and propelling movement frequency, and propelling movement opportunity and propelling movement frequency are to arrange according to the data volume of content-data and the liveness of client.
In this step, propelling movement is being set during opportunity, frequent for using content-data, comparatively chance postpones and pushes frequency and can reduce during the propelling movement of active client setting, because this client frequent requests has been obtained the most contents data; During for the propelling movement of using the fewer client of content-data to arrange chance in advance and frequency higher, stop up thereby reduce the content-data transmission of this client when the request content data; For the client of substantially not using content-data, then must arrange and push the content-data event, economize on resources.
Further, can also arrange according to current this content-data that whether uses of client opportunity for propelling movement, when the player who uses client sends in game when not accepting to push instruction, server receives, will reset the propelling movement opportunity to should client set propelling data content event, be set to endless.
In this step, can propelling movement opportunity be set to carry out after 2 minutes the content-data event that pushes, and set up client at server and enliven kilsyth basalt, client is sent the time of activation transmitting content data request as the liveness of this client, whenever client sends, just upgrade the liveness of this client.
In this step, the propelling movement frequency of setting can adopt formula (1) to calculate:
Meta-sqrt(current time when abs(expection pushes-this client was enlivened the time last time)) the * weights
Formula (1)
Wherein, expect that the propelling movement time is to arrange according to the generated frequency of content-data and the average frequency of client transmission activation transmitting content data request, when sending the time interval of activating the transmitting content data request, client just equals the expection propelling movement of this setting during the time, the frequency that pushes content-data reaches maximum, otherwise the frequency of propelling movement content-data is less; Enlivened last time of this client is this client liveness of the client liveness table record set up time on server; Weights determine according to amount of content data size, if amount of content data is little, then arrange smallerly, if amount of content data is large, then arrange larger; Sqrt represents to round behind the extraction of square root, and abs is for taking absolute value.
Here, the purpose of the root of making even in the formula (1) is to even up the propelling movement frequency curve, allow the frequency of the transmitting content data between the server and client does not differ too large within a period of time, so that the volume of transmitted data between server and the client keeps stable.
When Fig. 2 pushes the content-data event for employing formula (1), the client liveness that obtains and the schematic diagram that pushes frequency, as can be seen from the figure, the liveness interval of client pushes the time near the expection of setting, then push frequency lower, otherwise, then push frequency larger.
In this step, when the activation transmitting content data request time interval that client sends pushes the time greater than the expection that arranges, such as greater than 6, not operation in namely 30 minutes, then the set propelling movement content-data event of server can be set to stop fully, the propelling movement frequency namely is set reduces gradually, until be 0.
Step 103, server monitoring are carried out the content-data event that pushes after setting up to the opportunity of set propelling movement content-data event, according to pushing the propelling movement frequency of setting in the content-data event content-data that self upgrades are pushed to this client.
In this step, the content-data that pushes is that the content-data sign that request is carried according to step 101 is determined.
In the present invention, server can upgrade the content-data that will send to client in real time, in order further to reduce the content-data transmission quantity between server and the client, and when transmission, the content-data transmission after just will upgrading for this client.In order to reach this effect, adopted increment updating method, namely on the server and client side, set up respectively the content-data storage queue, in the content-data storage queue, with the storage of content-data piecemeal corresponding blocks sign, when the server update content-data, just the content-data piece that upgrades is stored in the front end of the content-data storage queue of server, like this, when server sends the content-data that upgrades, after only need obtaining the block identification of current content data in the set content storage queue of client, the block identification all the elements data block before that is positioned at this content-data in the content storage queue that self is set sends to client and gets final product.
In the present invention, the division of content-data piece can be processed according to real needs, no longer limits here.
Lift an object lesson method provided by the invention is described
Suppose that an online game has bulletin board, the message that this bulletin board uses the player of client to send for record, the message that also this bulletin board is recorded simultaneously send to uses the player of other clients to check, the message that records in the bulletin board is exactly content-data.
Server will be safeguarded bulletin board, when the player who receives the use client sends message or deletion message, just needs to upgrade bulletin board, and the bulletin board of renewal is sent to other clients that send the request of activation transmission bulletin board content-data.For server, the amount of content data of the bulletin board that safeguard is huge.
Use the player of client to send the bulletin board content-data request that activates, namely the player opens the bulletin board interface, at this moment, server will receive this request, in online game, simultaneously or the client that does not send simultaneously this request have a lot, so server will receive a lot of these requests, if directly according to this request, be the data volume moment increase of initiating the client transmissions bulletin board content-data of this request, will cause to transmit between client and the server.Therefore, adopt method provided by the invention, after server receives this request, do not send the bulletin board content-data for client immediately, but being that this client sets up the bulletin board content-data event that pushes, be to determine according to the bulletin board amount of content data that will upgrade the propelling movement opportunity in this propellings movement bulletin board content-data event, pushes frequency and then be the liveness setting according to client, like this, just can push opportunity and push frequency propelling movement bulletin board content-data according to difference for different clients.
In this embodiment, client can not accept to push instruction to the server transmission yet in game, the information of not accepting the state that pushes namely is set, at this moment in the copy of playing/PVP state, after server receives, just for this client the bulletin board content-data event that pushes is not set.
In this embodiment, when server is client push bulletin board content-data according to set propelling movement bulletin board content-data event, propelling movement for upgrading the bulletin board content-data.Particularly, do not adopt the mode of paging transmission, but the bulletin board content-data is carried out piecemeal, each uses player's data of client to preserve as a piece, when a player upgrades message on the bulletin board, (comprise and sending or deletion), just upgrade to data block that should client, when other players will receive the bulletin board content-data of propelling movement, also only push the data block of upgrading, thereby reduced the data volume of transmitting between server and the client.
In this embodiment, if client has very a large amount of bulletin board content-datas to need to upgrade, server adopts the mode of paging that the bulletin board content-data is pushed to client.But, when client just needs to upgrade the bulletin board content-data of some other client, when namely sending ordering or screening request, then need not all bulletin board content-datas all are pushed to this client.Server detects the content-data storage queue that arranges on this client, after determining its existing content-data block identification, with the content-data that after its existing content-data piece, upgrades in self content-data storage queue, sort or screen, be pushed at last client.Behind this client, just can obtain bulletin board with the bulletin board content-data merging of self storing, and be shown to the player who uses this client.
In this embodiment, if server has a plurality of, comprise a main control server and a plurality of controlled server, also can adopt the synchronous bulletin board content-data of said method between main control server and the controlled server, guarantee to be provided by different controlled servers and share unified bulletin board content-data between the client of service, volume of transmitted data between main control server and a plurality of controlled server is also smaller, within the acceptable range.
Above act preferred embodiment; the purpose, technical solutions and advantages of the present invention are further described; institute is understood that; the above only is preferred embodiment of the present invention; not in order to limit the present invention; within the spirit and principles in the present invention all, any modification of doing, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.

Claims (3)

1. one kind is the method for client transmissions data, it is characterized in that, the method comprises:
Server receives the activation transmitting content data request that client sends;
The corresponding client of initiating this request of server arranges the content-data event that pushes, and this propelling movement content-data event comprises propelling movement opportunity and propelling movement frequency, and propelling movement opportunity and propelling movement frequency are according to the liveness setting of data volume and the client of content-data;
After setting up the opportunity of the propelling movement content-data event that server monitoring is set, carry out the content-data event that pushes, according to pushing the propelling movement frequency of setting in the content-data event content-data that self upgrades is pushed to this client;
The described propelling movement frequency that arranges can adopt following formula to calculate:
Meta-sqrt(current time when abs(expection pushes-this client was enlivened the time last time)) the * weights;
Wherein, the expection propelling movement time sends the average frequency setting that activates the transmitting content data request according to generated frequency and the client of content-data; Enlivened last time of this client is this client liveness of the client liveness table record set up time on server; Weights are determined according to the amount of content data size; Sqrt represents to round behind the extraction of square root, and abs is for taking absolute value, and * represents to multiply each other, and-expression is subtracted each other.
2. the method for claim 1 is characterized in that, whether described propelling movement opportunity also uses this content-data setting according to client is current, when server receive that client sends do not accept to push instruction the time, propelling movement is set to endless opportunity.
3. such as each claim in the claim 1~2, it is characterized in that, the process that the described content-data that self is upgraded is pushed to this client is:
Set up respectively the content-data storage queue on the server and client side, in the content-data storage queue, with the storage of content-data piecemeal corresponding blocks sign, when the server update content-data, the content-data piece that upgrades is stored in the front end of the content-data storage queue of server;
When server is pushed to this client with the content-data that self upgrades, after obtaining the block identification of current content data in the set content storage queue of client, the block identification all the elements data block before that is positioned at this content-data in the content storage queue that self is set sends to client.
CN 201010621861 2010-12-27 2010-12-27 Method for transmitting data to client Active CN102075531B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010621861 CN102075531B (en) 2010-12-27 2010-12-27 Method for transmitting data to client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010621861 CN102075531B (en) 2010-12-27 2010-12-27 Method for transmitting data to client

Publications (2)

Publication Number Publication Date
CN102075531A CN102075531A (en) 2011-05-25
CN102075531B true CN102075531B (en) 2013-01-30

Family

ID=44033875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010621861 Active CN102075531B (en) 2010-12-27 2010-12-27 Method for transmitting data to client

Country Status (1)

Country Link
CN (1) CN102075531B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428290A (en) * 2013-08-19 2013-12-04 北京网秦天下科技有限公司 Method and device for pushing data
US10764379B2 (en) 2013-09-06 2020-09-01 Nokia Technologies Oy Method, apparatus and system for enhancing a user's engagement with a service
CN105743952B (en) * 2014-12-12 2019-09-17 金蝶软件(中国)有限公司 A kind of method for processing business, server and ERP client
CN105871590A (en) * 2015-12-15 2016-08-17 乐视移动智能信息技术(北京)有限公司 Client data updating method, client and server
CN105872058B (en) * 2016-04-01 2019-03-19 贵州创鑫旅程网络技术有限公司 A kind of method for pushing and its driving means of live broadcast of mobile terminal information
CN107846471A (en) * 2017-11-17 2018-03-27 杭州电魂网络科技股份有限公司 Data distributing method and device
CN108122129B (en) * 2017-12-01 2022-02-22 上海子午线新荣科技有限公司 Data processing method and device and electronic equipment
CN108156253A (en) * 2018-01-05 2018-06-12 中汇信息技术(上海)有限公司 A kind of data transmission method, apparatus and system
CN108449244A (en) * 2018-04-02 2018-08-24 珠海格力电器股份有限公司 Household appliance data processing method, device and system
CN114157705A (en) * 2021-12-07 2022-03-08 深圳前海微众银行股份有限公司 Information pushing method and device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467656A (en) * 2003-06-06 2004-01-14 腾讯科技(深圳)有限公司 Information sending method and system for instant communication tool
CN101299785A (en) * 2007-04-30 2008-11-05 华为技术有限公司 Method, system and service server for processing conversation
CN101345902A (en) * 2007-07-13 2009-01-14 上海东登视讯科技有限公司 Bulk-sending method for mobile phone multimedia video short message
CN101360125A (en) * 2008-09-09 2009-02-04 深圳华为通信技术有限公司 Message pushing method and system based on packet domain
CN101764828A (en) * 2008-12-23 2010-06-30 华为终端有限公司 Establishing method for push conversation, push system and relevant equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030206192A1 (en) * 2001-03-31 2003-11-06 Mingte Chen Asynchronous message push to web browser
WO2006047280A2 (en) * 2004-10-22 2006-05-04 Sonim Technologies Inc Delay timers for managing internal state changes and messages in user equipment for real-time multimedia applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467656A (en) * 2003-06-06 2004-01-14 腾讯科技(深圳)有限公司 Information sending method and system for instant communication tool
CN101299785A (en) * 2007-04-30 2008-11-05 华为技术有限公司 Method, system and service server for processing conversation
CN101345902A (en) * 2007-07-13 2009-01-14 上海东登视讯科技有限公司 Bulk-sending method for mobile phone multimedia video short message
CN101360125A (en) * 2008-09-09 2009-02-04 深圳华为通信技术有限公司 Message pushing method and system based on packet domain
CN101764828A (en) * 2008-12-23 2010-06-30 华为终端有限公司 Establishing method for push conversation, push system and relevant equipment

Also Published As

Publication number Publication date
CN102075531A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
CN102075531B (en) Method for transmitting data to client
EP4020349A1 (en) Risk control method, computer device, and readable storage medium
US8874780B2 (en) Data buffering and notification system and methods thereof
CN109568947A (en) Cloud game control method, device, equipment and computer storage medium
CN103200272B (en) Streaming media storage system and storage method
CN104468395A (en) Direct-broadcasting-room channel access method and system
CN101604358B (en) Method, device and system for updating resources
CN104967876A (en) Pop-up information processing method and apparatus, and pop-up information display method and apparatus
CN109462631B (en) Data processing method, data processing device, storage medium and electronic device
CN104133825A (en) Method and device for matching client user
CN104378407B (en) The server and method of game are provided
CN105031922A (en) Game data processing method, game server and game client
CN103546771B (en) A kind of TV programme comment processing method and system based on intelligent terminal
CN104468509A (en) Method and system for transmitting mobile phone network game data and mobile phone user side
CN109407997A (en) A kind of data processing method, device, equipment and readable storage medium storing program for executing
CN105327508A (en) Network game running system and method
CN102387178A (en) Method and device for upgrading message
CN101436232A (en) Method and system for performing network nurturance series game on mobile terminal
CN112764837B (en) Data reporting method, device, storage medium and terminal
CN109474674A (en) Transmission method and device, storage medium, the electronic device of content
US20130137520A1 (en) Game streaming system and method of supporting the multiuser and multiplatform
CN102065097A (en) Synchronous operation method of clients and servers
CN109413215A (en) Method of data synchronization and system for sound pick-up outfit and user terminal
CN111228818B (en) Communication interaction method and device, storage medium, processor and electronic device
CN104166820A (en) Data management method 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