A game virtual commodity transaction processing method, device and electronic equipment

By recording the target version number on both the game server and the trading server, and adjusting the data after a crash and restart, the problem of data inconsistency after a game server crash was solved, thus improving the accuracy of trading requests.

CN116159311BActive Publication Date: 2026-03-27GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

After the introduction of the trading server, if the game server crashes and rolls back, the player data recorded on the game server may be inconsistent with the product data recorded on the trading server, causing problems in the processing of the target virtual product and affecting the accuracy of player trading requests.

Method used

When a player issues a virtual item consignment order, the game server and the trading server record the target version number respectively. After the game server crashes and restarts, the virtual item status on the trading server is adjusted by comparing the version number to maintain data consistency.

Benefits of technology

By maintaining data consistency between the game server and the trading server, the accuracy of player trading request processing has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116159311B_ABST
    Figure CN116159311B_ABST
Patent Text Reader

Abstract

The application provides a processing method and device for game virtual commodity transaction and electronic equipment. In response to a virtual commodity consignment instruction of a player, a game server is controlled to update a target version number corresponding to a target virtual character, and a commodity consignment request containing the target version number is sent to a transaction server. The transaction server is controlled to store the target version number and execute a request, and a commodity processing result is sent to the game server. After the game server is restarted after a breakdown, if the target version number stored in the transaction server is newer than the target version number stored in the game server, the virtual commodity state of the virtual commodity recorded in the transaction server is adjusted. In this way, after the game server is restarted after a breakdown, the virtual commodity state of the virtual commodity recorded in the transaction server is adjusted by comparing the target version numbers of the game server and the transaction server, so as to keep the data at the game server and the transaction server consistent and improve the accuracy of processing of the transaction request of the player.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game data processing technology, and in particular to a method, apparatus and electronic device for processing virtual goods transactions in games. Background Technology

[0002] During gameplay, players can acquire virtual goods through in-game virtual transactions. Generally, player data related to transactions in the game can include virtual currency, virtual equipment (virtual items), inventory, and summoned beasts (for specific game types). These are usually stored in character data files on the game server. However, the amount of data that the game server needs to process is relatively large, which may lead to significant data processing pressure. Without scaling up the game server, this could result in low efficiency in processing player requests.

[0003] To alleviate the processing pressure on the game server during the game process, a trading server is added to the virtual goods trading system in the game. The trading server provides players with services for consigning and purchasing virtual goods. Players can control their virtual characters to consign and purchase virtual goods through the trading server.

[0004] However, after the introduction of the trading server, if the game server crashes and rolls back, the player data recorded on the game server may be inconsistent with the product data recorded on the trading server. This could cause problems in the processing of the target virtual product and affect the accuracy of player transaction requests. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a method, apparatus, and electronic device for processing virtual goods transactions in games. When a player submits a consignment request for goods to a trading server through the game server, the corresponding target version number is recorded on both the game server and the trading server. After the game server crashes and restarts, the virtual item status recorded on the trading server is adjusted by comparing the corresponding target version numbers recorded on the game server and the trading server, so as to maintain data consistency between the game server and the trading server and help improve the accuracy of player transaction request processing.

[0006] In a first aspect, embodiments of this application provide a method for processing virtual goods transactions in a game, applied to a virtual goods trading system within a game; the virtual goods trading system includes a game server and a trading server; the processing method includes:

[0007] In response to a player's virtual item consignment instruction, the game server is controlled to update the target virtual character's holding quantity and consignment quantity of the target item based on the virtual item consignment instruction, and to update the target version number corresponding to the target virtual character. The game server is also controlled to send an item consignment request to the trading server. The item consignment request includes the target version number and the item identifier of the consigned target virtual item.

[0008] The transaction server stores the target version number in the consignment request for the product, and updates the product status of the target virtual product in the virtual product table of the transaction server to "listing" based on the product identifier of the target virtual product. The transaction server then sends the successful update result of the product status of the target virtual product to the game server, so that the target virtual product can be sold through the transaction server. The virtual product table stores at least one consignment virtual product requested by the game server and the product status of each consignment virtual product.

[0009] When the game server crashes and restarts, it checks whether the target version number stored in the trading server is newer than the target version number stored in the game server. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0010] Secondly, embodiments of this application also provide a processing device for virtual goods transactions in games, applied to a virtual goods transaction system within a game; the processing device includes:

[0011] The request sending module is used to respond to a virtual goods consignment instruction issued by a player, control the game server to update the target virtual character's holding quantity and consignment quantity of the target goods based on the virtual goods consignment instruction, update the target version number corresponding to the target virtual character, and control the game server to send a goods consignment request to the trading server; the goods consignment request includes the target version number and the item identifier of the consigned target virtual goods;

[0012] The result return module is used to control the transaction server to store the target version number in the product consignment request, and based on the product identifier of the target virtual product, update the product status of the target virtual product in the virtual product table of the transaction server to "listing", and send the product processing result of the successful update of the product status of the target virtual product to the game server, so as to sell the target virtual product through the transaction server; the virtual product table stores at least one consigned virtual product requested by the game server for consignment and the product status of each consigned virtual product;

[0013] The product status adjustment module is used to detect whether the target version number stored in the trading server is newer than the target version number stored in the game server after the game server crashes and restarts. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0014] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the processing method for virtual game goods transactions as described in any of the first aspects.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the processing method for virtual game goods transactions as described in any of the first aspects.

[0016] The game virtual goods trading processing method, apparatus, and electronic device provided in this application, in response to a virtual goods consignment instruction issued by a player, control the game server to update the target virtual character's holding quantity and consignment quantity of the target goods based on the virtual goods consignment instruction, and update the target version number corresponding to the target virtual character. The consignment request containing the target version number is then sent to the trading server. The trading server stores the target version number and, based on the product identifier of the target virtual goods, updates the product status of the target virtual goods in the virtual goods table of the trading server to "listing," while simultaneously sending the successful update result of the target virtual goods' status to the game server. When the game server crashes and restarts, if the target version number stored in the game server is inconsistent with the target version number stored in the trading server, and the target version number stored in the trading server is newer than the target version number stored in the game server, then the virtual item status recorded in the trading server is adjusted based on the virtual goods holding quantity and consignment quantity corresponding to the target version number stored in the game server. In this way, when a player submits a consignment request for an item to the trading server through the game server, the corresponding target version number is recorded on both the game server and the trading server. After the game server crashes and restarts, the virtual item status recorded on the trading server is adjusted by comparing the corresponding target version numbers recorded on the game server and the trading server, so as to maintain the consistency of data between the game server and the trading server and help improve the accuracy of player transaction request processing.

[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a method for processing virtual goods transactions in a game, provided as an embodiment of this application;

[0020] Figure 2 This is a schematic diagram illustrating the data flow between the game server and the transaction server provided in an embodiment of this application;

[0021] Figure 3 This is one of the structural schematic diagrams of a processing device for virtual goods transactions in a game, provided in an embodiment of this application;

[0022] Figure 4 A second schematic diagram of a processing device for virtual goods transactions in a game, provided in an embodiment of this application;

[0023] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0025] First, the applicable scenarios for this application will be introduced. This application can be applied to the field of game data processing technology.

[0026] During gameplay, players can acquire virtual goods through in-game virtual transactions. Generally, player data related to transactions in the game can include virtual currency, virtual equipment (virtual items), inventory, and summoned beasts (for specific game types). These are usually stored in character data files on the game server. However, the amount of data that the game server needs to process is relatively large, which may lead to significant data processing pressure. Without scaling up the game server, this could result in low efficiency in processing player requests.

[0027] To alleviate the processing pressure on the game server during the game process, a trading server is added to the virtual goods trading system in the game. The trading server provides players with services for consigning and purchasing virtual goods. Players can control their virtual characters to consign and purchase virtual goods through the trading server.

[0028] However, after the introduction of the trading server, if the game server crashes and rolls back, the player data recorded on the game server may be inconsistent with the product data recorded on the trading server. This could cause problems in the processing of the target virtual product and affect the accuracy of player transaction requests.

[0029] Based on this, embodiments of this application provide a method for processing virtual goods transactions in games, so as to maintain data consistency between the game server and the transaction server and improve the accuracy of player transaction request processing.

[0030] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for processing virtual goods transactions in a game, as provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the method for processing virtual goods transactions in games includes:

[0031] S101. In response to the virtual goods consignment instruction issued by the player, control the game server to update the target virtual character's holding quantity and target goods consignment quantity based on the virtual goods consignment instruction, update the target version number corresponding to the target virtual character, and control the game server to send a goods consignment request to the trading server; the goods consignment request includes the target version number and the goods identifier of the consigned target virtual goods.

[0032] S102. Control the transaction server to store the target version number in the consignment request for the goods, and based on the product identifier of the target virtual product, update the product status of the target virtual product in the virtual product table of the transaction server to "listing", and send the product processing result of the successful update of the product status of the target virtual product to the game server, so as to sell the target virtual product through the transaction server; the virtual product table stores at least one consignment virtual product requested by the game server for consignment and the product status of each consignment virtual product.

[0033] S103. When the game server crashes and restarts, it checks whether the target version number stored in the trading server is newer than the target version number stored in the game server. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0034] The method for processing virtual goods transactions in games provided in this application involves recording the corresponding target version number on both the game server and the trading server when a player submits a consignment request for goods to the trading server through the game server. After the game server crashes and restarts, the virtual item status recorded on the trading server is adjusted by comparing the corresponding target version numbers recorded on the game server and the trading server, so as to maintain data consistency between the game server and the trading server and help improve the accuracy of player transaction request processing.

[0035] The exemplary steps of the embodiments of this application are described below:

[0036] S101. In response to the virtual goods consignment instruction issued by the player, control the game server to update the target virtual character's holding quantity and target goods consignment quantity based on the virtual goods consignment instruction, update the target version number corresponding to the target virtual character, and control the game server to send a goods consignment request to the trading server; the goods consignment request includes the target version number and the goods identifier of the consigned target virtual goods.

[0037] In this embodiment of the application, during the game process, players can obtain the virtual goods they need through virtual transactions in the game. Generally speaking, in the game, player data related to transactions can include virtual currency, virtual equipment (virtual items), backpacks, and summoned beasts (for specific game types). These are generally stored in the character data file on the game server. However, for the game server, the amount of data that needs to be processed is relatively large, which may result in a large data processing pressure. Without expanding the game server capacity, it may lead to a problem of low efficiency in processing player requests.

[0038] To alleviate the processing load on the game server during gameplay, a trading server is added to the game's virtual goods trading system. This trading server provides players with services for consigning and purchasing virtual goods. Players can control their virtual characters to consign and purchase virtual goods through the trading server. For example, after a player consigns their virtual goods, other players can browse, search, and purchase them using the in-game trading center. All data related to the goods is stored in a MongoDB database on the microservice side.

[0039] Specifically, players can issue virtual product consignment orders through touch operations on the virtual goods trading interface (such as the goods consignment interface or the goods purchase interface) displayed on the graphical user interface, or issue virtual goods consignment orders through external devices (such as a mouse or keyboard) by selecting the goods consignment operation displayed on the terminal's graphical user interface.

[0040] The virtual goods consignment instruction includes the type of virtual goods that the player needs to consign, as well as the quantity of virtual goods to be consigned.

[0041] In one possible implementation, after the virtual goods trading system in the game receives a virtual goods consignment instruction from a player, it controls the game server to update the current quantity of the target goods held and the quantity of the target goods consigned by the target virtual character controlled by the player, and at the same time updates the target version number of the target virtual character.

[0042] The target version number corresponding to the target virtual character is used to represent the number of times the target virtual character's target product holding quantity changes. When the target virtual character's target product holding quantity is updated, the target version number is updated simultaneously.

[0043] Specifically, a target version number is set to represent how player data changes with the number of transactions. Since the number of target goods held by the player will inevitably change during the process of controlling the target virtual character to make transactions, the target version number can also be used to represent the number of times the number of target goods held by the target virtual character changes.

[0044] In one possible implementation, the target version number can be set to a monotonically increasing value. An additional version number field can be added to the player's data to record the number of transactions when the player controls the target virtual character to make trades. That is, the version number is incremented by one each time the player's data is modified due to a trade.

[0045] In one possible implementation, the target virtual character's target item holding quantity is updated in response to any of the following actions:

[0046] The target virtual character purchases virtual goods, and the target virtual character sells the virtual goods it owns to other virtual characters.

[0047] Specifically, a target virtual character purchasing virtual goods can be done by the player controlling the target virtual character to buy virtual goods from the virtual item shop corresponding to the trading server, or by the player controlling the target virtual character to buy virtual items from other virtual characters. For the target virtual character's purchasing behavior, it generally results in an increase in the number of target virtual goods held by the target virtual character. For the target virtual character selling the virtual goods it owns to other virtual characters, it can be done by the target virtual character directly selling the virtual goods it owns to other virtual characters, or by the target virtual character consigning the virtual goods it owns to the shop on the trading server, and other virtual characters purchasing the virtual goods from the trading server. For the target virtual character's selling behavior, it generally results in a decrease in the number of target virtual goods held by the target virtual character.

[0048] It is worth noting that regardless of whether the number of target items held by the target virtual character increases or decreases, as long as the player data changes due to the transaction, the target version number corresponding to the target virtual character controlled by the player will change.

[0049] From the game server's perspective, after updating the target virtual character's holding quantity of the target item, the consignment quantity of the target item, and the target version number, a consignment request is generated and sent to the trading server. The consignment request includes the target version number and the item identifier of the consigned target virtual item. This allows the trading server to record the target version number and update the item data based on the item identifier and consignment quantity of the consigned target virtual item in the consignment request.

[0050] In one possible implementation, to prevent network communication problems between the game server and the transaction server from causing the game server to fail to send a consignment request for goods or to be unable to receive the goods processing result sent by the transaction server, requiring the game server to request a retry and send the goods consignment request to the transaction server again, in order to ensure the efficiency of sending the goods consignment request, the goods transaction request can be stored persistently after the game server generates the goods transaction request, so that the game server can resend the request in a timely manner.

[0051] Specifically, the processing method further includes:

[0052] a1: Control the game server to store the consignment request for the goods, and if the game server does not receive the goods processing result from the transaction server within a preset time period after issuing the goods consignment request, resend the stored goods consignment request to the transaction server, and receive the goods processing result returned by the transaction server.

[0053] In this embodiment of the application, after the game server generates a consignment request for goods, it immediately stores and persists the consignment request for goods. After the game server sends the consignment request for goods, it monitors the feedback from the transaction server. If the transaction server does not send the goods processing result within a preset time period after the consignment request for goods is sent, it initiates a request retry, controls the game server to resend the stored consignment request for goods to the transaction server, and receives the goods processing result returned by the transaction server.

[0054] It is worth noting that when the game server generates a consignment request for a product, each request will have a unique request number. The corresponding consignment request can be determined from the game server's stored data based on the request number of the consignment request that has not received a product processing result from the transaction server, and then resent.

[0055] In one possible implementation, after determining that the issued consignment request for goods has received the goods processing result returned by the transaction server, the stored consignment request for goods can be deleted in order to save memory on the game server.

[0056] In one possible implementation, if the game server sends a large number of consignment requests to the trading server but fails to receive any processing results from the trading server for the consignment requests, an early warning message needs to be generated to prompt staff to intervene and check the network communication between the game server and the trading server.

[0057] Specifically, the processing method further includes:

[0058] b1: Detect whether the number of times the game server sends a consignment request for goods to the transaction server within a preset time period exceeds a preset number.

[0059] b2: If exceeded, generate network anomaly alarm information.

[0060] In this embodiment of the application, a preset inspection period can be used to count whether the number of times the game server sends a consignment request for goods during the inspection period exceeds a preset number. If it exceeds the preset number, it proves that the game server has been sending a goods transaction request to the transaction server, but has not received a reply from the transaction server regarding the goods processing result. At this time, it is considered that there may be a problem with the network communication between the game server and the transaction server. Therefore, it is necessary to generate a network abnormality alarm message to prompt the staff to check the network communication between the game server and the transaction server.

[0061] It is worth noting that, in order to ensure that the consignment requests sent by the game server can be promptly received by the trading server after the network is restored, thereby improving the data transmission efficiency between the game server and the trading server and thus improving the processing efficiency of transactions in the game, the game server continued to send consignment requests to the trading server at a preset frequency while staff were investigating network problems between the game server and the trading server. This ensured that the consignment requests sent by the game server could be promptly received by the trading server after the network was restored.

[0062] In one possible implementation, the preset time period can be determined based on the frequency of the game server sending consignment requests and the data processing volume of the transaction server.

[0063] In one possible implementation, when the game server repeatedly sends the same unanswered item consignment request to the trading server, the requests can be sent at different time intervals. For example, if the game server does not receive a response from the trading server after the first consignment request, it can send the request again after a 10-second interval. If the game server does not receive a response from the trading server after the second consignment request, it can send the request again after a 20-second interval, and so on. This is to avoid a situation where the network communication between the trading server and the game server is normal, but the trading server is too busy to process the consignment requests sent by the game server, resulting in the trading server receiving too many consignment requests and thus experiencing excessive processing pressure.

[0064] S102. Control the transaction server to store the target version number in the consignment request for the goods, and based on the product identifier of the target virtual product, update the product status of the target virtual product in the virtual product table of the transaction server to "listing", and send the product processing result of the successful update of the product status of the target virtual product to the game server, so as to sell the target virtual product through the transaction server; the virtual product table stores at least one consignment virtual product requested by the game server for consignment and the product status of each consignment virtual product.

[0065] In this embodiment, when the communication between the transaction server and the game server is normal, when the transaction server receives a product consignment request from the game server, it first obtains and stores the target version number from the product consignment request. Then, based on the product identifier of the target virtual product, it updates the product status of the corresponding target virtual product in the virtual product list maintained in the transaction server to "listing". After confirming that the target virtual product has been successfully listed, it sends the product processing result of the successful update of the target virtual product's product status to the game server, so that the game server can notify the corresponding player that the virtual product has been successfully listed and can be sold through the transaction server.

[0066] The virtual goods table stores at least one virtual item that the game server requests to be consigned for sale, as well as the status of each virtual item.

[0067] In one possible implementation, since the game server may not receive the product processing result from the trading server within a preset time period after sending a product consignment request to the trading server, the trading server may repeatedly send the same product transaction request to the trading server. In order to ensure that the trading server processes the same product consignment request only once, the trading server also needs to check whether it has received the same product consignment request after receiving the product consignment request sent by the game server.

[0068] Specifically, when the transaction server receives a product processing request sent by the game server, it will pre-store different product processing requests in a request list, set the request status of each product processing request in the request list to the request received status, and record the request number (request identifier) ​​of each product processing request in the request list, and use the request identifier to perform index detection in the request table.

[0069] Specifically, the processing method further includes:

[0070] c1: Control the transaction server to check whether the consignment request for the goods has been stored in the request list based on the request identifier contained in the received consignment request for the goods.

[0071] c2: If the product consignment request is already stored in the request list, ignore the product consignment request.

[0072] c3: If the consignment request for the product is not stored in the request list, insert the consignment request for the product into the request list.

[0073] In this embodiment of the application, after the transaction server receives the product consignment request sent by the game server, it searches in the request list for a product consignment request with the same request identifier according to the request identifier corresponding to the product consignment request. If a product consignment request with the same identifier already exists in the request list, it means that the transaction server has previously received the same product consignment request. In order to avoid processing the product consignment request repeatedly, the received product consignment request will be ignored.

[0074] If no request with the same request identifier is found in the request table, it means that this is the first time the transaction server has received a product consignment request. In this case, the received product consignment request is inserted into the request list, and the requests are processed in the order of the product processing requests in the request table.

[0075] In one possible implementation, the operation of inserting a product consignment request into the request table can be performed by inserting the request in ascending order of time, based on the receiving time of each product processing request already included in the request table and the receiving time of the product consignment request.

[0076] For example, if the consignment request for this product is received at 13:00 on XX month XX year, and there are consecutive processing requests for product A and product B in the request table, and the processing request for product A is received at 10:00 on XX month XX year, and the processing request for product B is received at 17:00 on XX month XX year, then this consignment request for this product should be written between the processing requests for product A and product B.

[0077] In one possible implementation, after determining that a product consignment request has been inserted into the request table, the transaction server begins to execute the request to list the target virtual product according to the instructions in the product consignment request. After determining that the transaction server has finished executing the listing request, the product status corresponding to the target virtual product is updated.

[0078] Specifically, the step "updating the product status of the target virtual product to 'listing' in the virtual product table of the transaction server based on the product identifier of the target virtual product" includes:

[0079] d1: Control the transaction server to write the product identifier of the target virtual product into the virtual product table, and perform the listing operation for the target virtual product, and update the product status corresponding to the product identifier recorded in the virtual product table to "listing".

[0080] In this embodiment of the application, after determining that a consignment request for goods has been received from the game server, the control transaction server writes the product identifier of the target virtual product into the virtual product list, and at the same time controls the transaction server to perform the listing operation of the target virtual product, and updates the product status corresponding to the product identifier recorded in the virtual product table to "listing".

[0081] In one possible implementation, the operation of inserting the product identifier of the target virtual product in the consignment request into the virtual product table can be performed by inserting the product identifier in ascending order of time, according to the receiving time of each virtual product already included in the virtual product table and the receiving time of the consignment request; or it can be performed by storing virtual products according to product categories, and writing virtual products belonging to the same product category into adjacent positions in the virtual product table (the virtual product table can be divided into regions in advance, or divided by different rows, and virtual products belonging to the same product category can be written into adjacent positions in the virtual product table).

[0082] In one possible implementation, after the transaction server executes the item consignment request sent by the game server, it returns the item processing result of successfully updating the item status of the target virtual item to the game server to indicate that the virtual item transaction was successful. Due to network issues between the game server and the transaction server, the game server may not receive the item processing result and may request the transaction server to execute the request again. In order to ensure that the transaction server does not affect the processing efficiency by executing the corresponding item consignment request again, the transaction server will persist the corresponding item processing result after the transaction server finishes processing.

[0083] Specifically, the processing method further includes:

[0084] e1: Control the transaction server to store the product processing results so that after receiving the same product consignment request sent by the game server again, the stored product processing results can be directly returned to the game server.

[0085] In this embodiment of the application, after the transaction server finishes executing the corresponding product consignment request, the obtained product processing result is persistently stored. After receiving the same product consignment request sent by the game server again, the stored product processing result is directly returned to the game server, saving result return time and improving the efficiency of transaction request processing.

[0086] In one possible real-time approach, after the transaction server sends the product processing result to the game server, the game server returns feedback information indicating that the result has been received to the transaction server. After receiving the feedback information from the game server, in order to save storage space, the transaction server deletes the persistently stored product processing result after confirming that the game server has executed the process successfully.

[0087] Furthermore, after the game server receives feedback from the trading server indicating that the virtual item has been successfully listed, it will notify the player of the latest progress in the processing of the virtual item.

[0088] Specifically, after the step of "sending the product processing result of successfully updating the product status of the target virtual product to the game server", the processing method further includes:

[0089] f1: Control the game server to generate a product consignment prompt message to prompt the player to sell the target virtual product through the trading server.

[0090] In this embodiment of the application, after the game server receives the product processing result returned by the transaction server indicating that the virtual product has been successfully listed, it can generate corresponding consignment prompt information to inform the player that the target virtual product has been successfully listed. The player can sell the target virtual product through the transaction service or track the transaction status of the target virtual product through the transaction server.

[0091] In one possible implementation, the game server can set the status of the persistently stored item consignment request to successful, delete the item consignment request after a preset storage period, and return feedback information to the transaction server to inform the transaction server that the item processing result has been received.

[0092] S103. When the game server crashes and restarts, it checks whether the target version number stored in the trading server is newer than the target version number stored in the game server. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0093] In this embodiment, for the game server, player data is stored in a character data file, specifically a database (db) file. The db module serializes player data in a near-self-describing format and stores it in the db file, which is then loaded into the game server's memory after the player logs in. Modifications to player data in the game are all in memory and are only serialized and written to the db file during the next save. Since modifying the db file is a time-consuming operation, changes to player data after processing item requests are not saved after each modification. If the game server crashes and player data has been updated but hasn't been saved yet, the update will be lost, resulting in a rollback.

[0094] Specifically, in one possible implementation, after the step of "sending the updated target version number and the product identifier of the consigned target virtual product to the transaction server", the processing method further includes:

[0095] g1: According to a preset time interval, control the game server to associate and store the target version number corresponding to the target virtual character, the updated virtual item holding quantity, and the virtual item consignment quantity into the character data file of the game server.

[0096] In this embodiment, the game server is controlled to perform data saving at preset time intervals. The game server stores the target version number corresponding to the target virtual character, the updated virtual item holding quantity, and the virtual item consignment quantity in the character data file of the game server. If the game server crashes and restarts, it can find the last save request based on the target version number and compare it with the target version number in the transaction server, thereby keeping the data between the game server and the transaction server consistent.

[0097] In one possible implementation, after determining that the game server has crashed, the game server is restarted. Then, based on the persistently stored item processing requests in the game server, item consignment requests are selected. According to the request identifier or item identifier stored in the item consignment request, the target version number stored in the item consignment request with the same request identifier or item identifier is requested from the trading server. It is then checked whether the target version number stored on the trading server is newer than the target version number stored on the game server. If so, it is determined that the records in the trading server and the game server are inconsistent. Finally, the virtual item status recorded on the trading server is adjusted according to the virtual item holding quantity and virtual item consignment quantity corresponding to the target version number recorded in the game server.

[0098] Specifically, the step "adjusting the virtual item status of the virtual items recorded on the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server" includes:

[0099] h1: Based on the target version number, the number of virtual items held by the target virtual character, and the number of virtual items consigned, stored in the character data file, adjust the virtual item status of the virtual items in the trading server after the game server crashes and restarts.

[0100] In this embodiment of the application, the corresponding target version number, the number of virtual goods held by the target virtual character, and the number of virtual goods consigned are found in the character data file, and the product status of the target virtual goods in the transaction server is adjusted.

[0101] Specifically, taking a target version number that is monotonically increasing as an example, if it is determined that the target version number stored in the transaction server is greater than the target version number in the game server, then the target virtual item in the transaction server needs to be adjusted to the state recorded in the game server to ensure that the two are consistent.

[0102] For example, if a player sends a consignment request to the trading server through the game server, requesting the trading server to list a target virtual item X, and the trading server lists the target virtual item X after receiving the consignment request, but the game server crashes and rolls back, the process of listing the target virtual item X is not recorded. For the target virtual character controlled by the player, the target virtual item X is still stored in the inventory. After checking the target version number, it can be found that the target version number of the trading server is greater than the target trading version number of the game server. At this time, the target virtual item X listed on the trading server needs to be removed to ensure that no identical virtual item appears in the game system, thus preventing a system loss.

[0103] The following will illustrate the processing procedure for virtual goods transactions in this application embodiment through specific examples. It is worth noting that this application embodiment uses the process of the game server sending a request to the transaction server to execute the purchase and listing of virtual goods as an example for explanation:

[0104] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating the data flow between the game server and the transaction server provided in an embodiment of this application, as shown below. Figure 2 As shown, the communication process between the game server and the transaction server is as follows:

[0105] Step 1: Players initiate a purchase request through the game server and check the basic requirements.

[0106] Step 2: The game server requests the latest order status from the trading server.

[0107] Step 3: The transaction server returns the latest order status based on the request from the game server.

[0108] Step 4: After verifying that the purchase conditions are met, the game server will execute the payment deduction process.

[0109] Step 5: The game server notifies the trading server of the purchase request.

[0110] Step 6: The transaction server checks the order status, inventory, and other conditions.

[0111] Step 7: If the transaction server fails the check, notify the game server to issue a refund.

[0112] Step 8: If the transaction server passes the check, it will initiate a modification of the product table based on the version number. If the modification fails, it will repeat twice starting from step 6.

[0113] Step 9: If the modification still fails after retrying, notify the game server for a refund.

[0114] Step 10: The commodity table on the transaction server has been successfully modified. The guild deposit table and transaction records have also been modified.

[0115] Step 11: The transaction server notifies the game server of the successful purchase and the item information.

[0116] Step 12: The game server notifies the player that they have received the item.

[0117] Consequences of errors occurring during the above process:

[0118] 1. Messages in steps 5, 7, and 9 are lost:

[0119] Causes: Network problem / Script error / RPC module error / Peer timeout / Process crash.

[0120] Consequence: The buyer lost their game currency.

[0121] 2. The message in step 11 was lost:

[0122] Causes: Network problem / Script error / RPC module error / Peer timeout / Process crash.

[0123] Consequence: The buyer lost the goods.

[0124] 3. Step 12 failed to execute:

[0125] Possible reasons: The buyer is offline / their inventory is full.

[0126] Consequence: The buyer lost the goods.

[0127] The virtual goods listing process in this application embodiment will be further described below:

[0128] A successful product listing process:

[0129] Step 1. The game server initiates an upload request:

[0130] a) Obtain the player's target version number x;

[0131] b) Serialize the request content and persist it on the game server;

[0132] c) Delete the product information from the player data and change its version number to x+1;

[0133] d) Send an RPC request to the microservice.

[0134] Step 2. The trading server receives the listing request:

[0135] a) First, insert the request into the MongoDB request table, where the request status is "received";

[0136] b) After the request table is successfully inserted, start the listing request: put the product information into the product table, and the status is listed as listing;

[0137] c) After the product table is successfully inserted, update the request result in the request table and set the request status to successful execution;

[0138] d) Send an RPC request to the game server to notify that the execution was successful.

[0139] Step 3. The game server receives the request result:

[0140] a) Notify players that the listing has been successfully completed;

[0141] b) Set the local persistence request status to success;

[0142] c) The transaction server request has been received.

[0143] Step 4. The transaction server receives confirmation from the game server:

[0144] a) Delete the corresponding request from the request table.

[0145] The following describes the possible errors in each step of the product listing process and the corresponding handling methods in the embodiments of this application:

[0146] Scenario 1: An error occurred in the above 1d step; the listing request sent by the game server to the trading server was lost, and the trading server did not receive it.

[0147] a) The game server has persisted the request content before sending the request;

[0148] b) The game server will have a heartbeat logic to check if a request has timed out and no result has been received, and will resend the request;

[0149] c) A timeout could also be due to network congestion, resulting in multiple identical retry requests. The request table on the transaction server uses the request number as a unique index; duplicate requests will fail to be inserted in step 2a and will therefore be ignored and not executed repeatedly.

[0150] Scenario 2: The above 2D step failed, and the game server did not receive the request result.

[0151] a) If the game server's heartbeat logic checks for a timeout request, it will resend the request;

[0152] b) The transaction server will find requests with the same request number and a status of successful execution, so it will directly reply with the request result.

[0153] Scenario 3: During the above process, the game server crashes:

[0154] a) After the game server crashes and restarts, check all requests persisted locally on the game server and compare the player version number p (stored on the trading server) stored in the request with the version number q in the player data after the crash and restart. If p > q, it indicates that a rollback has occurred, and notify the trading server to delete the corresponding item from the item table.

[0155] The method for processing virtual goods transactions in games provided in this application embodiment, in response to a virtual goods consignment instruction issued by a player, controls the game server to update the target virtual character's holding quantity and consignment quantity of the target goods based on the virtual goods consignment instruction, and updates the target version number corresponding to the target virtual character. A consignment request containing the target version number is then sent to the transaction server. The transaction server stores the target version number and, based on the product identifier of the target virtual goods, updates the product status of the target virtual goods in the virtual goods table on the transaction server to "listing," while simultaneously sending the successful update result of the target virtual goods' status to the game server. When the game server crashes and restarts, if the target version number stored on the game server is inconsistent with the target version number stored on the transaction server, and the target version number stored on the transaction server is newer than the target version number stored on the game server, then the virtual item status recorded on the transaction server is adjusted based on the virtual goods holding quantity and consignment quantity corresponding to the target version number stored on the game server. In this embodiment, when a player submits a consignment request for goods to the trading server through the game server, the corresponding target version number is recorded on both the game server and the trading server. After the game server crashes and restarts, the virtual item status recorded on the trading server is adjusted by comparing the corresponding target version numbers recorded on the game server and the trading server, so as to maintain data consistency between the game server and the trading server and help improve the accuracy of player transaction request processing.

[0156] Based on the same inventive concept, this application also provides a processing device for game virtual goods transactions corresponding to the processing method for game virtual goods transactions. Since the principle of the device in this application is similar to the processing method for game virtual goods transactions described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0157] Please see Figure 3 , Figure 4 , Figure 3 This is one of the structural schematic diagrams of a processing device for virtual goods transactions in a game, provided in an embodiment of this application. Figure 4 This is a second schematic diagram of a processing device for virtual game goods transactions provided in an embodiment of this application. Figure 3As shown, the processing device 300 includes:

[0158] The request sending module 310 is used to respond to a virtual goods consignment instruction issued by a player, control the game server to update the target virtual character's holding quantity and target goods consignment quantity based on the virtual goods consignment instruction, update the target version number corresponding to the target virtual character, and control the game server to send a goods consignment request to the trading server; the goods consignment request includes the target version number and the item identifier of the consigned target virtual goods;

[0159] The result return module 320 is used to control the transaction server to store the target version number in the product consignment request, and based on the product identifier of the target virtual product, update the product status of the target virtual product in the virtual product table of the transaction server to "listing", and send the product processing result of the successful update of the product status of the target virtual product to the game server, so as to sell the target virtual product through the transaction server; the virtual product table stores at least one consigned virtual product requested by the game server for consignment and the product status of each consigned virtual product;

[0160] The product status adjustment module 330 is used to detect whether the target version number stored in the transaction server is newer than the target version number stored in the game server after the game server crashes and restarts. If so, it adjusts the virtual item status of the virtual items recorded in the transaction server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0161] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a data storage module 340, which is used for:

[0162] According to a preset time interval, the game server is controlled to associate and store the target version number corresponding to the target virtual character, the updated virtual item holding quantity, and the virtual item consignment quantity into the character data file of the game server.

[0163] When the product status adjustment module 330 adjusts the virtual item status of the virtual items recorded on the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server, the product status adjustment module 330 is used to:

[0164] Based on the target version number, the number of virtual items held by the target virtual character, and the number of virtual items consigned, stored in the character data file, the virtual item status of the virtual items in the trading server is adjusted after the game server crashes and restarts.

[0165] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a request storage module 350, which is used for:

[0166] The game server is controlled to store the consignment request for the goods. If the game server does not receive the goods processing result from the transaction server within a preset time period after issuing the goods consignment request, the stored goods consignment request is resent to the transaction server, and the goods processing result returned by the transaction server is received.

[0167] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a plagiarism request module 360, which is used for:

[0168] The transaction server is controlled to search the request list to see if the consignment request for the goods has been stored, based on the request identifier contained in the received consignment request for the goods.

[0169] If the product consignment request is already stored in the request list, ignore the product consignment request;

[0170] If the consignment request for the product is not stored in the request list, the consignment request for the product is inserted into the request list.

[0171] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a result storage module 370, which is used for:

[0172] The transaction server is controlled to store the product processing results so that, upon receiving a new consignment request for the same product from the game server, the stored product processing results can be directly returned to the game server.

[0173] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a network anomaly early warning module 380, which is used for:

[0174] The system detects whether the number of times the game server sends a consignment request for goods to the transaction server within a preset time period exceeds a preset number.

[0175] If the limit is exceeded, a network anomaly alarm message will be generated.

[0176] In one possible implementation, such as Figure 4 As shown, the processing device 300 further includes a prompt information display module 390, which is used for:

[0177] The game server is controlled to generate a consignment notification message to prompt the player to sell the target virtual item through the trading server.

[0178] In one possible implementation, the target version number corresponding to the target virtual character is used to represent the number of times the target virtual character's target product holding quantity changes. When the target virtual character's target product holding quantity is updated, the target version number is updated simultaneously.

[0179] The quantity of the target item held by the target virtual character is updated in response to any of the following actions:

[0180] The target virtual character purchases virtual goods, and the target virtual character sells the virtual goods it owns to other virtual characters.

[0181] In one possible implementation, when the result return module 320 updates the product status of the target virtual product in the virtual product table of the transaction server to "listing" based on the product identifier of the target virtual product, the result return module 320 is used to:

[0182] The transaction server is controlled to write the product identifier of the target virtual product into the virtual product table, and to perform a listing operation for the target virtual product, and to update the product status corresponding to the product identifier recorded in the virtual product table to "listing".

[0183] The virtual item trading processing device provided in this application embodiment, in response to a virtual item consignment instruction issued by a player, controls the game server to update the target virtual character's holding quantity and consignment quantity of the target item based on the virtual item consignment instruction, and updates the target version number corresponding to the target virtual character. It then sends a consignment request containing the target version number to the trading server. The trading server stores the target version number and, based on the item identifier of the target virtual item, updates the item status of the target virtual item in the virtual item table on the trading server to "listing," while simultaneously sending the successful update result of the item status to the game server. When the game server crashes and restarts, if the target version number stored on the game server is inconsistent with the target version number stored on the trading server, and the target version number stored on the trading server is newer than the target version number stored on the game server, then the virtual item status recorded on the trading server is adjusted based on the virtual item holding quantity and consignment quantity corresponding to the target version number stored on the game server. In this embodiment, when a player submits a consignment request for goods to the trading server through the game server, the corresponding target version number is recorded on both the game server and the trading server. After the game server crashes and restarts, the virtual item status recorded on the trading server is adjusted by comparing the corresponding target version numbers recorded on the game server and the trading server, so as to maintain data consistency between the game server and the trading server and help improve the accuracy of player transaction request processing.

[0184] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 includes a processor 510, a memory 520, and a bus 530.

[0185] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530, causing the processor 510 to execute the following instructions during operation:

[0186] In response to a player's virtual item consignment instruction, the game server is controlled to update the target virtual character's holding quantity and consignment quantity of the target item based on the virtual item consignment instruction, and to update the target version number corresponding to the target virtual character. The game server is also controlled to send an item consignment request to the trading server. The item consignment request includes the target version number and the item identifier of the consigned target virtual item.

[0187] The transaction server stores the target version number in the consignment request for the product, and updates the product status of the target virtual product in the virtual product table of the transaction server to "listing" based on the product identifier of the target virtual product. The transaction server then sends the successful update result of the product status of the target virtual product to the game server, so that the target virtual product can be sold through the transaction server. The virtual product table stores at least one consignment virtual product requested by the game server and the product status of each consignment virtual product.

[0188] When the game server crashes and restarts, it checks whether the target version number stored in the trading server is newer than the target version number stored in the game server. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0189] In one possible implementation, the target version number corresponding to the target virtual character is used to represent the number of times the target virtual character's target product holding quantity changes. When the target virtual character's target product holding quantity is updated, the target version number is updated simultaneously.

[0190] The quantity of the target item held by the target virtual character is updated in response to any of the following actions:

[0191] The target virtual character purchases virtual goods, and the target virtual character sells the virtual goods it owns to other virtual characters.

[0192] In one possible implementation, the instructions executed by the processor 510 further include:

[0193] According to a preset time interval, the game server is controlled to associate and store the target version number corresponding to the target virtual character, the updated virtual item holding quantity, and the virtual item consignment quantity into the character data file of the game server.

[0194] The adjustment of the virtual item status recorded on the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server includes:

[0195] Based on the target version number, the number of virtual items held by the target virtual character, and the number of virtual items consigned, stored in the character data file, the virtual item status of the virtual items in the trading server is adjusted after the game server crashes and restarts.

[0196] In one possible implementation, the instructions executed by the processor 510, which update the product status of the target virtual product in the virtual product table of the transaction server to "listed" based on the product identifier of the target virtual product, include:

[0197] The transaction server is controlled to write the product identifier of the target virtual product into the virtual product table, and to perform a listing operation for the target virtual product, and to update the product status corresponding to the product identifier recorded in the virtual product table to "listing".

[0198] In one possible implementation, the instructions executed by the processor 510 further include:

[0199] The game server is controlled to store the consignment request for the goods. If the game server does not receive the goods processing result from the transaction server within a preset time period after issuing the goods consignment request, the stored goods consignment request is resent to the transaction server, and the goods processing result returned by the transaction server is received.

[0200] In one possible implementation, the transaction server further stores a request list, which stores item processing requests sent by the game server; the item processing requests include item consignment requests; the instructions executed by the processor 510 also include:

[0201] The transaction server is controlled to search the request list to see if the consignment request for the goods has been stored, based on the request identifier contained in the received consignment request for the goods.

[0202] If the product consignment request is already stored in the request list, ignore the product consignment request;

[0203] If the consignment request for the product is not stored in the request list, the consignment request for the product is inserted into the request list.

[0204] In one possible implementation, the instructions executed by the processor 510 further include:

[0205] The transaction server is controlled to store the product processing results so that, upon receiving a new consignment request for the same product from the game server, the stored product processing results can be directly returned to the game server.

[0206] In one possible implementation, the instructions executed by the processor 510 further include:

[0207] The system detects whether the number of times the game server sends a consignment request for goods to the transaction server within a preset time period exceeds a preset number.

[0208] If the limit is exceeded, a network anomaly alarm message will be generated.

[0209] In one possible implementation, the instructions executed by the processor 510 further include:

[0210] The game server is controlled to generate a consignment notification message to prompt the player to sell the target virtual item through the trading server.

[0211] By employing the above method, when a player submits a consignment request for an item to the trading server through the game server, the corresponding target version number is simultaneously recorded on both the game server and the trading server. After the game server crashes and restarts, the target version numbers recorded on both servers are compared to adjust the virtual item status recorded on the trading server, maintaining data consistency between the two and improving the accuracy of player transaction request processing. Furthermore, by storing the consignment request on the game server and the processing result on the trading server, a quick retry of the consignment request or a rapid return of the processing result to the game server can be achieved when the consignment request is retried, further improving the efficiency of player transaction request processing.

[0212] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following instructions:

[0213] In response to a player's virtual item consignment instruction, the game server is controlled to update the target virtual character's holding quantity and consignment quantity of the target item based on the virtual item consignment instruction, and to update the target version number corresponding to the target virtual character. The game server is also controlled to send an item consignment request to the trading server. The item consignment request includes the target version number and the item identifier of the consigned target virtual item.

[0214] The transaction server stores the target version number in the consignment request for the product, and updates the product status of the target virtual product in the virtual product table of the transaction server to "listing" based on the product identifier of the target virtual product. The transaction server then sends the successful update result of the product status of the target virtual product to the game server, so that the target virtual product can be sold through the transaction server. The virtual product table stores at least one consignment virtual product requested by the game server and the product status of each consignment virtual product.

[0215] When the game server crashes and restarts, it checks whether the target version number stored in the trading server is newer than the target version number stored in the game server. If so, it adjusts the virtual item status of the virtual items recorded in the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server.

[0216] In one possible implementation, the target version number corresponding to the target virtual character is used to represent the number of times the target virtual character's target product holding quantity changes. When the target virtual character's target product holding quantity is updated, the target version number is updated simultaneously.

[0217] The quantity of the target item held by the target virtual character is updated in response to any of the following actions:

[0218] The target virtual character purchases virtual goods, and the target virtual character sells the virtual goods it owns to other virtual characters.

[0219] In one possible implementation, the instructions executed by the computer-readable storage medium further include:

[0220] According to a preset time interval, the game server is controlled to associate and store the target version number corresponding to the target virtual character, the updated virtual item holding quantity, and the virtual item consignment quantity into the character data file of the game server.

[0221] The adjustment of the virtual item status recorded on the trading server based on the number of virtual items held and the number of virtual items consigned corresponding to the target version number stored in the game server includes:

[0222] Based on the target version number, the number of virtual items held by the target virtual character, and the number of virtual items consigned, stored in the character data file, the virtual item status of the virtual items in the trading server is adjusted after the game server crashes and restarts.

[0223] In one possible implementation, the instructions executed by the computer-readable storage medium, which update the product status of the target virtual product in the virtual product table of the transaction server to "listed" based on the product identifier of the target virtual product, include:

[0224] The transaction server is controlled to write the product identifier of the target virtual product into the virtual product table, and to perform a listing operation for the target virtual product, and to update the product status corresponding to the product identifier recorded in the virtual product table to "listing".

[0225] In one possible implementation, the instructions executed by the computer-readable storage medium further include:

[0226] The game server is controlled to store the consignment request for the goods. If the game server does not receive the goods processing result from the transaction server within a preset time period after issuing the goods consignment request, the stored goods consignment request is resent to the transaction server, and the goods processing result returned by the transaction server is received.

[0227] In one possible implementation, the instructions executable by the computer-readable storage medium further include a request list stored in the transaction server, the request list being used to store item processing requests sent by the game server; the item processing requests include item consignment requests; and also include:

[0228] The transaction server is controlled to search the request list to see if the consignment request for the goods has been stored, based on the request identifier contained in the received consignment request for the goods.

[0229] If the product consignment request is already stored in the request list, ignore the product consignment request;

[0230] If the consignment request for the product is not stored in the request list, the consignment request for the product is inserted into the request list.

[0231] In one possible implementation, the instructions executed by the computer-readable storage medium further include:

[0232] The transaction server is controlled to store the product processing results so that, upon receiving a new consignment request for the same product from the game server, the stored product processing results can be directly returned to the game server.

[0233] In one possible implementation, the instructions executed by the computer-readable storage medium further include:

[0234] The system detects whether the number of times the game server sends a consignment request for goods to the transaction server within a preset time period exceeds a preset number.

[0235] If the limit is exceeded, a network anomaly alarm message will be generated.

[0236] In one possible implementation, the instructions executed by the computer-readable storage medium further include:

[0237] The game server is controlled to generate a consignment notification message to prompt the player to sell the target virtual item through the trading server.

[0238] By employing the above method, when a player submits a consignment request for an item to the trading server through the game server, the corresponding target version number is simultaneously recorded on both the game server and the trading server. After the game server crashes and restarts, the target version numbers recorded on both servers are compared to adjust the virtual item status recorded on the trading server, maintaining data consistency between the two and improving the accuracy of player transaction request processing. Furthermore, by storing the consignment request on the game server and the processing result on the trading server, a quick retry of the consignment request or a rapid return of the processing result to the game server can be achieved when the consignment request is retried, further improving the efficiency of player transaction request processing.

