Game activity resource dynamic pre-expansion and scheduling method and system

By combining multimodal resource prediction models and reinforcement learning models with attention mechanisms and virtual simulation environments, the problem of unreasonable resource allocation in game activities is solved, achieving accurate response and system stability, and improving user experience and security.

CN122032089APending Publication Date: 2026-05-15GUANGZHOU JISHANG NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610433263.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing methods for allocating resources for game activities cannot accurately predict demand, leading to unreasonable resource allocation, which affects the game experience and security. Furthermore, the response speed is slow and it is difficult to cope with dynamically changing resource demands.

Method used

By combining a multimodal resource prediction model and a reinforcement learning model with an attention mechanism to dynamically weight and fuse temporal, spatial, and external environmental features, a resource allocation and elastic scaling plan is generated. The plan is then verified and corrected in a virtual simulation environment, ultimately triggering multi-level resource pre-allocation operations.

Benefits of technology

This ensures the accuracy and timeliness of resource allocation for game activities, improves user experience, reduces security risks, and guarantees the smooth operation of game activities and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122032089A_ABST
    Figure CN122032089A_ABST
Patent Text Reader

Abstract

The invention discloses a game activity resource dynamic pre-expansion and scheduling method and system, and the method specifically comprises the steps: obtaining activity configuration information in response to an activity creation request, and carrying out the associated collection of multi-modal data; based on the multi-modal data, performing resource demand estimation by using a pre-trained multi-modal resource prediction model to obtain a resource prediction result; inputting the resource prediction result into a reinforcement learning model deployed in a virtual simulation environment, and generating a resource configuration and elastic scaling plan; pushing and auditing the resource configuration and the elastic scaling plan, and performing verification and correction in a virtual simulation environment in response to an auditing instruction to form an executable pre-expansion scheme; in accordance with an executable pre-capacity expansion scheme, a multi-level resource pre-allocation operation is triggered prior to initiation of an activity. According to the method and the device, the accuracy of game activity resource allocation and the timeliness of response are realized, the user experience is effectively improved, meanwhile, the safety risk is reduced, and a powerful guarantee is provided for smooth development of game activities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game operation and maintenance technology, and in particular to a method and system for dynamic pre-expansion and scheduling of game activity resources. Background Technology

[0002] In the current gaming landscape, especially with the booming development of online multiplayer games, weekly events and gatherings have become core elements attracting high player engagement. These events typically exhibit cyclical characteristics and cause significant fluctuations in user traffic and resource demands. For example, during large-scale events in popular online multiplayer games, the number of players may increase dramatically in a short period, leading to a surge in demand for server resources and network bandwidth; conversely, these demands will quickly subside after the event ends.

[0003] However, existing resource allocation methods mainly rely on manual adjustments and static rules. When dealing with complex and dynamically changing resource demand scenarios, these methods expose many serious problems, greatly limiting the smooth progress of game activities and the player experience. Specifically, these problems are as follows: 1. Inaccurate resource allocation: Due to the lack of intelligent prediction mechanisms, existing methods struggle to accurately estimate resource needs during events. This often leads to situations where resources are allocated too much or too little. Over-allocation results in unnecessary waste and increased operating costs; while under-allocation causes excessive system load, affecting normal game operation and even causing system crashes.

[0004] 2. Slow Response Speed: Manually adjusting resource configurations requires significant manpower and time. From identifying changes in resource needs to developing an adjustment plan and then actually implementing the adjustment, the entire process is cumbersome and time-consuming. This makes it difficult to respond promptly to unexpected situations, such as a sudden and significant increase or decrease in the number of players, and hinders the ability to quickly adjust resources to meet actual needs.

[0005] 3. Poor User Experience: Inadequate resource allocation will directly affect the game. When resources are insufficient, the game is prone to lag and latency, which seriously affects the player's operating experience and game smoothness. While allocating too many resources can avoid these problems to some extent, it will increase costs and may lead to other potential problems due to uneven resource allocation, which will also have a negative impact on the user experience.

[0006] 4. Security Risks: Excessive system load can not only affect game performance but also lead to serious security issues such as server crashes. A server crash could result in the loss of player data and interruption of game services, causing significant inconvenience to players and severely damaging the reputation and financial interests of the game operator. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for dynamic pre-expansion and scheduling of game activity resources, which realizes the accuracy of game activity resource allocation and the timeliness of response, effectively improves the user experience, reduces security risks, and provides a strong guarantee for the smooth operation of game activities, thereby solving at least one of the above-mentioned problems in the prior art.

[0008] In a first aspect, the present invention provides a method for dynamic pre-expansion and scheduling of game activity resources, the method specifically comprising: In response to an activity creation request, obtain activity configuration information and associate it with collected multimodal data. Based on multimodal data, a pre-trained multimodal resource prediction model is used to predict resource demand. The model dynamically weights and fuses temporal features, spatial features, and external environmental features through an attention mechanism to obtain resource prediction results. The resource prediction results are input into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling plans. The resource allocation and elastic scaling plan are pushed for review, and the plan is verified and corrected in the virtual simulation environment in response to the review instructions to form an executable pre-expansion plan. Based on the executable pre-scaling scheme, a multi-level resource pre-allocation operation, including cache preheating, cross-cloud resource initialization, and configuration of autoscalors, is triggered before the activity begins.

[0009] Secondly, the present invention provides a dynamic pre-expansion and scheduling system for game activity resources, the system specifically comprising: The data acquisition module is used to respond to activity creation requests, obtain activity configuration information, and associate and collect multimodal data through the activity configuration information; The resource prediction module is used to predict resource demand based on multimodal data and a pre-trained multimodal resource prediction model. It dynamically weights and fuses temporal features, spatial features, and external environmental features through an attention mechanism to obtain resource prediction results. The contingency plan generation module is used to input resource prediction results into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling contingency plans. The contingency plan modification module is used to push resource configuration and elastic scaling contingency plans for review, and to verify and modify them in the virtual simulation environment in response to review instructions, forming an executable pre-expansion plan; The execution operation module is used to trigger multi-level resource pre-allocation operations, including cache preheating, cross-cloud resource initialization, and configuration of autoscalors, before the activity begins, based on the executable pre-scaling scheme.

[0010] Thirdly, the present invention provides a computer device, including: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements the game activity resource dynamic pre-expansion and scheduling method as described in any of the above methods.

[0011] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for dynamic pre-expansion and scheduling of game activity resources as described in any of the above methods.

[0012] Compared with the prior art, the present invention has at least one of the following technical effects: 1. This invention achieves precision in resource allocation and timeliness in game activities, effectively improving user experience while reducing security risks, and providing strong support for the smooth operation of game activities.

[0013] 2. This invention uses a pre-trained multimodal resource prediction model to dynamically and weightedly fuse temporal features, spatial features, and external environmental features through an attention mechanism. This enables more accurate prediction of resource demand during an activity, avoiding resource waste or shortage and improving resource utilization.

[0014] 3. This invention inputs the resource prediction results into a reinforcement learning model deployed in a virtual simulation environment to quickly generate resource configuration and elastic scaling plans. After review and verification, an executable pre-expansion plan is formed, which triggers multi-level resource pre-allocation operations before the start of the activity. This can respond to changes in resource demand in a timely manner, reduce manual intervention, and improve response speed.

