Multi-player voice game performance optimization method and device based on dynamic resource management

Through dynamic resource management and precompilation technology, the compatibility problem of real-time multiplayer voice processing and high load requirements of the game is solved, and lower load delays, higher frame rates and lower communication delays are achieved, improving the smoothness of the game and player experience.

CN120045337AActive Publication Date: 2025-05-27QINGFENG (BEIJING) TECH CO LTD

Patent Information

Application Number
CN202510520644.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-05-27
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The existing technology is difficult to take into account the real-time multiplayer voice processing and high-load gaming needs, resulting in problems such as loading delay, frame rate drop, and communication delay.

Method used

Using a dynamic resource management method, we precompile the core source code of the game voice tool by obtaining the core source code of the game voice tool, generate bytecode files, and use bytecode files instead of real-time compilation when the game is running. At the same time, relevant resources are preloaded during game initialization, memory usage and CPU load are monitored in real time, precompilation methods and resource loading strategies are automatically adjusted, and resources are ensured that the resources and bytecode required for voice processing are placed in a high priority queue.

Benefits of technology

Reduces load delay, improves frame rate, reduces communication delay, dynamically takes into account the high load needs of voice real-time processing and games, and improves player experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045337A_ABST
    Figure CN120045337A_ABST
Patent Text Reader

Abstract

The invention provides a multi-player voice game performance optimization method and device based on dynamic resource management. The method comprises the following steps: acquiring a core source code of a game voice tool and pre-compiling the core source code to generate a byte code file; analyzing a target scene demand and pre-loading a related resource file; performing real-time acquisition and analysis on memory occupation and CPU load to obtain performance state data of the current system; based on the performance state data, when it is detected that memory occupation and / or CPU load exceed a preset threshold value, a pre-compiling mode and a resource loading strategy are automatically adjusted; when it is detected that the multi-person voice function is started, resources and byte codes needed by voice processing are placed in a high-priority queue, and cooperative scheduling is carried out on memory occupation and / or CPU loads. According to the method, the loading delay can be reduced, the frame rate can be improved, the communication delay can be reduced, and real-time voice processing and high-load requirements of games can be dynamically considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of game performance optimization, and particularly to a method and device for optimizing the performance of a multi-player voice game based on dynamic resource management. Background Art

[0002] With the continuous development of online games, especially the increasing popularity of multi-player online games, the multi-player voice function in games has become an important means to improve the interactive experience of players. However, when the multi-player voice function is turned on, it often requires a large amount of CPU and memory resources to maintain the collection, encoding, transmission, and decoding of voice data, resulting in competition for system resources between the game's own graphics rendering, logical operations, and other resource management tasks and voice processing, which is likely to cause problems such as lag, delay, or crash.

[0003] In the prior art, to improve the overall performance of multi-player online games, means such as resource preloading, dynamic memory management, multi-threaded scheduling, and source code compilation optimization are usually adopted to try to reduce the real-time load during the game startup and operation. However, these existing solutions focus more on single memory or CPU optimization, and it is difficult to take into account the resource priority scheduling required for real-time multi-player voice processing, and they also lack timely and effective responses to the dynamic changes in game scenarios and player behaviors. Especially when multi-player voice and large-scale scene rendering or complex game logic occur concurrently, the existing solutions are difficult to achieve a balance, and problems such as loading delay, frame rate drop, or communication delay still occur, unable to meet the needs of players for parallel guarantee of multi-player voice and game smoothness. Summary of the Invention

[0004] In view of this, the embodiments of this application provide a method and device for optimizing the performance of a multi-player voice game based on dynamic resource management to solve the problems of loading delay, frame rate drop, communication delay, and inability to balance voice real-time processing and high-load requirements existing in the prior art.

[0005] In the first aspect of the embodiments of the present application, a method for optimizing the performance of a multi-player voice game based on dynamic resource management is provided, including: obtaining the core source code of the game voice tool and pre-compiling the core source code to generate a bytecode file called during the runtime of the game voice tool; when the game voice tool executes, using the bytecode file to replace the real-time compilation operation so that the game voice tool directly calls the bytecode file during the running process; when the game is initialized or a player is about to enter a target scene, analyzing the requirements of the target scene and preloading relevant resource files, and caching the relevant resource files in the storage medium of the target system; during the running process of the game, using a monitoring module to collect and analyze the memory occupancy and CPU load in real time to obtain the performance status data of the current system; based on the performance status data, when it is detected that the memory occupancy and / or CPU load exceeds a preset threshold, automatically adjusting the pre-compilation method and resource loading strategy; when it is detected that the multi-player voice function is enabled, based on the voice high-priority policy, placing the resources and bytecodes required for voice processing in a high-priority queue and performing coordinated scheduling on the memory occupancy and / or CPU load.

[0006] In the second aspect of the embodiments of the present application, a device for optimizing the performance of a multi-player voice game based on dynamic resource management is provided, including: a pre-compilation module for obtaining the core source code of the game voice tool and pre-compiling the core source code to generate a bytecode file called during the runtime of the game voice tool; a calling module for using the bytecode file to replace the real-time compilation operation when the game voice tool executes so that the game voice tool directly calls the bytecode file during the running process; a preloading module for analyzing the requirements of the target scene and preloading relevant resource files when the game is initialized or a player is about to enter a target scene, and caching the relevant resource files in the storage medium of the target system; a collection and analysis module for using a monitoring module to collect and analyze the memory occupancy and CPU load in real time during the running process of the game to obtain the performance status data of the current system; an automatic adjustment module for automatically adjusting the pre-compilation method and resource loading strategy based on the performance status data when it is detected that the memory occupancy and / or CPU load exceeds a preset threshold; a coordinated scheduling module for placing the resources and bytecodes required for voice processing in a high-priority queue based on the voice high-priority policy and performing coordinated scheduling on the memory occupancy and / or CPU load when it is detected that the multi-player voice function is enabled.

[0007] In the third aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.

