CN106682014B - Game display data generation method and device - Google Patents

Game display data generation method and device Download PDF

Info

Publication number
CN106682014B
CN106682014B CN201510755781.XA CN201510755781A CN106682014B CN 106682014 B CN106682014 B CN 106682014B CN 201510755781 A CN201510755781 A CN 201510755781A CN 106682014 B CN106682014 B CN 106682014B
Authority
CN
China
Prior art keywords
display
data
game
template file
template
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
CN201510755781.XA
Other languages
Chinese (zh)
Other versions
CN106682014A (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
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 CN201510755781.XA priority Critical patent/CN106682014B/en
Publication of CN106682014A publication Critical patent/CN106682014A/en
Application granted granted Critical
Publication of CN106682014B publication Critical patent/CN106682014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Abstract

The invention discloses a method and a device for generating game display data. Wherein, the method comprises the following steps: acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated; acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters; according to a preset data generation flow, initial data corresponding to the template display parameters are read from game data pointed by the attribute information of the game application, and display data of the game application are generated based on the initial data. Through the embodiment, the problem of low efficiency of generating game information is solved, and the effect of generating game display data (such as information) is improved.

Description

Game display data generation method and device
Technical Field
The invention relates to the field of computers, in particular to a method and a device for generating game display data.
Background
There is a need in the art to present up-to-date information about games to users, such as: the information of the game such as the strategy, topic, announcement and video. Because the games needing to display data are numerous and the information is a resource of a storage type (mostly database DB), if each user opens a game APP (application program), the information data is pulled in real time, and when the user amount reaches a certain degree, the reading of the database becomes a bottleneck of data pulling. In the prior art, once the information data is generated, the change condition is extremely few, so the information data can be cached in a memory, and then the newly added data and the modified data are updated at regular time, thereby ensuring the timeliness of the data.
By adopting the scheme of caching the information data into the memory, when the game is online, only each game needs to be processed independently, however, when dozens of or even more games are needed at the same time, on one hand, the code development amount is related to the number of games needing to be online, and if a large number of games need to be online, a large number of codes need to be developed; on the other hand, the maintenance of the large amount of developed code is also very difficult, which results in inefficient generation of information data.
To solve the problem of low efficiency of generating a large amount of game information, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating game display data, which at least solve the technical problem of low efficiency of generating game information.
According to an aspect of an embodiment of the present invention, there is provided a method for generating game presentation data, the method including: acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated; acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters; according to a preset data generation flow, initial data corresponding to the template display parameters are read from game data pointed by the attribute information of the game application, and display data of the game application are generated based on the initial data.
According to an aspect of an embodiment of the present invention, there is provided a game show data generation apparatus, including: the first acquisition unit is used for acquiring the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated; the second acquisition unit is used for acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters; and the data generation unit is used for reading initial data corresponding to the template display parameters from the game data pointed by the attribute information of the game application according to a preset data generation flow and generating display data of the game application based on the initial data.
Through the embodiment, when the display data needs to be generated, the display parameters and the corresponding display data can be obtained only by the attribute information of the game application and the display type information of the display data to be generated, codes do not need to be modified in the whole processing process, if a plurality of game applications need to generate the display data, the attribute information of the plurality of game applications and the display type information of the display data to be generated are obtained, the display parameters and the corresponding display data of the plurality of game applications can be obtained, the problem of low efficiency of generating the game information is solved, and the effect of generating the game display data (such as information) is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of generating game presentation data according to an embodiment of the present invention;
FIG. 3 is a flow chart of an alternative method of generating game show data in accordance with an embodiment of the present invention;
FIG. 4 is a flow diagram of an alternative method of generating game presentation data according to an embodiment of the present invention;
FIG. 5 is a flow chart of yet another alternative method of generating game show data in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of an apparatus for generating game presentation data according to an embodiment of the present invention; and
fig. 7 is a block diagram of a structure of a computer terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for generating game show data, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
Alternatively, in the present embodiment, the above-described game presentation data generation method may be applied to a hardware environment formed by the terminal 10 and the server 30 as shown in fig. 1, where the hardware environment includes a network environment. As shown in fig. 1, the terminal 10 is connected to the server 30 through a network including, but not limited to: a wide area network, a metropolitan area network, or a local area network.
According to an embodiment of the present invention, there is provided a method for generating game display data, as shown in fig. 2, the method may include the following steps:
step S201: and acquiring attribute information of the game application of the display data to be generated and display type information of the display data to be generated.
Step S203: and acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters.
Step S205: according to a preset data generation flow, initial data corresponding to the template display parameters are read from game data pointed by the attribute information of the game application, and display data of the game application are generated based on the initial data.
By adopting the embodiment, when the game application needing to be online generates the display data (such as information data), only the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated are required to be acquired, the display template file corresponding to the display type information is acquired, the template display parameters in the display template file are used as input, and the display data of the game application are generated according to the preset flow. Through the embodiment, when the display data needs to be generated, the display parameters and the corresponding display data can be obtained only by the attribute information of the game application and the display type information of the display data to be generated, codes do not need to be modified in the whole processing process, if a plurality of game applications need to generate the display data, the attribute information of the plurality of game applications and the display type information of the display data to be generated are obtained, the display parameters and the corresponding display data of the plurality of game applications can be obtained, the problem of low efficiency of generating the game information is solved, and the effect of generating the game display data (such as information) is improved.
Since the data forms and processing logics of different game application displays are the same, in the application, the flow of data processing can be templated to generate the data generation flow, and the preset data generation flow can be used for generating the display data for different game applications.
The above embodiment is described in detail with reference to fig. 3, and as shown in fig. 3, the embodiment can be implemented by the following steps:
step S301: and acquiring a data generation flow.
Since the flow of each module generation presentation data may be the same for different games, the process of data pulling may be abstracted into a template class, which may include functions of data reading, data processing, and data saving. And (4) the data processing flow is templated, and each game application can inherit the template and perform personalized expansion.
Wherein, the above modules can represent the display units with different display types, such as strategies, topics, announcements, and the like.
Specifically, the flow of gathering the display data from each database DB to the memory is the same, and includes three flows of data reading (generally, sql query statement), data processing, and data storage, and these three flows may be abstracted into a template class.
Step S303: and acquiring attribute information of the game application of the display data to be generated and display type information of the display data to be generated.
The attribute information of the game application may include identification information (such as a game ID and a game name) of the game application, and the presentation type information of the presentation data to be generated may include: a presentation type identifier (e.g., a presentation type ID).
Step S305: and acquiring a display template file corresponding to the display type information.
The display template file may be a file pre-stored in a database, the tactical template file corresponding to the display type information is called, and template display parameters in the display template file are obtained, where the template display parameters are used to describe attributes of display data to be generated.
If the display type information indicates that the display type is topic display, calling a topic display template file, where template display parameters in the topic template display file may include: and setting the online date and the person.
Step S307: and generating the display data of the game application according to a preset data generation flow.
Specifically, the data generation flow obtained in step S301 is obtained, the template display parameters in the display template file obtained in step S305 are used as the input of the data generation flow, and the corresponding display parameters are generated through the data generation flow.
Through the embodiment, the game information is configured, the data processing flow is templated, the template of the game information data can be generated, the problem of simultaneously generating a large amount of game information data is solved, and the effect of rapidly generating the display data is realized.
According to the above embodiment of the present invention, the display type information includes a display type ID, wherein obtaining the display template file based on the display type information of the display data to be generated may include: judging whether a display template file corresponding to the display type ID exists or not; if the display template file corresponding to the display type ID exists, reading the display template file; and if the display template file corresponding to the display type ID does not exist, creating the display template file.
In the above embodiment, the common attribute of the game application is extracted through big data analysis, the display template file is created based on the common attribute, the created display template file includes a plurality of template display parameters, when the display data of a new game application needs to be generated, the display template file can be obtained based on the display type ID, and if no set display template file exists in the database, the display template file of the display type can be created.
In an optional embodiment, after reading the presentation template file, the method may further include: reading game display parameters of the game application from the attribute information of the game application; judging whether game display parameters exist in the display template file or not; and if the display template file does not have game display parameters, adding the game display parameters into the display template file to obtain the processed display template file.
Optionally, the reading of the initial data corresponding to the template presentation parameter from the game data pointed by the attribute information of the game application includes: and reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
In the above embodiment, if a display template file corresponding to the display type ID is already stored in the database, the game display parameters in the attribute information of the game application for which the display data is to be generated are read, and if the game display parameters of the game application are all in the display template file, the data in the display template file is used as the input of the data generation flow; if the game display parameters of some game applications do not exist in the display template file, adding the game display parameters which do not exist in the display template file into the display template file to obtain a processed display template file, and taking the template display parameters in the processed display template file as the input of a data generation process to obtain display data.
It should be noted that through the data analysis of the game application, for different games, besides the attributes (such as game ID and game name) strongly related to the game itself, other attributes of the data of the same module (the module includes the strategy, topic, announcement and video) are almost the same. On this basis, the data of each module can be abstracted into an information template file (i.e. the presentation template file in the above embodiment). When a module type is added, a display template file is added, and the display template file in the embodiment of the application also supports certain expandability.
An embodiment of the present invention is described in detail below with reference to fig. 4, and as shown in fig. 4, the embodiment may include the following steps:
step S401: and generating a data generation flow and a display template file of each display module.
Specifically, a presentation template file may be generated for each presentation module, a presentation data generation flow of each module may be extracted, and a data pulling process may be abstracted into a template class, where the template class may include functions of data reading, data processing, and data saving. And (4) the data processing flow is templated, and each game application can inherit the template and perform personalized expansion.
Wherein, the above modules can represent the display units with different display types, such as strategies, topics, announcements, and the like.
Step S402: and acquiring attribute information of the game application of the display data to be generated and display type information of the display data to be generated.
The attribute information of the game application may include identification information (such as a game ID and a game name) of the game application, and the presentation type information of the presentation data to be generated may include: the type ID is presented.
Step S403: and judging whether a display template file corresponding to the display type ID exists in the database or not.
If the display template file corresponding to the display type ID exists in the database, executing step S404; if the display template file corresponding to the display type ID does not exist in the database, step S405 is executed to create a display template file.
If so, the presentation type ID indicates that the presentation type is: audio type, and in the database: and if the display template files of the types of the topics, the strategies, the notices and the videos do not exist in the database, the display template file corresponding to the display type ID is established.
Step S404: and reading the display template file.
Step S406: and reading the game display parameters in the attribute information of the game application.
Step S407: and judging whether the game display parameters in the game application exist in the display template file.
If the game display parameters in the game application do not exist in the display template file, executing step S408; if the game display parameters in the game application are all present in the display template file, step S409 is executed.
If so, the presentation type ID indicates that the presentation type is: video types, there are: the method comprises the steps that topic, strategy, announcement and video display template files are judged, the display template files corresponding to display type IDs in a database are read, then game display parameters (such as character display and map display) in attribute information are obtained, whether the game display parameters exist in the display template files or not is judged, and if only characters are displayed in the existing display template files, the game display parameters are judged not to exist in the display template files; and if the existing display template file has the object display and the map display, judging that the game display parameters exist in the display template file.
Step S408: and adding the game display parameters which do not exist in the display template file into the display template file to obtain the processed display template file.
And if the game display parameters in the attribute information comprise character display and map display, and only characters are displayed in the existing display template file, adding the map display into the display template file to obtain the processed display template file.
Step S409: and acquiring the display parameters in the display template file, and generating display data of the display parameters according to a preset data generation flow.
Specifically, the data generation flow obtained in step S301 is obtained, the template display parameters in the display template file obtained in step S305 are used as the input of the data generation flow, and the corresponding display parameters are generated through the data generation flow.
According to the embodiment of the present invention, the obtaining of the attribute information of the game application of which the presentation data is to be generated and the presentation type information of the presentation data is to be generated includes: and storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file.
After obtaining the presentation template file based on the presentation type information, the method may further include: and establishing an incidence relation between the configuration file and the display template file, and acquiring template display parameters in the display template file based on the incidence relation.
Specifically, attribute information (such as game identification information and game name) strongly related to the game may be arranged into a configuration file, the configuration information in the configuration file is mainly used to associate with a presentation template file, the configuration information in the configuration file may include a game ID (i.e., game identification information), a game chinese name (i.e., the game name mentioned above), an information template file (such as a presentation type ID) that the game needs to use, and the like, the maintenance cost of the configuration file in this embodiment is low, and the configuration file in this embodiment may be generated in batch by a script.
When the display data of the game application needs to be added, a suitable information template file (i.e. the display template file in the above embodiment) is determined according to the attribute information of the game (including the game identifier and the game display parameters). If no appropriate information template file exists, expanding the original display template file corresponding to the display type ID, namely modifying the original display template file to obtain a processed display template file; or adding a new display template file. The required game information data is generated through the association between the presentation template file and the configuration file (wherein, the association relationship can be established through the game ID and the presentation type ID in the configuration file), and then through the data generation process of the above step S301.
According to the above embodiment of the present application, the display type information includes one or more display type IDs, each display type ID corresponds to one display template file, wherein reading initial data corresponding to the template display parameter from the game data pointed by the attribute information of the game application, and generating the display data of the game application based on the initial data includes: reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application; gathering each initial data, and storing the gathered result according to a preset format to generate display data; and saving the display data.
Optionally, the game data of different game applications may be stored in different databases, or may be stored in databases of different servers, the game data of the game application may be acquired through identification information in the attribute information of the game application, after the game data is acquired, the attribute value of the template display parameter (that is, the initial data corresponding to the template display parameter) is acquired, since the display data to be generated may belong to multiple display types, after the initial data of each display type is acquired, the multiple initial data are aggregated and encapsulated into display data, and the display data is stored, and when the display data is stored, the game ID of each game application may be used as index information of each game application.
In the above-described embodiments of the present application, after generating the presentation data of the game application based on the initial data, the method may further include: receiving a request sent by a terminal and used for acquiring display data, wherein the request used for acquiring the display data carries a game ID of a game application of which the display data is to be acquired; reading display data corresponding to the game ID; and displaying the display data corresponding to the game ID on an interface of the terminal.
Specifically, the display data is generated in the data generation method based on the above embodiment, and the display data is stored in the database. Generating a request for acquiring display data at a terminal, and sending the request to a server; reading the display data acquired by the request through the game ID in the request; and returning the display data corresponding to the game ID to the terminal, and displaying the display data on the interface of the terminal.
The above embodiment of the present invention is described in detail with reference to fig. 5, and as shown in fig. 5, the present application may include the following steps:
step S501: and generating a data generation flow and a display template file of each display module.
Specifically, a presentation template file may be generated for each presentation module, a presentation data generation flow of each module may be extracted, and a data pulling process may be abstracted into a template class, where the template class may include functions of data reading, data processing, and data saving. And (4) the data processing flow is templated, and each game application can inherit the template and perform personalized expansion.
Step S502: and acquiring attribute information of the game application of the display data to be generated and display type information of the display data to be generated.
The attribute information of the game application may include identification information (such as a game ID and a game name) of the game application, and the presentation type information of the presentation data to be generated may include: the type ID is presented.
Step S503: and judging whether a display template file corresponding to the display type ID exists in the database or not.
If the display template file corresponding to the display type ID exists in the database, executing step S504; if the display template file corresponding to the display type ID does not exist in the database, step S505 is executed to create a display template file.
If so, the presentation type ID indicates that the presentation type is: audio type, and in the database: and if the display template files of the types of the topics, the strategies, the notices and the videos do not exist in the database, the display template file corresponding to the display type ID is established.
Step S504: and reading the display template file.
Step S506: and reading the game display parameters in the attribute information of the game application.
Step S507: and judging whether the game display parameters in the game application exist in the display template file.
If the game display parameters in the game application do not exist in the display template file, executing step S508; if the game display parameters in the game application are all present in the display template file, step S509 is executed.
Step S508: and adding the game display parameters which do not exist in the display template file into the display template file to obtain the processed display template file.
And if the game display parameters in the attribute information comprise character display and map display, and only characters are displayed in the existing display template file, adding the map display into the display template file to obtain the processed display template file.
Step S509: and acquiring the display parameters in the display template file.
Step S510: and acquiring identification information of the game application, and acquiring game data pointed by the identification information.
Step S511: initial data corresponding to the presentation parameters is extracted from the game data.
Step S512: and aggregating each initial data, and storing the aggregated result according to a preset format to generate display data.
Step S513: and saving the display data.
Step S514: and receiving a request sent by the terminal for acquiring the display data.
The request for obtaining the display data carries the game ID of the game application of which the display data is to be obtained.
Step S515: and reading the display data corresponding to the game ID.
Step S516: and returning the display data corresponding to the game ID to the terminal and displaying the display data on the interface of the terminal.
In the above embodiment of the present invention, when a game is added, ideally, only a few rows of attribute configuration related to the game need to be added (i.e. a configuration file is generated), and if a corresponding display template file can be directly applied, only a game ID and a required information template file need to be added. On the premise of the existing display template file, if the display data of a plurality of games need to be generated at the same time, the configuration files related to the plurality of games can be input through the script and the display type ID in the configuration files can be obtained, and the template display parameters in the display template files are obtained, so that the corresponding display data can be generated based on the template display parameters and the attribute ID of the game application according to the preset data generation flow. The codes do not need to be modified in the whole data generation process, the generated configuration file is extremely small, the whole process can be completed within minute-level time, and the development efficiency is greatly improved. Meanwhile, because the amount of the configuration files is small, the codes are abstracted and optimized, and the maintenance cost is reduced.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided a generating apparatus for implementing the game show data, as shown in fig. 6, the apparatus including:
the first obtaining unit 20 is configured to obtain attribute information of a game application of which display data is to be generated and display type information of the display data to be generated;
the second obtaining unit 40 is configured to obtain a display template file based on the display type information, where the display template file includes template display parameters;
the data generating unit 60 is configured to read initial data corresponding to the template display parameter from the game data pointed by the attribute information of the game application according to a preset data generating flow, and generate display data of the game application based on the initial data.
By adopting the embodiment, when the game application needing to be online generates the display data (such as information data), only the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated are required to be acquired, the display template file corresponding to the display type information is acquired, the template display parameters in the display template file are used as input, and the display data of the game application are generated according to the preset flow. Through the embodiment, when the display data needs to be generated, the display parameters and the corresponding display data can be obtained only by the attribute information of the game application and the display type information of the display data to be generated, codes do not need to be modified in the whole processing process, if a plurality of game applications need to generate the display data, the attribute information of the plurality of game applications and the display type information of the display data to be generated are obtained, the display parameters and the corresponding display data of the plurality of game applications can be obtained, the problem of low efficiency of generating the game information is solved, and the effect of generating the game display data (such as information) is improved.
Since the data forms and processing logics of different game application displays are the same, in the application, the flow of data processing can be templated to generate the data generation flow, and the preset data generation flow can be used for generating the display data for different game applications.
The attribute information of the game application may include identification information (such as a game ID and a game name) of the game application, and the presentation type information of the presentation data to be generated may include: a presentation type identifier (e.g., a presentation type ID).
Through the embodiment, the game information is configured, the data processing flow is templated, the template of the game information data can be generated, the problem of simultaneously generating a large amount of game information data is solved, and the effect of rapidly generating the display data is realized.
According to the above embodiment of the present invention, the presentation type information includes a presentation type ID, wherein the second obtaining unit includes: the first judgment module is used for judging whether a display template file corresponding to the display type ID exists or not; the first reading module is used for reading the display template file if the display template file corresponding to the display type ID exists; and the creating module is used for creating the display template file if the display template file corresponding to the display type ID does not exist.
In the above embodiment, the common attribute of the game application is extracted through big data analysis, the display template file is created based on the common attribute, the created display template file includes a plurality of template display parameters, when the display data of a new game application needs to be generated, the display template file can be obtained based on the display type ID, and if no set display template file exists in the database, the display template file of the display type can be created.
In an optional embodiment, the second obtaining unit further includes: the second reading module is used for reading the game display parameters of the game application from the attribute information of the game application after the display template file is read; the second judgment module is used for judging whether the game display parameters exist in the display template file or not; and the adding module is used for adding the game display parameters into the display template file to obtain the processed display template file if the display template file does not have the game display parameters.
The data generation unit includes: and the third reading module is used for reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
In the above embodiment, if a display template file corresponding to the display type ID is already stored in the database, the game display parameters in the attribute information of the game application for which the display data is to be generated are read, and if the game display parameters of the game application are all in the display template file, the data in the display template file is used as the input of the data generation flow; if the game display parameters of some game applications do not exist in the display template file, adding the game display parameters which do not exist in the display template file into the display template file to obtain a processed display template file, and taking the template display parameters in the processed display template file as the input of a data generation process to obtain display data.
It should be noted that through the data analysis of the game application, for different games, besides the attributes (such as game ID and game name) strongly related to the game itself, other attributes of the data of the same module (the module includes the strategy, topic, announcement and video) are almost the same. On this basis, the data of each module can be abstracted into an information template file (i.e. the presentation template file in the above embodiment). When a module type is added, a display template file is added, and the display template file in the embodiment of the application also supports certain expandability.
According to the above-described embodiment of the present invention, the first acquisition unit includes: and the information storage module is used for storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file.
The device still includes: and the third obtaining unit is used for establishing an incidence relation between the configuration file and the display template file after obtaining the display template file based on the display type information, and obtaining the template display parameters in the display template file based on the incidence relation.
Specifically, attribute information (such as game identification information and game name) strongly related to the game may be arranged into a configuration file, the configuration information in the configuration file is mainly used to associate with a presentation template file, the configuration information in the configuration file may include a game ID (i.e., game identification information), a game chinese name (i.e., the game name mentioned above), an information template file (such as a presentation type ID) that the game needs to use, and the like, the maintenance cost of the configuration file in this embodiment is low, and the configuration file in this embodiment may be generated in batch by a script.
According to the above embodiment of the present invention, the presentation type information includes one or more presentation type IDs, each of the presentation type IDs corresponds to one presentation template file, wherein the data generating unit may include: the data reading module is used for reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application; the data generation module is used for converging each initial data and storing the converged result according to a preset format to generate display data; and the data storage module is used for storing the display data.
Optionally, the game data of different game applications may be stored in different databases, or may be stored in databases of different servers, the game data of the game application may be acquired through identification information in the attribute information of the game application, after the game data is acquired, the attribute value of the template display parameter (that is, the initial data corresponding to the template display parameter) is acquired, since the display data to be generated may belong to multiple display types, after the initial data of each display type is acquired, the multiple initial data are aggregated and encapsulated into display data, and the display data is stored, and when the display data is stored, the game ID of each game application may be used as index information of each game application.
The apparatus in the above embodiment may further include: the game playing device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a request for acquiring the display data sent by a terminal after the display data of the game application are generated based on the initial data, and the request for acquiring the display data carries the game ID of the game application of which the display data are to be acquired; the reading unit is used for reading the display data corresponding to the game ID; and the display unit is used for displaying the display data corresponding to the game ID on the interface of the terminal.
Specifically, the display data is generated in the data generation method based on the above embodiment, and the display data is stored in the database. Generating a request for acquiring display data at a terminal, and sending the request to a server; reading the display data acquired by the request through the game ID in the request; and returning the display data corresponding to the game ID to the terminal, and displaying the display data on the interface of the terminal.
When the display data of the game application needs to be added, a suitable information template file (i.e. the display template file in the above embodiment) is determined according to the attribute information of the game (including the game identifier and the game display parameters). If no appropriate information template file exists, expanding the original display template file corresponding to the display type ID, namely modifying the original display template file to obtain a processed display template file; or adding a new display template file. The required game information data is generated through the association between the presentation template file and the configuration file (wherein, the association relationship can be established through the game ID and the presentation type ID in the configuration file), and then through the data generation process of the above step S301.
Each module provided in this embodiment is the same as the use method provided in the corresponding step of the method embodiment, and the application scenario may also be the same. Of course, it should be noted that the solution related to the modules may not be limited to the content and the scenario in the above embodiments, and the modules may be executed in a computer terminal or a mobile terminal, and may be implemented by software or hardware.
Example 3
According to an embodiment of the present invention, there is also provided a server for implementing the method and the apparatus for generating game display data, as shown in fig. 7, the server includes:
as shown in fig. 7, the server or the terminal includes: one or more processors 201 (only one of which is shown), a memory 203, and a transmission device 205 (such as the transmission device in the above embodiment), as shown in fig. 7, the terminal may further include an input/output device 207.
The memory 203 may be used to store software programs and modules, such as program instructions/modules corresponding to the game display data generation method and apparatus in the embodiments of the present invention, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 203, that is, implements the game display data generation method described above. The memory 203 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include memory located remotely from the processor 201, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 205 is used for receiving or sending data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 203 is specifically used for storing application programs.
The processor 201 may call the application stored in the memory 203 via the transmission means 205 to perform the following steps:
acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated; acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters; according to a preset data generation flow, initial data corresponding to the template display parameters are read from game data pointed by the attribute information of the game application, and display data of the game application are generated based on the initial data.
The processor 201 is further configured to perform the following steps: the method for acquiring the display template file based on the display type information of the display data to be generated comprises the following steps: judging whether a display template file corresponding to the display type ID exists or not; if the display template file corresponding to the display type ID exists, reading the display template file; and if the display template file corresponding to the display type ID does not exist, creating the display template file.
The processor 201 is further configured to perform the following steps: after reading the display template file, reading game display parameters of the game application from the attribute information of the game application; judging whether game display parameters exist in the display template file or not; and if the display template file does not have game display parameters, adding the game display parameters into the display template file to obtain the processed display template file. Reading initial data corresponding to the template display parameters from game data pointed by the attribute information of the game application comprises the following steps: and reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
The processor 201 is further configured to perform the following steps: the method for acquiring the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated comprises the following steps: storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file; after the display template file is obtained based on the display type information, the incidence relation between the configuration file and the display template file is established, and the template display parameters in the display template file are obtained based on the incidence relation.
The processor 201 is further configured to perform the following steps: reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application; gathering each initial data, and storing the gathered result according to a preset format to generate display data; and saving the display data.
Through the embodiment, the game information is configured, the data processing flow is templated, the template of the game information data can be generated, the problem of simultaneously generating a large amount of game information data is solved, and the effect of rapidly generating the display data is realized.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It should be further noted that the register area is a memory of the system and a register in the system processor.
It can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be a program code for executing a method for generating game presentation data
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated; acquiring a display template file based on the display type information, wherein the display template file comprises template display parameters; according to a preset data generation flow, initial data corresponding to the template display parameters are read from game data pointed by the attribute information of the game application, and display data of the game application are generated based on the initial data.
Optionally, in another embodiment, the storage medium is arranged to store program code for performing the steps of: the method for acquiring the display template file based on the display type information of the display data to be generated comprises the following steps: judging whether a display template file corresponding to the display type ID exists or not; if the display template file corresponding to the display type ID exists, reading the display template file; and if the display template file corresponding to the display type ID does not exist, creating the display template file.
Optionally, in another embodiment, the storage medium is arranged to store program code for performing the steps of: after reading the display template file, reading game display parameters of the game application from the attribute information of the game application; judging whether game display parameters exist in the display template file or not; and if the display template file does not have game display parameters, adding the game display parameters into the display template file to obtain the processed display template file. Reading initial data corresponding to the template display parameters from game data pointed by the attribute information of the game application comprises the following steps: and reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
Optionally, in another embodiment, the storage medium is arranged to store program code for performing the steps of: the method for acquiring the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated comprises the following steps: storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file; after the display template file is obtained based on the display type information, the incidence relation between the configuration file and the display template file is established, and the template display parameters in the display template file are obtained based on the incidence relation.
Optionally, in another embodiment, the storage medium is arranged to store program code for performing the steps of: reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application; gathering each initial data, and storing the gathered result according to a preset format to generate display data; and saving the display data.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Through the embodiment, the game information is configured, the data processing flow is templated, the template of the game information data can be generated, the problem of simultaneously generating a large amount of game information data is solved, and the effect of rapidly generating the display data is realized.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method for generating game display data, comprising:
acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated;
extracting common attributes of the game applications through big data analysis, creating a display template file based on the common attributes, and storing the display template file in a database;
acquiring a display template file from the database based on the display type information, wherein the display template file comprises template display parameters;
reading initial data corresponding to the template display parameters from game data pointed by the attribute information of the game application according to a preset data generation flow, and generating display data of the game application based on the initial data;
wherein after generating presentation data for the gaming application based on the initial data, further comprising: receiving a request for acquiring display data sent by a terminal, wherein the request for acquiring the display data carries a game ID of a game application of the display data to be acquired; reading display data corresponding to the game ID; and displaying the display data corresponding to the game ID on an interface of the terminal.
2. The method of claim 1, wherein the presentation type information comprises a presentation type ID, and wherein obtaining a presentation template file based on the presentation type information comprises:
judging whether a display template file corresponding to the display type ID exists or not;
if the display template file corresponding to the display type ID exists, reading the display template file;
and if the display template file corresponding to the display type ID does not exist, creating the display template file.
3. The method of claim 2,
after reading the presentation template file, the method further comprises: reading game display parameters of the game application from the attribute information of the game application; judging whether the game display parameters exist in the display template file or not; if the game display parameters do not exist in the display template file, adding the game display parameters into the display template file to obtain a processed display template file;
reading initial data corresponding to the template presentation parameter from game data pointed by the attribute information of the game application comprises: and reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
4. The method of claim 1,
the method for acquiring the attribute information of the game application of the display data to be generated and the display type information of the display data to be generated comprises the following steps: storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file;
after obtaining the presentation template file based on the presentation type information, the method further comprises: and establishing an incidence relation between the configuration file and the display template file, and acquiring template display parameters in the display template file based on the incidence relation.
5. The method of claim 1, wherein the presentation type information comprises one or more presentation type IDs, each presentation type ID corresponds to a presentation template file, and wherein reading initial data corresponding to the template presentation parameter from game data pointed by attribute information of the game application according to a preset data generation flow, and generating presentation data of the game application based on the initial data comprises:
reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application;
converging each initial data, and storing the converged result according to a preset format to generate the display data;
and saving the display data.
6. A game show data generation apparatus, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring attribute information of a game application of display data to be generated and display type information of the display data to be generated;
the device is also used for extracting common attributes of the game applications through big data analysis, creating a display template file based on the common attributes, and storing the display template file in a database;
the second obtaining unit is used for obtaining a display template file from the database based on the display type information, wherein the display template file comprises template display parameters;
the data generation unit is used for reading initial data corresponding to the template display parameters from game data pointed by the attribute information of the game application according to a preset data generation flow and generating display data of the game application based on the initial data;
wherein the apparatus further comprises: the receiving unit is used for receiving a request for acquiring the display data sent by a terminal after the display data of the game application are generated based on the initial data, wherein the request for acquiring the display data carries a game ID of the game application of which the display data are to be acquired; the reading unit is used for reading the display data corresponding to the game ID; and the display unit is used for displaying the display data corresponding to the game ID on the interface of the terminal.
7. The apparatus according to claim 6, wherein the presentation type information comprises a presentation type ID, and wherein the second obtaining unit comprises:
the first judgment module is used for judging whether a display template file corresponding to the display type ID exists or not;
the first reading module is used for reading the display template file if the display template file corresponding to the display type ID exists;
and the creating module is used for creating the display template file if the display template file corresponding to the display type ID does not exist.
8. The apparatus of claim 7,
the second acquiring unit further includes: the second reading module is used for reading the game display parameters of the game application from the attribute information of the game application after reading the display template file; the second judgment module is used for judging whether the game display parameters exist in the display template file or not; the adding module is used for adding the game display parameters into the display template file to obtain a processed display template file if the display template file does not have the game display parameters;
the data generation unit includes: and the third reading module is used for reading initial data corresponding to the template display parameters in the processed display template file from the game data pointed by the attribute information of the game application.
9. The apparatus of claim 6,
the first acquisition unit includes: the information storage module is used for storing the attribute information of the game application and the display type information of the display data to be generated into a configuration file;
the device further comprises: and the third obtaining unit is used for establishing the incidence relation between the configuration file and the display template file after obtaining the display template file based on the display type information, and obtaining the template display parameters in the display template file based on the incidence relation.
10. The apparatus according to claim 6, wherein the presentation type information includes one or more presentation type IDs, each of which corresponds to a presentation template file, and wherein the data generating unit includes:
the data reading module is used for reading initial data corresponding to each template display parameter from game data pointed by the attribute information of the game application;
the data generation module is used for converging each initial data and storing the converged result according to a preset format so as to generate the display data;
and the data storage module is used for storing the display data.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
12. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 5.
CN201510755781.XA 2015-11-09 2015-11-09 Game display data generation method and device Active CN106682014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510755781.XA CN106682014B (en) 2015-11-09 2015-11-09 Game display data generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510755781.XA CN106682014B (en) 2015-11-09 2015-11-09 Game display data generation method and device

Publications (2)

Publication Number Publication Date
CN106682014A CN106682014A (en) 2017-05-17
CN106682014B true CN106682014B (en) 2020-09-01

Family

ID=58863083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510755781.XA Active CN106682014B (en) 2015-11-09 2015-11-09 Game display data generation method and device

Country Status (1)

Country Link
CN (1) CN106682014B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632973A (en) * 2017-09-26 2018-01-26 郑州云海信息技术有限公司 The input method and device of assets
CN111181758B (en) * 2019-08-01 2022-02-25 腾讯科技(深圳)有限公司 Configuration file generation method and device
CN111111178B (en) * 2019-12-25 2023-08-29 上海米哈游天命科技有限公司 Game announcement acquisition method, device, equipment and storage medium
CN112597266A (en) * 2020-12-16 2021-04-02 深圳中清龙图网络技术有限公司 Editor generation method and processing method for processing game template data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141525A (en) * 2007-10-10 2008-03-12 中兴通讯股份有限公司 Information management system and information management method
CN101170436A (en) * 2007-11-16 2008-04-30 中兴通讯股份有限公司 A method for managing template in network management system
CN101727446A (en) * 2008-10-27 2010-06-09 国际商业机器公司 Method and system for accessing mobile Web, corresponding server and mobile equipment
CN104462621A (en) * 2014-11-28 2015-03-25 北京奇虎科技有限公司 Data processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8562439B2 (en) * 2004-03-11 2013-10-22 Navteq B.V. Geographic area templates for computer games
US20070244997A1 (en) * 2005-08-31 2007-10-18 Tindal Glen D System and method for configuring a network device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141525A (en) * 2007-10-10 2008-03-12 中兴通讯股份有限公司 Information management system and information management method
CN101170436A (en) * 2007-11-16 2008-04-30 中兴通讯股份有限公司 A method for managing template in network management system
CN101727446A (en) * 2008-10-27 2010-06-09 国际商业机器公司 Method and system for accessing mobile Web, corresponding server and mobile equipment
CN104462621A (en) * 2014-11-28 2015-03-25 北京奇虎科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN106682014A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN104038908B (en) Push message sending method and device
CN106682014B (en) Game display data generation method and device
CN110245069B (en) Page version testing method and device and page display method and device
US11122142B2 (en) User behavior data processing method and device, and computer-readable storage medium
CN109635199B (en) Application list dynamic recommendation method and system based on user behaviors
CN104765746B (en) Data processing method and device for mobile communication terminal browser
CN107733984A (en) A kind of method, terminal and computer-readable recording medium for pushing screen locking information
WO2016201963A1 (en) Application pushing method and device
CN106649446B (en) Information pushing method and device
JP6667645B2 (en) Method, system, user terminal and computer-readable storage medium for implementing public relations PR activities
WO2019062081A1 (en) Salesman profile formation method, electronic device and computer readable storage medium
US20170277526A1 (en) Software categorization method and electronic device
US20140089397A1 (en) Method, server, and client for pushing and displaying splash screen
US11244153B2 (en) Method and apparatus for processing information
CN110149551B (en) Media file playing method and device, storage medium and electronic device
CN103377053A (en) Method, device and system for controlling application
CN111367562A (en) Data acquisition method and device, storage medium and processor
CN113412608A (en) Content pushing method and device, server and storage medium
CN105550179A (en) Webpage collection method and browser plug-in
CN114612279A (en) Watermark adding method and device
CN108737487B (en) Data synchronization method and device, storage medium and electronic device
CN106372158A (en) Method and device for processing user behavior data
CN104580298B (en) File upload process method and device
JP2018509714A (en) Search term list providing apparatus and method using the same
CN112487251A (en) User ID data association method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant