CN111905376B - Virtual article data processing method, device and system and electronic equipment - Google Patents

Virtual article data processing method, device and system and electronic equipment Download PDF

Info

Publication number
CN111905376B
CN111905376B CN202010822884.4A CN202010822884A CN111905376B CN 111905376 B CN111905376 B CN 111905376B CN 202010822884 A CN202010822884 A CN 202010822884A CN 111905376 B CN111905376 B CN 111905376B
Authority
CN
China
Prior art keywords
transaction
virtual article
database
virtual
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010822884.4A
Other languages
Chinese (zh)
Other versions
CN111905376A (en
Inventor
邓博文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010822884.4A priority Critical patent/CN111905376B/en
Publication of CN111905376A publication Critical patent/CN111905376A/en
Application granted granted Critical
Publication of CN111905376B publication Critical patent/CN111905376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/33Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, a device and a system for virtual articles, and electronic equipment, wherein the method comprises the following steps: the estimated value of the virtual article stored in the database is updated at regular time through the database server according to the transaction data of the dynamic change of the virtual article; synchronizing the updated valuation value of the virtual article to the game server; caching the valuation value of the virtual object through the game server; when the game server receives the client login signal, the game server sends the cached valuation value of the virtual article to a sender of the client login signal. The technical scheme provided by the embodiment of the application can reduce the occupation of the game server, reduce the response time and avoid the game clamping.

Description

Virtual article data processing method, device and system and electronic equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a computer readable storage medium for processing data of a virtual article.
Background
In a game world with high degrees of freedom, the value of items that can be traded between players should be determined by the players, but in case of excessive trading volume by players, there is no suitable way to give a dynamic valuation of the items.
The more data is required for valuation, the closer to the real price, but the valuation algorithm for a large number of transaction data is done in memory, requiring a large number of server CPUs (Central Processing Unit, central processing units).
In the case that the transaction amount of the player is tens of millions of large data, if all transaction data are traversed and data operation is calculated, the server CPU needs to be occupied for a long time, and the game master logic server is occupied for a long time, so that the problems of slow game response and clamping are caused.
Disclosure of Invention
The embodiment of the application provides a data processing method of a virtual article, which is used for solving the problems of slow game response and stuck state of a server CPU (Central processing Unit) when the server CPU is occupied for a long time.
The embodiment of the application provides a data processing method of a virtual article, which comprises the following steps:
the estimated value of the virtual article stored in the database is updated at regular time through the database server according to the transaction data of the dynamic change of the virtual article;
synchronizing the updated valuation value of the virtual article to a game server;
caching the estimated value of the virtual object through the game server;
and when the game server receives the client login signal, the game server transmits the cached valuation value of the virtual article to a sender of the client login signal.
In an embodiment, before the database server updates the valuation value of the virtual article stored in the database at regular time according to the dynamically changed transaction data of the virtual article, the method further includes:
traversing the dynamically-changed transaction record table through the database server to screen out transaction data with transaction time within a preset time range;
and constructing a temporary table in the database to store the screened transaction data.
In one embodiment, after the database construction temporary table stores the screened transaction data, the method further comprises:
marking transaction data of which the transaction price is not in the effective price interval in the temporary table as invalid transaction according to the effective price interval correspondingly configured by different virtual articles through the database server;
and traversing the temporary table through double-layer cursor nesting, and removing transaction data marked as invalid transactions.
In one embodiment, the transaction data includes a transaction price and a transaction amount; the method for updating the valuation value of the virtual article stored in the database at regular time by the database server according to the transaction data of dynamic change of the virtual article comprises the following steps:
calculating the trading volume median of the virtual article according to the trading volume of each trade of the virtual article at regular time through the database server;
obtaining the estimated value of the virtual article according to the transaction price corresponding to the transaction amount median;
updating a valuation table of the database, the valuation table comprising valuation values for each virtual item.
In an embodiment, obtaining the valuation value of the virtual article according to the transaction price corresponding to the median of the transaction amounts includes:
and calculating the estimated value of the virtual article by weighting according to the transaction prices corresponding to the transaction quantity median of different time periods and the transaction total quantity of different time periods through the database server.
In an embodiment, the game server includes a scene server corresponding to different game scenes, and synchronizing the updated valuation value of the virtual article to the game server includes:
and when the scene server side is started, synchronizing the valuation table stored in the database to the started scene server side through the database server side.
In an embodiment, the database server includes a master database server and a slave database server, and updating, by the database server, the valuation value of the virtual article stored in the database at regular time according to the transaction data dynamically changed by the virtual article, including:
the transaction data is backed up to the slave library server side at regular time through the master library server side;
and when the data quantity of the transaction data is larger than a threshold value, switching to periodically updating the estimated value of the virtual article by the slave library server.
The embodiment of the application also provides a data processing system of the virtual article, which comprises:
the database server is used for updating the estimated value of the virtual article stored in the database at regular time according to the transaction data of the dynamic change of the virtual article; synchronizing the updated valuation value of the virtual article to a game server;
the game server is connected with the database server and used for caching the estimated value of the virtual article; and when receiving the client login signal, transmitting the cached valuation value of the virtual article to a sender of the client login signal.
The embodiment of the application provides a data processing device of a virtual article, which comprises:
the valuation updating module is used for updating the valuation value of the virtual article stored in the database at regular time through the database server according to the transaction data of the dynamic change of the virtual article;
the valuation synchronization module is used for synchronizing the updated valuation value of the virtual article to the game server;
the valuation caching module is used for caching the valuation value of the virtual article through the game server;
and the valuation issuing module is used for issuing the valuation value of the cached virtual article to the sender of the client login signal through the game server side when the game server side receives the client login signal.
The embodiment of the application also provides electronic equipment, which comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of the virtual article described above.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program executable by a processor to perform the data processing method of a virtual article described above.
According to the technical scheme provided by the embodiment of the application, the database server side carries out timing update of the estimated value of the virtual object according to the dynamically changed transaction data, and the updated result is synchronized to the game server side, so that the game server side does not need to calculate the estimated value, and even if the order of magnitude of the transaction data is very large, the CPU of the game server side is not occupied, thereby accelerating response and enabling operation to be smoother. The client can obtain the valuation value of the virtual article when logging in, and the game server is not required to be accessed once in each transaction, so that the occupation of a game CPU is further reduced, and the response of the client is also quickened.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below.
Fig. 1 is an application scenario schematic diagram of a data processing method of a virtual article according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a data processing system for a virtual article according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a flow chart of a data processing method of a virtual article according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for processing data of a virtual object according to another embodiment of the present application based on the corresponding embodiment of FIG. 4;
FIG. 6 is a detailed flowchart of step S410 in the corresponding embodiment of FIG. 4;
fig. 7 is a block diagram of a data processing device for a virtual article according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
Like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 is an application scenario schematic diagram of a data processing method for a virtual article according to an embodiment of the present application, where, as shown in fig. 1, the application scenario includes a database server 110, a game server 120, and a plurality of clients 130. Database server 110 may be a server running database software, i.e., a database server. The game server 120 may be a server running a game program. There may be multiple game servers 120. The client 130 may be a cell phone, tablet, notebook, or desktop.
The database server 110 and the game server 120 form a server cluster, and the database server 110, the game server 120 and the client 130 communicate with each other through a wired or wireless network. The database server 110 and the game server 120 may execute the data processing method for virtual articles provided by the embodiment of the present application, and the valuation calculation of the virtual articles is completed by the database server 110, so that the CPU of the game server 120 is not occupied. The estimated value of each virtual item calculated by the database server 110 may be synchronized to the game server 120, and thus the game server 120 may send the estimated value of each virtual item to the client 130 after the client 130 logs in (i.e., after a communication connection is established with the client 130).
In one embodiment, for a multi-CPU server, the database server 110 and the game server 120 may be the same server, one CPU running database software, the other CPU running game programs, the valuation calculation being performed by the database CPU so as not to occupy the game CPU.
FIG. 2 is a schematic diagram of a data processing system 200 for virtual articles according to an embodiment of the present application. As shown in fig. 2, the data processing system 200 includes a database server 110 and a game server 120.
The database server 110 is configured to update the estimated value of the virtual article stored in the database at regular time according to the transaction data dynamically changed by the virtual article; the updated valuation value of the virtual item is synchronized to the game server 120.
The game server 120 is connected with the database server 110 and is used for caching the estimated value of the virtual article; and when receiving the client login signal, transmitting the cached valuation value of the virtual article to a sender of the client login signal.
Fig. 3 is a schematic diagram of an electronic device 300 according to an embodiment of the present application, where the electronic device 300 includes a processor 310; a memory 320 for storing instructions executable by the processor 310; the processor 310 is configured to execute the data processing method of the virtual article provided by the embodiment of the application.
The processor 310 may be an integrated circuit chip with signal processing capabilities. The processor 310 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. Which may implement or perform the disclosed methods, steps, and logic blocks in embodiments of the application.
The Memory 320 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
Embodiments of the present application also provide a computer readable storage medium storing a computer program executable by the processor 310 to perform the data processing method of the virtual article provided by the embodiments of the present application.
Fig. 4 is a flow chart of a data processing method of a virtual article according to an embodiment of the present application. As shown in fig. 4, the method includes the following steps S410 to S440.
Step S410: the estimated value of the virtual article stored in the database is updated at regular time by the database server 110 according to the transaction data of the dynamic change of the virtual article.
The virtual article refers to a weapon, a medicine, a food, or the like which are traded between players in a virtual scene such as a game. The transaction data refers to transaction records of virtual articles between players, including article types, transaction prices, transaction amounts and the like, and the players can freely set the transaction prices. Over time, there are more and more trade orders, and the trade data is dynamically changing. The timed update may be a daily, weekly or monthly update. The database is used to store valuations of virtual items, and may be a relational database, such as a MYSQL database. In one embodiment, the estimated value of the virtual item may be calculated by MYSQL database server 110 from the transaction data of the virtual item. The estimated value of the virtual item may be calculated from transaction data of the virtual item history. For example, it may be an average of historical prices per transaction.
Step S420: the updated valuation value of the virtual item is synchronized to the game server 120.
Wherein the kinds of the virtual articles may be one or more, the valuation value of each virtual article may be stored in the form of a valuation table, and the valuation table may be directly transmitted to the game server 120. Synchronization means that after the evaluation value calculation is completed, when the game server 120 is turned on, the calculated evaluation value of each virtual article is sent to the game server 120, so that the evaluation table stored by the game server 120 is consistent with the database server 110.
Step S430: the estimated value of the virtual item is cached by the game server 120.
In one embodiment, the game server 120 may cache the rating table in memory. The cache is relatively permanent storage, and the time of a particular cache is not limited.
Step S440: when the game server 120 receives the client login signal, the game server 120 issues the cached valuation value of the virtual article to the sender of the client login signal.
In one embodiment, the client 130 may send a client login signal to the game server 120, where the client login signal may include a user name and a password, and the game server 120 performs verification of the user name and the password, and after the verification is successful, issues the cached valuation value of the virtual article to the client 130.
The client 130 may locally cache the valuation table so that valuation access is shortened from a few minutes to milliseconds, and the client 130 may select multiple virtual items simultaneously without extending valuation acquisition time due to multiple virtual items.
According to the technical scheme provided by the embodiment of the application, the database server 110 carries out the timing update of the estimated value of the virtual object according to the dynamically changed transaction data, and the updated result is synchronized to the game server 120, so that the game server 120 does not need to calculate the estimated value, and even if the order of magnitude of the transaction data is very large, the CPU of the game server 120 is not occupied, thereby accelerating the response and enabling the operation to be smoother. The client 130 can obtain the valuation value of the virtual article when logging in, and the game server 120 is not required to be accessed once per transaction, so that occupation of a game CPU is further reduced, and response of the client 130 is also quickened.
In an embodiment, before the step S410, as shown in fig. 5, the method provided in the embodiment of the present application further includes: step S401: traversing the dynamically-changed transaction record table through the database server 110, and screening transaction data with transaction time within a preset time range; step S402: and constructing a temporary table in a database to store the screened transaction data.
The transaction record table may be stored in a database of the database server 110, the transaction record table including transaction data for each transaction between different players, the transaction data for each transaction may include: parameters such as transaction number, transaction time, item type, transaction price, transaction amount, etc.
The preset time range may be the last 24 hours, the last week or the last month, or a specified period of time, for example, no. 5 to No. 20. The database server 110 can screen out the transaction data with the transaction time within the preset range according to the transaction time of each transaction, so that all the transaction data between the valuation calculation time ranges can be screened out. The database server 110 may store the screened transaction data in a temporary table. The temporary table is a temporary data table relative to the transaction record table, and is convenient for acquiring transaction data from the temporary table for processing to obtain the valuation table.
In an embodiment, as shown in fig. 5, after the step S402, the method provided by the embodiment of the present application further includes the following steps S403 to S404.
Step S403: and marking transaction data, of which the transaction price is not in the effective price interval, in the temporary table as invalid transaction according to the effective price intervals correspondingly configured by different virtual articles by the database server 110.
Since players can price freely, there may be too high or too low a trade price for a certain piece of trade data for the same virtual item, which may affect the valuation accuracy if this piece of trade data participates in the valuation calculation.
Therefore, for different virtual articles, an effective price section corresponding to the virtual article can be allocated. The effective price interval refers to that when the transaction price is within the effective price interval, the transaction price belongs to a normal price, and the transaction price does not belong to too high or too low and can participate in valuation calculation. Transaction data in the temporary table for which the transaction price is not within the valid price range may be marked as invalid transactions.
Step S404: and traversing the temporary table through double-layer cursor nesting, and removing transaction data marked as invalid transactions.
Therefore, the temporary table covers multiple transactions of each virtual article, for example, the buying and selling price of the X virtual articles in one transaction is 1 element, the quantity is 1, and the trading price of the X virtual articles in another transaction is 2 elements, and the quantity is 2. In addition, if the price of an item in a transaction is too high or too low, the transaction needs to be marked as invalid and does not participate in valuation calculation. It is therefore necessary to traverse the temporary table to retrieve the transaction data for each time. To traverse all transactional data, a vernier technique may be used.
Starting a cursor 1, traversing a temporary table, aggregating transaction data of the same type of articles to obtain transaction total amount and effective transaction total amount of each type of articles, obtaining data of each row, storing the data into the cursor 1, starting the cursor 1, performing LOOP circulation, obtaining article IDs of each row in the cursor 1, and the effective transaction total amount (such as X articles, transaction for two times, 3 transaction total amounts in effective prices, wherein the data of each row obtained by the cursor 1 comprises article category IDs and transaction total amounts, and effective transaction total amounts, then defining the cursor 2, nesting the cursor 1, screening the temporary table A, wherein the screening condition is that the article category IDs are equal to the article category IDs in the cursor 1, the transaction price, the transaction quantity and the effective transaction state of the transaction at this time can be screened, and at this time, the data traversing each transaction can be realized.
In one embodiment, the transaction data includes a transaction price and a transaction amount; as shown in fig. 6, the step S410 specifically includes steps S411 to S413.
Step S411: and calculating the median of the transaction amount of the virtual article according to the transaction amount of each transaction of the virtual article at regular time through the database server 110.
For example, assuming that there are 5 transaction data, the transaction amounts are sequentially 2, 3, 1, 3, 5, and 4, the median of the transaction amounts may be the lowest value of the above-mentioned transaction amounts sorted from small to large.
In one embodiment, a variable tt_accumulated value of 0 is defined in the second-layer cursor loop, and if the calculated value is less than one half of the total amount of the virtual object, and in one calculation, the calculated value is added to the total amount of the transaction, which is greater than one half of the total amount of the object, then the transaction amount is the median of the transaction amounts. If not, the next cursor cycle is continued, and the transaction amount of the last transaction is added to the calculated number, so that the process is repeated until the median of the transaction amount is found.
Step S412: and obtaining the estimated value of the virtual article according to the transaction price corresponding to the transaction amount median.
In one embodiment, the transaction price corresponding to the median of the transaction amount may be used as the estimated value of the virtual item.
To improve the accuracy of the estimated value, the database server 110 may weight and calculate the estimated value of the virtual article according to the transaction prices corresponding to the median of the transaction amounts in different time periods and the total transaction amounts in different time periods.
The time period may be in days, weeks or months, and the total amount of transactions refers to the sum of each transaction amount over the time period.
For example, assuming that the trade price corresponding to the trade volume median of the first month is 10, the trade volume of the first month is 1000, the trade price corresponding to the trade volume median of the second month is 11, the trade volume of the second month is 1500, the trade price corresponding to the trade volume median of the third month is 13, the trade volume of the third month is 1300, the trade price corresponding to the trade volume median of the fourth month is 12, and the trade volume of the fourth month is 1100, the estimated value of the weighted calculation virtual article can be referred to the following formula:
(10×1000+11×1500+13×1300+12×1100)/(1000+1500+1300+1100)
i.e. the sum of the transaction price corresponding to the median of the transaction amounts of the plurality of time periods multiplied by the total amount of the transaction divided by the sum of the total amount of the transaction amounts of the plurality of time periods, as the estimated value of the final output.
Step S413: updating a valuation table of the database, the valuation table comprising valuation values for each virtual item.
Since the virtual articles may be more in variety, the estimated value of each virtual article may be stored in a one-to-one correspondence in the estimation table, and after calculating the new estimated value, the estimation table stored in the database may be updated. Database server 110 may then synchronize the rating table to game server 120.
In an embodiment, the game service 120 may include a scene service corresponding to different game scenes, for example, in a sandboxed game, the whole game world is divided into a plurality of areas, and each area may correspond to a service. One region may be regarded as a game scene, and the service end corresponding to each region may be regarded as a scene service end. Step S420 may include the steps of: when a scene server is started, the database server 110 synchronizes the valuation table stored in the database to the started scene server.
The open service refers to that the scene service end is opened, different scene service ends can be simultaneously opened, and the appointed scene service end can be opened according to the requirement. After the scene service end takes service, a service-taking signal may be sent to the database service end 110, so that the database service end 110 may send the latest valuation table stored in the database to the scene service end that takes service.
When a player logs in the scene service end of the designated area through the client 130, the cached valuation tables can be sent to the client 130 by the scene service end of each area, and the client 130 can cache the valuation tables locally, so that the client 130 can quickly acquire valuation values of a plurality of virtual articles, and the response time of the client 130 is shortened.
In an embodiment, the database server 110 includes a master library server and a slave library server, and the step S410 may include the following steps: the transaction data is backed up to the slave library server side at regular time through the master library server side; and when the data quantity of the transaction data is larger than a threshold value, switching to periodically updating the estimated value of the virtual article by the slave library server.
Assuming that the data size of the transaction data is very large, the database server 110 may include a master library server and a slave library server that communicate with each other, and the valuation is always calculated at the master library server, which occupies the CPU of the master library server, so that the master library server may send all the transaction data to the slave library server for backup, so that the slave library server has the same transaction data as the master library server.
In one embodiment, the value estimation can be updated by the main library server when the data amount of the transaction data is about ten millions of data. Above this order of magnitude, the computing process may take up the CPU of the master library server for a long time, at which time it may switch to an updated computation of the estimated value by the slave library server.
In other embodiments, as the data size increases, if the calculation time of the master library server is longer, the calculation may be switched to the update calculation of the estimated value by the slave library server.
Because the game server 120 is connected to the database server 110, the value estimation needs to be synchronized, so that the master process of the master library server and the game server 120 is not affected, and the value estimation calculation can be switched to the slave library server when the game server 120 is shut down.
According to the technical scheme provided by the embodiment of the application, the valuation updating calculation is completed by the database server 110, so that the CPU of the game server 120 is prevented from being occupied by big data calculation; when the data volume is particularly large, transferring to the slave library server to execute update calculation, so as to thoroughly release occupation of the master library server and the game server 120; after the client 130 logs in, the valuations of all the virtual items can be obtained from the game server 120, so that even if the user selects a plurality of virtual items, the client 130 can quickly respond and display the valuations of the plurality of virtual items.
Conventionally, the price of a virtual article is configured by a game plan, free pricing of a player cannot be achieved, and user requirements cannot be met under the condition that supply and demand change at any time. The embodiment of the application can provide a proper estimated value for the user according to the historical transaction data, thereby improving the user experience.
The following is an embodiment of the apparatus of the present application, which may be used to execute the data processing method embodiment of the virtual article of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to an embodiment of a data processing method for a virtual article of the present application.
Fig. 7 is a block diagram of a data processing apparatus for virtual articles according to an embodiment of the present application. As shown in fig. 7, the apparatus includes: a valuation update module 710, a valuation synchronization module 720, a valuation caching module 730, and a valuation issue module 740.
The valuation updating module 710 is configured to update, through the database server, the valuation value of the virtual article stored in the database at regular time according to the transaction data dynamically changed by the virtual article;
a valuation synchronization module 720, configured to synchronize the updated valuation value of the virtual article to a game server;
a valuation caching module 730, configured to cache, by the game server, a valuation value of the virtual object;
and the valuation issuing module 740 is configured to issue, when the game server receives the client login signal, the cached valuation value of the virtual article to the sender of the client login signal through the game server.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the data processing method of the virtual article, and will not be described herein.
In the several embodiments provided in the present application, the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (9)

1. A method of data processing for a virtual article, comprising:
the estimated value of the virtual article stored in the database is updated at regular time through the database server according to the transaction data of the dynamic change of the virtual article;
synchronizing the updated valuation value of the virtual article to a game server;
caching the estimated value of the virtual object through the game server;
when the game server receives a client login signal, the game server transmits the cached valuation value of the virtual article to a sender of the client login signal;
wherein the transaction data comprises transaction price and transaction amount, and the method for obtaining the estimated value of the virtual article comprises the following steps:
calculating the trading volume median of the virtual article according to the trading volume of each trade of the virtual article at regular time through the database server; taking the transaction price corresponding to the transaction amount median as the estimated value of the virtual article, and updating the estimated value table of the database, wherein the estimated value table comprises estimated values of each virtual article;
or alternatively, the first and second heat exchangers may be,
and calculating the estimated value of the virtual article by weighting according to the transaction prices corresponding to the transaction quantity median of different time periods and the transaction total quantity of different time periods through the database server.
2. The method of claim 1, wherein the method further comprises, prior to updating the database stored valuation value of the virtual item at regular time by the database server based on dynamically changing transaction data of the virtual item:
traversing the dynamically-changed transaction record table through the database server to screen out transaction data with transaction time within a preset time range;
and constructing a temporary table in the database to store the screened transaction data.
3. The method of claim 2, wherein after the database construction temporary table stores the screened transaction data, the method further comprises:
marking transaction data of which the transaction price is not in the effective price interval in the temporary table as invalid transaction according to the effective price interval correspondingly configured by different virtual articles through the database server;
and traversing the temporary table through double-layer cursor nesting, and removing transaction data marked as invalid transactions.
4. The method of claim 1, wherein the game server comprises a scene server corresponding to a different game scene, and synchronizing the updated valuation value of the virtual item to the game server comprises:
and when the scene server side is started, synchronizing the valuation table stored in the database to the started scene server side through the database server side.
5. The method of claim 1, wherein the database server comprises a master database server and a slave database server, and updating the valuation of the virtual item stored in the database at regular time by the database server according to the dynamically changing transaction data of the virtual item comprises:
the transaction data is backed up to the slave library server side at regular time through the master library server side;
and when the data quantity of the transaction data is larger than a threshold value, switching to periodically updating the estimated value of the virtual article by the slave library server.
6. A data processing system for a virtual article, comprising:
the database server is used for updating the estimated value of the virtual article stored in the database at regular time according to the transaction data of the dynamic change of the virtual article; synchronizing the updated valuation value of the virtual article to a game server;
the game server is connected with the database server and used for caching the estimated value of the virtual article; when receiving a client login signal, transmitting the cached valuation value of the virtual article to a sender of the client login signal;
the transaction data comprises transaction price and transaction amount, and the database server side is used for obtaining the estimated value of the virtual article through the following modes:
calculating the trading volume median of the virtual article according to the trading volume of each trade of the virtual article at regular time; taking the transaction price corresponding to the transaction amount median as the estimated value of the virtual article, and updating the estimated value table of the database, wherein the estimated value table comprises estimated values of each virtual article;
or alternatively, the first and second heat exchangers may be,
and calculating the estimated value of the virtual article by weighting according to the transaction prices corresponding to the transaction quantity median of different time periods and the transaction total quantity of different time periods.
7. A data processing apparatus for a virtual article, comprising:
the valuation updating module is used for updating the valuation value of the virtual article stored in the database at regular time through the database server according to the transaction data of the dynamic change of the virtual article;
the valuation synchronization module is used for synchronizing the updated valuation value of the virtual article to the game server;
the valuation caching module is used for caching the valuation value of the virtual article through the game server;
the evaluation issuing module is used for issuing the cached evaluation value of the virtual article to a sender of the client login signal through the game server when the game server receives the client login signal;
wherein the transaction data comprises a transaction price and a transaction amount, and the valuation update module is configured to obtain an estimated value of the virtual item by:
calculating the trading volume median of the virtual article according to the trading volume of each trade of the virtual article at regular time through the database server; taking the transaction price corresponding to the transaction amount median as the estimated value of the virtual article, and updating the estimated value table of the database, wherein the estimated value table comprises estimated values of each virtual article;
or alternatively, the first and second heat exchangers may be,
and calculating the estimated value of the virtual article by weighting according to the transaction prices corresponding to the transaction quantity median of different time periods and the transaction total quantity of different time periods through the database server.
8. An electronic device, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of the virtual article of any one of claims 1-5.
9. A computer readable storage medium, characterized in that the storage medium stores a computer program executable by a processor to perform the data processing method of the virtual article of any one of claims 1-5.
CN202010822884.4A 2020-08-14 2020-08-14 Virtual article data processing method, device and system and electronic equipment Active CN111905376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010822884.4A CN111905376B (en) 2020-08-14 2020-08-14 Virtual article data processing method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010822884.4A CN111905376B (en) 2020-08-14 2020-08-14 Virtual article data processing method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN111905376A CN111905376A (en) 2020-11-10
CN111905376B true CN111905376B (en) 2023-10-27

Family

ID=73278138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010822884.4A Active CN111905376B (en) 2020-08-14 2020-08-14 Virtual article data processing method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN111905376B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346742A (en) * 2013-08-09 2015-02-11 聚游互动(北京)科技发展有限公司 Method and device for providing transaction reference prices of virtual goods in online games
CN108537592A (en) * 2018-04-10 2018-09-14 网易(杭州)网络有限公司 Transaction detection method, device, storage medium and electronic device
CN109364492A (en) * 2018-09-27 2019-02-22 腾讯科技(深圳)有限公司 Realize the method and device of game item transfer

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030073495A1 (en) * 2001-10-16 2003-04-17 D'amico Michael H. Local database gaming system techniques

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346742A (en) * 2013-08-09 2015-02-11 聚游互动(北京)科技发展有限公司 Method and device for providing transaction reference prices of virtual goods in online games
CN108537592A (en) * 2018-04-10 2018-09-14 网易(杭州)网络有限公司 Transaction detection method, device, storage medium and electronic device
CN109364492A (en) * 2018-09-27 2019-02-22 腾讯科技(深圳)有限公司 Realize the method and device of game item transfer

Also Published As

Publication number Publication date
CN111905376A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN111488396B (en) Data synchronization method and device for service data block chain
CN111488614A (en) Digital identity storage method and device based on service data block chain
US8868525B2 (en) Distributed information synchronization
CN107451013A (en) Data reconstruction method, apparatus and system based on distributed system
CN108809704B (en) Data deduplication statistical method and device based on dynamic time window
CN115511144A (en) Commodity sales data prediction method, commodity sales data prediction device, commodity sales data prediction equipment, commodity sales data prediction medium and commodity sales data prediction product
CN111737726A (en) Relation data query method and device based on business data block chain
CN114490741A (en) Time sorting method and device based on trusted block chain, electronic equipment and medium
CN111905376B (en) Virtual article data processing method, device and system and electronic equipment
CN108460110A (en) A kind of binary operation based on the codings of two dimension Golay in length and breadth is registered method and device
CN111782587A (en) Snapshot information recording method, device, equipment and storage medium
CN111488610A (en) State data query method and device based on service data block chain
CN111915340A (en) Merchant type identification method, device, equipment and storage medium
CN108363773A (en) A kind of method and device of registering based on binary operation
CN111488611B (en) Relation data storage method and device of business data block chain
CN111523137A (en) Data recommendation method and device based on service data block chain
CN111695136A (en) Method and system for realizing service data block chain
US10558647B1 (en) High performance data aggregations
CN111695137A (en) Travel data storage method and system based on business data block chain
CN111488606B (en) Data sharing method and device based on service data block chain
US20230144905A1 (en) Data prediction and proactive request system using artificial intelligence
CN113919903A (en) Method and device for determining resource information, server and storage medium
CN111737732A (en) Contract data storage method and device based on business data block chain
CN117390111A (en) Marketing index real-time aggregation method, device and equipment
CN111737734A (en) Intellectual property data storage method and device based on service data block chain

Legal Events

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