[0015] 4. The precise resource allocation and timely response of this invention ensure the stable operation of the system during game activities, effectively avoiding problems such as lag and delay, providing players with a smooth gaming experience and improving user satisfaction.

[0016] 5. The reasonable resource allocation of this invention avoids excessive system load, reduces security risks such as server crashes, and ensures the security of player data and the stable operation of game services.

[0017] 6. This invention utilizes long short-term memory networks, convolutional neural networks, and attention mechanisms to integrate multimodal features, thereby improving the accuracy of game activity resource demand prediction.

[0018] 7. Based on resource prediction results, this invention uses reinforcement learning to generate resource allocation and elastic scaling plans in a virtual simulation environment, which can effectively cope with dynamic resource demands and improve system stability and resource utilization efficiency.

[0019] 8. This invention pushes resource allocation and flexible scaling plans for review and verifies and corrects them in a virtual simulation environment, ensuring the feasibility and security of the plan and reducing implementation risks.

[0020] 9. This invention triggers multi-level resource pre-allocation operations based on an executable pre-expansion scheme, making resource preparations in advance and ensuring sufficient and stable resources when the game activity begins.

[0021] 10. This invention uses an executable pre-expansion scheme to pre-warm up CDN cache and pre-allocate database connection pools, optimizing resource access in advance and improving player access speed and database response capabilities when game activities begin.

[0022] 11. Based on an executable pre-expansion scheme, this invention initializes computing resources according to a cost optimization algorithm through a unified scheduling layer API across cloud platforms, thereby achieving resource procurement cost optimization and efficient utilization.

[0023] 12. This invention configures a Kubernetes-based horizontal Pod autoscaler based on an executable pre-scaling scheme, enabling game service resources to automatically and elastically scale according to the number of players online in real time and the request latency rate.

[0024] 13. This invention collects full-cycle operational data of game activities and feeds it back to the multimodal resource prediction model and reinforcement learning model for incremental training and parameter updates, thereby improving the accuracy of subsequent predictions and decisions of the model. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating a method for dynamic pre-expansion and scheduling of game activity resources according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a dynamic pre-expansion and scheduling system for game activity resources provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0027] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0028] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0029] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0030] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0031] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0032] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0033] In this application embodiment, the entity executing the process includes a terminal device. This terminal device includes, but is not limited to, devices capable of executing the methods disclosed in this application, such as servers, computers, smartphones, and tablets. Figure 1 A flowchart illustrating a method for dynamic pre-expansion and scheduling of game activity resources according to an embodiment of the present invention is shown below: S101, in response to the activity creation request, obtains the activity configuration information and associates the collected multimodal data through the activity configuration information; S102, based on multimodal data, uses a pre-trained multimodal resource prediction model to estimate resource demand. It dynamically weights and fuses temporal features, spatial features and external environmental features through an attention mechanism to obtain resource prediction results. S103, input the resource prediction results into the reinforcement learning model deployed in the virtual simulation environment to generate resource allocation and elastic scaling plans; S104 pushes the resource configuration and elastic scaling plan for review, and verifies and corrects it in the virtual simulation environment in response to the review instructions to form an executable pre-expansion plan; S105, based on the executable pre-scaling scheme, triggers a multi-level resource pre-allocation operation that includes cache preheating, cross-cloud resource initialization, and configuration of autoscalators before the activity begins.

[0034] In this embodiment, when the game system receives an event creation request, it responds immediately. The system retrieves event configuration information from the event creation-related information. This configuration information covers key aspects such as the event type, scale, expected number of participants, and event duration. After obtaining the event configuration information, the system collects multimodal data based on this information. Multimodal data includes, but is not limited to, resource usage data of similar events in the same historical period, such as server CPU usage, memory usage, and network bandwidth consumption when similar events are held in the same time period; it also includes real-time operating data of the current game server, such as the current server load and remaining resources; and it also collects external environmental characteristic data, such as holiday information and special policies of network operators, which may affect players' participation in events and network conditions.

[0035] Based on the collected multimodal data, the system utilizes a pre-trained multimodal resource prediction model to estimate resource demand. During training, this model dynamically weights and fuses temporal, spatial, and external environmental features using an attention mechanism. Temporal features reflect the changing patterns of resource demand over time; for example, player activity levels vary at different times of the day and on different days of the week, resulting in different resource demands. Spatial features consider the differences in resource demand between different game regions and server nodes. External environmental features, as mentioned earlier, influence player participation and thus resource demand. By dynamically weighting and fusing these features through the attention mechanism, the model can more accurately capture the impact of various factors on resource demand, thereby obtaining more precise resource prediction results, including the amount of server resources and network bandwidth required at different times during the activity.

[0036] The resource prediction results are input into a reinforcement learning model deployed in a virtual simulation environment. The reinforcement learning model continuously learns and optimizes within the virtual simulation environment. Based on the resource prediction results, it comprehensively considers various factors, such as resource cost and system stability, to generate a resource allocation and elastic scaling plan. This plan details how resources will be dynamically adjusted during the event, including how much resource needs to be pre-allocated before the event starts, and how to elastically scale based on the actual number of players and resource usage during the event. For example, how to quickly increase server resources when the number of players suddenly increases; and how to reasonably release excess resources when the number of players decreases.

[0037] The generated resource configuration and elastic scaling plan are pushed to relevant reviewers for approval. Reviewers will evaluate the plan based on factors such as the actual operation of the game and security requirements. The system will respond to the reviewers' instructions and verify and revise the plan in a virtual simulation environment. In the virtual simulation environment, various situations during the event can be simulated, such as player influxes of different sizes and network fluctuations. Through simulation verification, problems in the plan can be identified and corrected, ultimately forming an executable pre-scaling solution.

[0038] Based on the resulting executable pre-scaling plan, multi-level resource pre-allocation operations are triggered before the event begins. These operations include: cache preheating (loading potentially needed data into the cache in advance to reduce data read time for players and improve game response speed); cross-cloud resource initialization (if the game uses a multi-cloud architecture, pre-initializing necessary resources on various cloud platforms to ensure rapid access during the event); and configuring an autoscalator (setting autoscalator parameters according to the executable pre-scaling plan to automatically adjust server resources and network bandwidth based on actual resource needs during the event, ensuring its smooth operation).

[0039] In some embodiments, in step S102 above, the step of estimating resource demand based on multimodal data using a pre-trained multimodal resource prediction model, and obtaining resource prediction results by dynamically weighting and fusing temporal features, spatial features, and external environmental features through an attention mechanism, specifically includes: Based on multimodal data, temporal feature vectors are extracted through a long short-term memory network, spatial feature vectors are extracted through a convolutional neural network, and external environmental data in the multimodal data are embedded and encoded to generate environmental feature vectors. Temporal feature vectors, spatial feature vectors, and environmental feature vectors are input together into an attention mechanism layer based on scaling dot products. The importance weights of each feature vector are dynamically calculated, and the feature vectors are weighted and fused according to their importance weights to generate a multimodal fused feature vector. The multimodal fusion feature vector is input into a fully connected regression network for nonlinear mapping and calculation, and the output is a resource prediction result of the number of various types of server resources required by the target activity in a specific future time period.

