A method, system, electronic device, and storage medium for processing a game session
Through Redis decoupling of the game combat suit and matching suit, the problems of complex configuration construction, low transmission stability and high coupling in the existing technology are solved, efficient deployment and stable data transmission are achieved, and the sustainable development of the game is supported.
Patent Information
- Application Number
- CN202510369432.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-27
AI Technical Summary
In the existing technology, the configuration of the game game environment is complicated, the transmission stability is low, and the coupling is high, making it difficult to develop iterate.
Through the Redis service database, the combat server and the matching server are decoupled. The combat server registers its own status information to Redis. The matching server obtains combat server information through Redis to allocate the start. After receiving the encrypted data, the client establishes a connection with the optimal combat server and directly transmits player data.
It realizes efficient deployment, shortens the data transmission link, improves transmission stability, reduces coupling and operation and maintenance complexity, and supports efficient and stable operation of the game.
Smart Images

Figure CN119868965B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game deployment and operation, and in particular to a game match processing method, system, electronic device and storage medium. Background Art
[0002] During the game battle, the battle server and the matching server need to work together to ensure that players can quickly and stably enter the battle scene and accurately transmit the data required for the battle. This not only affects the player's gaming experience, but also affects the overall operational efficiency and stability of the game. The efficient and reliable cooperation between the battle server and the matching server is the key to meeting player needs and improving game competitiveness.
[0003] In the relevant technology, the common practice is to establish a close connection between the game battle server and the matching server. When a player initiates a battle request, the matching server first matches the player to determine the battle suit he should enter. Subsequently, through layer-by-layer forwarding between multiple servers, the player's relevant data is transmitted to the corresponding battle suit. This series of processes involves the collaboration between multiple servers, aiming to accurately assign players to the appropriate battle environment and provide necessary data support for the conduct of the battle.
[0004] However, if there are multiple matching servers, the battle server needs to establish connections with multiple matching servers respectively, which makes the configuration and construction cumbersome and greatly increases the difficulty of operation and maintenance. In addition, the player's game data needs to be forwarded by multiple servers, and the link is long. Once a link fails, the battle will fail, affecting the player experience. In addition, the servers involved in data transmission need to maintain consistent versions and protocols, with high coupling. A change during development may affect the overall situation, resulting in complex and error-prone development, which hinders game optimization and updates. Summary of the invention
[0005] The embodiments of the present application provide a game match processing method, system, electronic device and computer-readable storage medium to at least solve the problem of complicated configuration and construction of the game match environment in the related art.
[0006] In a first aspect, an embodiment of the present application provides a game match processing method, the method comprising:
[0007] Multiple combat suits register their own status information to the redis service database respectively, wherein the redis service database is deployed on the main server of the game;
[0008] In response to the client's game request, the matching server obtains the information of the players to be played from the waiting player queue based on the preset matching algorithm;
[0009] Through the master server, query the status information in the Redis service database according to the game player information to determine the optimal battle suit;
[0010] Summarize and encrypt the IP port information of the optimal battle suit, the game player information, and the single-game information of the game into game data, and send the game data to each client corresponding to the game player information;
[0011] After receiving the game data, the client connects to the optimal battle suit and starts the game session.
[0012] In some embodiments, the battle suit uploads the status information to the Redis service database at preset time intervals, and the status information includes: the current number of game sessions, the status of the service program, and the number of game sessions that can be carried.
[0013] In some embodiments, multiple battle suits respectively register their own status information to the Redis service database, including:
[0014] Build a Redis client library in each battle suit respectively, and establish a network connection with the Redis service database through the Redis client library;
[0015] Store the status information into the Redis service database at preset time intervals through the API function of the Redis client library and the network connection.
[0016] In some embodiments, querying the status information in the Redis service database according to the game player information to determine the optimal battle suit includes:
[0017] The master server queries the status information of the battle suit that is updated in real time from the Redis service database;
[0018] According to the status information, based on a preset algorithm, respectively analyze and obtain the evaluation indicators of each battle suit, where the evaluation indicators include server load, network latency, the current number of game sessions, and the number of game sessions that can be carried;
[0019] According to the game requirements, determine the weights added to each evaluation indicator, and through the weighted summation algorithm, calculate the comprehensive scores of each battle suit in real time according to the evaluation indicators and the weights;
[0020] Obtain the battle suit with the highest comprehensive score in the current state to get the optimal battle suit.
[0021] In some embodiments, after the client receives the game data, connecting to the optimal battle suit and starting the game session includes:
[0022] Each client respectively establishes a connection channel with the optimal battle suit through the IP port information;
[0023] Each client uploads the player game data to the optimal battle suit, and the optimal battle suit receives the player game data and decrypts the player game data through a decryption algorithm;
[0024] After receiving the player game data sent by all clients, the optimal battle suit instructs the client to start the game session and performs game session operations according to the decrypted player game data.
[0025] In some embodiments, based on a preset matching algorithm, obtaining the game player information to be executed in the game from the candidate player queue includes:
[0026] Obtaining the comprehensive level scores of each player in the candidate player queue, and dividing each player into different level intervals according to the comprehensive level scores, where the comprehensive level scores are obtained based on the player's historical win rate, KDA, and game scores;
[0027] Selecting the account information of players with similar numbers from each level interval to obtain the game player information.
[0028] In a second aspect, an embodiment of the present application provides a game session processing system, the system includes: a deployment module, a demand response module, and an information distribution module, where;
[0029] The deployment module is used to register the status information of multiple battle suits to the redis service database respectively, where the redis service database is deployed on the main server of the game;
[0030] The demand response module is used to respond to the client game request, and obtain the game player information to be executed in the game from the candidate player queue through the matching server based on a preset matching algorithm;
[0031] And, through the main server, query the status information in the redis service database according to the game player information to determine the optimal battle suit;
[0032] The information distribution module is used to summarize and encrypt the IP port information of the optimal battle suit, the game player information, and the game single session information into a completed session data, and send the completed session data to each client corresponding to the game player information; after receiving the completed session data, the client connects to the optimal battle suit and starts the game session.
[0033] In some of these embodiments, the combat uniform uploads the status information to the Redis service database at a preset time interval, and the status information includes: the current number of game rounds, the status of the service program, and the number of game rounds that can be carried.
[0034] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect above is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect above is implemented.
[0036] Compared with the related art, the game round processing method provided by the embodiments of the present application solves the problems in the related art that the configuration and setup of the combat uniform are complex, the transmission stability is low, and the coupling is high, resulting in difficult development and iteration. The technical solution of the present application uses Redis to decouple the combat uniform and the matching service, realizing efficient deployment; when the player starts a game, the server sends the encrypted player data and the IP port information of the combat uniform to the client. After receiving it, the client establishes a connection with the combat uniform according to the IP port information, and reports the player data to the combat uniform after the connection is successful. Thus, the traditional data transmission path is changed, and the data required by the combat uniform no longer passes through multiple servers for forwarding, but is directly transmitted through the client, greatly shortening the transmission link and improving the transmission stability. Further, the network connection between the combat uniform and the matching service is abandoned. The combat uniform registers and updates its own status information to Redis, and the matching service obtains the combat uniform information through Redis to allocate the start of the game. This method replaces the complex network connection with Redis, effectively reducing the coupling between the two, reducing the development and iteration problems caused by the consistency of server versions and protocols, and at the same time reducing the complexity of operation and maintenance, providing strong support for the efficient and stable operation of the game combat service, ensuring the efficient, stable operation and continuous development of the game service. Description of the Drawings
[0037] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:
[0038] Figure 1 is a flowchart of a game round processing method according to an embodiment of the present application;
[0039] Figure 2 is a flowchart of another game round processing method according to an embodiment of the present application;
[0040] Figure 3 It is a structural block diagram of a game session processing system according to an embodiment of the present application;
[0041] Figure 4 It is a schematic internal structure diagram of an electronic device according to an embodiment of the present application; Detailed implementation manners
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts fall within the scope of protection of the present application.
[0043] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can be applied to other similar scenarios based on these drawings without creative efforts. In addition, it can also be understood that although the efforts made in this development process may be complex and time-consuming, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as insufficient disclosure of the content of the present application.
[0044] Referring to "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "comprising", "including", "having" and any variations thereof involved in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to these processes, methods, products or devices. The similar words such as "connected", "coupled" and "joined" involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0046] Currently, most game battle servers must be connected to a matching server. For a player to start a battle, the matching server needs to match the player to a corresponding battle server and perform necessary data transmission. This method has at least the following disadvantages:
[0047] 1. The battle server must establish a connection with the matching server. When there are multiple matching servers, the configuration setup of the battle server is very complex and requires configuring connections to all matching servers.
[0048] 2. The stability of network link transmission is low. The player game data required for starting a game needs to be forwarded between multiple servers before reaching the battle server. If any one of the multiple links is broken during this process, the game cannot start successfully.
[0049] 3. The coupling is relatively high and the development iteration is complex. All the servers through which data is transmitted must maintain the same version and the same protocol.
[0050] In view of this, the embodiments of this application provide a method for processing game matches, Figure 1 which is a flowchart of the method for processing game matches according to the embodiments of this application. As Figure 1 shown, this process includes the following steps:
[0051] S101. Multiple battle suits respectively register their own status information to the Redis service database, where the Redis service database is deployed on the game's main server;
[0052] In this embodiment, there are multiple battle suit programs that jointly form a battle service cluster; after each battle suit starts, it will connect to the Redis service database and report its own status information to the Redis service and record it at regular intervals. Among them, the status information includes but is not limited to: the current number of matches, the status of the service program, and the number of matches that can be carried.
[0053] Specifically, multiple battle suits respectively registering their own status information to the Redis service database includes the following detailed steps:
[0054] Step1. Build a Redis client library in each battle suit respectively, and establish a network connection with the Redis service database through the Redis client library;
[0055] Among them, when the battle suit starts, use the Redis client library provided by a suitable programming language to establish a network connection with the Redis server. For example, in Python, the redis-py library can be used to create a connection object by specifying the IP address and port number of the Redis server.
[0056] Step2. Store the status information into the data structure of Redis at a preset time interval through the API function of the Redis client library and the network connection.
[0057] Among them, use the API function provided by the Redis client library to store the status information into Redis. Taking the hash table as an example, if the redis-py library is used, the hmset or hset function may be used to store the status information of the battle suit in the form of key-value pairs under the specified key name.
[0058] In addition, according to business requirements, consider whether to set an expiration time for the stored status information. If the status information of the battle suit has timeliness, automatic deletion after expiration can avoid storing too many invalid data in Redis.
[0059] Through the above step S101, the battle suit program reports information to Redis in the main server, and all real-time data of the battle server cluster can be directly obtained in the main server, and then it will be directly applied to the match processing subsequently.
[0060] S102. In response to the client's match request, through the matching server, based on a preset matching algorithm, obtain the match player information of the players who will execute the match from the candidate player queue;
[0061] In a specific exemplary embodiment, the matching mechanism of the matching server includes the following steps:
[0062] Step 1, obtain the comprehensive level score of each player in the waiting player queue, and divide each player into different level intervals according to the comprehensive level score, wherein the comprehensive level score is obtained based on the player's historical win rate, KDA and game score;
[0063] Among them, the player initiates a matching request through the game client, and the client sends the player's relevant information (such as player ID, level, rank, region, etc.) to the matching server.
[0064] The matching server starts the matching algorithm according to preset rules and strategies. These rules take into account a variety of factors, such as keeping the difference in player levels within a certain range (to avoid the gap between high-level and low-level players affecting the gaming experience), the difference in rank in line with the game balance setting (to prevent the disparity in rank from leading to a one-sided game result), team balance (ensuring that the two teams are of equal strength in team games, for example, in shooting games, the average marksmanship level and tactical awareness of the two teams are similar), and network latency similarity (to reduce problems such as game freezes and asynchrony caused by network latency differences).
[0065] In an optional embodiment, the matching rules include:
[0066] First, a comprehensive skill rating is calculated for each player, which takes into account the player's historical win rate, kill / death ratio, average score, etc. Players are divided into different level intervals based on the skill rating, such as beginner, intermediate, advanced, etc.
[0067] Information of players with similar numbers is selected from each level interval to obtain game player information.
[0068] In team games, select players of similar numbers from each level range to form teams. For example, in a 5v5 game, try to ensure that the number of players of each level in both teams is the same to ensure that the overall strength of the teams is balanced.
[0069] In addition, the network delay between the player and the server can be calculated, and players with similar network delays can be matched together to reduce network lag in the game. Set a reasonable network delay threshold, such as 50ms, and give priority to matching players with delay differences within this threshold.
[0070] S103, querying the status information in the redis service database according to the game player information through the main server to determine the optimal battle suit;
[0071] This step specifically includes the following sub-steps:
[0072] Step 1, the primary server queries the status information of the battle suits updated in real time from the redis service database;
[0073] Use the API function for obtaining data provided by the Redis client library to query the real-time status data of the battle service cluster from Redis according to the predefined key names or data structures. Among them, the real-time status data may be stored in Redis in various forms, such as hash tables, lists, sorted sets, etc. According to the data storage structure, corresponding functions can be used to obtain the required information. For example, use the hgetall function to obtain all fields and values in the hash table, or use the lrange function to obtain partial data in the list.
[0074] Step 2, according to the status information, based on a preset algorithm, respectively parse and obtain the evaluation indicators of each battle suit. Among them, the evaluation indicators include server load, network latency, the current number of ongoing matches, and the number of matches that can be carried;
[0075] Specifically, according to the real-time data of the battle service cluster queried, analyze the current status of each battle service. The evaluation indicators may include server load (such as CPU usage rate, memory occupancy, current connection count, etc.), network latency, the number of battles in progress, etc.
[0076] Step 3, according to the match requirements, determine the weights added to each evaluation indicator, and through the weighted summation algorithm, calculate the comprehensive scores of each battle suit in real time according to the evaluation indicators and weights;
[0077] Among them, set corresponding weights for each evaluation indicator, and determine the influence degree of different indicators on the "optimal" battle service according to business requirements and priorities.
[0078] Furthermore, according to the evaluation indicators and weights, calculate the comprehensive scores of each battle service. Optionally, algorithms such as weighted summation can be used to calculate the scores. The higher the score, the better the status of the battle service. By comparing the scores of all battle services, select the battle service with the highest score as the optimal server.
[0079] In addition, if there are multiple battle services with the same score, further screening can be carried out according to other auxiliary rules, such as selecting the server that was started first, etc.
[0080] Step 4, obtain the battle suit with the highest comprehensive score in the current state and determine the optimal battle suit.
[0081] After determining the optimal combat service, this step packages the relevant information of the selected optimal combat service (such as IP address, port number, etc.) into a suitable format for subsequent sending and combining with other data to generate game information and send it to the client or other related modules.
[0082] Through the above step S103, the main server can accurately select the best combat service with the help of Redis data, realize efficient resource allocation, avoid players from concentrating on busy servers, and improve the overall load balancing ability of the system. At the same time, it ensures the rational use of combat service resources, reduces performance problems caused by uneven load, optimizes the player's gaming experience, enhances system stability and reliability, and provides strong support for the continuous and smooth operation of the game.
[0083] S104, the IP port information of the best combat suit, the game player information and the single game information are aggregated and encrypted into the game data, and the game data is sent to each client corresponding to the game player information.
[0084] Specifically, in this embodiment, the SHA256 encryption algorithm can be used to aggregate the player information and the game single-game information into completed game data. These clients are the game clients used by the players who are going to play the game, which can be smartphones, tablets, PCs, etc.
[0085] In addition, after sending the game data to each client corresponding to the game player information, the client connects to the optimal battle suit and starts the game, including the following steps:
[0086] Step 1, each client establishes a connection channel with the optimal combat suit through IP port information;
[0087] Step 2: Each client uploads the player's game data to the best combat server. The best combat server receives the player's game data and decrypts it using a decryption algorithm.
[0088] Optionally, a more efficient data compression algorithm can be used to further reduce the transmission size of player game data, speed up transmission, and reduce network bandwidth usage without affecting data integrity and security;
[0089] In addition, a two-way authentication mechanism can be introduced, which not only allows the combat service to verify the legitimacy of the client, but also the client to verify the authenticity of the combat service, preventing man-in-the-middle attacks. Digital certificate-based authentication can be used to ensure that both parties of the connection are credible.
[0090] Step 3, after receiving the player game data sent by all clients, the optimal combat server instructs the client to start the game and performs game calculations based on the decrypted player game data.
[0091] Through the above steps S101 to S104, for the confrontation method in the related art, there are problems such as complex configuration and setup of the combat suit, low transmission stability, and high coupling, which make development and iteration difficult. The technical solution of this application uses Redis to decouple the combat suit from the matching suit to achieve efficient deployment. When a player starts a game, the server sends encrypted player data and the IP port information of the combat suit to the client. After receiving the data, the client establishes a connection with the combat suit based on the IP port information and reports the player data to the combat suit once the connection is successful. This changes the traditional data transmission path, enabling the data required by the combat suit to be directly transmitted through the client instead of being forwarded by multiple servers, greatly shortening the transmission link and improving the transmission stability. Further, the network connection between the combat suit and the matching suit is abandoned. The combat suit registers and updates its own status information to Redis, and the matching suit obtains the combat suit information through Redis to allocate the start of the game. This method replaces the complex network connection with Redis, effectively reducing the coupling between the two, reducing the development and iteration problems caused by server version and protocol consistency, and also reducing the complexity of operation and maintenance, providing strong support for the efficient and stable operation of the game combat service, and ensuring the efficient, stable operation and sustainable development of the game service.
[0092] In addition, Figure 2 is a flowchart of another game confrontation processing method according to an embodiment of the present application.
[0093] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0094] This embodiment also provides a game confrontation processing system, Figure 3 is a structural block diagram of a game confrontation processing system according to an embodiment of the present application, as Figure 3 shown. The system includes: characterized in that the system includes: a deployment module 30, a demand response module 31, and an information distribution module 32, where;
[0095] The deployment module 30 is used for multiple combat suits to respectively register their own status information to the redis service database, where the redis service database is deployed on the main server of the game;
[0096] The demand response module 31 is used to respond to the game requests from the clients, obtain the information of the players for the game to be executed from the queue of candidate players by matching with the server based on a preset matching algorithm; and, query the status information in the Redis service database according to the player information of the game through the main server to determine the optimal battle suit;
[0097] The information distribution module 32 is used to aggregate and encrypt the IP port information of the optimal battle suit, the player information of the game, and the single-game information of the game into game-formed data, and send the game-formed data to each client corresponding to the player information of the game; after receiving the game-formed data, the client connects to the optimal battle suit and starts the game session.
[0098] With this system, for the game methods in the related technologies, there are problems such as complex configuration and setup of the battle suit, low transmission stability, and high coupling, which make development and iteration difficult. The technical solution of this application uses Redis to decouple the battle suit from the matching suit to achieve efficient deployment; when the player starts the game, the server sends the encrypted player data and the IP port information of the battle suit to the client. After receiving it, the client establishes a connection with the battle suit according to the IP port information, and reports the player data to the battle suit after the connection is successful. Thus, the traditional data transmission path is changed, so that the data required by the battle suit no longer needs to be forwarded by multiple servers, but is directly transmitted through the client, greatly shortening the transmission link and improving the transmission stability. Further, the network connection between the battle suit and the matching suit is abandoned. The battle suit registers and updates its own status information to Redis, and the matching suit obtains the battle suit information through Redis to allocate the start of the game. This method uses Redis to replace the complex network connection, effectively reducing the coupling between the two, reducing the development and iteration problems caused by the consistency of the server version and protocol, and at the same time reducing the complexity of operation and maintenance, providing strong support for the efficient and stable operation of the game battle service, and ensuring the efficient, stable operation and sustainable development of the game service.
[0099] In one embodiment, Figure 4 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, as Figure 4 shown, provides an electronic device, which may be a server, and its internal structure diagram may be as Figure 4 shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected through an internal bus. Among them, the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with external terminals through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program is executed by the processor to implement a game session processing method, and the database is used to store data.
[0100] Those skilled in the art can understand that Figure 4 The structure shown in Figure 4 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0101] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database or other medium used in the embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0102] The above embodiments only represent several implementation manners of this application, and their descriptions are relatively specific and detailed, but they should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.
Claims
1. A game match processing method, characterized in that: The method comprises: Multiple combat suits register their own status information to the redis service database respectively, wherein the redis service database is deployed on the main server of the game; In response to the client's game request, the matching server obtains the information of the players to be played from the waiting player queue based on the preset matching algorithm; By means of the main server, querying the state information in the redis service database according to the game player information to determine the optimal battle suit, specifically comprising: the main server querying the state information of the battle suit updated in real time from the redis service database; According to the state information, based on a preset algorithm, respectively analyze and obtain evaluation indicators of each combat suit, wherein the evaluation indicators include server load, network delay, current number of games, and number of games that can be carried; According to the game requirements, determine the weights added to each evaluation indicator, and calculate the comprehensive score of each combat suit in real time according to the evaluation indicators and the weights through a weighted sum algorithm; Obtain the combat suit with the highest comprehensive score in the current state, and obtain the optimal combat suit; Aggregate and encrypt the IP port information of the optimal combat suit, the game player information, and the single game information into game data, and send the game data to each client corresponding to the game player information; After receiving the game data, the client connects to the optimal combat suit and starts the game.
2. The method according to claim 1, characterized in that The combat suit uploads the status information to the redis service database at a preset time interval, wherein the status information includes: the current number of games, the service program status and the number of games that can be carried.
3. The method according to claim 2, characterized in that Multiple combat suits register their own status information to the redis service database, including: Constructing a redis client library in each combat suit respectively, and establishing a network connection with the redis service database through the redis client library; The state information is stored in the redis service database at preset time intervals through the API function of the redis client library and the network connection.
4. The method according to claim 1, characterized in that After the client receives the game data, connecting to the optimal combat suit and starting the game includes: Each client establishes a connection channel with the optimal combat suit through the IP port information; Each client uploads the player game data to the optimal battle suit, and the optimal battle suit receives the player game data and decrypts the player game data through a decryption algorithm; After receiving the player game data sent by all clients, the optimal combat suit instructs the client to start the game and performs game operations based on the decrypted player game data.
5. The method according to claim 1, characterized in that Based on the preset matching algorithm, the information of the players to be played is obtained from the waiting player queue, including: Obtaining a comprehensive level score of each player in the queue of players to be selected, and classifying each player into different level intervals according to the comprehensive level score, wherein the comprehensive level score is obtained based on the player's historical win rate, KDA, and game score; Account information of players with a similar number is selected from each level interval to obtain the game player information.
6. A game match processing system, characterized in that: The system comprises: a deployment module, a demand response module and an information delivery module, wherein; The deployment module is used for multiple combat suits to register their own status information to the redis service database, wherein the redis service database is deployed on the main server of the game; The demand response module is used to respond to the client's game request and obtain the game player information of the game to be executed from the waiting player queue based on the preset matching algorithm through the matching server; And, querying the state information in the redis service database according to the game player information through the main server to determine the optimal battle suit, specifically including: the main server querying the real-time updated state information of the battle suit from the redis service database; According to the state information, based on a preset algorithm, respectively analyze and obtain evaluation indicators of each combat suit, wherein the evaluation indicators include server load, network delay, current number of games, and number of games that can be carried; According to the game requirements, determine the weights added to each evaluation indicator, and calculate the comprehensive score of each combat suit in real time according to the evaluation indicators and the weights through a weighted sum algorithm; Obtain the combat suit with the highest comprehensive score in the current state, and obtain the optimal combat suit; The information sending module is used to summarize and encrypt the IP port information of the optimal combat suit, the game player information and the single game information into game completion data, and send the game completion data to each client corresponding to the game player information; after receiving the game completion data, the client connects to the optimal combat suit and starts the game.
7. The system according to claim 6, characterized in that The combat suit uploads the status information to the redis service database at a preset time interval, wherein the status information includes: the current number of games, the service program status and the number of games that can be carried.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Chess and card game cross-server combat method and device and medium
CN115253311A