[0008] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0009] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: By obtaining the core source code of the voice tool game and pre-compiling the core source code to generate a bytecode file called when the game voice tool runs; when the game voice tool executes, using the bytecode file to replace the real-time compilation operation, so that the game voice tool directly calls the bytecode file during the running process; when the game is initialized or the player is about to enter the target scene, analyzing the requirements of the target scene and preloading the relevant resource files, and caching the relevant resource files in the storage medium of the target system; during the running process of the game, using the monitoring module to collect and analyze the memory occupancy and CPU load in real time to obtain the performance state data of the current system; based on the performance state data, when it is detected that the memory occupancy and / or CPU load exceed the preset threshold, automatically adjusting the pre-compilation method and resource loading strategy; when it is detected that the multi-person voice function is enabled, based on the voice high-priority strategy, placing the resources and bytecode required for voice processing in the high-priority queue, and performing coordinated scheduling on the memory occupancy and / or CPU load. The present application can reduce the loading delay, improve the frame rate, reduce the communication delay, and dynamically balance the real-time processing of voice and the high-load requirements of the game. Description of the Drawings

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0011] Figure 1 It is a flowchart of a method for optimizing the performance of a multi-person voice game based on dynamic resource management provided by the embodiments of the present application; Figure 2 It is a structural diagram of a device for optimizing the performance of a multi-person voice game based on dynamic resource management provided by the embodiments of the present application; Figure 3 It is a structural diagram of an electronic device provided by the embodiments of the present application. Detailed Embodiments

[0012] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0013] With the development of online games, especially the increasing popularity of multiplayer online games, in order to enhance team cooperation and the gaming experience, it is often necessary to introduce a multiplayer voice chat function in the game. However, when the multiplayer voice function is enabled, the game needs to collect, transmit, and process voice data in real time, which often leads to a significant increase in the usage rates of the CPU and memory. Once the CPU or memory usage of the game is too high, problems such as frame stuttering, increased latency, and even program crashes may occur, seriously affecting the gaming experience of players.

[0014] In existing game systems, in order to improve game performance, the following solutions are usually adopted: Resource preloading: Preload commonly used resources such as models and sound effects in advance to avoid frequent loading during runtime; JIT (Just-In-Time compilation) or AOT (Ahead-Of-Time compilation) technology: Compile or optimize key code before the game starts or during runtime to reduce the CPU burden during runtime; Game memory monitoring and management: Real-time detect memory usage, and when it exceeds a certain threshold, perform a certain degree of resource unloading or compression; Multithreaded allocation: Allocate modules such as rendering, networking, and AI to different CPU cores to improve overall utilization.

[0015] However, when the multiplayer voice chat is enabled, in order to achieve low-latency voice processing, the system often needs to process audio data quickly and frequently, which causes the CPU and memory usage to continue to rise. Traditional solutions mostly focus on a single aspect (such as only optimizing memory or only targeting the CPU), and it is difficult to dynamically balance the high-load requirements brought by real-time voice processing and large-scale game scene rendering.

[0016] Therefore, in the game scenario, the present application not only ensures the smoothness of the multiplayer voice chat function but also minimizes the stuttering caused by excessive CPU and memory usage, thereby providing players with a more stable and smooth gaming process.

[0017] The content of the technical solution of the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0018] Figure 1 is a schematic flowchart of a method for optimizing the performance of a multiplayer voice game based on dynamic resource management provided by an embodiment of the present application. AsFigure 1 As shown in Figure 1 , the method for optimizing the performance of a multi - person voice game based on dynamic resource management may specifically include: S101, obtaining the core source code of the game voice tool and pre - compiling the core source code to generate a bytecode file called when the game voice tool runs; S102, when the game voice tool executes, using the bytecode file to replace the just - in - time compilation operation so that the game voice tool directly calls the bytecode file during operation; S103, when the game initializes or a player is about to enter the target scene, analyzing the target scene requirements and pre - loading relevant resource files, and caching the relevant resource files in the storage medium of the target system; S104, during the game operation, using the monitoring module to collect and analyze the memory occupancy and CPU load in real - time to obtain the performance status data of the current system; S105, based on the performance status data, when it is detected that the memory occupancy and / or CPU load exceed the preset threshold, automatically adjusting the pre - compilation method and resource loading strategy; S106, when it is detected that the multi - person voice function is enabled, based on the voice high - priority policy, placing the resources and bytecode required for voice processing in the high - priority queue and performing coordinated scheduling on the memory occupancy and / or CPU load.

[0019] In some embodiments, obtaining the core source code of the game voice tool and pre - compiling the core source code to generate a bytecode file called when the game voice tool runs includes: Analyzing the source files related to the core logic of the game voice tool and the multi - person voice function in the core source code to determine the target code; Using a compilation tool to perform compilation pre - processing on the target code to generate the corresponding bytecode file, and storing the bytecode file in the storage medium of the target system; According to the just - in - time compilation technology, performing dynamic optimization compilation on the bytecode files involved in multi - person voice interaction, and performing segmented loading on the bytecode files according to the performance status data.

[0020] Specifically, in this embodiment, the development team of the game voice tool will first sort out a core source code list, which contains several source files closely related to the multi - person voice function. For example: VoiceEncoder.cpp: Performs encoding and compression of audio data after voice acquisition; VoiceTransporter.cpp: Responsible for network transmission and decoding of voice data; VoiceSessionManager.cpp: Manages user connections, voice channel priorities, etc. in a multi - person voice session.

[0021] The system further determines the key algorithms and methods (such as "encodeFrame", "sendPacket", etc.) contained in these source files by performing static analysis on the above-mentioned source files and combining with the project configuration files or scripts, and marks them as "target code" that needs to be pre-compiled.

[0022] Furthermore, after clarifying the scope of the "target code", the system uses a compilation tool (which can be based on LLVM or other mature compilers) to perform compilation preprocessing and generate a bytecode file that can be called during runtime. This embodiment can divide the compilation preprocessing into the following stages: Retrieve the third-party libraries or internal library functions relied on by files such as "VoiceEncoder.cpp" and "VoiceTransporter.cpp" to ensure that linking can be completed in the same compilation environment; at the same time, enable appropriate optimization means such as function inlining and loop unrolling according to the tool or compiler options; Generate multiple corresponding bytecode files for different voice function modules, such as "VoiceEncoder.bc", "VoiceTransporter.bc", etc. For the convenience of subsequent quick positioning or segmented loading, the compilation script will index and archive each bytecode file and store it in the storage medium of the target system (for example, under the path " / data / voiceModules / bytecode / ").

