CN113877212A - Method and device for processing commodity data in game, storage medium and electronic equipment - Google Patents

Method and device for processing commodity data in game, storage medium and electronic equipment Download PDF

Info

Publication number
CN113877212A
CN113877212A CN202111181616.XA CN202111181616A CN113877212A CN 113877212 A CN113877212 A CN 113877212A CN 202111181616 A CN202111181616 A CN 202111181616A CN 113877212 A CN113877212 A CN 113877212A
Authority
CN
China
Prior art keywords
data
game
commodity
consumption
order
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.)
Pending
Application number
CN202111181616.XA
Other languages
Chinese (zh)
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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202111181616.XA priority Critical patent/CN113877212A/en
Publication of CN113877212A publication Critical patent/CN113877212A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/85Providing additional services to players
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The disclosure belongs to the technical field of computers, and relates to a method and a device for processing commodity data in a game, a storage medium and electronic equipment. The method comprises the following steps: acquiring original commodity data in a game, and performing external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data; carrying out validity check on the original order data to obtain target order data, and carrying out consumption payment processing on the target order data to obtain order consumption data; and sending the target order data and the order consumption data to a server of the game so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform. The method and the device have the advantages that the effect of purchasing the game commodities under the condition of off-line in the game is achieved, the consumption mode of the game commodities is enriched, the consumption accuracy and timeliness of the external platform are better, the satisfaction degree of a player is improved, and the game experience and the use experience of the player are optimized.

Description