[0040] In this embodiment, after acquiring multimodal data, feature extraction is performed first. For temporal feature extraction, a Long Short-Term Memory (LSTM) network is used. LSM networks have a unique memory unit structure, enabling them to effectively handle long-term dependencies in sequential data. In the context of game activities, the temporal data in the multimodal data includes changes in resource usage over time during historical activities. For example, server resource utilization and network bandwidth usage at different hours and dates during similar past activities. The LSM network analyzes and processes this temporal data layer by layer, uncovering hidden patterns and trends, and ultimately generating a temporal feature vector that accurately reflects the changing characteristics of resource demand over time.

[0041] For spatial feature extraction, convolutional neural networks (CNNs) are employed. CNNs have significant advantages in processing data with spatial structure. In gaming activities, spatial data may involve information such as the distribution of different game server nodes and the distribution of players in different game regions. Through convolutional and pooling layers, CNNs can automatically extract key features from this spatial data, such as the impact of player density in different regions on resource demand and the resource interaction between different server nodes, thereby generating a spatial feature vector that reflects the distribution and variation of resource demand across spatial dimensions.

[0042] Simultaneously, external environmental data within the multimodal data is embedded and encoded to generate environmental feature vectors. External environmental data encompasses various factors, such as holiday information, weather conditions, and specific policies of network operators. While these factors are not directly part of the game's resource usage data, they significantly impact player participation and resource demands. Through embedding and encoding, this discrete external environmental data is transformed into a continuous vector representation, enabling the model to better understand and process this information. The generated environmental feature vectors accurately reflect the potential impact of external environmental factors on resource demands.

[0043] Next, the extracted temporal feature vector, spatial feature vector, and environmental feature vector are input into a scaling dot product-based attention mechanism layer. The core idea of ​​the attention mechanism is to dynamically assign weights based on the importance of different features to the final resource demand prediction result. In the scaling dot product-based attention mechanism layer, the correlation between each feature vector and other feature vectors is calculated, and the importance weight of each feature vector is determined based on the magnitude of the correlation. For example, during certain special holidays, environmental feature vectors may have a greater impact on resource demand, and the attention mechanism will assign them a higher weight; while on weekdays, temporal feature vectors may better reflect the changing patterns of resource demand and will receive a relatively higher weight. This dynamic weight calculation method allows for a more reasonable fusion of information from different features. Then, based on the calculated importance weights, the temporal feature vector, spatial feature vector, and environmental feature vector are weighted and fused to generate a multimodal fused feature vector. This vector integrates information from temporal, spatial, and external environmental aspects, and can more comprehensively and accurately reflect the characteristics of resource demand.

[0044] Finally, the generated multimodal fusion feature vector is input into a fully connected regression network for nonlinear mapping and computation. The fully connected regression network, composed of multiple fully connected layers, is capable of performing complex nonlinear transformations on the input feature vector. In the scenario of predicting resource requirements for game activities, the fully connected regression network learns from a large amount of historical data to establish a mapping relationship between the multimodal fusion feature vector and the quantity of various server resources required by the target activity in a specific future time period. After nonlinear mapping and computation, it outputs resource prediction results for the quantity of various server resources required by the target activity in a specific future time period, such as predicting the number of server CPUs, memory capacity, and network bandwidth required each hour during the activity, providing an accurate basis for subsequent resource allocation and scheduling.

[0045] In some embodiments, step S103 above, which involves inputting the resource prediction results into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling plans, specifically includes: Based on the resource prediction results, the parameters of the pre-built virtual simulation environment are configured and the state is initialized. The initialized virtual simulation environment interacts with a reinforcement learning agent based on a near-end policy optimization algorithm. The reinforcement learning agent continuously observes the system state of the virtual simulation environment and outputs corresponding resource adjustment actions. The system state includes real-time resource utilization and service latency, and the resource adjustment actions include scaling up or down computing instances. The immediate reward for each resource adjustment action of the reinforcement learning agent is calculated using a preset composite reward function. The optimal resource adjustment action is determined by the immediate reward. The composite reward function is used to integrate system stability reward, resource cost efficiency reward and user experience quality reward in a weighted manner. Once the reinforcement learning agent has been trained to convergence, it is run in a simulation environment for the complete cycle of the target activity. The optimal resource adjustment action sequence output by the agent is recorded and organized to generate a resource configuration and elastic scaling plan that includes operation timing, operation objects and operation scale.

[0046] In this embodiment, the parameters and state of a pre-built virtual simulation environment are configured and initialized based on resource prediction results. The pre-built virtual simulation environment is a digital platform that simulates real-world game activity scenarios, highly replicating various elements and interactions within the game. Based on the resource prediction results, various parameters within the virtual simulation environment are precisely configured. For example, the initial resource capacity of the servers in the virtual simulation environment is set according to the predicted number of server resources required in a specific future time period; bandwidth parameters in the virtual network environment are set according to the predicted player traffic. Simultaneously, the state of the virtual simulation environment is initialized to a baseline state that matches the initial state of the upcoming game activity, preparing for subsequent interactions with the reinforcement learning agent.

[0047] The initialized virtual simulation environment interacts with a reinforcement learning agent based on the proximal policy optimization algorithm. The reinforcement learning agent is the core decision-making force throughout the process, possessing autonomous learning and decision-making capabilities. During the interaction, the agent continuously observes the system state of the virtual simulation environment. The system state includes several key indicators, among which real-time resource utilization reflects the usage of various resources in the current virtual environment, such as server CPU utilization and memory utilization; service latency reflects the time interval between a player's request and the response, directly affecting the player's gaming experience. Based on the observed system state, the reinforcement learning agent analyzes and judges using the proximal policy optimization algorithm, outputting corresponding resource adjustment actions. These resource adjustment actions mainly include expanding or shrinking computing instances. When resource demand is predicted to increase, the agent outputs an expansion action, increasing the number of computing instances to improve resource supply capacity; when resource demand is predicted to decrease, it outputs a shrinking action, reducing the number of computing instances to avoid resource waste.

[0048] A pre-defined composite reward function is used to calculate the immediate reward for each resource adjustment action of the reinforcement learning agent. This composite reward function is an evaluation mechanism that comprehensively considers multiple factors, integrating system stability rewards, resource cost efficiency rewards, and user experience quality rewards through a weighted approach. System stability rewards focus on the impact of resource adjustment actions on the stability of the virtual simulation environment; actions that maintain system stability and prevent crashes or lag will receive a higher reward. Resource cost efficiency rewards emphasize cost control through resource adjustment actions; actions that meet resource requirements with minimal resource input will receive a higher reward. User experience quality rewards primarily consider the degree to which resource adjustment actions improve the player's gaming experience, such as reducing service latency and improving game smoothness; actions that enhance the player experience will receive corresponding rewards. By calculating the immediate reward for each resource adjustment action, the merits of the action can be evaluated, providing a basis for determining the optimal resource adjustment action. The reinforcement learning agent continuously adjusts its decision-making strategy based on the immediate rewards, gradually tending towards outputting the optimal resource adjustment action.

[0049] Once the reinforcement learning agent has converged during training, it is run in a simulation environment for the complete lifecycle of the target activity. Training convergence signifies that the agent has, through extensive learning and interaction, found the relatively optimal resource adjustment strategy under various system states. At this point, the complete lifecycle of the target activity is simulated in the simulation environment, allowing the agent to output corresponding resource adjustment actions based on the system states at different stages. The optimal resource adjustment action sequence output by the agent is recorded and organized. This sequence includes details such as the timing of the operations (i.e., resource adjustments should be made at different times), the target of the operations (identifying which computing instances or resources are being adjusted), and the scale of the operations (determining the extent of expansion or contraction). Based on this information, a resource configuration and elastic scaling plan, including the timing of the operations, the target of the operations, and the scale of the operations, is generated, providing scientific and reasonable guidance for the dynamic adjustment of resources in actual game activities.