[0023] In some examples, when the game starts or loads the voice function, in order to reduce the waiting cost brought by one-time loading and avoid occupying too much memory, this embodiment will combine the JIT technology to perform dynamic compilation and segmented loading on the bytecode involved in multi-person voice interaction. The specific content is as follows: Segmented loading strategy: When the user has not enabled voice in the game lobby, only load and JIT compile the most basic initialization and session management logic (such as "VoiceSessionManager.bc") first, and delay the code segments of "a large number of encoding or decoding algorithms" until the user actually joins the multi-person voice. Example of JIT compilation scenario: When players start intensive discussions or commands in the voice channel, the voice tool will perform immediate optimization (such as register allocation or instruction inlining) on the frequently called methods in "VoiceEncoder.bc" to accelerate the encoding and transmission of subsequent multi-frame audio. If it is found midway that some advanced audio filters or noise reduction modules have not been called for a long time, the system can temporarily not perform in-depth compilation on them, thereby reducing the CPU load.

[0024] Furthermore, in a large-scale concurrent scenario of multi-person voice, if it is detected that the CPU or memory load is approaching the threshold, the system can moderately adjust the compilation frequency and loading timing in this embodiment according to the performance status data.

[0025] If a part of the filtering algorithm is only used in extremely rare cases, the system will reduce the compilation depth of the algorithm or postpone its compilation during periods when the CPU load remains high, so as to ensure that the currently executing voice transmission logic is not additionally occupied by resources.

[0026] If some voice enhancement modules (such as advanced audio reverberation) do not belong to the core requirements of the current team voice, the system can postpone their loading timing until the CPU load recovers before processing, thereby reducing stuttering or latency.

[0027] In this embodiment, by performing targeted pre-compilation and bytecode generation on the core source files of the game voice tool, and combining just-in-time compilation and segmented loading strategies, the real-time compilation pressure faced by multi-person voice in a high-concurrency scenario is significantly reduced. This solution not only ensures the stable operation of key voice functions but also leaves sufficient room for subsequent dynamic scheduling and optimization, and is particularly suitable for game applications with large-scale team voice, clan command, or high-density voice communication requirements.

[0028] In some embodiments, when the game is initialized or the player is about to enter the target scene, analyze the target scene requirements and pre-load the relevant resource files, and cache the relevant resource files in the storage medium of the target system, including: Determine the basic requirement information of the target scene and generate a resource list for pre-loading; Obtain the resource files matching the resource list from the resource library and perform compression processing on the resource files; Pre-store the compressed resource files in the storage medium of the target system for quick loading when the game enters the target scene; When it is detected that there are abnormal fluctuations in memory occupancy or CPU load during the game operation, according to the priority order of the resource list, postpone the loading of the resource files not within the current usage range.

[0029] Specifically, before the game starts or the player selects a certain target scene (such as a large dungeon, city square, arena), the system will read the basic requirement information of the scene. For example, when the player is about to enter a "fortress" scene, the system will retrieve the NPC models, sound effects, background music, light maps, etc. required for this scene, and generate a "pre-loading resource list" based on this.

[0030] For example, Example Scene 1: Arena battle When the player chooses to enter the arena, the system can list the audience model, background sound effects, countdown sound effects, character skill particle effects, etc. in the arena; For example, example scene 2: city square When players enter social scenes such as city squares, the system will list the necessary ground maps, building models, city environment background sound effects, and more NPC modeling files.

[0031] Furthermore, the system extracts resource files matching the "preloaded resource list" from the pre-established resource library. To reduce memory usage, this embodiment preferably uses an efficient compression algorithm such as LZ4 to compress the resource files.

[0032] After the resource file is processed by LZ4, an associated index is established with the original resource path or identifier to facilitate one-to-one correspondence during subsequent rapid decompression.

[0033] When the player has not yet entered the scene, these compressed files are stored in the storage medium of the target system (such as memory cache or fast reading memory) so that they can be quickly decompressed and put into use when needed later.

[0034] For example, in an example scenario, when the player's team is about to enter a dungeon, it is often necessary to load multiple large monster models, scene effects, and BOSS-specific sound effects. After compression, these resources are uniformly written into the " / cache / preload / bossDungeon" directory. During the game execution phase, they can be quickly searched and decompressed according to the index under this directory.

[0035] After the player confirms to enter the target scene, the system will first load the necessary resources in the "preloaded resource list". The basic textures, lighting information or key sound effects required for scene initialization will be decompressed into memory first, thus avoiding lag when the picture is initially rendered or the sound effects are played.

[0036] If the player enters the "Fortress" scene, the game will first load and decompress the key terrain data and basic lighting textures; the background music will be decompressed at the same time within a few seconds after the player enters the scene to ensure that the user can get a more complete audio-visual experience as soon as entering the scene.

[0037] After completing the preloading of the necessary resources for the scene, other resources (such as distant models, additional decorative sound effects, low-frequency NPC images, etc.) will be gradually loaded according to the current system performance status data.

[0038] Set a lower loading priority for non-critical resources in the resource list, and decompress and load them only when the CPU and memory loads are within an acceptable range; When it is detected that the system load climbs significantly (for example, when players turn on multiplayer voice at the same time or a large number of skill special effects are triggered, resulting in a sudden increase in CPU and memory occupancy), this embodiment can suspend the loading or compress and unload models that are not within the current field of view; if players do not access certain remote areas temporarily after entering a battle, the texture or audio resources in these areas are preferentially unloaded to free up resource space for more real-time calculations in the battle scene.

[0039] From the above specific embodiments, it can be seen that the solution of the present application to comprehensively analyze the scene requirements and preload relevant resource files when the game is initialized or the player is about to enter the target scene not only improves the loading speed of key resources during actual use, but also reduces the memory occupancy using an efficient compression algorithm. In addition, the priority-based deferred loading and abnormal fluctuation monitoring mechanism enables more flexible resource management in multiplayer voice or high-load scenarios, significantly reducing the probability of the game freezing. This solution is applicable to various games with large-scale scenes or multiplayer online interaction requirements, and has good applicability and scalability in optimizing the player experience.