[0239] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0240] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0241] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0242] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0243] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0244] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A processing method for a game virtual commodity transaction, characterized by, A virtual commodity transaction system applied to a game; the virtual commodity transaction system comprises a game server and a transaction server; the processing method comprises: In response to a virtual commodity consignment instruction issued by a player, the game server is controlled to update a target commodity holding quantity and a target commodity consignment quantity of a target virtual character based on the virtual commodity consignment instruction, and to update a target version number corresponding to the target virtual character, and the game server is controlled to send a commodity consignment request to the transaction server; the commodity consignment request comprises the target version number and a commodity identifier of a target virtual commodity to be consigned; wherein the target version number corresponding to the target virtual character is used to represent a change frequency of the target commodity holding quantity of the target virtual character, and when the target commodity holding quantity of the target virtual character is updated, the target version number is also updated; The transaction server is controlled to store the target version number in the commodity consignment request, and to update a commodity state of the target virtual commodity in a virtual commodity table in the transaction server based on the commodity identifier of the target virtual commodity, so that the commodity state of the target virtual commodity is updated to on the shelf, and a commodity processing result of successful commodity state updating of the target virtual commodity is sent to the game server, so that the target virtual commodity is sold through the transaction server; the virtual commodity table stores at least one consigned virtual commodity requested by the game server to be consigned and a commodity state of each consigned virtual commodity; After the game server is restarted, whether the target version number stored in the transaction server is newer than the target version number stored in the game server is detected according to the target version number found in the role data file last stored in the game server by the game server, and if so, the virtual commodity state of the virtual item recorded by the transaction server is adjusted based on the target version number corresponding to the virtual commodity holding quantity and the virtual commodity consignment quantity stored in the game server.

2. The processing method of claim 1, wherein In response to any one of the following behaviors, the target commodity holding quantity of the target virtual character is updated: The target virtual character purchases a virtual commodity, or the target virtual character sells a virtual commodity owned by the target virtual character to another virtual character.

3. The treatment method of claim 1, wherein After the game server is controlled to send the commodity consignment request to the transaction server, the processing method further comprises: The target version number corresponding to the target virtual character, the updated virtual commodity holding quantity and the virtual commodity consignment quantity are stored in the role data file of the game server at a preset time interval; The virtual commodity state of the virtual item recorded by the transaction server is adjusted based on the target version number corresponding to the virtual commodity holding quantity and the virtual commodity consignment quantity stored in the game server, comprising: Based on the target version number stored in the role data file, the virtual commodity holding quantity of the target virtual role, and the virtual commodity consignment quantity, the virtual commodity state of the virtual commodity in the transaction server is adjusted after the game server is restarted.

4. The treatment method of claim 1, wherein The virtual commodity state of the target virtual commodity in the virtual commodity table in the transaction server is updated to on shelf based on the commodity identifier of the target virtual commodity. The transaction server is controlled to write the commodity identifier of the target virtual commodity into the virtual commodity table, and perform the on-shelf operation for the target virtual commodity, and update the commodity state corresponding to the commodity identifier recorded in the virtual commodity table to on shelf.

5. The treatment method of claim 1, wherein The processing method further comprises: The game server is controlled to store the commodity consignment request, and when the game server does not receive the commodity processing result sent by the transaction server within a preset time period after sending the commodity consignment request, the stored commodity consignment request is resent to the transaction server, and the commodity processing result returned by the transaction server is received.

6. The treatment method of claim 1, wherein The transaction server also stores a request list, which is used to store the commodity processing request sent by the game server; The commodity processing request includes a commodity consignment request; the processing method further comprises: The transaction server is controlled to search in the request list based on the request identifier included in the received commodity consignment request, whether the commodity consignment request has been stored in the request list; If the commodity consignment request has been stored in the request list, the commodity consignment request is ignored; If the commodity consignment request has not been stored in the request list, the commodity consignment request is inserted into the request list.

7. The treatment method of claim 1, wherein The processing method further comprises: The transaction server is controlled to store the commodity processing result, so as to directly return the stored commodity processing result to the game server after receiving the same commodity consignment request sent by the game server again.

8. The treatment method of claim 1, wherein, In the processing method further comprises: Detecting whether the number of commodity consignment requests sent by the game server to the transaction server within a preset time period exceeds a preset number; If it exceeds, a network exception alarm information is generated.

9. The treatment method of claim 1, wherein, After the commodity processing result of updating the commodity state of the target virtual commodity successfully is sent to the game server, the processing method further comprises: The game server is controlled to generate a commodity consignment prompt information to prompt the player to sell the target virtual commodity through the transaction server.

10. A processing device for a game virtual commodity transaction, characterized by comprising: A virtual commodity transaction system applied to a game; the virtual commodity transaction system comprises a game server and a transaction server; the processing device comprises: The virtual commodity transaction system comprises a game server and a transaction server; the processing device comprises: The request sending module is configured to, in response to a virtual commodity consignment instruction issued by a player, control the game server to update a target commodity holding quantity and a target commodity consignment quantity of a target virtual character based on the virtual commodity consignment instruction, update a target version number corresponding to the target virtual character, and control the game server to send a commodity consignment request to the transaction server; the commodity consignment request includes the target version number and a commodity identifier of the target virtual commodity to be consigned; wherein the target version number corresponding to the target virtual character is used to represent a change frequency of the target commodity holding quantity of the target virtual character, and when the target commodity holding quantity of the target virtual character is updated, the target version number is also updated; The result returning module is configured to control the transaction server to store the target version number in the commodity consignment request, update a commodity state of the target virtual commodity in a virtual commodity table in the transaction server based on the commodity identifier of the target virtual commodity, and send a commodity processing result of successful updating of the commodity state of the target virtual commodity to the game server, so as to sell the target virtual commodity through the transaction server; the virtual commodity table stores at least one consigned virtual commodity requested to be consigned by the game server and a commodity state of each consigned virtual commodity. The commodity state adjusting module is configured to, after the game server is restarted, detect whether the target version number stored in the transaction server is newer than the target version number stored in the game server according to the target version number found in the role data file last stored in the game server, and if so, adjust a virtual commodity state of a virtual commodity recorded in the transaction server based on a virtual commodity holding quantity and a virtual commodity consignment quantity corresponding to the target version number stored in the game server.

11. An electronic device, comprising: The processor, the storage medium, and the bus, the storage medium stores the machine readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium are communicated through the bus, the processor executes the machine readable instructions, to execute the steps of the game virtual commodity transaction processing method as claimed in any one of claims 1 to 9. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the game virtual commodity transaction processing method as claimed in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Data synchronization method and device based on game retracement, and game system

    CN105427147A

  • Production data synchronization method and device, data synchronization system and server

    CN114490570A