[0050] In some embodiments, step S104 above, which involves pushing the resource configuration and elastic scaling plan for review, and verifying and correcting it in a virtual simulation environment in response to the review instructions to form an executable pre-scaling plan, specifically includes: The resource configuration and elastic scaling plan are pushed to the operation and maintenance interface for display. In response to the review instructions entered by the operation and maintenance personnel on the interface, the decision opinions on approval, rejection or modification of specific operation steps in the plan are captured and recorded. The verification process is triggered based on the decision-making opinions. The modified version of the plan is loaded into the virtual simulation environment to simulate the entire activity cycle. The estimated cost, service latency and resource utilization performance index data generated during the simulation are collected, and a verification report including index comparison and risk analysis is generated. Based on the verification report, the system automatically analyzes and generates correction suggestions for risky operations in the contingency plan through a pre-set correction rule base, forming an executable pre-expansion plan.

[0051] In this embodiment, the resource configuration and elastic scaling contingency plan are pushed to the interactive interface on the operations and maintenance (O&M) side for display. The O&M interface is a crucial window for O&M personnel to interact with the system, presenting the contingency plan content in an intuitive and clear manner. The contingency plan includes various operational steps for dynamically adjusting game activity resources, such as which server resources need to be expanded or scaled down at different stages of the activity, and the specific operation time and scale. O&M personnel can fully understand the details of the contingency plan on the interactive interface, providing a basis for subsequent review work.

[0052] The system responds to review commands entered by operations and maintenance (O&M) personnel on the interactive interface. Based on their professional knowledge and experience, O&M personnel carefully review the specific operational steps in the contingency plan. They can provide approval, rejection, or modification decisions for each operational step. For example, if O&M personnel believe that the timing of an operational step is unreasonable, they may choose to modify the execution time of that step; if they believe that an operation is unnecessary, they may choose to reject that step; if they believe that the operational step fully meets the requirements, they will choose to approve it. The system captures and records these decisions entered by O&M personnel for subsequent processing based on these opinions.

[0053] The verification process is triggered based on recorded decision-making feedback. If the feedback includes modifications to the contingency plan, the system loads the modified version into the virtual simulation environment. This environment highly simulates real-world game scenarios, including server resources, network conditions, and player behavior. Within the virtual simulation environment, the modified contingency plan is simulated throughout its entire lifecycle. During this simulation, the system collects various performance metrics in real time, such as estimated costs, service latency, and resource utilization. These metrics reflect the potential impact of the contingency plan on the system during actual execution. After data collection, the system generates a verification report containing metric comparisons and risk analysis. Metric comparisons compare the performance metrics collected during the simulation with preset reasonable ranges to determine if the contingency plan meets requirements. Risk analysis assesses potential risks, such as system crashes due to insufficient resources or excessive costs impacting operational efficiency.

[0054] Based on the generated verification report, the system automatically analyzes and generates correction suggestions for risky operations in the contingency plan using a pre-set correction rule base. The correction rule base is a rule system summarized from extensive practice and expert experience. It can automatically identify risky operations in the contingency plan based on the indicator comparison and risk analysis results in the verification report, and provide corresponding correction suggestions. The correction rule base stores a large number of rules and experiences, enabling it to quickly identify risky operational steps in the contingency plan based on the indicator comparison and risk analysis results in the verification report. For each risky operation, the correction rule base provides corresponding correction suggestions, such as suggesting increasing the lead time for resource expansion or optimizing the timing of resource adjustments. The system automatically corrects and improves the contingency plan based on these correction suggestions, ultimately forming an executable pre-expansion plan. This plan undergoes dual protection through review and verification correction, possessing high scientific validity and practicality. It can effectively guide the dynamic pre-expansion and scheduling of resources in game activities, ensuring the smooth operation of game activities and a good player experience. For example, if the verification report shows that resource utilization is too high within a certain time period, the correction rule base may suggest performing resource expansion operations in advance before that time period. Based on these suggested improvements, the system adjusted and refined the contingency plan, ultimately resulting in an executable pre-expansion scheme. This scheme, after review, verification, and revision, demonstrates high feasibility and reliability, providing effective guidance for the dynamic pre-expansion and scheduling of resources in game activities.

[0055] In some embodiments, step S105 above, which involves triggering a multi-level resource pre-allocation operation, including cache preheating, cross-cloud resource initialization, and configuring an autoscalator, before the activity begins according to an executable pre-scaling scheme, specifically includes: Based on the executable pre-scaling scheme, CDN cache preheating and database connection pool pre-allocation are carried out before the start of the event based on player pre-registration and behavior analysis; Based on the executable pre-scaling scheme, computing resources are initialized on multiple cloud platforms before the event begins through a unified scheduling layer API across cloud platforms, according to a cost optimization algorithm. Based on the executable pre-scaling scheme, configure a Kubernetes-based horizontal Pod autoscaler before the event starts, with the number of players online in real time and request latency as the core monitoring metrics.

[0056] In this embodiment, based on an executable pre-scaling scheme, player pre-registration and behavior analysis are conducted before the event begins. By collecting player pre-registration information, it is possible to know in advance which players intend to participate in the event. This is combined with past player behavior patterns in similar events, such as how long before the event starts and which game segments players primarily participate in during the event. Based on these analysis results, CDN (Content Delivery Network) caching preheating is performed. CDN caching preheating involves caching event-related static resources, such as game interface images, audio, and video, on CDN nodes closer to the players. This ensures that when the event starts and players access these resources, they can quickly retrieve them from their local CDN nodes, significantly reducing data transmission time and improving access speed. Simultaneously, database connection pool pre-allocation is performed. Based on the number of pre-registered players and the estimated database access volume from the behavior analysis, a sufficient number of database connections are allocated in advance to avoid insufficient connections and waiting issues caused by a large number of players accessing the database simultaneously after the event starts. This ensures that the database can quickly respond to player data requests and guarantees the smoothness of game data interaction.

[0057] Based on an executable pre-scaling scheme, resource initialization is performed using a cross-cloud platform unified scheduling layer API before the event begins. This API acts as a bridge connecting multiple cloud platforms, enabling unified management and scheduling of resources across different platforms. According to a cost optimization algorithm, this algorithm comprehensively considers factors such as resource price, performance, and availability on various cloud platforms, selecting the most cost-effective computing resources for initialization. For example, if certain cloud platforms offer discounts during specific periods, the cost optimization algorithm will prioritize these platforms for resource initialization to reduce operating costs during the event. In this way, the necessary computing resources are prepared in advance on multiple cloud platforms, providing sufficient computing power support for the smooth operation of the event.

