Intelligent management method and system suitable for game server resources
Patent Information
- Application Number
- CN202410753536.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2025-12-12
AI Technical Summary
[0007]为克服现有技术中手动配置和监控需要大量人力投入,容易出错,通用编程语言编写的脚本难以适应不同游戏的需求,且开发和维护成本高的问题,本发明的目的是提供一种适用于游戏服务器资源智能管理方法及系统,能够自定义设计脚本对游戏服务器进行管理,能够适应各种游戏服务器管理需求,游戏服务器管理效率高
Smart Images

Figure CN121102877A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game server management, and in particular to a method and system for intelligent management of game server resources. Background Technology
[0002] A popular MMOG operated by a game operator has attracted a large number of players worldwide, thus requiring efficient management and scheduling of game server resources to ensure smooth game operation and meet player demands. However, traditional methods of manual configuration and scripting in general programming languages are no longer sufficient for the operator's needs.
[0003] The shortcomings of existing technologies:
[0004] 1. Manual configuration and monitoring require a large amount of manpower, which is costly and prone to errors.
[0005] 2. Scripts written in general programming languages are difficult to adapt to the needs of different games, and their development and maintenance costs are high.
[0006] Current game server management methods mostly rely on manual configuration and monitoring, or on scripting using general-purpose programming languages. These methods are inefficient and cannot meet all server management needs. Summary of the Invention
[0007] To overcome the problems of existing technologies, such as the need for large amounts of manpower and the susceptibility to errors in manual configuration and monitoring, the difficulty of adapting scripts written in general programming languages to the needs of different games, and the high development and maintenance costs, the purpose of this invention is to provide a method and system for intelligent management of game server resources. This system can customize scripts to manage game servers, adapt to various game server management needs, and achieve high game server management efficiency.
[0008] This invention is implemented using the following scheme:
[0009] A method for intelligent management of game server resources, comprising the following steps:
[0010] Step 1: Design DSL instructions based on the game server management requirements;
[0011] Step 2: Design the DSL parser and compiler;
[0012] Step 3: Design the core functions of game server management based on the design DSL instructions;
[0013] Step 4: Integrate the DSL parser and compiler;
[0014] Step 5: Develop the user interface and API;
[0015] Step 6: Integrate DSL commands, DSL parser, DSL compiler, core game server management functions, user interface, and API to manage the game server.
[0016] Furthermore, step 1 specifically involves:
[0017] Step 1.1: Define game server resources, including defining keywords and syntax structures;
[0018] Step 1.2: Design resource operation instructions to manage game server resources;
[0019] Step 1.3: Design resource status monitoring commands to monitor and query the resource status of the game server;
[0020] Step 1.4: Design resource scheduling instructions to schedule game server resources;
[0021] Step 1.5: Set event triggering instructions and response instructions, which are used to set event triggering conditions and response actions.
[0022] Furthermore, the DSL instructions support user-defined functions and extensions to meet the needs of specific game scenarios.
[0023] Furthermore, step 2 specifically involves designing the DSL parser, which includes the following steps:
[0024] Step 2.1: Lexical analysis, decomposing DSL instructions into several lexical units;
[0025] Step 2.2: Syntax analysis. According to the DSL grammar rules, several lexical units are organized into a tree structure to form a syntax tree;
[0026] Step 2.3: Based on the syntax tree, construct an AST (Abstract Syntax Tree) to represent the structure and semantics of DSL instructions;
[0027] Designing a compiler for a DSL involves the following steps:
[0028] Step 2.4: Perform semantic checks on the AST (Abstract Syntax Tree);
[0029] Step 2.5: Optimize the AST (Abstract Syntax Tree);
[0030] Step 2.6: Generate target code based on the AST (Abstract Syntax Tree).
[0031] Furthermore, step 3 specifically involves designing the core functions of game server management based on the design DSL instructions, including resource monitoring, resource scheduling, and automated resource management.
[0032] Resource monitoring is used to monitor the status of the game server in real time;
[0033] Resource scheduling can dynamically schedule and allocate server resources based on server load and user demand. It uses machine learning models to predict player behavior and server load, enabling preventative scaling and optimization. Based on historical data and real-time feedback, it optimizes scheduling strategies and resource allocation.
[0034] Furthermore, the user interface described in step 5 includes a graphical interface or a command-line interface. The user interface and API are integrated with the core functions of game server management to monitor server status in real time and perform management operations.
[0035] A smart management system for game server resources, the system comprising: a DSL instruction design module, a parser compiler design module, a game server management core function design module, a parser compiler integration module, and a user interface API development module;
[0036] The DSL instruction design module is used to design DSL instructions according to the game server management requirements;
[0037] The parser compiler design module is used to design the parser and compiler for the DSL;
[0038] The game server management core function design module is used to design the game server management core functions according to the design DSL instructions;
[0039] The parser-compiler integration module is used to integrate a DSL parser and a compiler;
[0040] The user interface API development module is used to develop user interfaces and APIs;
[0041] The integrated module is used to integrate DSL commands, DSL parser, DSL compiler, core functions of game server management, user interface and API for game server management.
[0042] Furthermore, the DSL instruction design module specifically includes:
[0043] Define game server resources, including defining keywords and syntax structures;
[0044] Design resource operation commands to manage game server resources;
[0045] Design resource status monitoring commands to monitor and query the resource status of the game server;
[0046] Design resource scheduling instructions to schedule game server resources;
[0047] The event trigger and response commands are set to define the event trigger conditions and response actions.
[0048] Furthermore, the DSL instructions support user-defined functions and extensions to meet the needs of specific game scenarios.
[0049] Furthermore, the parser compiler design module specifically involves the following steps in designing a DSL parser:
[0050] Lexical analysis breaks down DSL instructions into several lexical units;
[0051] Syntax analysis involves organizing several lexical units into a tree structure, forming a syntax tree, according to the DSL grammar rules.
[0052] Based on the syntax tree, an AST (Abstract Syntax Tree) is constructed to represent the structure and semantics of DSL instructions;
[0053] Designing a compiler for a DSL involves the following steps:
[0054] Perform semantic checks on the Abstract Syntax Tree (AST);
[0055] Optimize the Abstract Syntax Tree (AST);
[0056] Generate target code based on the Abstract Syntax Tree (AST).
[0057] Furthermore, the core function design module for game server management is specifically designed as follows: based on the design DSL instructions, the core functions for game server management are designed, including resource monitoring, resource scheduling, and automated resource management;
[0058] Resource monitoring is used to monitor the status of the game server in real time;
[0059] Resource scheduling can dynamically schedule and allocate server resources based on server load and user demand. It uses machine learning models to predict player behavior and server load, enabling preventative scaling and optimization. Based on historical data and real-time feedback, it optimizes scheduling strategies and resource allocation.
[0060] Furthermore, the user interface described in the user interface API development module includes a graphical interface or a command-line interface. The user interface and API are integrated with the core functions of game server management to monitor server status in real time and perform management operations.
[0061] The beneficial effects of this invention are as follows:
[0062] This invention provides a method and system for intelligent management of game server resources, which realizes intelligent management and scheduling of game server resources. It can dynamically adjust the number of server instances according to real-time demand, achieve load balancing and automatic scaling, and effectively improve server resource utilization and game performance. Attached Figure Description
[0063] Figure 1 This is a flowchart of the method of the present invention;
[0064] Figure 2 This is a structural block diagram of the system of the present invention. Detailed Implementation
[0065] The invention will now be further described with reference to the accompanying drawings.
[0066] See Figure 1 A method for intelligent management of game server resources, comprising the following steps:
[0067] Step 1: Design DSL instructions based on the game server management requirements;
[0068] Step 2: Design the DSL parser and compiler;
[0069] Step 3: Design the core functions of game server management based on the design DSL instructions;
[0070] Step 4: Integrate the DSL parser and compiler;
[0071] Step 5: Develop the user interface and API;
[0072] Step 6: Integrate DSL commands, DSL parser, DSL compiler, core game server management functions, user interface, and API to manage the game server.
[0073] The present invention will be further described below with reference to a specific embodiment:
[0074] A method for intelligent management of game server resources, the method comprising the following steps:
[0075] Step 1: Define game server resources, including defining keywords and syntax structures, such as server instance, game world, players, etc.
[0076] Example:
[0077] ServerInstance{
[0078] Name: "GameServer1"
[0079] Region: "Asia"
[0080] Type: "Dedicated"
[0081] Capacity: 100
[0082] }
[0083] Design resource operation commands to manage game server resources, such as creating, destroying, and adjusting capacity;
[0084] Example:
[0085] CreateServerInstance{
[0086] Name: "GameServer2"
[0087] Region: "Europe"
[0088] Type: "Cloud"
[0089] Capacity: 50
[0090] }
[0091] Design resource status monitoring commands to monitor and query the resource status of game servers, such as obtaining the current list of server instances and querying resource utilization.
[0092] Example:
[0093] GetServerInstances{
[0094] Region: "Asia"
[0095] }
[0096] Design resource scheduling instructions to schedule game server resources, such as load balancing and automatic scaling.
[0097] Example:
[0098]
[0099] Set event trigger and response commands to set event trigger conditions and response actions, such as player login, changes in game world state, etc.
[0100] Example:
[0101] OnPlayerLogin{
[0102] Action: "SendWelcomeMessage"
[0103] }
[0104] In addition, the DSL commands support user-defined functions and extensions to meet the needs of specific game scenarios.
[0105] Example:
[0106]
[0107]
[0108] Step 2: Design the DSL parser and DSL compiler:
[0109] The design of a DSL parser includes the following steps:
[0110] Step 2.1: Lexical analysis, which decomposes DSL instructions into several lexical units, such as keywords, identifiers, operators, etc.
[0111] Step 2.2: Syntax analysis. According to the DSL grammar rules, several lexical units are organized into a tree structure to form a syntax tree. This process can use techniques such as recursive descent and LL(k) analysis.
[0112] Step 2.3: Based on the syntax tree, construct an AST (Abstract Syntax Tree) to represent the structure and semantics of DSL instructions;
[0113] Designing a compiler for a DSL involves the following steps:
[0114] Step 2.4: Perform semantic checks on the AST (Abstract Syntax Tree) to ensure the semantic correctness of the DSL code, such as type checking and scope checking;
[0115] Step 2.5: Optimize the AST (Abstract Syntax Tree) to improve code execution efficiency and reduce resource consumption;
[0116] Optimizations of the Abstract Syntax Tree (AST) include constant folding: it calculates the constant values of expressions during the compilation phase, thereby reducing the amount of computation at runtime. For example, x = 3 + 4, after optimization: x = 7.
[0117] Constant propagation: Replace known constant values throughout the program, thereby reducing the use of variables and unnecessary calculations.
[0118] Dead code elimination: Eliminate code that will not be executed or that has no effect on the program's outcome.
[0119] Looping code without changing the loop: This involves moving expressions that evaluate to the same result every time they are executed within a loop out of the loop, thereby reducing redundant calculations within the loop body.
[0120] Common subexpression elimination: Detects and eliminates subexpressions that appear multiple times in the program and produce the same result, evaluating them only once and reusing the result. For example:
[0121] x = (a + b) * c;
[0122] y = (a + b) * d;
[0123] After optimization:
[0124] temp = a + b;
[0125] x = temp * c;
[0126] y = temp * d;
[0127] Reduce unnecessary memory accesses: Minimize memory read and write operations, and store frequently used values in registers to improve access speed; for example:
[0128] x = array[i];
[0129] y = array[i];
[0130] optimization:
[0131] temp = array[i];
[0132] x = temp;
[0133] y = temp;
[0134] Intensity reduction: Replace high-cost operations with low-cost operations, for example: y = x * 8; after optimization: y = x << 3;
[0135] Step 2.6: Generate target code based on the AST (Abstract Syntax Tree), which can be machine code, intermediate code, or other forms of representation for the target platform.
[0136] Step 3: Design the core functions of game server management according to the design DSL instructions, including resource monitoring, resource scheduling and automated resource management;
[0137] Resource monitoring is used to monitor the status of the game server in real time, including the utilization of resources such as CPU, memory, and network.
[0138] Resource scheduling design of appropriate scheduling algorithms can dynamically schedule and allocate server resources based on server load and user demand. It can use machine learning models to predict player behavior and server load, perform preventative scaling and optimization, and optimize scheduling strategies and resource allocation based on historical data and real-time feedback to improve response speed and resource utilization.
[0139] Automated resource management, including automatic expansion, automatic reduction, and fault recovery.
[0140] Step 4: Integrate the DSL parser and compiler set with the core functions of game server management, so that it can receive DSL code and convert it into executable instructions.
[0141] The integration process involves writing adapters or interfaces to ensure that the DSL parser and compiler can communicate and interact with the functional modules.
[0142] Step 5: Develop the user interface and API to enable users to easily manage the game server using the DSL. The user interface can be a graphical interface or a command-line interface, and the API can be a RESTful API or other forms of interface.
[0143] The user interface and API need to be integrated with the core functions of game server management so that users can monitor server status and perform management operations in real time.
[0144] Step 6: Integrate DSL commands, DSL parser, DSL compiler, core game server management functions, user interface, and API to manage the game server.
[0145] See Figure 2 A smart management system for game server resources, the system comprising: a DSL instruction design module, a parser compiler design module, a game server management core function design module, a parser compiler integration module, and a user interface API development module;
[0146] The DSL instruction design module is used to design DSL instructions according to the game server management requirements;
[0147] The parser compiler design module is used to design the parser and compiler for the DSL;
[0148] The game server management core function design module is used to design the game server management core functions according to the design DSL instructions;
[0149] The parser-compiler integration module is used to integrate a DSL parser and a compiler;
[0150] The user interface API development module is used to develop user interfaces and APIs;
[0151] The integrated module is used to integrate DSL commands, DSL parser, DSL compiler, core functions of game server management, user interface and API for game server management.
[0152] In one embodiment of the present invention, the DSL instruction design module specifically comprises:
[0153] Define game server resources, including defining keywords and syntax structures;
[0154] Design resource operation commands to manage game server resources;
[0155] Design resource status monitoring commands to monitor and query the resource status of the game server;
[0156] Design resource scheduling instructions to schedule game server resources;
[0157] The event trigger and response commands are set to define the event trigger conditions and response actions.
[0158] In one embodiment of the present invention, the DSL instruction supports user-defined functions and extensions to meet the needs of specific game scenarios.
[0159] In one embodiment of the present invention, the parser compiler design module specifically comprises the following steps: designing a DSL parser includes the following steps:
[0160] Lexical analysis breaks down DSL instructions into several lexical units;
[0161] Syntax analysis involves organizing several lexical units into a tree structure, forming a syntax tree, according to the DSL grammar rules.
[0162] Based on the syntax tree, an AST (Abstract Syntax Tree) is constructed to represent the structure and semantics of DSL instructions;
[0163] Designing a compiler for a DSL involves the following steps:
[0164] Perform semantic checks on the Abstract Syntax Tree (AST);
[0165] Optimize the Abstract Syntax Tree (AST);
[0166] Generate target code based on the Abstract Syntax Tree (AST).
[0167] Based on the developed DSL parser and compiler, the DSL code (instructions) is parsed into instructions that the game server management system can understand and execute.
[0168] The DSL parser is responsible for parsing the DSL code into an Abstract Syntax Tree (AST), and the compiler converts the AST into internal system instructions.
[0169] In one embodiment of the present invention, the core function design module for game server management specifically involves: designing core functions for game server management according to the design DSL instructions, including resource monitoring, resource scheduling, and automated resource management;
[0170] Resource monitoring is used to monitor the status of the game server in real time;
[0171] Resource scheduling can dynamically schedule and allocate server resources based on server load and user demand. It uses machine learning models to predict player behavior and server load, enabling preventative scaling and optimization. Based on historical data and real-time feedback, it optimizes scheduling strategies and resource allocation.
[0172] In addition, this invention also includes a DSL code editor and debugging tools, supporting functions such as DSL syntax highlighting and auto-completion. The use of the DSL code editor and debugging tools greatly improves the work efficiency and code quality of the operator's team, making game server management more intelligent, flexible, and efficient.
[0173] The editor and debugging tools are integrated into the game server management system, enabling operators to easily write and debug DSL code.
[0174] Before implementation, all modules will be integrated to ensure that all parts of the system work together properly.
[0175] In one embodiment of the present invention, the user interface in the user interface API development module includes a graphical interface or a command-line interface. The user interface and API are integrated with the game server management core function design module to perform real-time monitoring of server status and execution of management operations.
[0176] It supports user-defined functions and extensions to meet the needs of specific game scenarios.
[0177] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be included in the scope of the present invention.
Claims
1. A method for intelligent management of resources of a game server, characterized in that, The method steps are as follows: Step 1: Design DSL instructions according to game server management needs; Step 2: Design DSL parser and compiler; Step 3: Design game server management core functions according to designed DSL instructions; Step 4: Integrate DSL parser and compiler; Step 5: Develop user interface and API; Step 6: Integrate DSL instructions, DSL parser, DSL compiler, game server management core functions, user interface, and API for game server management.
2. The method for intelligent management of game server resources according to claim 1, wherein, Step 1 is specifically: Step 1.1: Define game server resources, including defining keywords and syntax structures; Step 1.2: Design resource operation instructions for managing game server resources; Step 1.3: Design resource state monitoring instructions for monitoring and querying game server resource states; Step 1.4: Design resource scheduling instructions for scheduling game server resources; Step 1.5: Set event trigger instructions and response instructions for setting event trigger conditions and response actions.
3. The method for intelligent management of game server resources according to claim 1, wherein, The DSL instructions support user-defined functions and extensions to meet specific game scenario needs.
4. The method for intelligent management of game server resources according to claim 1, wherein, Step 2 is specifically: Designing a DSL parser includes the following steps: Step 2.1: Lexical analysis, which decomposes DSL instructions into several lexical units; Step 2.2: Syntax analysis, which organizes several lexical units into a tree structure according to DSL syntax rules to form a syntax tree; Step 2.3: According to the syntax tree, construct an AST abstract syntax tree representing the structure and semantics of the DSL instruction; Designing a DSL compiler includes the following steps: Step 2.4: Semantic checking of the AST abstract syntax tree; Step 2.5: Optimization of the AST abstract syntax tree; Step 2.6: Generating target code from the AST abstract syntax tree.
5. The method for intelligent management of game server resources according to claim 1, wherein, Step 3 is specifically: Designing game server management core functions according to designed DSL instructions, including resource monitoring, resource scheduling, and resource automation management; Resource monitoring is used to monitor the state of game servers in real time; Resource scheduling can dynamically schedule and allocate server resources according to server load and user needs, use machine learning models to predict player behavior and server load, and perform preventive expansion and optimization, optimize scheduling strategies and resource allocation based on historical data and real-time feedback.
6. The method for intelligent management of game server resources according to claim 1, wherein, The user interface in Step 5 includes a graphical interface or command line interface.
7. A smart management system for game server resources, characterized in that, The system includes: DSL instruction design module, parser compiler design module, game server management core function design module, parser compiler integration module, user interface API development module, integration module; The DSL instruction design module is used to design DSL instructions according to game server management needs; The parser compiler design module is used to design the parser and compiler of DSL; The game server management core function design module is used to design game server management core functions according to designed DSL instructions; The parser compiler integration module is used to integrate DSL parser and compiler; The user interface API development module is used to develop user interface and API; The integrated module is used for integrating DSL instructions, a DSL parser, a DSL compiler, game server management core functions, a user interface, and an API to perform game server management.
8. The game server resource intelligent management system of claim 7, wherein, The DSL instruction design module specifically comprises: defining game server resources, including defining keywords and syntax structures; designing resource operation instructions for managing game server resources; designing resource state monitoring instructions for monitoring and querying game server resource states; designing resource scheduling instructions for scheduling game server resources; setting event trigger instructions and response instructions for setting event trigger conditions and response actions.
9. The system for intelligent management of resources of a game server according to claim 7, wherein, The DSL instructions support user-defined functions and extensions to meet specific game scenario requirements.
10. The system for intelligent management of game server resources according to claim 7, wherein, The parser compiler design module specifically comprises: lexical analysis, which decomposes DSL instructions into several lexical units; syntax analysis, which organizes several lexical units into a tree structure according to DSL syntax rules to form a syntax tree; constructing an AST abstract syntax tree for representing the structure and semantics of DSL instructions according to the syntax tree; The DSL compiler design module specifically comprises: performing semantic checking on the AST abstract syntax tree; optimizing the AST abstract syntax tree; generating target code according to the AST abstract syntax tree.
11. The system for intelligent management of resources of a game server according to claim 7, wherein, The game server management core function design module specifically comprises: designing game server management core functions according to the DSL instruction design, including resource monitoring, resource scheduling, and resource automation management; resource monitoring is used for real-time monitoring of game server states; 12. The system for intelligent management of resources of a game server according to claim 7, wherein, resource scheduling can dynamically schedule and allocate server resources according to server load conditions and user demands, predict player behavior and server load using machine learning models, perform preventive expansion and optimization, and optimize scheduling strategies and resource allocation based on historical data and real-time feedback. The user interface API development module comprises a graphical interface or a command line interface.