[0040] In some embodiments, during the game operation, a monitoring module is used to collect and analyze the memory occupancy and CPU load in real time to obtain the performance status data of the current system, including: Set the monitoring frequency and monitoring trigger conditions for capturing the memory occupancy and CPU load, and collect the system operation parameters according to the monitoring frequency and monitoring trigger conditions during the game execution; Compare the system operation parameters with the preset benchmark thresholds to obtain the performance metrics for characterizing the current system usage; Generate performance status data based on the performance metrics, and output the performance status data to the subsequent resource management and bytecode call phases to perform corresponding adjustment operations when the memory occupancy and / or CPU load rises abnormally.

[0041] Specifically, in this embodiment, the game introduces a dedicated monitoring module for capturing memory occupancy and CPU load information. The system configures two types of monitoring strategies for this monitoring module: regular monitoring and event triggering.

[0042] For example, read the current memory usage rate and CPU load rate every 200 milliseconds, and record these data in a cache object named "PerfMonitor"; When the memory usage rate surges by more than 80% within a short period (such as 1 second) or the CPU load rate suddenly rises by more than 90% within a short time (such as 500 milliseconds), the system immediately triggers an emergency collection to quickly obtain the key operation parameters of the current system.

[0043] Further, after collecting the memory and CPU loads, the monitoring module compares the obtained values with preset benchmark thresholds to generate performance metrics reflecting the system usage status.

[0044] For example, in a sample scenario (a sudden increase in CPU during a raid battle), when the player's team enters a large-scale battle scene, character skills, monster AI, and multi-player voice interaction occur simultaneously, which is very likely to cause an instant spike in CPU load. After the system detects that the CPU load rate is approaching the set benchmark value of 85%, it will mark this metric as the "about to overload" status; if it detects that the CPU exceeds 90%, it will be marked as "high load".

[0045] Similarly, when the memory usage rate exceeds the preset 70% but has not reached 85%, the performance metric will show as "attention required" to prompt subsequent modules to be cautious during resource scheduling or loading.

[0046] Based on the above performance metrics, the monitoring module comprehensively generates the current "Performance State Data" of the system, which includes information such as memory usage rate, CPU load rate, whether there are abnormal fluctuations, and the duration of overload.

[0047] This "Performance State Data" will be immediately fed back to the modules responsible for resource management and bytecode invocation. For example, after receiving the notification that the memory usage rate is approaching the threshold, "ResourceManager" can pause the loading of some texture resources that are deferred; if "BytecodeManager" detects that the CPU is already in a high-load state, it can delay or execute the compilation tasks of the unused special effect operation modules at a low frequency to avoid further increasing the CPU pressure during the compilation process.

[0048] In some examples, if the "TeamVoiceHandler" module (multi-player voice processing) requires more CPU time slices and the current system metrics show that the CPU overload critical value has been reached, under the guidance of the "Performance State Data", the system can prioritize ensuring that the voice module maintains sufficient resource occupancy and reduce unnecessary resource decompression or rendering details to ensure the real-time nature of multi-player voice.

[0049] In this embodiment, the feedback mechanism between the monitoring module and the subsequent resource scheduling modules continues. The monitoring module updates the performance state data regularly or when an event is triggered. The subsequent modules perform corresponding adjustment operations based on the latest data, and then feed back the operation results or newly generated load information to the monitoring module for the next comparison and evaluation.

[0050] If the CPU and memory loads are alleviated within a period of time, the monitoring module will next detect that the system metrics have fallen back to the safe range and output this updated status to subsequent modules, enabling the resource management process to gradually resume normal loading or compilation policies.

[0051] As can be seen from this embodiment, during the operation of the game, by reasonably setting the monitoring frequency and trigger conditions, and combining the threshold comparison mechanism to obtain memory occupancy and CPU load information in a timely manner, it is possible to quickly initiate adjustments to subsequent resource management or compilation policies at the critical load point, providing timely and reliable data support for the coordination between multi-person voice and other game modules. In high-concurrency or high-load game scenarios, this technical solution can effectively reduce the occurrence probability of sudden freezes, enabling the game to maintain a relatively stable and smooth running experience under performance pressure.

[0052] In some embodiments, based on the performance status data, when it is detected that the memory occupancy and / or CPU load exceed the preset threshold, the pre-compilation method and resource loading strategy are automatically adjusted, including: Comparing the performance status data with the preset threshold to determine the trigger conditions for the memory occupancy and / or CPU load to exceed the limit; According to the trigger conditions, modifying the pre-compilation method, where the pre-compilation method includes adjusting the compilation frequency, compilation depth, or compilation priority; Dynamically switching the resource loading strategy, selecting resource files in low-resolution or high-compression ratio formats, and delaying the loading of resources that are not in the core usage range according to the usage priority.

[0053] Specifically, in this embodiment, the system continuously obtains key metrics such as the current memory occupancy and CPU load through the performance monitoring module. Once the monitoring results show that one or more metrics exceed the predefined threshold (such as the memory usage rate reaches 80%, or the CPU load rate exceeds 85%), the corresponding performance optimization process is triggered.

[0054] For example, Example Scenario 1: When a large-scale multi-player dungeon is opened When players gather at the entrance of the large dungeon, the system monitors that the simultaneous opening of multi-person voice and scene loading causes the memory usage rate to quickly climb above the 80% threshold, triggering the memory optimization strategy.

[0055] Another example, Example Scenario 2: Intense battles or intensive calculations When players enter a high-intensity battle scenario or trigger a large number of special effects, once the CPU load rate is detected to exceed 85%, the system will immediately initiate the CPU optimization strategy.

[0056] Based on the above triggering conditions, the system appropriately modifies the pre-compilation frequency, compilation depth, or compilation priority of the source code to alleviate the additional pressure brought by real-time compilation under high-load conditions.

[0057] If it is detected that the CPU is frequently in the high-load range, the system will temporarily reduce or suspend the compilation tasks of some function modules that have not been triggered by players, and resume the normal compilation process after the CPU load drops.