[0058] Based on an executable pre-scaling scheme, a Kubernetes-based horizontal Pod autoscaler is configured before the event begins. Kubernetes is an open-source platform for automating the deployment, scaling, and management of containerized applications. The horizontal Pod autoscaler is a crucial component of Kubernetes, automatically adjusting the number of Pods based on defined monitoring metrics. In this embodiment, the number of players online in real-time and the request latency rate are used as core monitoring metrics. When the number of players online in real-time increases or the request latency rate rises, it indicates that current system resources may not be sufficient to meet player demands. The horizontal Pod autoscaler will automatically increase the number of Pods to provide more resources to handle player requests. Conversely, when the number of players online in real-time decreases or the request latency rate decreases, the number of Pods will automatically decrease to avoid resource waste. By configuring such an autoscaler, system resources can be dynamically adjusted in real-time, ensuring that the system maintains a stable and efficient operating state throughout the event, providing players with a good gaming experience.

[0059] Furthermore, the executable pre-scaling scheme involves CDN cache preheating and database connection pool pre-allocation based on player pre-registration and behavior analysis before the event begins. Specifically, this includes: Based on the activity parameters and time windows defined in the executable pre-expansion scheme, the collection and aggregation of player pre-registration data and historical behavior analysis data are triggered. Combined with the analysis engine, the data is processed to generate a CDN cache preheating strategy containing a static resource push list and a connection pool pre-allocation strategy containing database connection parameters. Based on the CDN cache preheating strategy and the geographical distribution information of players, the target set of edge nodes that need to perform preheating operations is calculated and determined. Based on the priority of static resource files and player preferences, combined with the region type, static resource files are pushed to the corresponding content distribution network edge nodes in the edge node target set before the event starts to complete the cache preheating. Based on the connection pool pre-allocation strategy, the initial number of physical connections are pre-configured and established for the target database instance before the activity begins by calling the database management interface; Database connections and their caches are warmed up by automatically sending lightweight query statements to pre-established physical connections.

[0060] In this embodiment, based on the activity parameters and time windows clearly defined in the executable pre-scaling scheme, a comprehensive collection and precise aggregation of player pre-registration data and historical behavior analysis data is initiated. Activity parameters cover key information such as the type, scale, and expected number of participants of the activity, while the time window specifies the time range for data collection, such as from one week before the activity's creation to one day before the activity's start. Using specialized collection tools and systems, player pre-registration information, including player accounts, registration times, and locations, is collected from multiple data sources such as game servers and player registration platforms. Simultaneously, historical behavior data from players' past participation in similar activities is acquired, such as active time periods during activities, frequency of use of different game functions, and types of static resources accessed. This collected multi-source data is then aggregated and imported into the analysis engine. The analysis engine utilizes advanced technologies such as data mining and machine learning to deeply process the data. Through the analysis and pattern recognition of a large amount of historical data, it generates a CDN caching preheating strategy including a static resource push list and a connection pool pre-allocation strategy including database connection parameters. The static resource push list details various static resources that players may frequently access during the event, such as game interface images, audio, and video; the database connection parameters include key information such as the database address, port, username, password, and initial number of connections.

[0061] Based on the generated CDN cache preheating strategy and combined with pre-acquired player geographic distribution information, complex and precise calculations are performed to determine the target set of edge nodes that need to perform preheating operations. Player geographic distribution information can be obtained through the region information filled in by players during registration or through IP address-based location technology. By statistically analyzing the number of players in different regions, densely populated player areas are identified. Considering the network topology and CDN node distribution, edge nodes that can effectively cover these player areas are selected to form the target set of edge nodes. For example, if a region has a large number of players and multiple CDN edge nodes nearby, the nodes with better performance and higher network bandwidth will be selected for inclusion in the target set to ensure the effectiveness and efficiency of cache preheating.

[0062] Based on the priority of static resource files and player preferences, combined with regional type, static resource files are precisely pushed to the corresponding content delivery network edge nodes in the edge node target set before the event starts, completing the caching preheating. The priority of static resource files can be divided according to factors such as file size, access frequency, and importance to the game experience. For example, core game interface images and key audio files have higher priority and need to be pushed first. Player preferences are determined through analysis of historical behavioral data. Players in different regions may have different preferences for different types of static resources; for example, players in some regions prefer specific styles of game music. Based on this priority and preference information, and the previously determined edge node target set, a detailed resource push plan is formulated. According to the plan, high-priority static resource files are pushed first to edge nodes in densely populated player areas, while ensuring that each edge node can obtain resource files that match the local player preferences. This allows players to quickly obtain the necessary resources from their local edge nodes at the start of the event, reducing data transmission latency and improving the game experience.

[0063] Based on the generated connection pool pre-allocation strategy, an initial number of physical connections are pre-configured and established for the target database instance before the event begins by calling the database management interface. The database management interface is a programming interface provided by the database system for managing and operating the database. By calling these interfaces, operations such as creating, configuring, and managing database connections can be performed. According to the initial number of connections determined in the connection pool pre-allocation strategy, connection requests are sent to the target database instance, establishing the corresponding number of physical connections. These physical connections are stored in the connection pool for subsequent player requests, avoiding the overhead of re-establishing connections every time a player requests a connection during the event, thus improving the database's response speed and processing capacity.

[0064] By automatically sending lightweight queries to pre-established physical connections, database connections and their caches are warmed up. Lightweight queries are those that execute quickly and consume minimal database resources, such as queries for system information or simple table structure information. Automatically sending these lightweight queries keeps database connections active while loading frequently used data and indexes into the database cache. This allows the database to respond more quickly when players send actual business query requests after the event begins, reducing query latency and improving the overall performance and stability of the game.

[0065] Furthermore, the executable pre-scaling scheme initializes computing resources on multiple cloud platforms before the activity begins, using a unified scheduling layer API across cloud platforms and a cost optimization algorithm. Specifically, this includes: Based on the resource requirement specifications defined in the executable pre-expansion scheme, the cost optimization algorithm engine is invoked through the cross-cloud platform unified scheduling layer to perform decision calculation. The cost optimization algorithm engine is used to obtain resource quotations and discount information from multiple cloud platforms in real time, and calculate and generate a resource procurement and initialization list specific to each cloud platform and region by combining preset performance and compliance constraints. Based on the resource procurement and initialization list, parallel resource creation and configuration requests are initiated to multiple cloud service providers through standardized application programming interfaces encapsulated by the unified scheduling layer across cloud platforms to complete resource initialization; Within the time window after resource initialization is completed and before the activity begins, the real-time market prices of each cloud platform are continuously monitored through the unified scheduling layer across cloud platforms. When the real-time market price exceeds the preset threshold, the cost optimization algorithm engine is triggered again to quickly recalculate, and dynamic adjustments are made to the initialized resources based on the recalculation results, such as cross-cloud migration or billing mode changes.

[0066] In this embodiment, based on the resource requirement specifications clearly defined in the executable pre-expansion plan, the cost optimization algorithm engine is invoked to perform decision-making calculations using a cross-cloud platform unified scheduling layer. The resource requirement specifications are a key element of the executable pre-expansion plan, detailing the types of computing resources required during the activity, such as the number of CPU cores, memory size, and storage capacity, as well as the required quantities of these resources at different time periods. The cross-cloud platform unified scheduling layer, acting as a bridge connecting multiple cloud platforms and the cost optimization algorithm engine, integrates information from different cloud platforms and accurately transmits it to the algorithm engine. The cost optimization algorithm engine is the core of the entire decision-making calculation, possessing the ability to obtain real-time resource pricing and discount information from multiple cloud platforms. Through interface connections with various cloud platforms, the algorithm engine can promptly grasp market dynamics and obtain the latest resource prices and promotional information. Simultaneously, the algorithm engine incorporates preset performance and compliance constraints. Performance constraints ensure that the purchased resources meet the performance requirements of the game activity, such as guaranteeing low latency and high throughput; compliance constraints ensure that resource procurement and use comply with relevant laws, regulations, and industry standards. Based on this rich information, the cost optimization algorithm engine performs complex and precise calculations to generate a resource procurement and initialization list specific to each cloud platform and region. This list details the required quantity and type of computing resources for each region on each cloud platform, providing clear guidance for subsequent resource initialization.