Method and device for processing commodity data in game, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing commodity data in a game, a computer-readable storage medium, and an electronic device.
Background
With the popularity of computers and mobile terminals, gaming has become an increasingly popular form of entertainment. As a mature product for end and hand games, the sale of merchandise within the game continues to create considerable revenue for the game. The player can consume and buy the in-game item in the game, and the buying behavior is that the player operates the role data when the in-game character is on line.
Specifically, the player initiates a request to the central server according to the commodity data when the player is online. And after the game fee of the player is deducted from the MySQL database of the central server, returning a message to the game server, and after the game server receives the message that the data processing of the central server is successful, updating the prop number of the player and issuing the corresponding commodity to the player. This operation requires the player to be online at all times. If the player is offline, the process of purchasing the game item cannot be initiated, and the purchasing process of the game item is too single and rigid, so that the experience of the player is deteriorated.
In view of the above, there is a need in the art to develop a new method and apparatus for processing merchandise data in a game.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method for processing in-game merchandise data, a device for processing in-game merchandise data, a computer-readable storage medium, and an electronic device, which overcome the technical problem of single and rigid way of purchasing game merchandise due to the limitations of related technologies, at least to some extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of embodiments of the present invention, there is provided a method for processing merchandise data in a game, the method including:
acquiring original commodity data in a game, and performing external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data;
carrying out validity check on the original order data to obtain target order data, and carrying out consumption payment processing on the target order data to obtain order consumption data;
and sending the target order data and the order consumption data to a server of the game so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
In an exemplary embodiment of the present invention, after the acquiring the original merchandise data in the game, the method further includes:
acquiring a mapping relation corresponding to the original commodity data, and determining target commodity data corresponding to the original commodity data according to the mapping relation;
and storing the target commodity data in a database.
In an exemplary embodiment of the present invention, the storing the target article data in a database includes:
carrying out regular splicing processing on the target commodity data to obtain spliced commodity data;
and storing the assembled commodity data in a database in an array form through a message receiving module.
In an exemplary embodiment of the present invention, the performing validity check on the original order data to obtain target order data includes:
carrying out commodity legality verification on the commodity identification data in the original order data to obtain a commodity legality result;
and carrying out price logic calculation on the commodity price data in the original order data based on the commodity legal result to obtain target order data.
In an exemplary embodiment of the invention, the sending the target order data and the order consumption data to the server of the game includes:
and sending the target order data and the order consumption data to a server of the game through a message queue so that the server receives the target order data and the order consumption data through a message receiving module.
In an exemplary embodiment of the present invention, the message queue includes: redis message queues.
In an exemplary embodiment of the present invention, the sending the target order data and the order consumption data to a server of the game, so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform, includes:
and sending the target order data and the order consumption data to a server of the game, so that the server performs data conversion processing on the order consumption data to obtain virtual game data, and performing data freezing processing on the virtual game data to realize undetermined deduction processing on the target order data by the order consumption data to obtain a commodity consumption result of the external platform.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for processing in-game merchandise data, including:
the external consumption module is configured to acquire original commodity data in a game and perform external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data;
the verification payment module is configured to perform validity verification on the original order data to obtain target order data, and perform consumption payment processing on the target order data to obtain order consumption data;
and the undetermined deduction module is configured to send the target order data and the order consumption data to a server of the game, so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory has stored thereon computer readable instructions, which when executed by the processor, implement a method for processing in-game merchandise data in any of the above exemplary embodiments.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of processing in-game merchandise data in any of the above-described exemplary embodiments.
As can be seen from the foregoing technical solutions, the method for processing in-game commodity data, the device for processing in-game commodity data, the computer storage medium, and the electronic device in the exemplary embodiment of the present disclosure have at least the following advantages and positive effects:
in the method and the device provided by the exemplary embodiment of the disclosure, the external consumption processing is performed through the external platform of the game, so that the effect of purchasing game commodities by a player under the condition of off-line in the game is realized, and the consumption modes and scenes of the game commodities are enriched. And moreover, the logic of consuming game commodities by the external platform is improved by carrying out validity check on the original order data, so that the accuracy and timeliness of the consumption by the external platform are better. Furthermore, the game server performs pending deduction processing on the target order data, and organically combines logic consumed by the external platform through the offline state and the online state of the player, so that the satisfaction degree of the player on the external platform is improved, and the game experience and the use experience of the player are optimized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a flow chart diagram schematically illustrating a method for processing in-game merchandise data according to an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of storing raw good data in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of further storing target good data in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a method of validity checking in an exemplary embodiment of the present disclosure;
fig. 5 is a system architecture diagram schematically illustrating a processing method of commodity data in a game in an application scenario in an exemplary embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a processing device for in-game merchandise data according to an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates an electronic device for implementing a method for processing in-game merchandise data in an exemplary embodiment of the disclosure;
fig. 8 schematically illustrates a computer-readable storage medium for implementing a processing method of in-game merchandise data in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
Aiming at the problems in the related art, the disclosure provides a method for processing commodity data in a game. Fig. 1 is a flowchart showing a method for processing in-game merchandise data, and as shown in fig. 1, the method for processing in-game merchandise data at least includes the steps of:
and S110, acquiring original commodity data in the game, and performing external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data.
And S120, carrying out validity check on the original order data to obtain target order data, and carrying out consumption payment processing on the target order data to obtain order consumption data.
And S130, sending the target order data and the order consumption data to a server of the game so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
In the exemplary embodiment of the disclosure, the external consumption processing through the external platform of the game realizes the effect of purchasing game commodities by the player under the condition of off-line in the game, and enriches the consumption modes and scenes of the game commodities. And moreover, the logic of consuming game commodities by the external platform is improved by carrying out validity check on the original order data, so that the accuracy and timeliness of the consumption by the external platform are better. Furthermore, the game server performs pending deduction processing on the target order data, and organically combines logic consumed by the external platform through the offline state and the online state of the player, so that the satisfaction degree of the player on the external platform is improved, and the game experience and the use experience of the player are optimized.
The following describes each step of the method for processing the in-game commodity data in detail.
In step S110, original commodity data in the game is obtained, and the original order data is obtained by performing external consumption processing on the original commodity data through an external platform corresponding to the game.
In an exemplary embodiment of the present disclosure, the raw goods data may be data stored in a database, and the goods data may be stored in a table form, including prices, names, types, and the like of game goods. The database may be a mongo database, a Redis database, or another database, which is not limited in this exemplary embodiment.
Since the raw commodity data is stored in the table of the database, the actual meaning of price, name and type can be represented in the form of numbers.
Further, fig. 2 shows a flow chart of a method for storing raw commodity data, as shown in fig. 2, the method at least comprises the following steps: in step S210, a mapping relationship corresponding to the original product data is acquired, and target product data corresponding to the original product data is determined according to the mapping relationship.
In order to determine the actual meaning of the number of the original commodity data, the mapping relationship between the original commodity data and the actual meaning can be acquired. For example, the mapping relationship may be 1 for device 1, 2 for device 2, 100 for gold coins, or other forms of mapping relationships, which is not particularly limited in this exemplary embodiment.
According to the mapping relation, the original commodity data in the number form can be converted into the target commodity data with the corresponding actual meaning.
In step S220, the target article data is stored in the database.
After the target commodity data is obtained, the target commodity data may be stored in a database. The database may be a database with a communication function, such as a Redis database, or may be another database, which is not limited in this exemplary embodiment.
Fig. 3 shows a flow chart of a method for further storing target commodity data, as shown in fig. 3, the method at least comprises the following steps: in step S310, the target commodity data is subjected to regular assembly processing to obtain assembled commodity data.
The regular assembly processing may be to assemble target commodity data and original commodity data, for example, 1-equipment 1, 2-equipment 2, 100-price is 100 coins, and the like. Namely, regular assembly processing is carried out according to the mapping relation between the original commodity data and the target commodity data to obtain assembly commodity data.
In step S320, the assembled commodity data is stored in the database in an array form through the message receiving module.
And after the assembled commodity data are obtained, the assembled commodity data are further stored through the message receiving module.
In general, the message receiving module may include: a titan _ node module.
In addition, when the assembled commodity data are stored, the assembled commodity data can be converted into an array form.
In general, the array form may include: a form of HashMap.
Specifically, the assembled commodity data is stored in a database with a communication function, such as a Redis database, in the form of a HashMap through a titan _ node module.
At this time, the Redis database stores data such as the name, type, and price of the game item.
Furthermore, the player's own character data, such as a unique ID (identification number) and owned equipment, may be stored in the database. At this time, the database storing the role data may be a Redis database, may also be in a mongo database, and may also be any other database, which is not particularly limited in this exemplary embodiment.
In the exemplary embodiment, by converting the original commodity data into the target commodity data, the target commodity data can be stored in the corresponding database, and a data basis is provided for subsequent commodity data processing. Moreover, by converting the commodity data into the target commodity data, the commodity data processing platforms such as the micro service platform can process the data more conveniently and rapidly, and the processing efficiency and accuracy of the commodity data are improved.
Further, in order to facilitate the player to purchase the commodities in the game offline, the raw commodity data can be subjected to external consumption processing through an external platform of the game. Since the original commodity data is converted into the target commodity data and stored in the database, the target commodity data can be acquired from the database to complete external consumption processing.
Specifically, the external platform may be an official webpage of the game or an official transaction platform of the game or other external product platform related to the game. Therefore, the player can acquire target commodity data in the game through an HTTP (Hyper Text Transfer Protocol) interface and display the target commodity data to the player on the interface of the external platform.
Therefore, the player can generate the original order data of the player after a series of operations such as selection and purchase.
In step S120, the original order data is legally checked to obtain target order data, and the target order data is subjected to consumption payment processing to obtain order consumption data.
In an exemplary embodiment of the present disclosure, after the original order data is obtained, validity check may be further performed on the original order data consumed by the external platform.
In an alternative embodiment, fig. 4 shows a flowchart of a method for validity checking, and as shown in fig. 4, the method at least includes the following steps: in step S410, the product identification data in the original order data is subjected to product validity check to obtain a product validity result.
The commodity identification data may be data that uniquely represents the game commodity included in the original order data, such as a commodity name and a commodity identification number, and this is not particularly limited in this exemplary embodiment.
Further, the commodity validity check may be a check to see whether the game commodity exists in the game through the commodity identification data, that is, whether the game commodity is in the selling state. Therefore, the corresponding commodity legal result can be obtained by carrying out commodity legal verification on the commodity identification data.
In step S420, based on the product legal result, price logic calculation is performed on the product price data in the original order data to obtain target order data.
When the result of the product legitimacy is that the game product in the original order data is legitimate, the price logic calculation related to the selling state of the game product, such as adding and discounting, can be further performed on the product price data in the original order data to obtain the target order data containing the actual total price of the product.
When the legal result of the commodity is that some game commodities in the original order data are illegal, the part of illegal game commodities can be removed, and then commodity price data of other game commodities are summed and discounted, and price logic calculation related to the current selling state of the game commodity is carried out to obtain target order data containing the actual total price of the commodity.
In the exemplary embodiment, the corresponding target order data can be obtained by performing validity check on the original order data, so that unreasonable consumption and other situations during game commodity consumption on an external platform are avoided, and validity and correctness guarantees are provided for commodity consumption processing of the external platform.
After the target order data is obtained, the target order data may be displayed on an external platform to enable a player to obtain order consumption data of the player, such as a consumption amount of the order, by making an online payment according to the target order data.
In step S130, the target order data and the order consumption data are sent to a server of the game, so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
In an exemplary embodiment of the present disclosure, after the target order data is obtained, the target order data and the order consumption data may be sent to a server of the game.
In an alternative embodiment, the target order data and the order consumption data are sent to a server of the game through a message queue, so that the server receives the target order data and the order consumption data through a message receiving module.
Since the target commodity data is stored in the database having the communication function, when the target order data corresponding to the target commodity data is transmitted, the target order data and the order consumption data can be transmitted to the server of the game through the message queue corresponding to the database having the communication function.
In an alternative embodiment, the message queue includes: redis message queues.
When the database with the communication function is a Redis database, the message queue may be a Redis message queue.
The game server may further notify a message receiving module, such as a titan _ node module, of the game server by means of a Redis message queue, and the titan _ node module obtains the target order data and the order consumption data from the Redis database and forwards the target order data and the order consumption data to the game server. At this time, the server of the game can acquire the target order data and the corresponding order consumption data of the external platform, and can process the target order data and the corresponding order consumption data.
In an optional embodiment, the target order data and the order consumption data are sent to a server of the game, so that the server performs data conversion processing on the order consumption data to obtain virtual game data, and performs data freezing processing on the virtual game data to realize undetermined deduction processing on the target order data by the order consumption data to obtain a commodity consumption result.
Specifically, the server may exchange the order consumption data of the player as a point card of the game, and further exchange the point card of the game of the same amount as the virtual currency in the game, that is, virtual game data.
However, since the part of the virtual game data is consumed on the external platform, the data freezing process can be performed on the virtual game data.
Specifically, the virtual game data may be stored in a table temporarily storing consumption data of the external platform for freezing. Moreover, the process of the external platform for the in-game commodity consumption is successful.
Further, when the player logs in the game to receive the game commodity consumed by the external platform, the server of the game deducts the part of virtual game data, so that the player deducts the corresponding virtual currency to obtain a commodity consumption result of the external platform while receiving the game commodity.
After the server of the game completes processing, the corresponding commodity consumption result can be sent to the titan _ node module, and then the titan _ node module adds the message of the commodity consumption result into the Redis message queue. Further, a channel can be used for receiving the message in the Redis message queue, and the message is returned to the external platform in an HTTP mode to inform the player of the final commodity consumption result.
The following describes the processing method of the commodity data in the game according to the embodiment of the present disclosure in detail with reference to an application scenario.
Fig. 5 is a system architecture diagram illustrating a method for processing commodity data in a game in an application scenario, and as shown in fig. 5, the system architecture may include an external product, a Mongo database, a gold micro service, a Redis database, a Redis message queue, a titania _ node module, a game server, and a centre server MySQL database.
The Golay micro-service is a micro-service written by Golay, can provide HTTP service, is deployed on a cloud platform, and can be connected with a redis and mongo database. In addition, the gold microservice opens several HTTP interfaces that can receive HTTP requests from external products. And asynchronous communication with the game is realized through channel and redis message queues of the Golang microservice. In addition, the Golang microservice itself can perform logic processing tasks such as pulling raw merchandise data from a portion of a table in the mongo database to generate target merchandise data such as merchandise price, description and sale conditions, or returning a total price of merchandise in an order to an external product, or detecting whether a player can consume the external product. the TITIAN _ NODE Process enables communication between the game process and the Redis database.
Specifically, the end game or the hand game of the game obtains the original commodity data in the game according to the script logic of the game.
The raw goods data may be data stored in a database, and the goods data may be stored in the form of a table including prices, names, and types of game goods, and the like. The database may be a mongo database, a Redis database, or another database, which is not limited in this exemplary embodiment.
Since the raw commodity data is stored in the table of the database, the actual meaning of price, name and type can be represented in the form of numbers.
And acquiring a mapping relation corresponding to the original commodity data, and determining target commodity data corresponding to the original commodity data according to the mapping relation.
In order to determine the actual meaning of the number of the original commodity data, the mapping relationship between the original commodity data and the actual meaning can be acquired. For example, the mapping relationship may be 1 for device 1, 2 for device 2, 100 for gold coins, or other forms of mapping relationships, which is not particularly limited in this exemplary embodiment.
According to the mapping relation, the original commodity data in the number form can be converted into the target commodity data with the corresponding actual meaning.
Further, the original commodity data of the game can be stored in a redis database after being processed.
The database may be a database with a communication function, such as a Redis database, or may be another database, which is not limited in this exemplary embodiment.
Specifically, target commodity data is subjected to regular splicing processing to obtain spliced commodity data.
The regular assembly processing may be to assemble target commodity data and original commodity data, for example, 1-equipment 1, 2-equipment 2, 100-price is 100 coins, and the like. Namely, regular assembly processing is carried out according to the mapping relation between the original commodity data and the target commodity data to obtain assembly commodity data.
And storing the assembled commodity data in a database in an array form through a message receiving module.
And after the assembled commodity data are obtained, the assembled commodity data are further stored through the message receiving module.
Wherein, the message receiving module may be a titan _ node module.
In addition, when the assembled commodity data are stored, the assembled commodity data can be converted into an array form.
Wherein, the array form can be a HashMap form.
Specifically, the assembled commodity data is stored in a database with a communication function, such as a Redis database, in the form of a HashMap through a titan _ node module.
At this time, the Redis database stores data such as the name, type, and price of the game item.
Furthermore, the player's own character data, such as a unique ID (identification number) and owned equipment, may be stored in the database. At this time, the database storing the role data may be a Redis database, may also be in a mongo database, and may also be any other database, which is not particularly limited in this exemplary embodiment.
The external product can be an official webpage of the game or an official transaction platform of the game and other external product platforms related to the game. The external product can acquire target commodity data in the game through an HTTP interface provided by Golang microservice and is displayed to the player on an interface of an external platform.
After the player selects the goods, the corresponding original order data can be obtained. The external product can send the original order data to the Golay microservice, and the Golay microservice completes the validity check of the goods in the original order.
And carrying out commodity legality verification on the commodity identification data in the original order data to obtain a commodity legality result.
The commodity identification data may be data that uniquely represents the game commodity included in the original order data, such as a commodity name and a commodity identification number, and this is not particularly limited in this exemplary embodiment.
Further, the commodity validity check may be a check to see whether the game commodity exists in the game through the commodity identification data, that is, whether the game commodity is in the selling state. Therefore, the corresponding commodity legal result can be obtained by carrying out commodity legal verification on the commodity identification data.
And carrying out price logic calculation on the commodity price data in the original order data based on the commodity legal result to obtain target order data.
When the result of the product legitimacy is that the game product in the original order data is legitimate, the price logic calculation related to the selling state of the game product, such as adding and discounting, can be further performed on the product price data in the original order data to obtain the target order data containing the actual total price of the product.
When the legal result of the commodity is that some game commodities in the original order data are illegal, the part of illegal game commodities can be removed, and then commodity price data of other game commodities are summed and discounted, and price logic calculation related to the current selling state of the game commodity is carried out to obtain target order data containing the actual total price of the commodity.
After receiving the message that the commodity validity check of the Golang micro service passes, the external product determines order consumption data according to the target order data. And the player can pay through the online payment platform to obtain order consumption data.
After successful payment, the external product sends the target order data and the order consumption data to the Golang microservice through an interface of the Golang microservice.
Further, the Golike microservice sends the target order data and the order consumption data to a server of the game, so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of an external platform.
Since the target commodity data is stored in the database having the communication function, when the target order data corresponding to the target commodity data is transmitted, the target order data and the order consumption data can be transmitted to the server of the game through the message queue corresponding to the database having the communication function.
Wherein the message queue may be a Redis message queue.
When the database with communication function is a Redis database, the message queue may be a Redis message queue.
The game server may further notify a message receiving module, such as a titan _ node module, of the game server by means of a Redis message queue, and the titan _ node module obtains the target order data and the order consumption data from the Redis database and forwards the target order data and the order consumption data to the game server. At this time, the server of the game can acquire the target order data and the corresponding order consumption data of the external platform, and can process the target order data and the corresponding order consumption data.
The server may exchange the player's order consumption data as a point card for the game and further exchange the equal amount of point cards for the game as virtual currency in the game, i.e. virtual game data.
However, since the part of the virtual game data is consumed on the external platform, the data freezing process can be performed on the virtual game data.
Specifically, the virtual game data may be stored in a table temporarily storing consumption data of the external platform for freezing. The table of scratch pad consumption data may be in the MySQL database of the game server. Moreover, the process of the external platform for the in-game commodity consumption is successful.
Further, when the player logs in the game to receive the game commodity consumed by the external platform, the server of the game deducts the part of virtual game data, so that the player deducts the corresponding virtual currency to obtain a commodity consumption result of the external platform while receiving the game commodity.
After the server of the game completes processing, the corresponding commodity consumption result can be sent to the titan _ node module, and then the titan _ node module adds the message of the commodity consumption result into the Redis message queue. Further, the channel can be used for receiving the message in the Redis message queue, and then the message is returned to the external platform in an HTTP mode to inform the player of the final commodity consumption result.
In the method for processing commodity data in the game in the exemplary embodiment of the disclosure, the external consumption processing is performed through the external platform of the game, so that the effect of purchasing game commodities by a player under the condition of off-line in the game is realized, and the consumption modes and scenes of the game commodities are enriched. And moreover, the logic of consuming game commodities by the external platform is improved by carrying out validity check on the original order data, so that the accuracy and timeliness of the consumption by the external platform are better. Furthermore, the game server performs pending deduction processing on the target order data, and organically combines logic consumed by the external platform through the offline state and the online state of the player, so that the satisfaction degree of the player on the external platform is improved, and the game experience and the use experience of the player are optimized.
In addition, in an exemplary embodiment of the present disclosure, a processing device of in-game merchandise data is also provided. Fig. 6 is a schematic structural diagram of a processing device for in-game merchandise data, and as shown in fig. 6, the processing device 600 for in-game merchandise data may include: an external consumption module 610, a check payment module 620 and a pending deduction module 630. Wherein:
an external consumption module 610 configured to obtain original commodity data in a game, and perform external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data; the checking and payment module 620 is configured to check the legitimacy of the original order data to obtain target order data, and perform consumption payment processing on the target order data to obtain order consumption data; and the undetermined deduction module 630 is configured to send the target order data and the order consumption data to a server of the game, so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
In an exemplary embodiment of the present invention, after the acquiring the original merchandise data in the game, the method further includes:
acquiring a mapping relation corresponding to the original commodity data, and determining target commodity data corresponding to the original commodity data according to the mapping relation;
and storing the target commodity data in a database.
In an exemplary embodiment of the present invention, the storing the target article data in a database includes:
carrying out regular splicing processing on the target commodity data to obtain spliced commodity data;
and storing the assembled commodity data in a database in an array form through a message receiving module.
In an exemplary embodiment of the present invention, the performing validity check on the original order data to obtain target order data includes:
carrying out commodity legality verification on the commodity identification data in the original order data to obtain a commodity legality result;
and carrying out price logic calculation on the commodity price data in the original order data based on the commodity legal result to obtain target order data.
In an exemplary embodiment of the invention, the sending the target order data and the order consumption data to the server of the game includes:
and sending the target order data and the order consumption data to a server of the game through a message queue so that the server receives the target order data and the order consumption data through a message receiving module.
In an exemplary embodiment of the present invention, the message queue includes: redis message queues.
In an exemplary embodiment of the present invention, the sending the target order data and the order consumption data to a server of the game, so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform, includes:
and sending the target order data and the order consumption data to a server of the game, so that the server performs data conversion processing on the order consumption data to obtain virtual game data, and performing data freezing processing on the virtual game data to realize undetermined deduction processing on the target order data by the order consumption data to obtain a commodity consumption result of the external platform.
The specific details of the processing device 600 for in-game commodity data have been described in detail in the corresponding processing method for in-game commodity data, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the in-game merchandise data processing apparatus 600 are mentioned, such division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
An electronic device 700 according to such an embodiment of the invention is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, electronic device 700 is embodied in the form of a general purpose computing device. The components of the electronic device 700 may include, but are not limited to: the at least one processing unit 710, the at least one memory unit 720, a bus 730 connecting different system components (including the memory unit 720 and the processing unit 710), and a display unit 740.
Wherein the memory unit stores program code that is executable by the processing unit 710 such that the processing unit 710 performs the steps according to various exemplary embodiments of the present invention as described in the above section "exemplary method" of the present specification.
The storage unit 720 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)721 and/or a cache memory unit 722, and may further include a read only memory unit (ROM) 723.
The memory unit 720 may also include programs/utilities 724 having a set (at least one) of program modules 725, such program modules 725 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 730 may be any representation of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 700, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 700 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 750. Also, the electronic device 700 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 760. As shown, the network adapter 740 communicates with the other modules of the electronic device 700 over the bus 730. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
Referring to fig. 8, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for processing commodity data in a game, the method comprising:
acquiring original commodity data in a game, and performing external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data;
carrying out validity check on the original order data to obtain target order data, and carrying out consumption payment processing on the target order data to obtain order consumption data;
and sending the target order data and the order consumption data to a server of the game so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
2. The method for processing in-game merchandise data according to claim 1, wherein after said obtaining raw merchandise data in a game, the method further comprises:
acquiring a mapping relation corresponding to the original commodity data, and determining target commodity data corresponding to the original commodity data according to the mapping relation;
and storing the target commodity data in a database.
3. The in-game merchandise data processing method according to claim 2, wherein the storing the target merchandise data in a database includes:
carrying out regular splicing processing on the target commodity data to obtain spliced commodity data;
and storing the assembled commodity data in a database in an array form through a message receiving module.
4. The method for processing commodity data in a game according to claim 1, wherein the performing validity check on the original order data to obtain target order data comprises:
carrying out commodity legality verification on the commodity identification data in the original order data to obtain a commodity legality result;
and carrying out price logic calculation on the commodity price data in the original order data based on the commodity legal result to obtain target order data.
5. The method for processing in-game commodity data according to claim 1, wherein the sending the target order data and the order consumption data to a server of the game comprises:
and sending the target order data and the order consumption data to a server of the game through a message queue so that the server receives the target order data and the order consumption data through a message receiving module.
6. The in-game merchandise data processing method of claim 1, wherein the message queue comprises: redis message queues.
7. The method for processing in-game commodity data according to claim 1, wherein the sending the target order data and the order consumption data to a server of the game so that the server performs pending deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform comprises:
and sending the target order data and the order consumption data to a server of the game, so that the server performs data conversion processing on the order consumption data to obtain virtual game data, and performing data freezing processing on the virtual game data to realize undetermined deduction processing on the target order data by the order consumption data to obtain a commodity consumption result of the external platform.
8. An apparatus for processing in-game merchandise data, comprising:
the external consumption module is configured to acquire original commodity data in a game and perform external consumption processing on the original commodity data through an external platform corresponding to the game to obtain original order data;
the verification payment module is configured to perform validity verification on the original order data to obtain target order data, and perform consumption payment processing on the target order data to obtain order consumption data;
and the undetermined deduction module is configured to send the target order data and the order consumption data to a server of the game, so that the server performs undetermined deduction processing on the target order data according to the order consumption data to obtain a commodity consumption result of the external platform.
9. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the method for processing in-game merchandise data according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the in-game merchandise data processing method of any one of claims 1-7 via execution of the executable instructions.
CN202111181616.XA 2021-10-11 2021-10-11 Method and device for processing commodity data in game, storage medium and electronic equipment Pending CN113877212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111181616.XA CN113877212A (en) 2021-10-11 2021-10-11 Method and device for processing commodity data in game, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111181616.XA CN113877212A (en) 2021-10-11 2021-10-11 Method and device for processing commodity data in game, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113877212A true CN113877212A (en) 2022-01-04