[0058] When some function modules are not important or have a low usage frequency in the current scene, the system can adjust their compilation depth to a low level to reduce the CPU occupancy during the compilation process; or directly lower their compilation priority and preferentially reserve computing resources for the key multi-player voice module.

[0059] For example, in an example scenario (hierarchical compilation of skill scripts and voice modules), in a large-team voice communication scenario, if it is detected that the CPU load is too high, the game will first ensure that the bytecode corresponding to the voice module is compiled or run with the highest priority; for high-order skill scripts that players are unlikely to use in the short term, the compilation priority will be lowered, or even the compilation timing will be postponed.

[0060] When the resource load exceeds the limit, this embodiment provides the following resource optimization means for memory and CPU pressure: If it is detected that the memory occupancy exceeds the threshold, the system can automatically switch some high-resolution textures, sound effect files, etc. to low-resolution or high-compression ratio alternative versions. For example, when players only need to maintain battles or communications in a simplified rendering environment, there is no need to continue loading ultra-high-definition textures.

[0061] According to the resource priority list, temporarily exclude the resources that are not in the current field of view or non-critical function modules from the immediate loading queue, and continue to load them when the system load resumes.

[0062] For example, in an example scenario (real-time switching in a team dungeon BOSS battle), when players first enter the BOSS room, the system usually needs to load a large number of BOSS-exclusive sound effects, skill special effects and other resources. If the load monitoring shows that the memory occupancy is seriously high, the system will first postpone the loading of scene decorative resources (such as surrounding environment special effects) or use low-resolution versions, and give priority to ensuring that the real-time processing of BOSS battles and multi-player voices is not affected.

[0063] While triggering the above strategies, this embodiment can cooperate with intelligent preloading and asynchronous computing mechanisms to further reduce peak loads: when the multi-person voice function is frequently enabled, the system will automatically increase the priority of voice processing resources based on the voice activity of players, and adjust the resource occupancy of rendering and AI computing accordingly; if some algorithm modules (such as game AI, battle simulation) are not triggered in the short term, the system can allocate them to time segments with lower loads to avoid resource conflicts with real-time voice processing or key scene rendering.

[0064] As can be seen from the above specific embodiments, when the game detects that the memory occupancy or CPU load exceeds the preset threshold during operation, it can automatically adjust the pre-compilation method and resource loading strategy according to the actual scene requirements and user operation behaviors. By reducing the priority of some non-essential compilation tasks, switching to resource files with low resolution or high compression ratio, and delaying the loading of resources that are not critical to the current game, the system achieves an effective balance between key interactive functions such as multi-person voice and resource management, which helps to reduce lag and latency and ensure a smooth experience for players in high-load scenarios.

[0065] In some embodiments, based on the voice high-priority strategy, the resources and bytecodes required for voice processing are placed in a high-priority queue, and the memory occupancy and / or CPU load are coordinated and scheduled, including: Allocate or load resources and bytecode files related to voice processing in the high-priority queue, and adjust the occupancy ratio of other tasks in the processor and memory according to the performance status data; When it is detected that the memory occupancy and / or CPU load exceeds the preset threshold, the processor time slice and necessary memory space are preferentially reserved for voice tasks, and the compilation tasks unrelated to core voice processing are postponed; After the memory occupancy and / or CPU load return below the preset threshold, the processor and memory resources are re-allocated to the postponed compilation tasks according to the predetermined resource management strategy.

[0066] Specifically, in this embodiment, the game system first creates or enables a high-priority queue according to the real-time requirements of the multi-person voice function, which is used to centrally manage the resources and bytecodes required for voice processing.

[0067] Mark the core algorithms related to multi-person voice (such as audio codec, voice data packing and network transmission) and their corresponding bytecode files as "high-priority", and preferentially load them into the processor time slice and memory space.

[0068] For example, in an example scenario (large-scale combat voice chat), before a guild war or a large-scale dungeon starts, most players will turn on the voice function simultaneously for command and communication. The system pre-loads the bytecodes and resources of modules such as "TeamVoiceHandler" or "GuildVoiceModule" in a high-priority queue, so that these voice processing processes do not need to wait or compile again when the game officially starts.

[0069] During the actual operation, the game's performance monitoring module continuously provides real-time memory and CPU load information to the resource scheduling engine (or multi-threaded scheduling mechanism). In this embodiment, once it detects an increase in voice demand or an increase in the frequency of player voice activities, the system automatically allocates more or more stable resource occupancy for the voice module in the processor and memory according to the current performance status data.

[0070] If the CPU load is climbing, the system will first ensure that the threads related to voice processing obtain a fixed or sufficient time slice, and reduce the execution frequency of other auxiliary tasks (such as decorative special effect rendering, low-priority compilation).

[0071] For example, in an example scenario (cross-server alliance voice discussion), when a large number of players form cross-server teams and have a lively discussion in the same channel, the server side may detect a significant increase in the call volume of the voice module. At this time, the scheduling engine will reserve a certain number of CPU cores and the minimum memory space for the voice module, so that the player voice does not have interruptions or delays.

[0072] When it detects that the memory occupancy and / or CPU load exceeds the preset threshold (such as the CPU load exceeding 85%), the system will first reserve the processor time slice and the necessary memory space required for the voice task, and temporarily postpone the compilation or loading tasks that are not related to the core voice processing. In this embodiment, the multi-person voice demand is clearly placed at a higher priority, so even when the CPU or memory resources are in short supply, the voice function can continue to run relatively smoothly.

[0073] For example, in an example scenario (critical command moment), the guild leader issues a critical command during the final BOSS battle stage, and the scene rendering and skill special effects surge instantly. After the system detects that the CPU is about to be overloaded, it will abort the compilation of some low-priority AI scripts and transfer more processing power to the voice queue module to ensure the real-time transmission of the command voice.

[0074] After detecting that the memory occupancy and / or CPU load has returned below the preset threshold, the system then reschedules the previously postponed compilation, loading, or rendering tasks to the processor and memory according to the established policy order: the game first restores the key information or visual effects that may affect the player experience, and then gradually loads the remaining low-priority resources.

[0075] For example, in a sample scenario (post-war recovery), after the guild war comes to an end, the CPU load is no longer too high, and the system begins to resume previously suspended rendering effects or certain background tasks (such as leaderboard synchronization data) to ensure the integrity of game functions.

