User behavior simulation method in cloud game scene

文档序号:1104656 发布日期:2020-09-29 浏览:26次 中文

阅读说明:本技术 在云游戏场景的用户行为模拟方法 (User behavior simulation method in cloud game scene ) 是由 林宇 徐晨阳 于 2020-06-17 设计创作,主要内容包括:本发明公开了在云游戏场景的用户行为模拟方法。涉及云游戏场景用户行为模拟技术领域。利用protobuf协议来传输模拟点击数据使得数据包体十分的小,数据流量小,在mrp游戏大量画面变化时对mrp游戏的流畅程度无太大影响。登录行为:从服务器端的账号密码输入框中输入账号密码;断线行为:当网络环境不好或用户关闭服务器端时,服务器端与服务器端的长链接断开;点击行为:服务器端捕捉点击与抬起事件,当滑动屏幕时,定时捕捉屏幕坐标作为点击事件;捕捉到的事件通过protobuf协议封装成数据包发送至服务器端,服务器端将服务器端传过来的数据包转发至android模拟器的mrp游戏;从而实现点击行为。(The invention discloses a user behavior simulation method in a cloud game scene. Relates to the technical field of cloud game scene user behavior simulation. The protobuf protocol is used for transmitting the simulated click data, so that the data inclusion is very small, the data flow is small, and the smoothness of the mrp game is not greatly influenced when a large number of pictures of the mrp game are changed. Login behavior: inputting an account password from an account password input box of a server side; and (3) line breaking action: when the network environment is poor or a user closes the server, the long chain connection between the server and the server is disconnected; click behavior: capturing click and lifting events by the server, and capturing screen coordinates as click events at regular time when a screen is slid; the captured events are packaged into data packets through a protobuf protocol and sent to the server side, and the server side forwards the data packets transmitted by the server side to an mrp game of the android simulator; thereby achieving click behavior.)

1. The user behavior simulation method in the cloud game scene is characterized by comprising a login behavior, a disconnection behavior and a click behavior;

(1) keeping a long link between an mrp game on the android simulator and a server side, and keeping a long link between the server side and the server side;

(2) login behavior: inputting an account password from an account password input box of a server, packaging the account password into a protobuf data packet during login, sending the protobuf data packet to an mrp game on an android simulator, and starting the mrp game after login is successful; thereby realizing the login behavior;

(3) and (3) line breaking action: when the network environment is poor or a user closes the server, the long chain connection between the server and the server is disconnected; at the moment, the long-chain connection between the android simulator and the server side is kept for T minutes continuously;

if the server side is not connected with the server side again within T minutes, the android simulator restarts the mrp game process to be connected with the server side again;

if the server side and the server side are reconnected within T minutes, the server side matches the maintained mrp game long link with the reconnected server side, so that the server side and the android simulator are re-matched, the disconnection reconnection is successful, and the game can be continued; thereby realizing the line breaking behavior;

(4) click behavior: setting the resolution of an mrp game picture on the android simulator to be M multiplied by N; therefore, the resolution size of the picture at the server side should be MxN amplified in equal proportion; capturing click and lifting events by the server, and capturing screen coordinates as click events at regular time when a screen is slid; the captured events are packaged into data packets through a protobuf protocol and sent to the server side, and the server side forwards the data packets transmitted by the server side to an mrp game of the android simulator; thereby achieving click behavior.

2. The method of claim 1, wherein the game-side frame resolution mxn is 240x 320.

3. The method for simulating the user behavior in the cloud game scene according to claim 1, wherein after the disconnection reconnection is successful, the mrp game starts the mrp game after receiving an instruction sent from the server side, generates an mrp game picture, generates a data packet by using the mrp game picture generated by the piece grabbing, and transmits the obtained data packet to the server side.

4. The method as claimed in claim 3, wherein the mrp game screen data is divided into nine data packets, each data packet generates an md5 value and a coordinate, each data packet is transmitted to store the corresponding md5 value, the md5 value generated by a data packet is compared with the md5 value originally stored in the data packet at the time of next transmission, if the md5 value is the same, the data packet is transmitted without transmitting the complete data packet, and only the md5 value and the coordinate of the data packet are transmitted, thereby saving traffic.

5. The method as claimed in claim 1, wherein in the process of capturing click and lift events at the server, the android simulator is linked with the server for a long time, the screen data of the android simulator is transmitted to the server through the server for displaying the screen of the mrp game, and the click data collected at the server is transmitted to the mrp game for controlling the game.

6. The method as claimed in claim 1, wherein when the server side and the mrp game are allowed to perform data transmission with each other, if more than two server sides are allowed to transmit the same data to the same mrp game at the same time, the server side temporarily stores the same data in the server side, and then the server side directly reads the same data in the server side, and after each server side reads the same data, the same data is removed from the server side.