[0067] Based on the generated resource procurement and initialization list, parallel resource creation and configuration requests are initiated to multiple cloud service providers through standardized application programming interfaces (APIs) encapsulated by the cross-cloud platform unified scheduling layer to complete resource initialization. The standardized APIs encapsulated by the cross-cloud platform unified scheduling layer are key to achieving efficient interaction with multiple cloud service providers. These APIs have unified interface specifications and calling methods, shielding the differences between different cloud platforms and enabling the management and operation of resources from multiple cloud platforms through a unified scheduling layer. When initiating resource creation and configuration requests, the scheduling layer sends requests to multiple cloud service providers simultaneously based on the information in the resource procurement and initialization list, achieving parallel processing and significantly improving the efficiency of resource initialization. Upon receiving the request, each cloud service provider creates the corresponding computing resources for the user according to its own resource allocation process and rules, and performs initial configuration, such as setting network parameters and security group rules. After these operations are completed, the resources are ready for use, preparing for the game activity.

[0068] Within the time window between resource initialization and the start of the activity, the unified scheduling layer across cloud platforms continuously monitors real-time market prices across all cloud platforms. This time window is designed to fully leverage market price fluctuations and further optimize resource costs. The unified scheduling layer maintains real-time connections with each cloud platform and periodically obtains the latest resource pricing information. By monitoring and analyzing these real-time market prices, the scheduling layer can promptly grasp market price trends, providing a basis for subsequent decision-making. For example, if a cloud platform's resource price drops significantly in a short period or a new promotional activity is launched, the scheduling layer can consider adjusting resources to reduce costs.

[0069] When the real-time market price exceeds a preset threshold, the cost optimization algorithm engine is triggered again for rapid recalculation. The preset threshold is set based on a combination of factors, including historical data, market trends, and the cost budget for game activities. When the real-time market price exceeds this threshold, it means the current resource procurement plan may no longer be optimal and needs adjustment. Upon receiving the trigger signal, the cost optimization algorithm engine quickly retrieves the latest resource quotes and discount information from various cloud platforms and performs a rapid recalculation, taking into account performance and compliance constraints. Based on the recalculation results, dynamic adjustments are made to initialized resources, including cross-cloud migration or billing model changes. Cross-cloud migration refers to migrating some resources from one cloud platform to another with lower prices or better performance; billing model changes involve selecting a more suitable billing model based on the different billing methods offered by the cloud platform, such as on-demand billing or reserved instance billing, to reduce resource costs. This dynamic adjustment mechanism ensures that the required computing resources are always obtained at the optimal cost during game activities, improving resource utilization efficiency and economic benefits.

[0070] Furthermore, the executable pre-scaling scheme, which configures a Kubernetes-based horizontal Pod autoscaler before the event begins, with real-time online player count and request latency as the core monitoring metrics, specifically includes: Deploy a metrics collection agent in the game service Pod to be scaled, and collect the real-time online player count and request latency rate through the metrics collection agent. Register and expose the real-time online player count and request latency rate as custom metrics that can be recognized by the KubernetesMetrics API. For the target game service workload, create or update its corresponding HorizontalPodAutoscaler resource configuration file; In the specifications of the HorizontalPodAutoscaler resource configuration file, the real-time online player count and request latency rate are specified as the scaling basis, and the target values ​​of each metric and the algorithm rules for calculating the number of replicas are set. Based on the capacity planning and stability requirements in the executable pre-scaling scheme, the scaling cooling window and replica count upper and lower limits are set in the HorizontalPodAutoscaler resource configuration file before the activity begins. The correctness of the auto-scaling logic is verified by simulating changes in the metrics to trigger an evaluation.

[0071] In this embodiment, a metrics collection agent is deployed in the game service Pod to be scaled. This step lays the foundation for accurately acquiring key metric data subsequently. The metrics collection agent has the ability to collect data in real time. Through this agent, it can accurately collect two key metrics in real time: the number of players online and the request latency rate. After collecting this data, the metrics collection agent will further register and expose the number of players online and the request latency rate as custom metrics that can be recognized by the Kubernetes Metrics API. This operation is crucial because only by converting the collected data into a format that the Kubernetes Metrics API can recognize can subsequent monitoring and auto-scaling operations be effectively carried out based on this data, enabling the Kubernetes system to process this key information reflecting the status of the game service.

[0072] For the target game service workload, create or update its corresponding HorizontalPodAutoscaler resource configuration file. The target game service workload is a core part of the game's operation, and its performance directly affects the player's gaming experience. This document will clearly specify under what circumstances the number of Pods for the game service needs to be increased or decreased, providing a specific guiding framework for subsequent automatic scaling.

[0073] The HorizontalPodAutoscaler resource configuration file specifies the real-time online player count and request latency rate as scaling criteria, and sets target values ​​for each metric and the algorithm rules for calculating the number of replicas. The real-time online player count reflects the number of players currently participating in the game, while the request latency rate reflects the response speed of the game service. These two metrics comprehensively reflect the load on the game service. Specifying them as scaling criteria ensures that automatic scaling operations closely align with the actual state of the game service. Simultaneously, target values ​​for each metric and the algorithm rules for calculating the number of replicas are set. For example, when the real-time online player count exceeds the set target value, the system automatically calculates the number of Pod replicas that need to be added based on the replica count calculation algorithm rules, thereby achieving dynamic adjustment of game service resources to adapt to constantly changing player demands.

[0074] Based on the capacity planning and stability requirements of the executable pre-scaling scheme, a scaling cooldown window and replica limit upper and lower limits were set in the HorizontalPodAutoscaler resource configuration file before the event began. An evaluation was triggered by simulating metric changes to verify the correctness of the auto-scaling logic. Capacity planning and stability requirements are crucial factors for ensuring the smooth operation of the game event. Setting a scaling cooldown window avoids frequent scaling operations in a short period, reducing unnecessary resource fluctuations and system overhead, and ensuring system stability. The replica limit upper and lower limits restrict the range of Pod number changes, preventing resource waste or system performance degradation due to over-scaling. The evaluation triggered by simulating metric changes allows for the verification of the auto-scaling logic's correctness before the actual game event begins. For example, simulating a sudden and significant increase in the number of players online or a sharp rise in request latency allows observation of whether the system can accurately adjust the number of Pods according to the set rules, thus ensuring that the autoscaler can operate reliably during the game event, providing players with a stable and smooth gaming experience.

[0075] In some embodiments, in steps S101 to S105 above, the method further includes: Throughout the entire cycle of the game activity, from start to finish, time-series data of all monitoring metrics are collected, and the triggering context, execution actions, and subsequent system state changes of each resource scaling decision are linked and recorded to form a full-cycle operation data package. The full-cycle running data packets and resource prediction results are integrated to generate new training samples, which are then fed back into the multimodal resource prediction model for incremental training. Based on the decision-making process data in the full-cycle running data package, the actual reward value obtained for each step of resource scaling action is calculated to form a data pair containing state, action, actual reward and new state, which is then added to the training experience library of the reinforcement learning model for parameter updates.