[0076] To further improve resource scheduling efficiency, this embodiment can also combine a machine learning-based resource scheduling engine to predict future loads, and use a multi-threaded parallel computing strategy to allocate game voice processing, rendering, and resource loading tasks to different CPU cores, for example: If it is predicted that there will be a peak in multi-person voice calls in the next phase, the system will preload some resources in low resolution in advance, or schedule module compilation tasks that do not need to be called immediately to be executed during a period of low load; By properly dividing the number of cores, one or more threads are dedicated to voice processing, and the bytecodes in the high-priority queue are also allocated to relatively idle cores as much as possible to avoid excessive contention with high-intensity graphics rendering threads.

[0077] This embodiment centrally manages the key resources and bytecode files required for multi-person voice in a high-priority queue, and performs real-time processor and memory scheduling based on performance status data, ensuring that the voice function can still maintain sufficient system resource usage in high-load scenarios. Especially in scenarios such as large-scale multiplayer battles, guild battles, or cross-server team formations, the above solution can significantly reduce voice delays or packet loss, thereby improving team collaboration efficiency and player experience. At the same time, after the load index drops, the system can quickly release resource scheduling space outside of voice tasks, and smoothly connect and restore delayed compilation or rendering tasks, thereby achieving a good performance balance between multi-person voice and other important modules of the game.

[0078] In some embodiments, the method further comprises: Analyze historical game data and real-time player operation data to predict future scene switching and player interaction needs; Based on the prediction results, determine the time period when high load occurs, and adjust bytecode loading, resource file scheduling, and voice processing resource allocation before high load occurs; Based on performance status data, the scenes to be loaded or the operations to be performed are prioritized and memory and CPU resources are reserved.

[0079] Specifically, in this embodiment, the system will first continuously collect and analyze historical game data (such as the length of time a player stays in a specific copy or scene, previous team voice usage) and the player's current operation trajectory (such as real-time movement path, voice interaction frequency, and combat skill usage).

[0080] In some examples, the data source may include server logs, client behavior statistics, voice channel interaction records, etc.; by comprehensively judging the player's past operation patterns and real-time locations, the system predicts the possible types of scene switches (such as about to enter a dungeon, crossing a terrain boundary) or resource consumption events (such as the peak voice stage, concentrated BOSS battles, etc.) that may occur next.

[0081] Based on the above data analysis results, the system can infer that there will be a high load in a certain future time period. For example, a large number of players simultaneously turn on voice or trigger large-scale battle special effects in the same scene. To avoid lag or delay caused by insufficient resource preparation when the load peak arrives, the following adjustments are made in this embodiment before the high load arrives: Pre-load the most likely to be called script and algorithm modules in subsequent scenes or functions into memory, and perform appropriate pre-compilation or local optimization according to the possible CPU load situation; Pre-unzip high-resolution texture maps or large sound effect files to the cache so that real-time decompression is not required when players officially enter the scene or turn on multi-player voice. If it is predicted that multi-player voice is about to enter the active period, allocate or reserve some CPU cores or memory blocks in advance for the voice processing module to prevent competition with other high-load tasks.

[0082] Furthermore, after completing the above pre-loading and resource allocation, the system continues to monitor the performance status data during the game operation. If the monitoring module shows that players do not enter a specific scene or trigger the expected operation as predicted, the previously reserved CPU / memory space can be released or adjusted according to the actual situation. When the prediction deviation is confirmed, the resource weights allocated to the voice module or other high-load processing are reduced to enable other game functions that require resources to run normally.

[0083] For example, Example Scenario 1: Emergency preparation before a guild war When the analysis results show that most players will gather at a certain fortress to start a guild war in a few minutes, the system pre-loads the main resources required for the large scene, the BOSS interaction script, and the unique voice module for the guild war in advance, avoiding emergency scheduling that occupies a large amount of CPU and memory when the guild war breaks out.

[0084] Another example, Example Scenario 2: Switching between personal dungeons and team dungeons The player was originally exploring the dungeon in single-player mode. Historical data analysis shows that players usually directly invite friends to form a team to challenge the elite dungeon after clearing. The system pre-loads the multi-player voice script that may be used when the player's single-player dungeon is about to end, reducing the resource loading pressure brought by subsequent real-time switching.

[0085] Another example, Example Scenario 3: Cross-region movement If it is detected that the player's walking route will pass through multiple high-load areas (such as towns or guild capitals), the system will cache the main NPC models, chat voice modules, and corresponding background sound effect files of these areas in advance to ensure that there is no obvious loading delay when traveling quickly.

[0086] This embodiment predicts player operation behavior and historical game data, completes resource preparation and bytecode compilation before the peak load arrives, and effectively reduces the jamming caused by real-time loading or real-time compilation. Especially for periods of intensive multi-person voice interaction, allocating CPU and memory resources to the voice module in advance can ensure smooth voice communication between players and significantly improve team collaboration and game fluency. When the load demand ends or a forecast deviation occurs, the system can flexibly adjust the previously reserved resources to maintain the overall operating efficiency of the game.

[0087] In some embodiments, in order to ensure the smoothness of multiplayer team voice when it is turned on, while not affecting the loading of game screens and other important resources, the present application also provides a dynamic balance optimization technology for game scenes and voice interaction.

[0088] When multi-person voice interaction is enabled, the system will prioritize the real-time transmission and processing of voice data to ensure that voice is not affected by delays or freezes. For the processing of voice data, the system marks it as a high-priority resource and prioritizes the allocation of CPU and memory resources for processing.

[0089] In order to avoid excessive impact on the game screen during voice interaction, the system will dynamically adjust the level of detail of the screen rendering according to the running status of the game. When the game performance allows, high-quality graphics rendering is maintained; when the performance decreases, the picture quality is appropriately reduced, such as reducing the rendering frame rate or adjusting the picture details.

[0090] Through the above technical solution, this application not only solves the problem of lag caused by excessive resource occupation during multi-person voice interaction, but also provides an efficient and adaptive technical solution by combining dynamic memory management, bytecode precompilation, intelligent resource scheduling, and CPU and memory collaborative optimization. The technical solution of this application will greatly improve the fluency of the game when multi-person team voice is turned on, providing users with a better gaming experience.

