The content of the invention
The present invention provides a kind of processing method and processing device of online game business card, can quickly and easily generate network tripPlay business card, and it is of low cost, it can effectively reduce the data processing amount of server end.
On the one hand, the present invention provides a kind of generation method of online game business card, applied to client, including:
Whether detection client occurs login behavior;
After detecting that login behavior occurs for the client, data knapsack, the data are obtained from the clientKnapsack is generated by the client according to the data of network game that server returns;
Determine the generation required data of online game business card;
Judge the generation required data of online game business card whether are stored with the data knapsack;
If it is, the generation required data of online game business card are obtained from the data knapsack;Otherwise, fromThe generation required data of online game business card are obtained in the server;
Online game business card is generated in the client according to the generation required data of online game business card.
Wherein, the definite generation required data of online game business card, including:
Obtain configuration file;
The Data Entry of online game business card is read from the configuration file;
The generation required data of online game business card are determined according to the Data Entry.
Further, after generating online game business card in the client, the method further includes:
The online game business card is stored in the client, and the online game name is sent to the serverPiece.
Further, the method further includes:
After data of network game after the renewal that the server is sent is received, online game name is judged whetherPiece is upgraded demand;
If it is, the data of network game after the renewal sent according to the server regenerates online game namePiece;
The online game business card regenerated is stored in the client, and to the server send described in againThe online game business card of generation;
The online game business card for judging whether to receive the transmission of demand object in preset time period obtains demand;
If it is, to the demand object send described in the online game business card that regenerates.
Wherein, it is described to judge whether online game business card updating demand, including:
The login object for detecting the client whether there is following behavior, and the behavior includes completing online game matchRegistration, or it is in online game during the games;
If it is, judge that there are online game business card updating demand.
On the other hand, the present invention provides a kind of generating means of online game business card, applied to client, including:
Detection unit, for detecting whether client occurs login behavior;
First acquisition unit, for after detecting that login behavior occurs for the client, being obtained from the clientData knapsack, what the data knapsack was generated by the client according to the data of network game that server returns;
Determination unit, for determining the generation required data of online game business card;
First judging unit, for judging whether be stored with the data knapsack needed for the generation online game business cardThe data wanted;
Second acquisition unit, for being stored with judging the data knapsack required for the generation online game business cardData after, obtained from the data knapsack it is described generation the required data of online game business card;Otherwise, from the serviceThe generation required data of online game business card are obtained in device;
First generation unit, for according to the generation required data of online game business card life in the clientInto online game business card.
Wherein, the determination unit, including:
First acquisition module, for obtaining configuration file;
Read module, for reading the Data Entry of online game business card from the configuration file;
Determining module, for determining the generation required data of online game business card according to the Data Entry.
Further, described device further includes:
First storage and transmitting element, after generating online game business card in the client, the network is swumPlay business card is stored in the client, and sends the online game business card to the server.
Further, described device further includes:
Second judging unit, after the data of network game after renewal that the server is sent is received, judgesWith the presence or absence of online game business card updating demand;
Second generation unit, after judging there are online game business card updating demand, sends according to the serverData of network game after renewal regenerates online game business card;
Second storage and transmitting element, for the online game regenerated business card to be stored in the client, andTo the online game business card regenerated described in server transmission;
3rd judging unit, the network for judging whether to receive the transmission of demand object in preset time period are swumBusiness card of playing obtains demand;
Transmitting element, the online game business card for judging to receive the transmission of demand object in preset time period obtainAfter taking demand, to the online game business card regenerated described in demand object transmission.
Wherein, second judging unit, including:
Detection module, the login object for detecting the client whether there is following behavior, and the behavior has includedRegister into network competition game, or be in online game during the games;
Judgment module, includes completing online game ratio for detecting the login object of the client there are the behaviorMatch registration, or it is in online game during the games, judge that there are online game business card updating demand.
The generation method and device of online game business card provided in an embodiment of the present invention, by detecting whether client occursLogin behavior;After detecting that login behavior occurs for client, data knapsack is obtained from client, data knapsack is clientWhat the data of network game returned according to server was generated;Determine the generation required data of online game business card;Judge numberThe required data of online game business card are generated according to whether being stored with knapsack;If it is, generation is obtained from data knapsackThe required data of online game business card;Otherwise, the generation required data of online game business card are obtained from server;According toThe generation required data of online game business card generate online game business card in the client.This method and device can conveniently,Online game business card is quickly generated, it is of low cost, and can effectively reduce the data processing amount of server end.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specificationObtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations writeSpecifically noted structure is realized and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme is described in further detail.
Embodiment
The preferred embodiment of the present invention is illustrated below in conjunction with attached drawing, it will be appreciated that described herein preferred realApply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
The related proprietary term used in present patent application is explained below.
Online game (Online Game):Also known as " game on line ", referred to as " network game ".Refer to using internet as transmission medium,Using gaming operators server and subscriber computer as processing terminal, using game client software being intended to as information exchange windowRealize amusement, leisure, exchange and obtain the individuality multiplayer online games with sustainability invented just.
Online game business card:Abbreviation business card, also known as card, be sign name and its affiliated tissue, company and title andThe scraps of paper of the information such as contact method.In real world, business card is the most fast most effective side that new friend recognizes mutually, introduces myselfMethod.Equally, in online game, virtual role generally also can carry and check business card, to meet the social demand between role.
Data knapsack:It is the data subset of data complete or collected works.In the software of C/S structures (client-side/server-side structure)In, typically obtain and update on demand from data complete or collected works' server, be stored in client's end memory or local data base and shapeInto the data in knapsack are typically important and high frequency accesses.
The embodiment of the present invention provides a kind of generation method of online game business card, client is mainly used in, such as Fig. 1 institutesShow, include the following steps S101- steps S107:
Step S101:Whether detection client occurs login behavior;
Step S102:After detecting that login behavior occurs for client, data knapsack, data knapsack are obtained from clientGenerated by the client according to the data of network game that server returns;
Step S103:Determine the generation required data of online game business card;
Step S104:Judge the generation required data of online game business card whether are stored with data knapsack;
In above-mentioned steps S104, judge after the generation required data of online game business card are stored with data knapsack,Perform step S105 and the generation required data of online game business card are obtained from data knapsack;Otherwise, perform step S106 fromThe generation required data of online game business card are obtained in server;
Step S107:Online game business card is generated in the client according to the generation required data of online game business card.
The online game business card generation method that the present embodiment is provided, online game name is generated when being stored with data knapsackDuring the required data of piece, the generation required data of online game business card are obtained directly from data knapsack, are given birth in clientInto online game business card.It should be noted that if there is no the generation required data of online game business card in data knapsackWhen, related data can be obtained from server, then generate online game business card in client.Due to data operation and generation allCompleted in client, it is not necessary to which server-side participates in, so as to effectively save the computing overhead of server, to software and hardware resourcesIt is required that it is relatively low, it is of low cost.Compared with conventional method, online game business card generates relevant data and calculates, all by server-sideCompletion moves to client completion, and server-side only provides storage and inquiry service, completely eliminates calculating pressure;For clientEnd, how many user log in, and just accordingly there are how many a clients, each client only calculates the name the piece number of currently logged on userAccording to, be substantially not present data pressure problem so that be effectively ensured online game business card generation real-time.
In another embodiment, above-mentioned steps S103 determines the generation required data of online game business card, including:
Step S1031:Obtain configuration file.
Wherein, configuration file designates certain specific money its business card of playing needs which game data entry of player shown.Such as:Fighting landlord display game player great master point, grade;Random Factor Mahjong then only shows grade, does not show that great master grades.
Step S1032:The Data Entry of online game business card is read from configuration file.
Step S1033:The generation required data of online game business card are determined according to Data Entry.
In another embodiment, after generating online game business card in the client, the above method further includes:
By the storage of online game business card in the client, and to server online game business card is sent.
In another embodiment, the above method further includes:
After data of network game after the renewal of server transmission is received, online game business card is judged whether moreNew demand;
If it is, the data of network game after the renewal sent according to server regenerates online game business card;
The online game business card regenerated is stored in the client, and the net regenerated is sent to serverNetwork game business card;
The online game business card for judging whether to receive the transmission of demand object in preset time period obtains demand;
If it is, the online game business card regenerated is sent to demand object.
In the present embodiment, server, can be to transmission inquiry request after online game business card query demand is receivedPersonnel send the online game business card of latest edition.Such as:During the games, if certain player especially closes other certain playersNote, there is the demand of communication or friend-making, can check the online game business card of other side, specifically can be by sending net to serverNetwork game business card obtain request come obtain concern player online game business card situation, server can to send the request oneSide sends corresponding online game business card data, and after the online game card information of the follow-up player updates, meetingThe online game business card regenerated after renewal is sent to requesting party is sent, so that recipient can obtain its concern in timeThe latest development of player.
In another embodiment, it is above-mentioned to judge whether online game business card updating demand, including:
The login object of detection client whether there is following behavior, and behavior includes completing online game competition entry, orPerson is in online game during the games;
If it is, judge that there are online game business card updating demand.
Since the online game situation that online game business card needs to be participated according to online game player is updated in time,It could more truly reflect the present case of player, can detect player's browsing client race list, and complete ratioIt will be considered that the online business card of player needs to update after match registration, detecting that player is currently in some online game ratio certainlyDuring match, it is also considered as needing the online game business card to the player to be updated.
Further elaborate to the related content involved in the embodiment of the present invention below:
Online game player preferentially obtains data from Data Data knapsack, generates the object for appreciation on demand after client loginThe online game business card data of family, and server is sent in xml format, please by the inquiry of server response to network game business cardAsk.Wherein, data knapsack can be stored in client, and the data in data knapsack are to obtain, maintain and renewal from serverGame data.
In actual use, in players log network game client, client can obtain the game data of player, it is necessary toIllustrate, obtain the necessary links that player data are game client initialization to data server, one can be formedData knapsack, is supported for the data that are smoothed out providing of game.Wherein, after client logins successfully, can by pulling orPerson receives the game data that push two ways obtains player, such as the phase such as experience, grade, finance, virtual objects, history military successClose data.
Client is by reading configuration file, and business card entry obtains corresponding number from data knapsack according to listed by configuration fileAccording to, such as the data such as head portrait ID, location, game ratings, game experience, history military success, business card data is generated on demand.
Client can send online game business card data after online game business card is generated to server-side, wherein, such as canOnline game business card data is sent to server in xml format.
Server can be stored online game business card, when by all clients after online game business card is receivedThe online game business card data of biography is all stored to after server, and server also just maintains the complete of online game business card dataCollection, can be inquired about and showed for any client, it is achieved thereby that whole business card datas is shared.
Wherein, above-mentioned server can preserve online game business card data after online game business card data is receivedCaching, can also preserve in the database.Can forever be preserved, can also be protected according to the time parameter method of settingDeposit, such as removed automatically after storing 1 year etc., it can specifically be set according to actual needs.
It should be noted that after server receives the online game business card that client is sent, when there is other clients to needWhen checking the online game business card data of certain player, it can initiate to ask to server, to obtain online game business card data., can be to corresponding data format (such as XML format) after client receives the online game business card data of server returnParsed, specific business card data is shown according to configuration item.
The generation method of online game business card provided in an embodiment of the present invention, by detecting whether client occurs to log in rowFor;After detecting that login behavior occurs for client, data knapsack is obtained from client, data knapsack is client according to clothesWhat the data of network game that business device returns was generated;Determine the generation required data of online game business card;Judge data knapsackIn whether be stored with generation the required data of online game business card;If it is, generation network trip is obtained from data knapsackThe play required data of business card;Otherwise, the generation required data of online game business card are obtained from server;According to generation netThe network game required data of business card generate online game business card in the client.This method can quickly and easily generate netNetwork game business card, it is of low cost, and can effectively reduce the data processing amount of server end.
In addition the embodiment of the present invention provides a kind of generating means of online game business card, as shown in Fig. 2, being mainly used in visitorFamily end, including:
Detection unit 201, for detecting whether client occurs login behavior;
First acquisition unit 202, for after detecting that login behavior occurs for client, the data back of the body to be obtained from clientBag, data knapsack are generated by client according to the data of network game that server returns;
Determination unit 203, for determining the generation required data of online game business card;
First judging unit 204, it is required for judging whether to be stored with generation online game business card in data knapsackData;
Second acquisition unit 205, for being stored with the generation required number of online game business card in data knapsack is judgedAccording to rear, the acquisition generation required data of online game business card from data knapsack;Otherwise, generation network is obtained from serverThe game required data of business card;
First generation unit 206, for generating net in the client according to the generation required data of online game business cardNetwork game business card.
In another embodiment, above-mentioned determination unit 203, including:
First acquisition module, for obtaining configuration file;
Read module, for reading the Data Entry of online game business card from configuration file;
Determining module, for determining the generation required data of online game business card according to Data Entry.
In another embodiment, above device further includes:
First storage and transmitting element, after generating online game business card in the client, online game business card is depositedStorage in the client, and sends online game business card to server.
In another embodiment, above device further includes:
Second judging unit, after the data of network game after renewal of server transmission is received, judges whetherThere are online game business card updating demand;
Second generation unit, after judging there are online game business card updating demand, according to the renewal of server transmissionData of network game afterwards regenerates online game business card;
Second storage and transmitting element, for the online game regenerated business card to be stored in the client, and to clothesBusiness device sends the online game business card regenerated;
3rd judging unit, for judging whether to receive the online game name of demand object transmission in preset time periodPiece obtains demand;
Transmitting element, needs for judging that the online game business card that the transmission of demand object is received in preset time period obtainsAfter asking, the online game business card regenerated is sent to demand object.
In another embodiment, above-mentioned second judging unit, including:
Detection module, the login object for detecting client whether there is following behavior, and the behavior includes completing netNetwork competition game is registered, or is in online game during the games;
Judgment module, includes completing online game competition entry for detecting the login object of client there are behavior,Or it is in online game during the games, judge that there are online game business card updating demand.
The generating means of online game business card provided in an embodiment of the present invention, by detecting whether client occurs to log in rowFor;After detecting that login behavior occurs for client, data knapsack is obtained from client, data knapsack is client according to clothesWhat the data of network game that business device returns was generated;Determine the generation required data of online game business card;Judge data knapsackIn whether be stored with generation the required data of online game business card;If it is, generation network trip is obtained from data knapsackThe play required data of business card;Otherwise, the generation required data of online game business card are obtained from server;According to generation netThe network game required data of business card generate online game business card in the client.The device can quickly and easily generate netNetwork game business card, it is of low cost, and can effectively reduce the data processing amount of server end.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer programProduct.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardwareApply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or moreThe shape for the computer program product that usable storage medium is implemented on (including but not limited to magnetic disk storage and optical memory etc.)Formula.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program productFigure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagramThe combination of flow and/or square frame in journey and/or square frame and flowchart and/or the block diagram.These computer programs can be providedThe processors of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produceA raw machine so that the instruction performed by computer or the processor of other programmable data processing devices, which produces, to be used in factThe device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring toMake the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram orThe function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that countedSeries of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer orThe instruction performed on other programmable devices is provided and is used for realization in one flow of flow chart or multiple flows and/or block diagram oneThe step of function of being specified in a square frame or multiple square frames.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the artGod and scope.In this way, if these modifications and changes of the present invention belongs to the scope of the claims in the present invention and its equivalent technologiesWithin, then the present invention is also intended to comprising including these modification and variations.