CN111841022B - Method, device and terminal for determining stall in game - Google Patents

Method, device and terminal for determining stall in game Download PDF

Info

Publication number
CN111841022B
CN111841022B CN202010764656.6A CN202010764656A CN111841022B CN 111841022 B CN111841022 B CN 111841022B CN 202010764656 A CN202010764656 A CN 202010764656A CN 111841022 B CN111841022 B CN 111841022B
Authority
CN
China
Prior art keywords
target
booth
stall
virtual
identifier
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
CN202010764656.6A
Other languages
Chinese (zh)
Other versions
CN111841022A (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 CN202010764656.6A priority Critical patent/CN111841022B/en
Publication of CN111841022A publication Critical patent/CN111841022A/en
Application granted granted Critical
Publication of CN111841022B publication Critical patent/CN111841022B/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/85Providing additional services to players
    • A63F13/87Communicating with other players during game play, e.g. by e-mail or chat
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method, a device and a terminal for determining a booth in a game, comprising the following steps: acquiring a target identifier for each of a plurality of booths for a game; after acquiring a query request of a target virtual article sent by a game player, calculating a booth index based on name information of the target virtual article carried in the query request; a target booth is determined among the plurality of booths based on the target identifier and the booth index for each booth. According to the application, when a target stall containing target virtual articles is inquired, only the stall index and the target identifier of each stall are needed to be calculated, and all the virtual articles to be sold on the stall are not needed to be traversed, so that the inquiry efficiency of the target stall is improved.

Description

Method, device and terminal for determining stall in game
Technical Field
The application relates to the technical field of information query, in particular to a method, a device and a terminal for determining a stall in a game.
Background
The system is an important part in a game, can not only increase interaction among players and bear a part of social functions, but also enrich an economic system of the game. When players face thousands of booths, there is a need for a booth that filters items of interest quickly and efficiently.
In the traditional scheme, if the stall of the article of interest of the player is to be filtered out, all the current stall is required to be traversed, all the articles to be sold are traversed in turn for each stall, whether the article of interest of the player exists or not is checked, and if the article of interest of the player exists, the stall of interest of the player exists.
Obviously, the above-described manner of determining the booth of interest to the player has the problems of high workload and inefficiency.
Disclosure of Invention
The application aims to provide a method, a device and a terminal for determining a stall in a game, which are used for solving the problems of large workload and low efficiency of the existing method for determining the stall of interest of a player.
In a first aspect, an embodiment of the present application provides a method for determining a booth in a game, including: obtaining a target identifier of each of a plurality of booths of a game, wherein the target identifier is used for representing virtual articles to be sold contained in the corresponding booth, and the target identifier is calculated according to the number of the virtual articles to be sold contained in the booth; after a query request of a target virtual article sent by a game player is obtained, calculating a booth index based on name information of the target virtual article carried in the query request; determining a target booth among the plurality of booths based on the target identifier of each booth and the booth index, wherein the target booth contains virtual articles for sale including the target virtual articles.
Further, obtaining a target identifier for each of a plurality of booths for the game includes: acquiring the number of the virtual article for sale; determining a target number corresponding to each stall according to the virtual articles to be sold and the numbers of the virtual articles to be sold contained in each stall; and calculating the target identifier of each stall according to the target number corresponding to each stall.
Further, calculating the target identifier of each booth according to the target number corresponding to each booth includes: acquiring an initial identifier of each stall, wherein the identification information of each position of the initial identifier is a first preset value; setting the identification information of the first position in the initial identifier of each stall to be a second preset value to obtain a target identifier of each stall; the first position is an nth position in the order from right to left in the initial identifier of each booth, and the value of N is the same as the target number.
Further, calculating a booth index based on the name information of the target virtual object carried in the query request includes: determining a number corresponding to the target virtual article based on the name information of the target virtual article; and calculating the stall index according to the number corresponding to the target virtual object.
Further, calculating the booth index according to the number corresponding to the target virtual object includes: acquiring an initial booth index, wherein the identification information of each position of the initial booth index is a first preset value; setting the identification information of the second position in the initial booth index as a second preset value to obtain the booth index; the second position is an Mth position in the initial booth index according to the order from right to left, and the value of M is the same as the number corresponding to the target virtual article.
Further, determining a target booth among the plurality of booths based on the target identifier for each booth and the booth index comprises: performing AND operation on the stall index and the target identifier of each stall to obtain an AND operation result; and determining the target stall according to the AND operation result.
Further, the method further comprises: acquiring an update request of virtual articles for sale of a stall; updating a target identifier of the booth based on the update request.
Further, when the update request is a request to add a virtual article to be sold, updating the target identifier of the booth based on the update request includes: determining the number of the virtual article to be added for sale based on the update request; and updating the target identifier of the stall according to the number of the virtual article to be added for sale.
Further, updating the target identifier of the booth according to the number of the virtual article to be added for sale includes: setting the identification information of a third position in the target identifier of the stall as a second preset value to obtain an updated target identifier; and the third position is the P position in the right-to-left order in the target identifier of the stall, and the value of P is the same as the number of the virtual article to be added for sale.
Further, when the update request is a request to remove virtual items to be sold, updating the target identifier of the booth based on the update request includes: determining the number of the virtual article to be removed for sale based on the update request; and updating the target identifier of the stall according to the number of the virtual article to be removed for sale.
Further, updating the target identifier of the booth according to the number of the virtual article to be removed for sale includes: setting the identifier of the fourth position in the target identifier of the stall as a first preset value to obtain an updated target identifier; the fourth position is the Q position in the right-to-left order in the target identifier of the stall, and the value of Q is the same as the number of the virtual article to be removed for sale.
In a second aspect, an embodiment of the present application further provides a device for determining a booth in a game, including: the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a target identifier of each of a plurality of booths of a game, the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, and the target identifier is calculated according to the numbers of the virtual articles to be sold contained in the booths; the computing unit is used for computing a booth index based on name information of a target virtual object carried in a query request after the query request of the target virtual object sent by a game player is acquired; a determining unit configured to determine a target booth among the plurality of booths based on the target identifier of each booth and the booth index, wherein the target booth contains the target virtual article among the virtual articles for sale.
In a third aspect, an embodiment of the present application further provides a terminal, including a memory, and a processor, where the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method in any one of the first aspects when executing the computer program.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the first aspects.
In an embodiment of the present application, a method for determining a booth in a game is provided, the method comprising: the method comprises the steps of firstly obtaining a target identifier of each of a plurality of booths of a game, wherein the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, the target identifier is obtained by calculating according to the numbers of the virtual articles to be sold contained in the booths, then, after obtaining a query request of the target virtual articles sent by a game player, calculating a booths index based on name information of the target virtual articles carried in the query request, and finally, determining the target booths containing the target virtual articles in the booths based on the target identifier of each booths and the booths index. According to the application, on the basis that the virtual articles to be sold are represented by numbers, each stall is represented by the target identifier, and the query request of the target virtual articles is represented by the stall index, so that when the target stall containing the target virtual articles is determined, the stall index and the target identifier of each stall are calculated, and all the virtual articles to be sold on the stall are not required to be traversed, thus the query efficiency of the target stall is improved, the stall where the virtual articles of interest to the game player are located can be queried rapidly and efficiently, and the problems of large workload and low efficiency of the existing mode for determining the stall of interest to the player are solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for determining a booth in a game according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for obtaining a target identifier for each booth according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for computing a booth index according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a determining apparatus for a booth in a game according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions of the present application will be clearly and completely described in connection with the embodiments, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, when a game player inquires the stall where the virtual object of interest is located, the player traverses all the virtual objects in all the current stalls, so that the workload is high, the efficiency is low and the user experience is poor.
Based on the above, the embodiment of the application provides a method, a device and a terminal for determining a stall in a game, which are used for solving the problems of large workload and low efficiency of the existing method for determining the stall interested by a player.
For the sake of understanding the present embodiment, first, a detailed description will be given of a method for determining a booth in a game disclosed in the present embodiment, referring to a flowchart of a method for determining a booth in a game shown in fig. 1, the method may be executed by a server, and mainly includes the following steps:
step S102, a target identifier of each of a plurality of booths for the game is obtained.
The target identifier is used for representing the virtual articles to be sold contained in the corresponding stall, and is calculated according to the number of the virtual articles to be sold contained in the stall.
In the embodiment of the application, the virtual articles to be sold are represented by numbers, and each virtual article to be sold corresponds to a unique number. For example, the number corresponding to the A virtual item is 1, the number corresponding to the B virtual item is 2, the number corresponding to the C virtual item is 3, the number corresponding to the D virtual item is 4, and so on.
On the basis that the virtual articles for sale are represented by numbers, each stall is represented by a target identifier, and the target identifier is calculated according to the numbers of the virtual articles for sale contained in the stall, so that the target identifier can represent the virtual articles for sale contained in the corresponding stall.
In the booth of the actual game, only the virtual articles included in the booth for sale are displayed, and the target identifier is not displayed.
Step S104, after obtaining the query request of the target virtual article sent by the game player, calculating the stall index based on the name information of the target virtual article carried in the query request.
Specifically, after the game player sends the query request of the a virtual article, the server can calculate the stall index based on the name information of the a virtual article carried therein, where the stall index is an index for querying the target stall.
Step S106, determining a target booth among the plurality of booths based on the target identifier and the booth index for each booth.
The virtual articles for sale contained in the target booth contain target virtual articles.
It should be noted that the target booth determined by the above process may be one or more. If the target virtual articles are multiple, the virtual articles for sale contained in the finally determined target booth can only contain one or multiple target virtual articles. For example, the target virtual articles are an a virtual article and a B virtual article, and the virtual articles included in the finally determined target booth for sale may be only the a virtual article, or may be the a virtual article and other virtual articles other than the B virtual article, or may be the a virtual article and the B virtual article, or may be the a virtual article, the B virtual article, or other virtual articles other than the a virtual article and the B virtual article.
In an embodiment of the present application, a method for determining a booth in a game is provided, the method comprising: the method comprises the steps of firstly obtaining a target identifier of each of a plurality of booths of a game, wherein the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, the target identifier is obtained by calculating according to the numbers of the virtual articles to be sold contained in the booths, then, after obtaining a query request of the target virtual articles sent by a game player, calculating a booths index based on name information of the target virtual articles carried in the query request, and finally, determining the target booths containing the target virtual articles in the booths based on the target identifier of each booths and the booths index. According to the embodiment of the application, on the basis that the virtual articles to be sold are represented by numbers, each stall is represented by the target identifier, and the query request of the target virtual articles is represented by the stall index, so that when the target stall containing the target virtual articles is determined, the stall index and the target identifier of each stall are calculated, and all the virtual articles to be sold on the stall are not required to be traversed, so that the query efficiency of the target stall is improved, the stall where the virtual articles of interest to the game player are located can be queried rapidly and efficiently, and the problems of large workload and low efficiency of the existing method for determining the stall of interest of the player are solved.
The foregoing briefly describes a method of determining a booth in a game of the present application, and the details of which are set forth below.
In an alternative embodiment of the present application, referring to fig. 2, step S102 of obtaining a target identifier for each of a plurality of booths for a game includes the steps of:
step S201, obtaining the number of the virtual article to be sold.
All the virtual articles to be sold are numbered in advance, namely, the serial numbers are generally sequential, namely, the serial numbers are numbered according to the sequence of 1,2,3,4 and …, and when the serial numbers are numbered, the serial numbers corresponding to each virtual article to be sold are ensured to be unique. After the numbering is finished in advance, the server can acquire the number of the virtual article for sale.
Step S202, determining a target number corresponding to each stall according to the virtual articles to be sold and the numbers of the virtual articles to be sold contained in each stall.
This process is illustrated below:
if the number of the virtual article to be sold is: the number of the virtual article A is 1, the number of the virtual article B is 2, the number of the virtual article C is 3, the number of the virtual article D is 4, and the virtual article to be sold contained in one stall is the virtual article B, so that the corresponding target number of the stall is 2.
Step S203, calculating the target identifier of each booth according to the target number corresponding to each booth.
The method specifically comprises the following steps:
1, obtaining an initial identifier for each booth.
The identification information of each position of the initial identifier is a first preset value.
In the embodiment of the present application, the first preset value may be 0, so that the initial identifier is 0.
And 2, setting the identification information of the first position in the initial identifier of each stall as a second preset value to obtain the target identifier of each stall.
The first position is the nth position in the order from right to left in the initial identifier of each booth, and the value of N is the same as the target number. The second preset value may be 1.
For example, if the initial identifier of a certain booth is 0 and the target number corresponding to the booth is 2, then the identification information of the 2 nd position in the order from right to left in the initial identifier of the booth is set to be 1, so as to obtain the target identifier of the booth as follows: 10; for another example, the target numbers corresponding to a certain booth are 2 and 4, and then the identification information of the 2 nd and 4 th positions in the order from right to left in the initial identifier of the booth is set to be 1, so as to obtain the target identifier of the booth as follows: 1010.
when implemented, the pseudocode is as follows:
Flag=0;
for item in currently sells all:
flag|= (1 < < (item number-1))
Flag=0 means that the initial identifier is 0, flag|= (1 < < (item number-1)) is equivalent to: flag=flag| (1 < < (item number-1)); wherein 1< < (item number-1) represents a 1 right shift (item number-1) bit.
For example, if the virtual article is A, then 1 moves to the right by 0 bit, which is 1; if the virtual article is B, 1 moves to the right by 1 bit, namely 10; and if the virtual article is C, shifting 1 to the right by 2 bits to obtain 100.
Flag < (1 < < (item number-1)) means that the results after Flag and right shift are made or calculated.
As described above, if the right shift result is 100 and flag is initially 0, the result is 100 after the or operation. That is, in the case where the virtual article in the booth is C, the target identifier of the booth is finally determined to be 100.
The pseudo code process corresponds to a process of setting the corresponding position of the initial identifier to 1, wherein the corresponding position is the nth bit from right to left in the initial identifier, and the value of N is the same as the target number.
The above describes the process of obtaining the target identifier for each booth in detail, and the process of calculating the booth index is described below.
In an alternative embodiment of the present application, referring to fig. 3, step S104 of calculating a booth index based on name information of a target virtual object carried in a query request includes the steps of:
step S301 determines the number corresponding to the target virtual article based on the name information of the target virtual article.
For example, the name information of the target virtual article is a, and as described above, the number corresponding to the target virtual article a is 1.
Step S302, calculating a stall index according to the number corresponding to the target virtual article.
The method specifically comprises the following steps:
1) An initial booth index is obtained.
The identification information of each position of the initial booth index is a first preset value.
2) Setting the identification information of the second position in the initial stall index as a second preset value to obtain the stall index.
The second position is the M position in the initial stall index according to the order from right to left, and the value of M is the same as the number corresponding to the target virtual article.
The procedure for determining the booth index is similar to the procedure 1 and 2 described above, and the detailed description is omitted herein.
In an alternative embodiment of the present application, a method for determining a target booth based on a target identifier and a booth index for each booth, the method for determining a target booth among a plurality of booths based on a target identifier and a booth index for each booth comprises the steps of:
performing AND operation on the stall index and the target identifier of each stall to obtain an AND operation result; and determining the target stall according to the AND operation result.
For example: the stall index is 100, and the identifiers of each stall are respectively: 1010 And (101, 10) performing an and operation as follows: 100& 1010=0100 & 1010=0, indicating that the first booth is not the target booth; 100& 101=100, indicating that the second booth is a target booth; 100& 10=100 & 010=0, indicating that the third booth is not the target booth. The target booth can thus be determined among a plurality of booths.
In a shimmy system, it is often the case that a booth owner updates virtual objects in the booth for sale, and based thereon, the method of the present application further includes the following processes (1) and (2):
(1) An update request for virtual items for sale at a booth is obtained.
(2) Updating the target identifier of the booth based on the update request.
Case one: when the update request is a request to add a virtual item to be sold, updating the target identifier of the booth based on the update request includes:
(21) Determining the number of the virtual article to be added for sale based on the update request;
if the name information of the virtual article to be added for sale carried in the update request is a, the corresponding number is 1 according to the description.
(22) Updating the target identifier of the booth according to the number of the virtual article to be added for sale.
The method specifically comprises the following steps: setting the identification information of a third position in the target identifier of the stall as a second preset value to obtain an updated target identifier; the third position is the P position in the target identifier of the stall in the order from right to left, and the value of P is the same as the number of the virtual article to be added for sale.
The pseudo code of the update process is: flag|= (1 < < (item number-1)), the meaning of which has been described above, is not described here again.
And a second case: when the update request is a request to remove virtual items to be sold, updating the target identifier of the booth based on the update request includes:
(23) Determining the number of the virtual article to be removed for sale based on the update request;
if the name information of the virtual article to be removed and sold carried in the update request is B, the corresponding number is 2 according to the description.
(24) Updating the target identifier of the booth according to the number of the virtual article to be removed for sale.
The method specifically comprises the following steps: setting the identifier of the fourth position in the target identifier of the stall as a first preset value to obtain an updated target identifier; the fourth position is the Q position in the target identifier of the stall in the order from right to left, and the value of Q is the same as the number of the virtual article to be removed for sale.
The pseudo code of the update process is: flag = (1 < < (item number-1)) is equivalent to: flag=flag & } (1 < < > (item number-1)); wherein 1< < (item number-1) indicates 1 right shift (item number-1) bit, and (1 < (item number-1)) indicates inverting the right shift result.
For example, 100 is 011 and 1000 is 0111;
flag & (1 < < (item number-1)) means and operation with Flag (i.e., target identifier) and the inverted result.
The above-mentioned pseudo code process corresponds to a process of setting the corresponding position of the target identifier to 0, where the corresponding position is the Q-th position from right to left in the target identifier, and the Q value is the same as the number of the virtual article to be removed for sale.
According to the method for determining the stall in the game, the virtual articles to be sold are represented by numbers, each stall is represented by the target identifier, and the query request of the target virtual articles is represented by the stall index, so that when the target stall containing the target virtual articles is determined, the stall index and the target identifier of each stall are calculated, all the virtual articles to be sold on the stall are not required to be traversed, the query efficiency of the target stall is improved, and the stall where the virtual articles of interest to a game player are located can be queried quickly and efficiently.
The embodiment of the application also provides a device for determining the in-game booth, which is mainly used for executing the method for determining the in-game booth provided by the embodiment of the application, and the device for determining the in-game booth provided by the embodiment of the application is specifically introduced below.
FIG. 4 is a schematic view of a determining apparatus of a booth in a game according to an embodiment of the present application, as shown in FIG. 4, the determining apparatus of a booth in a game mainly includes: an acquisition unit 10, a calculation unit 20, and a determination unit 30, wherein:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a target identifier of each of a plurality of booths of a game, the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, and the target identifier is calculated according to the numbers of the virtual articles to be sold contained in the booths;
the computing unit is used for computing a booth index based on name information of the target virtual object carried in the query request after the query request of the target virtual object sent by the game player is acquired;
a determining unit for determining a target booth among the plurality of booths based on the target identifier and the booth index of each booth, wherein the target booth contains a target virtual article among the virtual articles for sale.
In an embodiment of the present application, a method for determining a booth in a game is provided, the method comprising: the method comprises the steps of firstly obtaining a target identifier of each of a plurality of booths of a game, wherein the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, the target identifier is obtained by calculating according to the numbers of the virtual articles to be sold contained in the booths, then, after obtaining a query request of the target virtual articles sent by a game player, calculating a booths index based on name information of the target virtual articles carried in the query request, and finally, determining the target booths containing the target virtual articles in the booths based on the target identifier of each booths and the booths index. According to the application, on the basis that the virtual articles to be sold are represented by numbers, each stall is represented by the target identifier, and the query request of the target virtual articles is represented by the stall index, so that when the target stall containing the target virtual articles is determined, the stall index and the target identifier of each stall are calculated, and all the virtual articles to be sold on the stall are not required to be traversed, thus the query efficiency of the target stall is improved, the stall where the virtual articles of interest to the game player are located can be queried rapidly and efficiently, and the problems of large workload and low efficiency of the existing mode for determining the stall of interest to the player are solved.
Optionally, the above-mentioned acquisition unit is further configured to: obtaining the number of the virtual article to be sold; determining a target number corresponding to each stall according to the virtual articles to be sold and the numbers of the virtual articles to be sold contained in each stall; and calculating the target identifier of each stall according to the target number corresponding to each stall.
Optionally, the above-mentioned acquisition unit is further configured to: acquiring an initial identifier of each stall, wherein the identification information of each position of the initial identifier is a first preset value; setting the identification information of the first position in the initial identifier of each stall as a second preset value to obtain a target identifier of each stall; the first position is the nth position in the order from right to left in the initial identifier of each booth, and the value of N is the same as the target number.
Optionally, the above computing unit is further configured to: determining a number corresponding to the target virtual article based on the name information of the target virtual article; and calculating the stall index according to the number corresponding to the target virtual object.
Optionally, the above computing unit is further configured to: acquiring an initial booth index, wherein the identification information of each position of the initial booth index is a first preset value; setting the identification information of the second position in the initial stall index as a second preset value to obtain a stall index; the second position is the M position in the initial stall index according to the order from right to left, and the value of M is the same as the number corresponding to the target virtual article.
Optionally, the determining unit is further configured to: performing AND operation on the stall index and the target identifier of each stall to obtain an AND operation result; and determining the target stall according to the AND operation result.
Optionally, the above device is further configured to: acquiring an update request of virtual articles for sale of a stall; updating the target identifier of the booth based on the update request.
Optionally, the above device is further configured to: when the update request is a request for adding the virtual articles to be sold, determining the numbers of the virtual articles to be added to be sold based on the update request; updating the target identifier of the booth according to the number of the virtual article to be added for sale.
Optionally, the above device is further configured to: setting the identification information of a third position in the target identifier of the stall as a second preset value to obtain an updated target identifier; the third position is the P position in the target identifier of the stall in the order from right to left, and the value of P is the same as the number of the virtual article to be added for sale.
Optionally, the above device is further configured to: when the update request is a request for removing the virtual articles to be sold, determining the numbers of the virtual articles to be removed and sold based on the update request; updating the target identifier of the booth according to the number of the virtual article to be removed for sale.
Optionally, the above device is further configured to: setting the identifier of the fourth position in the target identifier of the stall as a first preset value to obtain an updated target identifier; the fourth position is the Q position in the target identifier of the stall in the order from right to left, and the value of Q is the same as the number of the virtual article to be removed for sale.
The device provided by the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein. The device for determining the in-game booth provided by the embodiment of the application has the same technical characteristics as the method for determining the in-game booth provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the application also provides a terminal, which specifically comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method according to the above embodiments.
As an example, as shown in fig. 5, a computer device 400 provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus, said memory 402 storing machine-readable instructions executable by said processor 401, said processor 401 communicating with said memory 402 via the bus when the computer device is running, said processor 401 executing said machine-readable instructions to perform the steps of the method of determining a booth in a game as described above.
Specifically, the above-mentioned memory 402 and the processor 401 can be general-purpose memories and processors, and are not particularly limited herein, and the above-mentioned method of determining a booth in a game can be performed when the processor 401 runs a computer program stored in the memory 402.
Wherein the above-described computer device 400 may be used to perform the method of determining a booth in a game shown in fig. 1, the computer device 400 may be a development terminal.
Corresponding to the above method for determining a booth in a game, embodiments of the present application also provide a computer-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the steps of the above method for determining a booth in a game.
The determining device of the booth in the game provided by the embodiment of the application can be specific hardware on equipment or software or firmware installed on the equipment and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned. It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In the several embodiments provided in the present application, it should be understood that 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). It should also be noted that 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, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in 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 mobile control method according to 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 (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application, and should be included in the scope of the present application.

Claims (14)

1. A method of determining a booth in a game, comprising:
obtaining a target identifier of each of a plurality of booths of a game, wherein the target identifier is used for representing virtual articles to be sold contained in the corresponding booth, and the target identifier is calculated according to the number of the virtual articles to be sold contained in the booth;
after a query request of a target virtual article sent by a game player is obtained, calculating a booth index based on name information of the target virtual article carried in the query request;
determining a target booth among the plurality of booths based on the target identifier of each booth and the booth index, wherein the target booth contains virtual articles for sale including the target virtual articles.
2. The method of claim 1, wherein obtaining a target identifier for each of a plurality of booths for the game comprises:
acquiring the number of the virtual article for sale;
determining a target number corresponding to each stall according to the virtual articles to be sold and the numbers of the virtual articles to be sold contained in each stall;
and calculating the target identifier of each stall according to the target number corresponding to each stall.
3. The method of claim 2, wherein calculating the destination identifier for each booth based on the destination number corresponding to each booth comprises:
acquiring an initial identifier of each stall, wherein the identification information of each position of the initial identifier is a first preset value;
setting the identification information of the first position in the initial identifier of each stall to be a second preset value to obtain a target identifier of each stall;
the first position is an nth position in the order from right to left in the initial identifier of each booth, and the value of N is the same as the target number.
4. The method of claim 1, wherein calculating a booth index based on name information of the target virtual article carried in the query request comprises:
determining a number corresponding to the target virtual article based on the name information of the target virtual article;
and calculating the stall index according to the number corresponding to the target virtual object.
5. The method of claim 4, wherein calculating the booth index from the number corresponding to the target virtual object comprises:
acquiring an initial booth index, wherein the identification information of each position of the initial booth index is a first preset value;
setting the identification information of the second position in the initial booth index as a second preset value to obtain the booth index;
the second position is an Mth position in the initial booth index according to the order from right to left, and the value of M is the same as the number corresponding to the target virtual article.
6. The method of claim 1, wherein determining a target booth among the plurality of booths based on the target identifier for each booth and the booth index comprises:
performing AND operation on the stall index and the target identifier of each stall to obtain an AND operation result;
and determining the target stall according to the AND operation result.
7. The method according to claim 1, wherein the method further comprises:
acquiring an update request of virtual articles for sale of a stall;
updating a target identifier of the booth based on the update request.
8. The method of claim 7, wherein updating the target identifier of the booth based on the update request when the update request is a request to add a virtual article to be sold comprises:
determining the number of the virtual article to be added for sale based on the update request;
and updating the target identifier of the stall according to the number of the virtual article to be added for sale.
9. The method of claim 8, wherein updating the target identifier of the booth according to the number of the virtual article to be added for sale comprises:
setting the identification information of a third position in the target identifier of the stall as a second preset value to obtain an updated target identifier;
and the third position is the P position in the right-to-left order in the target identifier of the stall, and the value of P is the same as the number of the virtual article to be added for sale.
10. The method of claim 7, wherein updating the target identifier of the booth based on the update request when the update request is a request to remove virtual objects to be sold comprises:
determining the number of the virtual article to be removed for sale based on the update request;
and updating the target identifier of the stall according to the number of the virtual article to be removed for sale.
11. The method of claim 10, wherein updating the target identifier of the booth according to the number of the virtual article to be removed for sale comprises:
setting the identifier of the fourth position in the target identifier of the stall as a first preset value to obtain an updated target identifier;
the fourth position is the Q position in the right-to-left order in the target identifier of the stall, and the value of Q is the same as the number of the virtual article to be removed for sale.
12. A device for determining a booth in a game, comprising:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a target identifier of each of a plurality of booths of a game, the target identifier is used for representing virtual articles to be sold contained in the corresponding booths, and the target identifier is calculated according to the numbers of the virtual articles to be sold contained in the booths;
the computing unit is used for computing a booth index based on name information of a target virtual object carried in a query request after the query request of the target virtual object sent by a game player is acquired;
a determining unit configured to determine a target booth among the plurality of booths based on the target identifier of each booth and the booth index, wherein the target booth contains the target virtual article among the virtual articles for sale.
13. A terminal comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method of any of the preceding claims 1 to 11.
14. A computer readable storage medium storing machine executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of claims 1 to 11.
CN202010764656.6A 2020-07-31 2020-07-31 Method, device and terminal for determining stall in game Active CN111841022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010764656.6A CN111841022B (en) 2020-07-31 2020-07-31 Method, device and terminal for determining stall in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010764656.6A CN111841022B (en) 2020-07-31 2020-07-31 Method, device and terminal for determining stall in game

Publications (2)

Publication Number Publication Date
CN111841022A CN111841022A (en) 2020-10-30
CN111841022B true CN111841022B (en) 2023-10-27

Family

ID=72954311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010764656.6A Active CN111841022B (en) 2020-07-31 2020-07-31 Method, device and terminal for determining stall in game

Country Status (1)

Country Link
CN (1) CN111841022B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015164969A1 (en) * 2014-04-29 2015-11-05 Socialplay Inc. System and method for cross-application virtual goods management
CN108176054A (en) * 2017-12-27 2018-06-19 网易(杭州)网络有限公司 Virtual article trading method, apparatus, electronic equipment and storage medium
CN108579090A (en) * 2018-04-16 2018-09-28 腾讯科技(深圳)有限公司 Article display method, apparatus in virtual scene and storage medium
CN109107155A (en) * 2018-08-08 2019-01-01 腾讯科技(深圳)有限公司 Method of adjustment, device, terminal and the storage medium of virtual objects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015164969A1 (en) * 2014-04-29 2015-11-05 Socialplay Inc. System and method for cross-application virtual goods management
CN108176054A (en) * 2017-12-27 2018-06-19 网易(杭州)网络有限公司 Virtual article trading method, apparatus, electronic equipment and storage medium
CN108579090A (en) * 2018-04-16 2018-09-28 腾讯科技(深圳)有限公司 Article display method, apparatus in virtual scene and storage medium
CN109107155A (en) * 2018-08-08 2019-01-01 腾讯科技(深圳)有限公司 Method of adjustment, device, terminal and the storage medium of virtual objects

Also Published As

Publication number Publication date
CN111841022A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN108829610B (en) Memory management method and device in neural network forward computing process
US9009159B2 (en) Population and/or animation of spatial visualization(s)
CN108140050B (en) Method and device for filtering files by using bloom filter
CN112328842B (en) Data processing method and device, electronic equipment and storage medium
CN111462283A (en) Method, medium, device and apparatus for playing a large number of animations of the same character
CN111841022B (en) Method, device and terminal for determining stall in game
CN110652728A (en) Game resource management method and device, electronic equipment and storage medium
CN112308857A (en) Method and device for determining center line of blood vessel and readable storage medium
CN108288228B (en) Social network information acquisition method and device
CN111659125A (en) Game-based friend recommendation method and device and computer-readable storage medium
CN108390916B (en) Picture downloading method and terminal
CN115914387A (en) Resource sharing and data query method, device and server
CN107463374B (en) Subset model extraction method and system based on inheritance and association automatic deduction
CN113934799A (en) Data processing method, device, equipment and medium for event object
CN111939569B (en) Method, device and terminal for searching virtual articles in game
CN113326141A (en) Memory management method and device for block chain nodes
CN109561349B (en) Method and device for pushing video
CN106919451B (en) Data processing method and device
CN112657197A (en) Game role data processing method and device, electronic equipment and storage medium
CN111259100B (en) Road network topological structure construction method and device
CN116186059B (en) Flight data updating method, system, electronic device and storage medium
CN112541793B (en) Information processing method, information processing device and electronic equipment
CN112416208B (en) Interaction method based on materials, computing equipment and computer storage medium
CN105389462A (en) Method and apparatus for providing reading reference information of electronic reading material to users
CN108573001B (en) Method and apparatus for determining shortest path distance

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