[0091] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0092] Figure 2 Schematic diagram of the structure of a multi-person voice game performance optimization device based on dynamic resource management provided by an embodiment of the present application. Figure 2 As shown, the multi-person voice game performance optimization device based on dynamic resource management includes: A pre-compilation module 201, configured to obtain the core source code of the game voice tool and pre-compile the core source code to generate a bytecode file called during the operation of the game voice tool; An invocation module 202, configured to, when the game voice tool is executed, use the bytecode file to replace the just-in-time compilation operation, so that the game voice tool directly invokes the bytecode file during the operation process; A preloading module 203, configured to, when the game is initialized or the player is about to enter the target scene, analyze the requirements of the target scene and preload relevant resource files, and cache the relevant resource files in the storage medium of the target system; An acquisition and analysis module 204, configured to, during the operation of the game, use a monitoring module to perform real-time acquisition and analysis of the memory occupancy and CPU load, and obtain the performance status data of the current system; An automatic adjustment module 205, configured to, based on the performance status data, when it is detected that the memory occupancy and / or CPU load exceeds a preset threshold, automatically adjust the pre-compilation method and resource loading strategy; A collaborative scheduling module 206, configured to, when it is detected that the multi-person voice function is enabled, based on the voice high-priority policy, place the resources and bytecodes required for voice processing in a high-priority queue, and perform collaborative scheduling on the memory occupancy and / or CPU load.

[0093] In some embodiments, Figure 2 The pre-compilation module 201 analyzes the source files related to the core logic of the game voice tool and the multi-person voice function in the core source code, determines the target code; uses a compilation tool to perform compilation preprocessing on the target code, generates the corresponding bytecode file, and stores the bytecode file in the storage medium of the target system; according to the just-in-time compilation technology, performs dynamic optimization compilation on the bytecode file involving multi-person voice interaction, and performs segmented loading on the bytecode file according to the performance status data.

[0094] In some embodiments, Figure 2 The preloading module 203 determines the basic requirement information of the target scene, generates a resource list for preloading; obtains the resource files matching the resource list from the resource library, and performs compression processing on the resource files; pre-stores the compressed resource files in the storage medium of the target system for quick loading when the game enters the target scene; when it is detected that there are abnormal fluctuations in the memory occupancy or CPU load during the operation of the game, according to the priority order of the resource list, delays the loading of the resource files not within the current usage range.

[0095] In some embodiments, Figure 2The acquisition and analysis module 204 is configured to capture the monitoring frequency and monitoring trigger conditions of memory occupancy and CPU load, and collect system operation parameters during the execution of the game according to the monitoring frequency and monitoring trigger conditions; compare the system operation parameters with preset reference thresholds to obtain performance indicators for characterizing the current system usage status; generate performance status data based on the performance indicators, and output the performance status data to the subsequent resource management and bytecode invocation phases to perform corresponding adjustment operations when the memory occupancy and / or CPU load abnormally increases.

[0096] In some embodiments, Figure 2 The automatic adjustment module 205 compares the performance status data with preset thresholds to determine the trigger conditions for memory occupancy and / or CPU load exceeding the limit; according to the trigger conditions, modify the pre-compilation method, where the pre-compilation method includes adjusting the compilation frequency, compilation depth, or compilation priority; dynamically switch the resource loading strategy, select resource files in low resolution or high compression ratio format, and delay the loading of resources not in the core usage range according to the usage priority.

[0097] In some embodiments, Figure 2 The cooperative scheduling module 206 allocates or loads resources and bytecode files related to voice processing in the high-priority queue, and adjusts the occupancy ratios of other tasks in the processor and memory according to the performance status data; when it is detected that the memory occupancy and / or CPU load exceeds the preset threshold, preferentially reserve the processor time slice and necessary memory space for voice tasks, and delay the execution of compilation tasks unrelated to core voice processing; after the memory occupancy and / or CPU load resumes below the preset threshold, re-allocate processor and memory resources for the delayed compilation tasks according to the predetermined resource management strategy.

[0098] In some embodiments, Figure 2 The prediction module 207 analyzes historical game data and real-time player operation data to predict future scene switching and player interaction requirements; based on the prediction results, determine the time periods when high load occurs, and adjust bytecode loading, resource file scheduling, and voice processing resource allocation before the high load occurs; according to the performance status data, prioritize the upcoming scenes or operations to be executed, and reserve memory and CPU resources.

[0099] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or posterior, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0100] Figure 3 is a schematic structural diagram of the electronic device 3 provided by the embodiments of the present application. As Figure 3As shown, the electronic device 3 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, the steps in the above method embodiments are implemented. Alternatively, when the processor 301 executes the computer program 303, the functions of each module / unit in the above device embodiments are implemented.

[0101] Exemplarily, the computer program 303 can be divided into one or more modules / units. The one or more modules / units are stored in the memory 302 and executed by the processor 301 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 303 in the electronic device 3.

[0102] The electronic device 3 can be a desktop computer, a notebook, a palm computer, a cloud server, or other electronic devices. The electronic device 3 can include, but is not limited to, the processor 301 and the memory 302. Those skilled in the art can understand that Figure 3 merely examples of the electronic device 3, which do not constitute a limitation on the electronic device 3, may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0103] The processor 301 can be a central processing unit (CPU), or 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 the processor can also be any conventional processor, etc.

[0104] The memory 302 may be an internal storage unit of the electronic device 3, for example, the hard disk or memory of the electronic device 3. The memory 302 may also be an external storage device of the electronic device 3, for example, a plug-in hard disk equipped on the electronic device 3, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 302 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0105] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0106] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0107] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0108] In the embodiments provided in the present application, it should be understood that the disclosed device / computer equipment and method can be implemented in other ways. For example, the device / computer equipment embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. Multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

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