[0076] In this embodiment, the system initiates comprehensive data collection after the game activity begins. Throughout the entire activity period, time-series data of all monitoring metrics are continuously collected. These monitoring metrics cover multiple aspects, such as server resource utilization, including CPU utilization and memory utilization, which directly reflect the server's load when processing game requests; network bandwidth usage, which indicates the level of data transmission activity; the number of players online in real-time, a crucial indicator of game activity; and request latency, which reflects the game service's response speed to player actions. Simultaneously, the system records the triggering context of each resource scaling decision. The triggering context includes various conditions that trigger resource scaling, such as when the number of players online in real-time reaches a certain threshold or when the request latency exceeds a certain standard. These conditions are key factors in triggering resource scaling decisions. The execution actions explicitly record the specific operations taken by the system for resource scaling, such as increasing the number of server instances or adjusting network bandwidth allocation. Subsequent system status changes are also recorded in detail, such as changes in server resource utilization, changes in network bandwidth usage, and whether the player's gaming experience has improved after the resource scaling operation. By integrating this data, a full-cycle runtime data package is formed. This data package comprehensively and in detail records the system's operating status and resource scaling throughout the entire process of the game activity from start to finish.

[0077] After constructing the full-cycle runtime data package, the system integrates it with the resource prediction results obtained from the multimodal resource prediction model. The resource prediction results are estimated data on resource needs during game activities, while the full-cycle runtime data package contains real data from the actual gameplay. Integrating the two generates new training samples. These new training samples contain richer and more accurate information because they combine predicted and actual data. After generating the new training samples, they are fed back into the multimodal resource prediction model for incremental training. Incremental training is a training method that further optimizes and adjusts the existing model using new data. In this way, the multimodal resource prediction model can continuously learn and adapt to changes in actual resource needs during game activities, improving the accuracy of resource demand prediction and enabling more precise resource allocation in subsequent game activities.

[0078] Based on the decision-making process data in the full-cycle runtime data package, the system updates the parameters of the reinforcement learning model. For each resource scaling action, the system calculates the actual reward value. The reward value calculation comprehensively considers multiple factors, such as whether the resource scaling action effectively improves system performance, enhances the player's gaming experience, and reduces operating costs. If the resource scaling action improves system performance, enhances the player's experience, and reduces costs, a higher reward value will be awarded; conversely, a lower reward value will be awarded. By calculating the actual reward value, data pairs containing state, action, actual reward, and new state are formed. The state refers to the system's state before the resource scaling action is executed; the action is the resource scaling operation performed; the actual reward is the reward value calculated above; and the new state is the system's state after the resource scaling action is executed. These data pairs are added to the reinforcement learning model's training experience base, and the reinforcement learning model updates its parameters based on this experience data. The purpose of parameter updates is to enable the model to choose more appropriate actions to obtain higher reward values ​​when facing similar states in the future, thereby improving the scientific and rational nature of resource allocation and elastic scaling decisions.

[0079] Reference Figure 2 An embodiment of the present invention provides a dynamic pre-expansion and scheduling system 2 for game activity resources, wherein the system 2 specifically includes: Data acquisition module 201 is used to respond to activity creation requests, obtain activity configuration information, and associate and collect multimodal data through activity configuration information; The resource prediction module 202 is used to predict resource demand based on multimodal data and a pre-trained multimodal resource prediction model. It dynamically weights and fuses temporal features, spatial features and external environmental features through an attention mechanism to obtain resource prediction results. The contingency plan generation module 203 is used to input the resource prediction results into the reinforcement learning model deployed in the virtual simulation environment to generate resource configuration and elastic scaling contingency plans. The contingency plan modification module 204 is used to push resource configuration and elastic scaling contingency plans for review, and to verify and modify them in the virtual simulation environment in response to the review instructions, forming an executable pre-expansion plan; The execution operation module 205 is used to trigger a multi-level resource pre-allocation operation, including cache preheating, cross-cloud resource initialization, and configuration of autoscalators, before the activity starts, based on the executable pre-scaling scheme.

[0080] It is understandable that, such as Figure 1 The content of the game activity resource dynamic pre-expansion and scheduling method embodiment shown is applicable to this game activity resource dynamic pre-expansion and scheduling system embodiment. The specific functions implemented by this game activity resource dynamic pre-expansion and scheduling system embodiment are as follows: Figure 1The method for dynamic pre-expansion and scheduling of game activity resources shown in the embodiment is the same, and the beneficial effects achieved are the same as those described above. Figure 1 The beneficial effects achieved by the illustrated embodiment of the dynamic pre-expansion and scheduling method for game activity resources are also the same.

[0081] It should be noted that the information interaction and execution process between the above systems are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0083] Reference Figure 3 The present invention also provides a computer device 3, including: a memory 302 and a processor 301, and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, it implements the game activity resource dynamic pre-expansion and scheduling method as described in any of the above methods.

[0084] The computer device 3 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that... Figure 3 The computer device 3 is merely an example and does not constitute a limitation on the computer device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0085] The processor 301 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0086] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may be an external storage device of the computer device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 3. Furthermore, the memory 302 may include both internal and external storage units of the computer device 3. The memory 302 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 302 can also be used to temporarily store data that has been output or will be output.

[0087] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the game activity resource dynamic pre-expansion and scheduling method as described in any of the above methods.

[0088] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0089] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0090] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0091] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. A method for dynamic pre-expansion and scheduling of game activity resources, characterized in that, The method specifically includes: In response to an activity creation request, obtain activity configuration information and associate it with collected multimodal data. Based on multimodal data, a pre-trained multimodal resource prediction model is used to predict resource demand. The model dynamically weights and fuses temporal features, spatial features, and external environmental features through an attention mechanism to obtain resource prediction results. The resource prediction results are input into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling plans. The resource allocation and elastic scaling plan are pushed for review, and the plan is verified and corrected in the virtual simulation environment in response to the review instructions to form an executable pre-expansion plan. Based on the executable pre-scaling scheme, a multi-level resource pre-allocation operation, including cache preheating, cross-cloud resource initialization, and configuration of autoscalors, is triggered before the activity begins.

2. The method according to claim 1, characterized in that, The resource demand prediction based on multimodal data utilizes a pre-trained multimodal resource prediction model to estimate resource demand. It dynamically weights and fuses temporal, spatial, and external environmental features through an attention mechanism to obtain the resource prediction results. Specifically, this includes: Based on multimodal data, temporal feature vectors are extracted through a long short-term memory network, spatial feature vectors are extracted through a convolutional neural network, and external environmental data in the multimodal data are embedded and encoded to generate environmental feature vectors. Temporal feature vectors, spatial feature vectors, and environmental feature vectors are input together into an attention mechanism layer based on scaling dot products. The importance weights of each feature vector are dynamically calculated, and the feature vectors are weighted and fused according to their importance weights to generate a multimodal fused feature vector. The multimodal fusion feature vector is input into a fully connected regression network for nonlinear mapping and calculation, and the output is a resource prediction result of the number of various types of server resources required by the target activity in a specific future time period.

