Game match processing method and system, electronic equipment and storage medium
Through Redis decoupling of combat suits and matching suits in the game game environment, the problems of cumbersome configuration construction, low transmission stability and high coupling are solved, efficient deployment and stable data transmission are achieved, and efficient and stable operation of the game is supported.
Patent Information
- Application Number
- CN202510369432.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-04-25
- 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, and the matching server obtains combat server information through Redis to allocate the start. After the client receives the encrypted player data and combat server IP port information, it directly establishes a connection with the optimal combat server to pass on player data.
It realizes efficient deployment, shortens the data transmission link, improves transmission stability, reduces coupling and operation and maintenance complexity, and supports the efficient and stable operation of game combat services.
Smart Images

Figure CN119868965A_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: 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; 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; 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.
[0007] In some of the embodiments, the combat suit uploads the status information to the redis service database at a preset time interval, and the status information includes: the current number of games, the service program status and the number of games that can be carried.
[0008] In some embodiments, multiple combat suits respectively 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.
[0009] In some embodiments, querying the state information in the redis service database according to the game player information to determine the optimal battle suit includes: The main server queries the real-time updated combat uniform status information 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 to obtain the optimal combat suit.
[0010] In some embodiments, 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.
[0011] In some embodiments, based on a preset matching algorithm, obtaining information of a player to be played from a queue of players to be selected includes: 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.
[0012] In a second aspect, an embodiment of the present application provides a game match processing system, the system comprising: 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 status information in the redis service database according to the game player information through the main server to determine the optimal battle 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.
[0013] In some of the embodiments, the combat suit uploads the status information to the redis service database at a preset time interval, and the status information includes: the current number of games, the service program status and the number of games that can be carried.
[0014] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of the first aspect described above.
[0016] Compared with the related art, the game match processing method provided by the embodiment of the present application has the problem that the match method in the related art has complex configuration and construction of the battle suit, low transmission stability and high coupling, which leads to difficult development iteration. The technical solution of the present application uses Redis to decouple the battle suit and the matching suit to achieve efficient deployment; when the player starts the game, the server sends the encrypted player data and the battle suit IP port information to the client. After receiving it, the client establishes a connection with the battle suit based on the IP port information, and reports the player data to the battle suit when the connection is successful. Thereby changing the traditional data transmission path, the data required by the battle suit is no longer forwarded through multiple servers, but is directly transmitted through the client, which greatly shortens the transmission link and improves the transmission stability. Furthermore, 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. This approach uses Redis to replace complex network connections, effectively reducing the coupling between the two and alleviating the development iteration difficulties caused by server version and protocol consistency. It also reduces the complexity of operation and maintenance, and provides strong support for the efficient and stable operation of game combat services, ensuring the efficient, stable operation and sustainable development of game services. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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 on the present application. In the drawings: Figure 1 is a flowchart of a game match processing method according to an embodiment of the present application; Figure 2 is a flowchart of another game match processing method according to an embodiment of the present application; Figure 3 is a structural block diagram of a game match processing system according to an embodiment of the present application; Figure 4 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application; DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated 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 intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0019] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0020] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0021] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0022] Currently, most game battle servers must be connected to the matching server. Players need to be matched to the corresponding battle server and necessary data transmission before they can start a battle. This method has at least the following disadvantages: 1. The battle suit must establish a connection with the matching server. When there are multiple matching servers, the configuration of the battle suit is very complicated and requires configuration of connections with all matching servers.
[0023] 2. The network link transmission stability is low. The player game data required for the start of the game needs to be forwarded between multiple servers before it can reach the battle server. If one of the multiple links is broken during this period, the start will fail.
[0024] 3. The coupling is high and the development iteration is complex. All servers through which data is transmitted must maintain consistent versions and protocols.
[0025] In view of this, an embodiment of the present application provides a game match processing method. Figure 1 is a flowchart of a game match processing method according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps: S101, multiple combat suits respectively register their own status information to the redis service database, wherein the redis service database is deployed on the main server of the game; In this embodiment, the battle service program includes multiple battle service clusters. After each battle service is started, it will connect to the redis service database and report its own status information to the redis service and record it at regular intervals. The status information includes but is not limited to: the current number of games, the service program status, and the number of games that can be carried. Specifically, multiple combat suits register their own status information to the redis service database respectively, including the following subdivision steps: Step 1: Build the redis client library in each combat suit, and establish a network connection with the redis service database through the redis client library; When the combat suit is started, the Redis client library provided by the appropriate programming language is used 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.
[0026] Step 2, through the API function of the redis client library and the network connection, the status information is stored in the redis data structure according to the preset time interval.
[0027] The API function provided by the Redis client library is used to store the status information in 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 combat suit in the form of a key-value pair under the specified key name.
[0028] In addition, you can also consider whether to set an expiration time for the stored status information based on business needs. If the status information of the combat suit is time-sensitive, automatic deletion after expiration can avoid storing too much invalid data in Redis.
[0029] Through the above step S101, the battle server program reports information to the Redis in the main server, and the main server can directly obtain all real-time data of the battle server cluster, and then directly apply it to game processing.
[0030] S102, responding to the game request from the client, obtaining the information of the game player to be played from the waiting player queue based on the preset matching algorithm through the matching server; In a specific exemplary embodiment, the matching mechanism of the matching server includes the following steps: 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; 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.
[0031] 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).
[0032] In an optional embodiment, the matching rules include: 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.
[0033] Information of players with similar numbers is selected from each level interval to obtain game player information.
[0034] 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.
[0035] 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.
[0036] 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; This step specifically includes the following sub-steps: Step 1, the main server queries the real-time updated combat suit status information from the redis service database; Use the data acquisition API function provided by the Redis client library to query the real-time status data of the combat service cluster from Redis according to the pre-defined key name or data structure. The real-time status data may be stored in Redis in various forms, such as hash tables, lists, ordered sets, etc. You can use the corresponding function to obtain the required information according to the data storage structure, for example, use the hgetall function to obtain all fields and values in the hash table, or use the lrange function to obtain part of the data in the list.
[0037] Step 2, according to the status information, based on the preset algorithm, respectively parse and obtain the evaluation indicators of each combat suit, where the evaluation indicators include server load, network delay, current number of games and number of games that can be carried; Specifically, the current status of each combat service is analyzed based on the real-time data of the combat service cluster. Evaluation indicators may include server load (such as CPU usage, memory usage, current number of connections, etc.), network latency, number of ongoing combats, etc.
[0038] Step 3: Determine the weights of each evaluation indicator according to the game requirements, and use the weighted sum algorithm to calculate the comprehensive score of each combat suit in real time based on the evaluation indicators and weights; Among them, a corresponding weight is set for each evaluation indicator, and the degree of influence of different indicators on the "optimal" combat service is determined according to business needs and priorities.
[0039] Furthermore, the comprehensive score of each combat service is calculated based on the evaluation index and weight. Optionally, the score can be calculated using an algorithm such as weighted summation, where a higher score indicates a better status of the combat service. By comparing the scores of all combat services, the combat service with the highest score is selected as the optimal server.
[0040] In addition, if there are multiple combat services with the same score, further screening can be performed based on other auxiliary rules, such as selecting the server that was started first.
[0041] Step 4, obtain the combat suit with the highest comprehensive score in the current state and determine the optimal combat suit.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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: Step 1, each client establishes a connection channel with the optimal combat suit through IP port information; 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. 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; 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.
[0047] 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.
[0048] Through the above steps S101 to S104, the game method in the related art has the problem that the battle suit configuration is complex, the transmission stability is low, and the coupling is high, which leads to the difficulty of development iteration. The technical solution of this application uses Redis to decouple the battle suit and the matching suit to achieve efficient deployment; when the player starts the game, the server sends the encrypted player data and the battle suit IP port information 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 when the connection is successful. This changes the traditional data transmission path, so that the data required by the battle suit is no longer forwarded through multiple servers, but is directly transmitted through the client, which greatly shortens the transmission link and improves the transmission stability. Furthermore, 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 service obtains the battle suit information through Redis to allocate the start. This method replaces the complex network connection with Redis, effectively reduces the coupling between the two, reduces the development iteration problems caused by the consistency of server versions and protocols, and also reduces the complexity of operation and maintenance, providing strong support for the efficient and stable operation of game battle services, and ensuring the efficient, stable operation and sustainable development of game services.
[0049] also, Figure 2 It is a flowchart of another game match processing method according to an embodiment of the present application.
[0050] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0051] This embodiment also provides a game match processing system. Figure 3 is a structural block diagram of a game match processing system according to an embodiment of the present application, such as Figure 3 As shown, the system includes: It is characterized in that the system includes: a deployment module 30, a demand response module 31 and an information delivery module 32, wherein; The deployment module 30 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 31 is used to respond to the game request of the client, obtain the game player information to be executed from the player queue through the matching server based on the preset matching algorithm; and query the status information in the redis service database through the main server according to the game player information to determine the optimal battle suit; The information sending module 32 is used to summarize and encrypt the IP port information, game player information and single game information of the best combat suit 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 best combat suit and starts the game.
[0052] Through this system, the game method in the related technology has the problem that the battle suit configuration is complex, the transmission stability is low, and the coupling is high, which leads to the difficulty of development iteration. The technical solution of this application uses Redis to decouple the battle suit and the matching suit to achieve efficient deployment; when the player starts the game, the server sends the encrypted player data and the battle suit IP port information to the client. After receiving it, the client establishes a connection with the battle suit based on the IP port information, and reports the player data to the battle suit when the connection is successful. This changes the traditional data transmission path, so that the data required by the battle suit is no longer forwarded through multiple servers, but is directly transmitted through the client, which greatly shortens the transmission link and improves the transmission stability. Furthermore, 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 service obtains the battle suit information through Redis to allocate the start. This method replaces the complex network connection with Redis, effectively reduces the coupling between the two, reduces the development iteration problems caused by the consistency of server versions and protocols, and also reduces the complexity of operation and maintenance, providing strong support for the efficient and stable operation of game battle services, and ensuring the efficient, stable operation and sustainable development of game services.
[0053] In one embodiment, Figure 4 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 4 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 4 As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein 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 an external terminal 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 match processing method, and the database is used to store data.
[0054] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0055] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may 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 (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0056] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached 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; 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; 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 Querying the state information in the redis service database according to the game player information to determine the optimal battle suit includes: The main server queries the real-time updated combat uniform status information 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 to obtain the optimal combat suit.
5. 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.
6. 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.
7. 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 status information in the redis service database according to the game player information through the main server to determine the optimal battle 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.
8. The system according to claim 7, 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.
9. 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 7 is implemented.
10. 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 7 is implemented.
Citation Information
Patent Citations
Combat-server matching method and device
CN109529326A
Game watching method and system
CN112494957A
Virtual organization creation method and device, storage medium and electronic equipment
CN114367112A
Battle matching method and device in game, equipment and storage medium
CN114870403A
Chess and card game cross-server combat method and device and medium
CN115253311A