[0110] In addition, in each embodiment of the present application, the various functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0111] If the integrated module / unit is implemented in the form of 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, to implement all or part of the processes in the above method embodiments of the present application, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. The computer program can include computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0112] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the technical solutions of the present application have been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A multiplayer voice game performance optimization method based on dynamic resource management, characterized in that: include: Obtaining the core source code of the game voice tool and precompiling the core source code to generate a bytecode file called when the game voice tool is running; When the game voice tool is executed, the bytecode file is used to replace the real-time compilation operation, so that the game voice tool directly calls the bytecode file during operation; When the game is initialized or the player is about to enter the target scene, the target scene requirements are analyzed and relevant resource files are preloaded, and the relevant resource files are cached in the storage medium of the target system; During the game running process, the monitoring module is used to collect and analyze the memory usage and CPU load in real time to obtain the performance status data of the current system; Based on the performance status data, when it is detected that the memory usage and / or CPU load exceeds a preset threshold, the pre-compilation mode and resource loading strategy are automatically adjusted; When it is detected that the multi-person voice function is turned on, based on the voice high priority strategy, the resources and bytecodes required for voice processing are placed in a high priority queue, and the memory occupancy and / or CPU load are collaboratively scheduled.

2. The method according to claim 1, characterized in that The obtaining of the core source code of the game voice tool and precompiling the core source code to generate a bytecode file called by the game voice tool when it is running includes: Analyze the source files in the core source code related to the core logic of the game voice tool and the multiplayer voice function to determine the target code; Compiling and preprocessing the target code using a compilation tool to generate a corresponding bytecode file, and storing the bytecode file in a storage medium of the target system; According to the just-in-time compilation technology, the bytecode files involved in multi-person voice interaction are dynamically optimized and compiled, and the bytecode files are loaded in segments according to the performance status data.

3. The method according to claim 1, characterized in that: When the game is initialized or the player is about to enter the target scene, the target scene requirements are analyzed and relevant resource files are preloaded, and the relevant resource files are cached in the storage medium of the target system, including: Determine the basic requirement information of the target scene and generate a resource list for preloading; Acquire resource files matching the resource list from the resource library, and perform compression processing on the resource files; Pre-storing the compressed resource files in the storage medium of the target system so as to quickly load them when the game enters the target scene; When abnormal fluctuations in memory usage or CPU load are detected during game operation, resource files that are not currently in use are loaded later according to the priority order of the resource list.

4. The method according to claim 1, characterized in that: During the game running process, the monitoring module is used to collect and analyze the memory usage and CPU load in real time to obtain the performance status data of the current system, including: Setting a monitoring frequency and monitoring trigger conditions for capturing the memory usage and the CPU load, and collecting system operating parameters according to the monitoring frequency and monitoring trigger conditions during game execution; Comparing the system operating parameters with a preset reference threshold to obtain a performance indicator for characterizing the current system usage status; The performance status data is generated based on the performance indicator, and the performance status data is output to the subsequent resource management and bytecode calling stage, so as to perform corresponding adjustment operations when the memory occupancy and / or CPU load increases abnormally.

5. The method according to claim 1, characterized in that The method of automatically adjusting the pre-compilation mode and resource loading strategy based on the performance status data when detecting that the memory usage and / or CPU load exceeds a preset threshold value includes: Comparing the performance status data with the preset threshold value to determine the triggering condition of memory usage and / or CPU load exceeding the limit; Modify the pre-compilation mode according to the trigger condition, wherein the pre-compilation mode includes adjusting the compilation frequency, compilation depth or compilation priority; The resource loading strategy is dynamically switched to select resource files in low-resolution or high-compression formats, and resources that are not in the core usage range are delayed in loading according to usage priority.

6. The method according to claim 1, characterized in that The high-priority voice strategy is based on placing resources and bytecodes required for voice processing in a high-priority queue, and co-scheduling the memory occupancy and / or CPU load, including: Allocate or load resources and bytecode files related to speech processing in the high priority queue, and adjust the proportion of other tasks occupied in the processor and memory according to the performance status data; When it is detected that the memory usage and / or CPU load exceeds a preset threshold, the processor time slice and necessary memory space are reserved for the voice task first, and the compilation tasks not related to the core voice processing are postponed; After the memory occupancy and / or CPU load recovers to below a preset threshold, processor and memory resources are reallocated for the deferred compilation tasks according to a predetermined resource management strategy.

7. The method according to claim 1, characterized in that The method further comprises: Analyze historical game data and real-time player operation data to predict future scene switching and player interaction needs; Based on the prediction results, determine the time period when high load occurs, and adjust bytecode loading, resource file scheduling, and voice processing resource allocation before high load occurs; Based on performance status data, the scenes to be loaded or the operations to be performed are prioritized and memory and CPU resources are reserved.

8. A multiplayer voice game performance optimization device based on dynamic resource management, characterized in that: include: A pre-compilation module, used to obtain the core source code of the game voice tool and pre-compile the core source code to generate a bytecode file called when the game voice tool is running; A calling module, used to use the bytecode file to replace the real-time compilation operation when the game voice tool is executed, so that the game voice tool directly calls the bytecode file during operation; A preloading module is used to analyze the target scene requirements and preload relevant resource files when the game is initialized or the player is about to enter the target scene, and cache the relevant resource files in the storage medium of the target system; The collection and analysis module is used to collect and analyze the memory usage and CPU load in real time using the monitoring module during the game running process to obtain the performance status data of the current system; An automatic adjustment module, for automatically adjusting the precompilation mode and resource loading strategy based on the performance status data when it is detected that the memory usage and / or CPU load exceeds a preset threshold; The collaborative scheduling module is used to place the resources and bytecodes required for voice processing in a high priority queue based on the voice high priority strategy when it is detected that the multi-person voice function is turned on, and to collaboratively schedule the memory occupancy and / or CPU load.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Voice processing method and device, electronic equipment and storage medium

    CN109731345A

  • Task management method and related equipment

    CN117519918A

  • Multi-voice intelligent voice interaction method, electronic equipment and storage medium

    CN118982979A

  • Python Serverless function cold start optimization system and method

    CN119201284A

  • Game resource processing method, system and equipment for H5 micro terminal and medium

    CN119701324A

Cited By

  • Storage resource allocation method, electronic equipment, storage medium and program product

    CN120256134A

  • Transplanted application RAM resource optimization method, device and equipment based on YTS engine

    CN121000924A