3. The method according to claim 1, characterized in that, The step of inputting the resource prediction results into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling plans specifically includes: Based on the resource prediction results, the parameters of the pre-built virtual simulation environment are configured and the state is initialized. The initialized virtual simulation environment interacts with a reinforcement learning agent based on a near-end policy optimization algorithm. The reinforcement learning agent continuously observes the system state of the virtual simulation environment and outputs corresponding resource adjustment actions. The system state includes real-time resource utilization and service latency, and the resource adjustment actions include scaling up or down computing instances. The immediate reward for each resource adjustment action of the reinforcement learning agent is calculated using a preset composite reward function. The optimal resource adjustment action is determined by the immediate reward. The composite reward function is used to integrate system stability reward, resource cost efficiency reward and user experience quality reward in a weighted manner. Once the reinforcement learning agent has been trained to convergence, it is run in a simulation environment for the complete cycle of the target activity. The optimal resource adjustment action sequence output by the agent is recorded and organized to generate a resource configuration and elastic scaling plan that includes operation timing, operation objects and operation scale.

4. The method according to claim 1, characterized in that, The process of pushing resource allocation and elastic scaling plans for review, and verifying and correcting them in a virtual simulation environment in response to review instructions to form an executable pre-scaling plan, specifically includes: The resource configuration and elastic scaling plan are pushed to the operation and maintenance interface for display. In response to the review instructions entered by the operation and maintenance personnel on the interface, the decision opinions on approval, rejection or modification of specific operation steps in the plan are captured and recorded. The verification process is triggered based on the decision-making opinions. The modified version of the plan is loaded into the virtual simulation environment to simulate the entire activity cycle. The estimated cost, service latency and resource utilization performance index data generated during the simulation are collected, and a verification report including index comparison and risk analysis is generated. Based on the verification report, the system automatically analyzes and generates correction suggestions for risky operations in the contingency plan through a pre-set correction rule base, forming an executable pre-expansion plan.

5. The method according to claim 1, characterized in that, The aforementioned pre-scaling scheme triggers a multi-level resource pre-allocation operation before the activity begins, including cache preheating, cross-cloud resource initialization, and configuring autoscalators. Specifically, this includes: Based on the executable pre-scaling scheme, CDN cache preheating and database connection pool pre-allocation are carried out before the start of the event based on player pre-registration and behavior analysis; Based on the executable pre-scaling scheme, computing resources are initialized on multiple cloud platforms before the event begins through a unified scheduling layer API across cloud platforms, according to a cost optimization algorithm. Based on the executable pre-scaling scheme, configure a Kubernetes-based horizontal Pod autoscaler before the event starts, with the number of players online in real time and request latency as the core monitoring metrics.

6. The method according to claim 5, characterized in that, The executable pre-scaling scheme involves CDN cache preheating and database connection pool pre-allocation based on player pre-registration and behavior analysis before the event begins. Specifically, this includes: Based on the activity parameters and time windows defined in the executable pre-expansion scheme, the collection and aggregation of player pre-registration data and historical behavior analysis data are triggered. Combined with the analysis engine, the data is processed to generate a CDN cache preheating strategy containing a static resource push list and a connection pool pre-allocation strategy containing database connection parameters. Based on the CDN cache preheating strategy and the geographical distribution information of players, the target set of edge nodes that need to perform preheating operations is calculated and determined. Based on the priority of static resource files and player preferences, combined with the region type, static resource files are pushed to the corresponding content distribution network edge nodes in the edge node target set before the event starts to complete the cache preheating. Based on the connection pool pre-allocation strategy, the initial number of physical connections are pre-configured and established for the target database instance before the activity begins by calling the database management interface; Database connections and their caches are warmed up by automatically sending lightweight query statements to pre-established physical connections.

7. The method according to claim 5, characterized in that, The executable pre-scaling scheme initializes computing resources on multiple cloud platforms before the activity begins, using a unified scheduling layer API across cloud platforms and a cost optimization algorithm. Specifically, this includes: Based on the resource requirement specifications defined in the executable pre-expansion scheme, the cost optimization algorithm engine is invoked through the cross-cloud platform unified scheduling layer to perform decision calculation. The cost optimization algorithm engine is used to obtain resource quotations and discount information from multiple cloud platforms in real time, and calculate and generate a resource procurement and initialization list specific to each cloud platform and region by combining preset performance and compliance constraints. Based on the resource procurement and initialization list, parallel resource creation and configuration requests are initiated to multiple cloud service providers through standardized application programming interfaces encapsulated by the unified scheduling layer across cloud platforms to complete resource initialization; Within the time window after resource initialization is completed and before the activity begins, the real-time market prices of each cloud platform are continuously monitored through the unified scheduling layer across cloud platforms. When the real-time market price exceeds the preset threshold, the cost optimization algorithm engine is triggered again to quickly recalculate, and dynamic adjustments are made to the initialized resources based on the recalculation results, such as cross-cloud migration or billing mode changes.

8. The method according to claim 5, characterized in that, The executable pre-scaling scheme involves configuring a Kubernetes-based horizontal Pod autoscaler before the event begins, with real-time online player count and request latency as the core monitoring metrics. Specifically, this includes: Deploy a metrics collection agent in the game service Pod to be scaled, and collect the real-time online player count and request latency rate through the metrics collection agent. Register and expose the real-time online player count and request latency rate as custom metrics that can be recognized by the Kubernetes MetricsAPI. For the target game service workload, create or update its corresponding HorizontalPodAutoscaler resource configuration file; In the specifications of the HorizontalPodAutoscaler resource configuration file, the real-time online player count and request latency rate are specified as the scaling basis, and the target values ​​of each metric and the algorithm rules for calculating the number of replicas are set. Based on the capacity planning and stability requirements in the executable pre-scaling scheme, the scaling cooling window and replica count upper and lower limits are set in the HorizontalPodAutoscaler resource configuration file before the activity begins. The correctness of the auto-scaling logic is verified by simulating changes in the metrics to trigger an evaluation.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Throughout the entire cycle of the game activity, from start to finish, time-series data of all monitoring metrics are collected, and the triggering context, execution actions, and subsequent system state changes of each resource scaling decision are linked and recorded to form a full-cycle operation data package. The full-cycle running data packets and resource prediction results are integrated to generate new training samples, which are then fed back into the multimodal resource prediction model for incremental training. Based on the decision-making process data in the full-cycle running data package, the actual reward value obtained for each step of resource scaling action is calculated to form a data pair containing state, action, actual reward and new state, which is then added to the training experience library of the reinforcement learning model for parameter updates.

10. A dynamic pre-expansion and scheduling system for game activity resources, characterized in that, The system specifically includes: The data acquisition module is used to respond to activity creation requests, obtain activity configuration information, and associate and collect multimodal data through the activity configuration information; The resource prediction module is used to predict resource demand based on multimodal data and a pre-trained multimodal resource prediction model. It dynamically weights and fuses temporal features, spatial features, and external environmental features through an attention mechanism to obtain resource prediction results. The contingency plan generation module is used to input resource prediction results into a reinforcement learning model deployed in a virtual simulation environment to generate resource allocation and elastic scaling contingency plans. The contingency plan modification module is used to push resource configuration and elastic scaling contingency plans for review, and to verify and modify them in the virtual simulation environment in response to review instructions, forming an executable pre-expansion plan; The execution operation module is used to trigger multi-level resource pre-allocation operations, including cache preheating, cross-cloud resource initialization, and configuration of autoscalors, before the activity begins, based on the executable pre-scaling scheme.