CN111190915B - Prop identification or role identification determining method, server and storage medium - Google Patents

Prop identification or role identification determining method, server and storage medium Download PDF

Info

Publication number
CN111190915B
CN111190915B CN202010003192.7A CN202010003192A CN111190915B CN 111190915 B CN111190915 B CN 111190915B CN 202010003192 A CN202010003192 A CN 202010003192A CN 111190915 B CN111190915 B CN 111190915B
Authority
CN
China
Prior art keywords
information
game server
configuration information
identification
prop
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
CN202010003192.7A
Other languages
Chinese (zh)
Other versions
CN111190915A (en
Inventor
管鹤鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010003192.7A priority Critical patent/CN111190915B/en
Publication of CN111190915A publication Critical patent/CN111190915A/en
Application granted granted Critical
Publication of CN111190915B publication Critical patent/CN111190915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Pinball Game Machines (AREA)

Abstract

The embodiment of the invention discloses a determination method, a server and a storage medium for prop identification or role identification. The method for determining the prop identifier or the role identifier comprises the following steps: acquiring first information in a configuration database and second information in an identification database; comparing the first process information in the first information with the second process information in the second information to obtain a comparison result; obtaining first configuration information of a first game server according to the comparison result, wherein the first game server is a current game server, and the first configuration information comprises a first global seed of the first game server; and sending the first configuration information to the first game server so that the first game server generates prop identification/role identification according to the first global seed. By adopting the embodiment of the invention, the globally unique determination of the prop identification/role identification can be realized.

Description

Prop identification or role identification determining method, server and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, a server, and a storage medium for determining a prop identifier or a role identifier.
Background
When some online games are operated in China, a plurality of game service areas exist in the online games due to a large user quantity. Subsequently, when a plurality of game service areas need to be opened, a developer needs to develop a special process module, and then the server detects and modifies repeated prop identifications/character identifications by using the special process module so as to ensure that different prop identifications/character identifications exist in the game service areas after the opening or closing of the game service areas.
With the increasing demand for opening and closing a game service area, repeated prop identification/character identification during opening and closing of the game service area becomes a problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a method, a server and a storage medium for determining prop identifications or role identifications, which can realize globally unique determination of prop identifications/role identifications.
In a first aspect, an embodiment of the present invention provides a method for determining a prop identifier or a role identifier, where the method is applied to a management server, and the method includes: acquiring first information in a configuration database and second information in an identification database, wherein the first information comprises attribute information of a current game server, and the second information comprises attribute information of a historical game server; comparing the first process information in the first information with the second process information in the second information to obtain a comparison result; obtaining first configuration information of a first game server according to the comparison result, wherein the first game server is a current game server, and the first configuration information comprises a first global seed of the first game server; and sending the first configuration information to the first game server so that the first game server generates prop identification/role identification according to the first global seed.
In the technical scheme, a management server acquires first information in a configuration database and second information in an identification database, determines first configuration information of a first game server according to a comparison result of first process information in the first information and second process information in the second information, and sends the first configuration information to the first game server. In the method, the first configuration information generated by the management server comprises a first global seed, the first global seed is generated in a self-adding mode and has uniqueness, so that the first game server can generate the prop identification/role identification with uniqueness according to the first global seed, and the globally unique determination of the prop identification/role identification can be realized.
In a second aspect, the present invention provides a prop identifier or role identifier determining device, where the device is applied to a management server, and the device includes:
the acquisition device is used for acquiring first information in the configuration database and second information in the identification database, wherein the first information comprises attribute information of a current game server, and the second information comprises attribute information of a historical game server;
the processing device is used for comparing the first process information in the first information with the second process information in the second information to obtain a comparison result;
The processing device is further used for obtaining first configuration information of a first game server according to the comparison result, wherein the first game server is a current game server, and the first configuration information comprises a first global seed of the first game server;
and the sending device is used for sending the first configuration information to the first game server so that the first game server generates the prop identifier/role identifier according to the first global seed.
In a third aspect, an embodiment of the present invention provides a server, where the server includes a memory, a processor, and a communication interface, where the memory stores a program, and the processor invokes the program instruction to implement a method for determining the prop identifier or the role identifier.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored therein computer program instructions which, when executed, implement a method of determining a prop or role identifier as described above.
By implementing the embodiment of the invention, the management server determines the first configuration information of the first game server by comparing the first process information of the current game server with the second process information of the history game server, wherein the first configuration information comprises the first global seed which is generated in a self-adding way and has uniqueness, so that the prop identifier/role identifier generated by the first game server in the follow-up process according to the first global seed also has uniqueness, and the globally unique determination of the prop identifier/role identifier can be realized.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system for determining a prop identifier or a role identifier according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for determining prop or role identifiers according to an embodiment of the present invention;
FIG. 3a is a schematic diagram of attribute information according to an embodiment of the present invention;
FIG. 3b is a schematic diagram of a list for obtaining attribute information of a game server according to an embodiment of the present invention;
FIG. 4 is a flowchart of obtaining first configuration information of a first game server according to a comparison result according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an identification database according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a first configuration information provided in an embodiment of the present invention;
FIG. 7 is a schematic diagram of a process generation rule algorithm according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a final. Txt file according to an embodiment of the present invention;
FIG. 9 is a flowchart of sending first configuration information to a first game server according to an embodiment of the present invention;
FIG. 10 is a flowchart of another method for determining a prop identifier or a role identifier according to an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of a determining device for prop identification or role identification according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
The embodiment of the invention provides a determination method, a server and a storage medium for prop identification or role identification. In the method for determining the prop identification or the role identification, a management server acquires first information of a current game server in a configuration management database and second information of a historical game server in an identification database, and according to a comparison result of first process information in the first information and second process information in the second information, first configuration information of a first game server is obtained, the first game server is the current game server, the first configuration information comprises a first global seed of the first game server, and then the first configuration information is sent to the first game server, so that the first game server generates the prop identification/the role identification according to the first global seed. The first global seeds are generated in a self-adding mode and have uniqueness, so that the prop identification/role identification generated by the first game server also has uniqueness, and the global uniqueness determination of the prop identification/role identification is realized.
In order to better understand the determining method, the server and the storage medium of the prop identifier or the role identifier disclosed in the embodiment of the present invention, the architecture of the system to which the embodiment of the present invention is applicable is first described below.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a prop identifier or role identifier determining system according to an embodiment of the present invention. As shown in fig. 1, the system is composed of a management server 101, a configuration management database 102, a first game server 103, and an identification database 104. The management server 101, the configuration management database 102, the first game server 103, and the identification database 104 may be integrated in one server or may be integrated in different servers. For example, the management server 101, the configuration management database 102, the first game server 103, and the identification database 104 are integrated in four different servers, respectively, or the management server 101 and the configuration management database 102 are integrated in one server, and the first game server 103 and the identification database 104 are integrated in another server, which is not limited herein. The management server 101 is an operation and maintenance manager. The configuration management database 102 (Configuration Management Database, CMDB) stores therein attribute information of the current game server, such as an external network segment, a device model, and an operating system version of the current game server. The first game server 103 is any current game server, the attribute information of the history game server is stored in the identification database 104, and the current game server is a game server determined when the history game server has capacity expansion or capacity shrinkage or operation failure. The system architecture shown in fig. 1 is for illustration only and is not to be construed as limiting the embodiments of the invention.
The prop ID/character ID is a unique number determined to distinguish the uniqueness of the prop/character in the network game, and may be expressed as prop Identity Document (prop ID)/character Identity Document (character ID). For example, in a game server, a prop named reply lotion and prop ID 12345667 indicates that in the game server, 1234567 uniquely represents the prop reply lotion.
In one implementation, as the number of game users increases, the game service area may have a need to open, that is, the game servers may have capacity expansion, that is, the number of game servers increases, and as the number of game servers increases, new prop/character identifiers may be generated in the current game server, where the newly generated prop/character identifiers may be the same as prop/character identifiers in the history game server. For example, in the early stage of trial operation of a game, the number of game servers laid out is 5, and as game developers are strongly promoting the game, so that game users are increasing, the original 5 game servers cannot meet the existing game user amount, so that the game developers need to increase the number of game servers from 5 to 10, or 20, and so on.
In one implementation, as the number of game users decreases, the need for a pool area occurs in the game service area, i.e., the game servers shrink in volume, i.e., the number of game servers decreases. When the game server has the capacity shrinkage phenomenon, the current game server after capacity shrinkage may have the same prop identification/role identification as the history game server, and in order to ensure the normal use of the user player, a special process module is required to detect and modify the prop identification/role identification. For example, the number of game servers in the game operation period is 25, the number of users in the game is continuously reduced in the later period of the game operation, in order to reduce the game operation cost, the game developer reduces the number of game servers, reduces the number of game servers from the original 25 to 10 or 6, and the like, and after the current game server is determined, a special process module is used for detecting and modifying the prop identification/role identification so as to ensure that the same prop identification/role identification does not exist in the game server.
In one implementation, if the game server fails during the running process, for example, the memory of the game server fails, or the motherboard fails, etc., the game developer needs to replace the failed historical game server with the current game server, so that the current game server ensures the normal running of the game.
In the above-described problems of capacity shrinkage of game servers and operational failure of game servers, the number of game servers is reduced and the game servers are replaced, and for any one of the two problems, the embodiment of the present invention provides a method for determining prop identification or character identification as shown in fig. 2, which includes but is not limited to: S201-S204.
S201: the management server obtains first information in the configuration database and second information in the identification database.
The attribute information of all current game servers is stored in a configuration database (CMDB), and the first information is attribute information of the current game server, for example, attribute information of any game server is shown in fig. 3a, including intranet internet protocol (Internet Protocol, IP), extranet IP, logical area, and the like. Specifically, the management server obtains the first information from an interface script provided by a program application interface (Application Programming Interface, API) in the CMDB. For example, the management server acquires the attribute information list of the game server shown in fig. 3b through the interface script of the base shell provided by the gettopmodularized host list.
The identification data stores second information, the second information is attribute information of the history game server, the second information comprises process information in the game server and global seeds of each process information, the global seeds are generated in a self-increasing mode, and the global seeds comprise guidded which range from 1 to 65535. The global seed is used for generating unique prop identifications/role identifications, wherein the global seeds of different process information are different, and the prop identifications/role identifications generated according to the global seeds are unique based on the global seed. The self-increment refers to that starting from the global seed of the last process information, the global seed and the self-increment are added to obtain the global seed of the current process information. The self increment is exemplified by 1, namely when new process information is added in the identification database, a global seed is generated for the new process information in a mode of adding 1 according to the global seed of the previous process information. As shown in FIG. 5, the self-increment column is the third column in FIG. 5, and the global seed is the guid seed value in FIG. 5. In the identification database, when the second process information b of the second game server is added, since the global seed of the last second process information a is 52013, the global seed generated for the second process information b by adding 1 from the list is 52014. The global seeds are obtained in a self-adding mode, so that the uniqueness of the global seeds corresponding to each process information can be guaranteed, and further, the prop identification/role identification generated by the game server according to the global seeds also has uniqueness.
S202: and the management server compares the first process information in the first information with the second process information in the second information to obtain a comparison result.
The first information is information of a current game server stored in the configuration database, the second information is information of a history game server stored in the identification database, the management server obtains comparison results by comparing the first process information in the first information with the second process information in the second information, different comparison results correspond to the running states of the history game server, and the running states of the history game server comprise running faults of the history game server or capacity shrinkage phenomenon of the history game server.
The specific mode of the management server comparing the first process information in the first information with the second process information in the second information is as follows: the management server extracts a process Key, namely a process identifier, from the first process information, and names the process Key as a new. Txt file, and extracts a process Key, namely an old. Txt file, from the second process information. And acquiring the process information in the new. Txt file and the old. Txt file through a comm command of the base shell, and comparing the process information of the new. Txt file and the old. Txt file to obtain a comparison result.
In one implementation, the management server obtains the process information existing in the new. Txt file but not existing in the old. Txt file through the comm command of the base shell, and names the process information as an add. Txt file, so as to obtain the first process information which is the process information in the newly added add. Txt file as a comparison result.
In one implementation, the process information in the new.txt file and the old.txt file obtained by the management server through the comm command of the base shell are the same, and the comparison result is that the first process information is updated, that is, the process information in the new.txt file is updated.
In one implementation, the management server obtains, through a comm command of the base shell, the process information that does not exist in the new. Txt file, but exists in the old. Txt file, names the new. Txt file as a final. Txt file, and obtains the comparison result as deleting the second process information, namely deleting the process information in the final. Txt file.
S203: and the management server obtains first configuration information of the first game server according to the comparison result.
The flow diagram of the management server obtaining the first configuration information of the first game server according to the different comparison results is shown in fig. 4. From fig. 4, it can be seen that, according to different comparison results, the management server obtains first configuration information of the first game server, where the first configuration information includes a first global seed, and the first global seed is generated by a self-adding manner and has uniqueness, so that after the first game server obtains the first configuration information, prop identifiers/character identifiers generated according to the first global seed also have uniqueness.
In one implementation, if the comparison result is newly added first process information, the first process information is added to the identification database to generate a first global seed of the first process information in a self-adding manner; the method comprises the steps of obtaining first full-quantity information of a first game server from an identification database, generating first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database, and the first configuration information comprises a first global seed. For example, as shown in fig. 5, the identification database stores second process information about a second game server, where the second game server is a history game server, the identification data includes a self-increasing column, the self-increasing column is used to generate a global seed in a mode of increasing 1, if the comparison result is newly increased first process information, the management server adds the first process information to the process information of the first game server, and generates a first global seed for the first process information in a mode of self-increasing column according to the global seed of the second process information, where the global seed of the second process information b in the previous row of the first process information is 52014, and the first global seed of the newly increased first process information is 52015.
Specifically, if the management server obtains the add. Txt file, which indicates that the comparison result is the newly added first process information, as shown in fig. 4, the sql statement file of insert is generated by the process information corresponding to the process Key existing in the add. Txt file, and the sql statement file is imported into the identification database; after the sql statement file is imported into the database, the management server generates a first global seed of first process information in the sql statement file in a self-increasing mode; then, the management server acquires first full-quantity information of the first game server from the identification database, and generates first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database after the first process information is newly added, so that the first configuration information comprises a first global seed of the first process information. For example, the management server generates first configuration information generated according to the first full amount information as shown in fig. 6, and as can be seen from fig. 6, the first configuration information includes a first global seed, i.e., a column of guidded in fig. 6. In fig. 6, server ID is game ID, name is game name, and key is process identification. the three columns of type, subtype and ch constitute a game scene, such as a wild or a copy. IP is an IP address, port is a port, capability is the number of available players in the server for entering, capability is designed by a developer, as in fig. 6, capability is 3000, which means that up to 3000 players can be online at the same time in the game server, capability can be modified by the developer, and guidded is the first global seed.
In one implementation, after the management server obtains the first full-quantity information of the first game server, the first configuration information is generated according to the first full-quantity information through a base shell script and a process generation rule algorithm written by a developer, the process generation rule algorithm is preset, the first configuration information comprises process information of the first game server, the process information comprises a process identifier, the process generation rule algorithm determines a value of the process identifier, different games have different process generation rule algorithms, and the process identifiers generated by different processes are different.
For example, in the risk island 2, as shown in fig. 7, a row of servers in fig. 7 represents a process module, where the process module includes a Center module, a logic module, and the like, a row of keys represents a process identifier, a row of keys represents relevant information of a game, in the row of keys, word ID is a game identifier, type is a Type of process module, and index is an account identifier. As can be seen from fig. 7, the process identifier Key in the process generation rule algorithm is obtained by combining three values of a game identifier Word ID, a process module Type and an account identifier index, for example, in the third row, the Word ID is 1, the Type is 2, the index is 001, and the three values of the Word ID, the Type and the index are combined in the order from front to back to be 12001, that is, the value of the process identifier Key. In other process rule generation algorithms, three values of Word ID, type and index may be combined in order from back to front to obtain a process identifier, i.e. a process Key.
In one implementation, if the comparison result is that the first process information is updated, copying the second process information into the process information of the first game server in the identification database; the method comprises the steps of obtaining first full-quantity information of a first game server from an identification database, and generating first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database.
Specifically, if the process information in the new. Txt file and the old. Txt file obtained by the management server are the same, which indicates that the comparison result is that the first process information is updated, as shown in fig. 4, the sql statement file of update is generated by the process information related to the process Key in the new. Txt file, the sql statement file is stored in the identification database, the first process information is updated in full, that is, the second process information is copied to the process information of the first game server in the identification database. Then, the management server acquires first full-quantity information of the first game server from the identification database, and generates first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database after updating the first process information, and the first configuration information is the configuration information after updating the first process information.
In one implementation, if the comparison result is that the second process information is deleted, setting an internet protocol field in the second process information as a non-internet protocol field in the identification database, so as to exclude a global seed of the second process information when generating a global seed of the first process information in a self-increasing manner, wherein the internet protocol field comprises an IP field and the non-internet protocol field comprises a NOIP.
Specifically, if the management server obtains the final. Txt file, which indicates that the comparison result is that the second process information is deleted, as shown in fig. 4, the IP corresponding to the process Key in the final. Txt file is changed to the NOIP, and the IP corresponding to the process Key is changed to the NOIP, so that the management server cannot be allocated to the process identifier and/or the global seed identical to the process information set as the NOIP when generating the second configuration information, so that the first game server cannot generate the prop identifier/the role identifier identical to the NOIP process information when generating the prop identifier/the role identifier according to the process identifier and the global seed later, so as to ensure the uniqueness of the prop identifier/the role identifier.
For example, in the final. Txt file shown in fig. 8, any one of the behavior process information, the first column is a global seed, the second example is a game ID, the third column is a game name, the fourth column is a process identifier, the fifth column, the sixth column and the seventh column form a game scene, the eighth column is an IP address, the ninth column is a port of a server, the tenth column is the number of entries available to the game player in the server, the first column is an example, the global seed is 1, the game ID is 1001, the game name is a queen town, the process identifier is 10010001, the game scene is a game scene indicated by 000, the IP address is 100.117. In fig. 8, if the deleted second process information is the process information shown in the third row, the IP field of the row is set to be the NOIP, so that when the management server generates the second configuration information, the process identifier and/or the global seed which are the same as those in the third process information are not generated, and further, the prop identifier/role identifier generated by the subsequent first game server is not the same as the prop identifier/role identifier corresponding to the process information, so that the globally unique determination of the prop identifier/role identifier can be realized.
In one implementation, the management server may further determine that the running state of the second game server is changed according to the comparison result. If the comparison results obtained by the management server are different, the running state of the second game server is determined to be changed. The changing of the running state of the second game server includes: the running state of the second game server is updated to be a fault state, the running state of the second game server is replaced by the first game server or the running state of the second game server is updated to be a capacity reduction state, the second game server and the associated game server are combined to be the first game server, the associated game server is other history game servers in the game operation process, for example, the history game server comprises a game server A, a game server B and a game server C in the game operation process, the first game server is a game server A, and the other game servers are a game server B and a game server C.
S204: the management server transmits the first configuration information to the first game server.
The first configuration information is configuration information of the first game server, which is obtained after the process information is updated by the identification database, so that the management server sends the first configuration information to the first game server, the first game server generates prop identification/role identification of the first game server according to the first global seed and the process identification in the first configuration information, and then the third configuration information is operated. Specifically, the first game server generates the prop identifier/role identifier according to the globally unique algorithm and the first global seed, that is, the first game server takes the first global seed as the input of the globally unique algorithm, outputs the prop identifier/role identifier, for example, the prop identifier/role identifier of the first game server is generated based on a snowflake algorithm, a database, a redis or a zookeeper.
In one implementation, the management server may perform the steps shown in fig. 9 before sending the first configuration information to the first game server, where the management server generates a hash value for the first configuration information according to a cryptographic hash function, where the cryptographic hash function includes an MD5 information digest algorithm, and where the hash value includes an MD5 code, and then sends the first configuration information and the hash value to the first game server through a preset batch tool to cause the first game server to verify the first configuration information according to the hash value, where the batch tool includes an secure, scp, and so on. When the first game server obtains first configuration information according to the hash value, the first configuration information is identical to the received first configuration information, the first configuration information is not tampered, the first configuration information is checked to pass, prop identification/role identification of the first game server is generated according to a first global seed in the first configuration information, and the third configuration information is operated.
In one implementation, the management server hashes the first configuration information according to a hashing algorithm to obtain a first hash value of the first configuration information before sending the first configuration information to the first game server, where the hashing algorithm may include, but is not limited to, a SHA512 algorithm, a SHA224 algorithm, a SHA384 algorithm, and the like. And then sending the first configuration information and the hash value to the first game server through a preset batch tool, so that the first game server checks the second configuration information according to the first hash value, when the first game server performs hash operation on the received first configuration information by using the same hash algorithm, if the obtained second hash value is the same as the first hash value, the first configuration information is not tampered, and when the first configuration information is checked, the first configuration information is operated.
In the embodiment of the invention, the management server obtains the comparison result by comparing the first process information of the first information with the second process information of the second information, then determines the first configuration information of the first game server according to the comparison result, wherein the determined first configuration information comprises the first global seed of the first game server, and the first global seed is generated by the management server in a self-increasing way and has uniqueness, so that the prop identifier/role identifier generated by the first game server according to the first global seed also has uniqueness after the first configuration information is received by the first game server. Therefore, the method can realize globally unique determination of the prop identification/role identification.
In the above-described capacity expansion phenomenon of game servers, an increase in the number of game servers may occur, and in response to the problem of the increase in the number of game servers, the embodiment of the present invention proposes a method for determining prop identifiers or character identifiers as shown in fig. 10, which may include, but is not limited to: S1001-S1006.
S1001: when the management server detects that the target game server is created, target attribute information of the target game server is acquired from the configuration database.
S1002: the management server generates second configuration information of the target game server according to the target attribute information.
S1003: the management server stores the second configuration information in the identification database.
The second configuration information comprises target process information, and the management server stores the second configuration information into the identification database to generate a second global seed of the target process information in a self-increasing manner.
S1004: the management server obtains the second full-quantity information of the target server from the identification database.
The second full-size information includes all information identifying the target game server stored in the database.
S1005: the management server generates third configuration information according to the second full-quantity information.
The third configuration information generated by the management server comprises the second configuration information and a second global seed, i.e. the management server obtains the third configuration information in the second global with respect to the target server.
S1006: the management server transmits the third configuration information to the target game server.
And sending the third configuration information to the target game server so that the target game server generates prop identifications/role identifications of the target game server according to the second global seeds and the process identifications in the third configuration information, wherein the second global seeds are generated by the management server in a self-adding mode, and the second global seeds have uniqueness, so that the prop identifications/role identifications generated by the target game server also have uniqueness, and the globally unique determination of the global prop identifications/role identifications is realized.
In the implementation of the invention, when the management server detects that the target game server is created, second configuration information is generated according to the target attribute information of the target game server stored in the configuration database, the second configuration information is stored in the identification database so as to generate a second global seed of the target game server, and the target game server generates prop identification/role identification according to the second global seed. Because the second global seed has uniqueness, the prop identifier/role identifier generated by the target game server also has uniqueness, and the method also realizes the globally unique determination of the prop identifier/role identifier.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a prop identifier or role identifier determining device provided in an embodiment of the present invention, where the prop identifier or role identifier determining device may be disposed in a management server, and the device 110 may include:
an obtaining device 1101, configured to obtain first information in a configuration database and second information in an identification database, where the first information includes attribute information of a current game server, and the second information includes attribute information of a history game server;
the processing device 1102 is configured to compare the first process information in the first information with the second process information in the second information to obtain a comparison result;
The processing device 1102 is further configured to obtain first configuration information of a first game server according to the comparison result, where the first game server is a current game server, and the first configuration information includes a first global seed of the first game server;
the sending device 1103 is configured to send the first configuration information to the first game server, so that the first game server generates a prop identifier/role identifier according to the first global seed.
In one implementation, the processing device 1102 is further configured to determine, according to the comparison result, that the running state of the second game server changes, where the second game server is a history game server, and the running state of the second game server changes includes: the running state of the second game server is updated to a fault state and the running state of the second game server is replaced with the first game server or the second game server is updated to a capacity reduction state and the second game server and the associated game server are combined to the first game server.
In one implementation manner, the processing module 1102 is further configured to add the first process information to the identification database if the comparison result is the newly added first process information, so as to generate a first global seed of the first process information in a self-adding manner; the obtaining module 1101 is further configured to obtain, from the identification database, first full-size information of the first game server, where the first full-size information includes all information of the first game server stored in the identification database; the processing module 1102 is further configured to generate first configuration information according to the first full-scale information, where the first configuration information includes the first global seed.
In one implementation, the processing module 1102 is further configured to copy, if the comparison result is that the first process information is updated, the second process information to the process information of the first game server in the identification database; the obtaining module 1101 is further configured to obtain, from the identification database, first full-size information of the first game server, where the first full-size information includes all information of the first game server stored in the identification database; the processing module 1102 is further configured to generate first configuration information according to the first full-size information.
In one implementation, the processing module 1102 is further configured to, if the comparison result is that the second process information is deleted, set an internet protocol field in the second process information to a non-internet protocol field in the identification database, so as to exclude a global seed of the second process information when the first global seed of the first process information is generated by means of self-increasing.
In one implementation, the obtaining module 1101 is further configured to obtain target attribute information of the target game server when it is detected that there is a creation of the target game server; the processing module 1102 is further configured to generate second configuration information of the target game server according to the target attribute information, where the second configuration information includes target process information; the processing module 1102 is further configured to store second configuration information in the identification database, so as to generate a second global seed of the target process information in a self-adding manner; the obtaining module 1101 is further configured to obtain second full-dose information of the target server from the identification database, where the second full-dose information includes all information of the target game server stored in the identification database; the processing module 1102 is further configured to generate third configuration information according to the second full-scale information, where the third configuration information includes the second configuration information and a second global seed; the sending module 1103 is further configured to send the third configuration information to the target game server, so that the target game server generates a prop identifier/role identifier of the target game server according to the second global seed.
In one implementation, the processing module 1102 is further configured to generate a hash value for the first configuration information according to a cryptographic hash function; the sending module 1103 is further configured to send the first configuration information and the hash value to the first game server through a preset batch tool, so that the first game server generates a prop identifier/role identifier according to a first global seed in the first configuration information after the first configuration information is checked by the first game server according to the hash value.
The specific implementation of each module included in the prop identifier or role identifier determining device in the embodiment of the present invention may refer to descriptions of related content in the foregoing embodiments, which are not described herein, and each module in the prop identifier or role identifier determining device shown in fig. 11 may be combined into one or several other modules separately or all of them may be formed, or some (some) of them may be further split into a plurality of modules with smaller functions, which may implement the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above modules are divided based on logic functions, and in practical application, the functions of one module may be implemented by a plurality of modules, or the functions of a plurality of modules may be implemented by one module. In other embodiments of the present application, other modules may be included, and in practical applications, these functions may be implemented with assistance of other modules, and may be implemented by cooperation of multiple modules, which is not limited in this application.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 120 according to an embodiment of the present invention may include a processor 1201, a memory 1202, and a communication interface 1203, and the processor 1201, the memory 1202, and the communication interface 1203 are connected through one or more communication buses.
The memory 1202 may include volatile memory (RAM), such as random-access memory (RAM); the memory 1202 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), etc.; memory 1202 may also include combinations of the above types of memory.
The processor 1201 may be a central processing unit (central processing unit, CPU). The processor 1201 may further comprise a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or the like. The PLD may be a field-programmable gate array (FPGA), general-purpose array logic (generic array logic, GAL), or the like.
In an embodiment of the present invention, the server 120 includes a plurality of communication interfaces, where the communication interface for transmitting data and the communication interface for receiving data may not be the same communication interface.
Processor 1201 may invoke program code stored in memory 1202 to perform the steps of:
acquiring first information in a configuration database and second information in an identification database, wherein the first information comprises attribute information of a current game server, and the second information comprises attribute information of a historical game server;
comparing the first process information in the first information with the second process information in the second information to obtain a comparison result;
obtaining first configuration information of a second game server according to the comparison result, wherein the first game server is a current game server, and the first configuration information comprises a first global seed of the first game server;
and sending the first configuration information to the first game server so that the first game server generates prop identification/role identification according to the first global seed.
In one implementation, the processor 1201 may also perform the following steps:
and determining that the running state of the second game server is changed according to the comparison result, wherein the second game server is a history game server, and the running state of the second game server is changed and comprises the following steps: the running state of the second game server is updated to a fault state and the running state of the second game server is replaced with the first game server or the second game server is updated to a capacity reduction state and the second game server and the associated game server are combined to the first game server.
In one implementation, the processor 1201 specifically performs the following steps:
if the comparison result is that the first process information is newly added, the first process information is added into an identification database to generate a first global seed of the first process information in a self-adding mode;
the method comprises the steps of obtaining first full-quantity information of a first game server from an identification database, generating first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database, and the first configuration information comprises a first global seed.
In one implementation, the processor 1201 specifically performs the following steps:
if the comparison result is that the first process information is updated, copying the second process information into the process information of the first game server in the identification database;
the method comprises the steps of obtaining first full-quantity information of a first game server from an identification database, and generating first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database.
In one implementation, the processor 1201 may also perform the following steps:
if the comparison result is that the second process information is deleted, setting an internet protocol field in the second process information as a non-internet protocol field in the identification database, and eliminating the global seed of the second process information when the first global seed of the first process information is generated in a self-increasing manner.
In one implementation, the processor 1201 may also perform the following steps:
when the creation of the target game server is detected, acquiring target attribute information of the target game server, and generating second configuration information of the target game server according to the target attribute information, wherein the second configuration information comprises target process information;
storing the second configuration information into an identification database to generate a second global seed of the target process information in a self-adding mode;
acquiring second full-quantity information of the target server from the identification database, and generating third configuration information according to the second full-quantity information, wherein the second full-quantity information comprises all information of the target game server stored in the identification database, and the third configuration information comprises second configuration information and a second global seed;
and sending the third configuration information to the target game server so that the target game server generates prop identification/role identification of the target game server according to the second global seed.
In one implementation, the processor 1201 specifically performs the following steps:
generating a hash value for the first configuration information according to the cryptographic hash function;
and sending the first configuration information and the hash value to the first game server through a preset batch tool, so that the first game server generates prop identification/role identification according to a first global seed in the first configuration information after checking the second configuration information according to the hash value.
Embodiments of the present invention also provide a computer readable storage medium that may be used to store computer software instructions for use by the management server in the embodiments shown in fig. 2 and 10, including a program designed for executing the management server in the embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A method for determining a prop or character identifier, the method comprising:
acquiring first information in a configuration database and second information in an identification database, wherein the first information comprises attribute information of a current game server, and the second information comprises attribute information of a historical game server;
comparing the first process information in the first information with the second process information in the second information to obtain a comparison result;
if the comparison result is that the first process information is newly added, the first process information is added into the identification database to generate a first global seed of the first process information in a self-adding mode;
acquiring first full-quantity information of a first game server from the identification database, and generating first configuration information of the first game server according to the first full-quantity information, wherein the first game server is the current game server, and the first configuration information comprises the first global seed;
and sending the first configuration information to the first game server so that the first game server generates prop identifiers/role identifiers according to the first global seeds.
2. The method according to claim 1, wherein the method further comprises:
according to the comparison result, determining that the running state of the second game server is changed, wherein the second game server is the history game server, and the running state of the second game server is changed, which comprises: updating the running state of the second game server to a fault state and replacing the second game server with the first game server;
or the running state of the second game server is updated to be a volume-shrinking state and the second game server and the associated game server are combined to be the first game server.
3. The method according to claim 1, wherein the method further comprises:
if the comparison result is that the first process information is updated, copying the second process information into the process information of the first game server in the identification database;
acquiring first full-quantity information of the first game server from the identification database, and generating the first configuration information according to the first full-quantity information, wherein the first full-quantity information comprises all information of the first game server stored in the identification database.
4. The method according to claim 1, wherein the method further comprises:
if the comparison result is that the second process information is deleted, setting an internet protocol field in the second process information as a non-internet protocol field in the identification database, so as to exclude a global seed of the second process information when the first global seed of the first process information is generated in a self-increasing manner.
5. The method according to claim 1, wherein the method further comprises:
when the creation of the target game server is detected, acquiring target attribute information of the target game server, and generating second configuration information of the target game server according to the target attribute information, wherein the second configuration information comprises target process information;
storing the second configuration information into the identification database to generate a second global seed of the target process information in a self-adding mode;
acquiring second full-quantity information of the target server from the identification database, and generating third configuration information according to the second full-quantity information, wherein the second full-quantity information comprises all information of the target game server stored in the identification database, and the third configuration information comprises the second configuration information and the second global seed;
And sending the third configuration information to the target game server so that the target game server generates prop identification/role identification of the target game server according to the second global seed.
6. The method of claim 1, wherein the sending the first configuration information to the first game server comprises:
generating a hash value for the first configuration information according to a cryptographic hash function;
and sending the first configuration information and the hash value to the first game server through a preset batch tool, so that the first game server generates the prop identifier/role identifier according to the first global seed in the first configuration information after checking the first configuration information according to the hash value.
7. A prop or character identifier determining apparatus, the apparatus comprising:
an obtaining device, configured to obtain first information in a configuration database and second information in an identification database, where the first information includes attribute information of a current game server, and the second information includes attribute information of a history game server;
The processing device is used for comparing the first process information in the first information with the second process information in the second information to obtain a comparison result;
the processing device is further configured to add the first process information to the identification database if the comparison result is that the first process information is newly added, so as to generate a first global seed of the first process information in a self-adding manner; acquiring first full-quantity information of a first game server from the identification database, and generating first configuration information of the first game server according to the first full-quantity information, wherein the first game server is the current game server, and the first configuration information comprises the first global seed;
and the sending device is used for sending the first configuration information to the first game server so that the first game server generates prop identifiers/role identifiers according to the first global seeds.
8. A server comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-6.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-6.
CN202010003192.7A 2020-01-02 2020-01-02 Prop identification or role identification determining method, server and storage medium Active CN111190915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010003192.7A CN111190915B (en) 2020-01-02 2020-01-02 Prop identification or role identification determining method, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010003192.7A CN111190915B (en) 2020-01-02 2020-01-02 Prop identification or role identification determining method, server and storage medium

Publications (2)

Publication Number Publication Date
CN111190915A CN111190915A (en) 2020-05-22
CN111190915B true CN111190915B (en) 2023-05-16

Family

ID=70708023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010003192.7A Active CN111190915B (en) 2020-01-02 2020-01-02 Prop identification or role identification determining method, server and storage medium

Country Status (1)

Country Link
CN (1) CN111190915B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782255A (en) * 2020-07-03 2020-10-16 珠海金山网络游戏科技有限公司 Virtual prop updating method and device
CN112675546A (en) * 2020-12-22 2021-04-20 北京像素软件科技股份有限公司 Game auxiliary maintenance method and device, electronic equipment and readable storage medium
CN113398586A (en) * 2021-07-14 2021-09-17 网易(杭州)网络有限公司 Virtual resource comparison method, device, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821316A (en) * 2012-05-14 2012-12-12 南京邮电大学 Improved video on demand (VOD) transmission method based on peer-to-peer computing core algorithm
CN102868731A (en) * 2012-08-27 2013-01-09 济南大学 Method and device for software online updating and downloading acceleration
CN107256335A (en) * 2017-06-02 2017-10-17 肖传乐 A kind of preferred three generations's sequencing sequence comparison method of being given a mark based on global seed
CN109697133A (en) * 2018-12-28 2019-04-30 广州华多网络科技有限公司 ID generation method, apparatus and system
CN110209500A (en) * 2019-06-03 2019-09-06 网易(杭州)网络有限公司 Server load balancing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8843758B2 (en) * 2011-11-30 2014-09-23 Microsoft Corporation Migrating authenticated content towards content consumer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821316A (en) * 2012-05-14 2012-12-12 南京邮电大学 Improved video on demand (VOD) transmission method based on peer-to-peer computing core algorithm
CN102868731A (en) * 2012-08-27 2013-01-09 济南大学 Method and device for software online updating and downloading acceleration
CN107256335A (en) * 2017-06-02 2017-10-17 肖传乐 A kind of preferred three generations's sequencing sequence comparison method of being given a mark based on global seed
CN109697133A (en) * 2018-12-28 2019-04-30 广州华多网络科技有限公司 ID generation method, apparatus and system
CN110209500A (en) * 2019-06-03 2019-09-06 网易(杭州)网络有限公司 Server load balancing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Web Service多源异构系统增量同步的实现;庞秋奔等;《计算机应用与软件》(第05期);178-182 *
基于私有云的智能BT Cache系统研究与实现;余汶龙;《中国优秀硕士学位论文全文数据库 信息科技辑》(第11期);I138-427 *

Also Published As

Publication number Publication date
CN111190915A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN111190915B (en) Prop identification or role identification determining method, server and storage medium
CN107562513B (en) Intelligent contract life cycle management method based on JAVA
US10785110B2 (en) Automated change approval
US10073916B2 (en) Method and system for facilitating terminal identifiers
CN109831487B (en) Fragmented file verification method and terminal equipment
CN109766330B (en) Data slicing method and device, electronic equipment and storage medium
US8219575B2 (en) Method and system for specifying, preparing and using parameterized database queries
CN110225029B (en) Injection attack detection method, device, server and storage medium
CN110489421B (en) Data storage method, apparatus, computer readable storage medium and computer device
US20120296878A1 (en) File set consistency verification system, file set consistency verification method, and file set consistency verification program
US11099828B2 (en) Updating a metadata structure for a firmware update
US20200073781A1 (en) Systems and methods of injecting fault tree analysis data into distributed tracing visualizations
US11210003B2 (en) Method, device and computer program product for restoring data based on replacing child node identifiers with parent node identifier
CN110162429A (en) System repair, server and storage medium
CN102833273A (en) Data restoring method when meeting temporary fault and distributed caching system
CN104216721A (en) Method for issuing configuration before starting of operating system
CN114816266A (en) Metadata repairing method, system, storage medium and equipment
CN113946854A (en) File access control method and device and computer readable storage medium
CN111353150B (en) Trusted boot method, trusted boot device, electronic equipment and readable storage medium
CN113360914A (en) BIOS updating method, system, equipment and medium
CN115964721A (en) Program verification method and electronic equipment
CN113132241B (en) ACL template dynamic configuration method and device
CN107085681B (en) Robust computing device identification framework
CN115514644A (en) Entry consistency checking method, electronic equipment and storage medium
CN111538651A (en) Interface testing method, device, server and storage medium

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