Family

ID=79006038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111181616.XA Pending CN113877212A (en) 2021-10-11 2021-10-11 Method and device for processing commodity data in game, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113877212A (en)

Similar Documents

Publication Publication Date Title
CN111598659B (en) Commodity information processing method and device, electronic equipment and storage medium
CN110111107B (en) Payment method, device, equipment and storage medium
CN109087148B (en) Method, apparatus and computer readable medium for determining virtual resource object
CN110097356B (en) Payment method, device, equipment and storage medium
CN110458544B (en) Payment method and payment service system of multi-cash-register-crossing system
US10173140B2 (en) Interactive gaming systems and methods
CN112070544A (en) Online popularization method and system
TW201014637A (en) Method and system for generating virtual resources of game, computer program product, portable electronic device, and commercial marketing method using the method for generating virtual resources of game
JP2002092249A (en) Sales price calculation device and method therefor
CN108898431A (en) Consume interlock method, device and server
CN113877212A (en) Method and device for processing commodity data in game, storage medium and electronic equipment
JP2022053122A (en) Information processing method, information processing device, and program
CN114912904B (en) Project delivery state determining method, system, electronic equipment and storage medium
CN110796516A (en) Commodity promotion method and device
CN110633966A (en) Block chain-based contract securitization method and device
CN113077315B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN111078636A (en) Marketing data processing method and system and related equipment
US10949892B2 (en) Cross platform reward exchange marketplace providing an auction operation
CN110796518A (en) E-commerce interaction activity processing method and system
KR20160024513A (en) Subscription based virtual item auction management server and method thereof
US9824346B2 (en) Systems and methods for selling and distributing lottery tickets
CN111435508B (en) Method and device for processing information of resource issuing terminal
JP6592170B1 (en) Information processing method, information processing apparatus, and program
CN112990970A (en) Electronic coupon management method and device, storage medium and electronic equipment
US20150356590A1 (en) Commodity credits for software application users associated with services and products

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