7. The method as claimed in claim 1, wherein if the disconnection behavior occurs between two adjacent click behaviors, if the time difference between the two click behaviors is less than 0.3 seconds, the mrp game picture at the time point of the first click in the two adjacent click behaviors is substituted for the mrp game picture at the time point of the second click in the two adjacent click behaviors and stored in the server.

Technical Field

The invention relates to the technical field of cloud game scene user behavior simulation, in particular to a user behavior simulation method in a cloud game scene.

Background

The mrp game is a cloud game, when the cloud game runs, the data flow is large due to the fact that the transmitted simulated click data packet is large, and the influence on the fluency of the mrp game is large when a large number of pictures of the mrp game change, therefore, the method which can be perfectly matched with the mrp game is designed, the control flow is simplified, and the method which enables the transmitted simulated click data packet to be small is very necessary.

Disclosure of Invention

The invention aims to solve the defects of the conventional mrp game and provides a user behavior simulation method in a cloud game scene.

In order to achieve the purpose, the invention adopts the following technical scheme:

the user behavior simulation method in the cloud game scene comprises a login behavior, a disconnection behavior and a click behavior;

(1) keeping a long link between an mrp game on the android simulator and a server side, and keeping a long link between the server side and the server side;

(2) login behavior: inputting an account password from an account password input box of a server, packaging the account password into a protobuf data packet during login, sending the protobuf data packet to an mrp game on an android simulator, and starting the mrp game after login is successful; thereby realizing the login behavior;

(3) and (3) line breaking action: when the network environment is poor or a user closes the server, the long chain connection between the server and the server is disconnected; at the moment, the long-chain connection between the android simulator and the server side is kept for T minutes continuously;

if the server side is not connected with the server side again within T minutes, the android simulator restarts the mrp game process to be connected with the server side again;

if the server side and the server side are reconnected within T minutes, the server side matches the maintained mrp game long link with the reconnected server side, so that the server side and the android simulator are re-matched, the disconnection reconnection is successful, and the game can be continued; thereby realizing the line breaking behavior;

(4) click behavior: setting the resolution of an mrp game picture on the android simulator to be M multiplied by N; therefore, the resolution size of the picture at the server side should be MxN amplified in equal proportion; capturing click and lifting events by the server, and capturing screen coordinates as click events at regular time when a screen is slid; the captured events are packaged into data packets through a protobuf protocol and sent to the server side, and the server side forwards the data packets transmitted by the server side to an mrp game of the android simulator; thereby achieving click behavior.

Preferably, the game-side screen resolution M × N is 240 × 320.

Preferably, after the disconnection reconnection is successful, the mrp game starts the mrp game after receiving an instruction sent by the server side, generates an mrp game picture, captures the generated mrp game picture by adopting fragments to generate a data packet, and transmits the obtained data packet to the server side.

Preferably, when the mrp game picture generated by fragment grabbing is adopted, the mrp game picture data is divided into nine data packets, each data packet generates an md5 value and a coordinate, the corresponding md5 value is stored when each data packet is sent, the md5 value generated by each data packet is compared with the md5 value originally stored in each data packet when a certain data packet is sent next time, if the same md5 value exists, the data packet is already sent, the data packet only needs to be sent with the md5 value and the coordinate of the data packet without sending the complete data packet of the data packet, and therefore flow is saved.

Preferably, in the process of capturing click and lift events at the server side, the android simulator is in long link with the server side on the server side, the picture data of the android simulator is transmitted to the server side through the server side to be used for displaying screen pictures of the mrp game, and the server side collects click data and transmits the click data to the mrp game to be used for controlling the game.

Preferably, in the server, when the server and the mrp game are allowed to mutually transmit data, if more than two servers want to mutually transmit the same data to the same mrp game in the server at the same time, the server temporarily stores the same data in the server, then the server directly reads the same data in the server, and after the same data is read by each server, the same data is removed from the server.

Preferably, if the disconnection behavior occurs between the adjacent two-click behaviors, if the time difference between the two-click behaviors is less than 0.3 second, the mrp game picture at the time of the first click time point in the adjacent two-click behaviors is substituted for the mrp game picture at the time of the second click time point in the adjacent two-click behaviors and stored at the server side.

The invention can achieve the following effects:

the method has the advantages that the protobuf protocol is utilized to transmit the simulated click data, so that the data packet body is very small, the data flow is small, the smoothness degree of the game is not greatly influenced when a large number of pictures of the game are changed, the method can be perfectly matched with the mrp game, and the effect of simplifying control steps is achieved.

Drawings

FIG. 1 is a flow chart illustrating the log-in behavior of the present invention.

FIG. 2 is a flow chart illustrating the disconnection process of the present invention.

FIG. 3 is a flow chart illustrating the click behavior of the present invention.

Detailed Description

The technical scheme of the invention is further specifically described by the following embodiments and the accompanying drawings.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:物理状态的更新方法和装置、存储介质、电子装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类