Data processing method and device, electronic equipment and computer readable storage medium

By using prediction models in the game server to predict calculation pressure and dynamically adjust the calculation unit and wait queue, the resource utilization problem of the game server at high and low loads is solved, and the smooth operation of the game system and the improvement of user experience is achieved.

CN119565166APending Publication Date: 2025-03-07BEIJING PIXEL SOFTWARE TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411636676.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

During the development of online games, game servers will experience excessive computing pressure when logging in with a large number of users, resulting in delayed logic updates; while when there are fewer users, server resources are seriously wasted.

Method used

Through the prediction model, predict the calculation pressure of game activities, dynamically adjust the number of calculation units and waiting queue length to ensure the reasonable allocation of computing resources.

Benefits of technology

It effectively avoids the increase in game data processing delay, improves user's gaming experience, and optimizes the utilization of server resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119565166A_ABST
    Figure CN119565166A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of computers. The method comprises the steps of obtaining activity data according to starting time of a game activity; inputting the activity data into a pre-trained prediction model to obtain the number of core calculation units, the number of maximum calculation units and the length of a waiting queue; starting the computing units according to the number of the core computing units and the maximum number of the computing units, and adjusting the size of the waiting queue according to the length of the waiting queue; and scheduling the game data in the waiting queue by utilizing the calculation unit. According to the method, the prediction model is used for predicting the calculation pressure of the game activity, and the number of the calculation units participating in calculation and the length of the waiting queue are dynamically adjusted according to the prediction result, so that the calculation pressure is intervened in advance, a game system operates stably, the game data processing time delay is effectively prevented from being increased, and the game experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the process of developing online games, computing units are used to process user game data. Users gather at the same time every day to log in and participate in game activities. When faced with a large number of users logging in, the computing pressure on the game server becomes very high, which will cause delays in logic updates. When there are fewer logged-in users, there will be a waste of game server resources. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a data processing method, device, electronic device and computer-readable storage medium, which can effectively cope with the computing pressure of game data and enable the game system to run smoothly.

[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0005] In a first aspect, the present invention provides a data processing method, the method comprising:

[0006] Acquire activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity;

[0007] Inputting the activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units, and the length of the waiting queue;

[0008] Turning on computing units according to the number of core computing units and the maximum number of computing units, and adjusting the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store game data corresponding to users participating in the game activity;

[0009] The computing unit is used to schedule the game data in the waiting queue.

[0010] In an optional implementation, the computing unit includes a core computing unit and a temporary computing unit; and the step of enabling the computing unit according to the number of the core computing units and the maximum number of computing units includes:

[0011] Enable the core computing unit according to the number of the core computing units;

[0012] The temporary computing unit is enabled according to the difference between the maximum number of computing units and the number of core computing units.

[0013] In an optional embodiment, after the step of scheduling the game data in the waiting queue by using the computing unit, the method further includes:

[0014] When the game data in the waiting queue exceeds the queue high threshold, calculating the product of the maximum number of computing units and a preset ratio, and using the product to update the maximum number of computing units;

[0015] The temporary computing unit is enabled according to the difference between the updated maximum number of computing units and the number of core computing units, and the game data in the waiting queue is scheduled using the temporary computing unit.

[0016] In an optional embodiment, the method further comprises:

[0017] When the maximum number of computing units is greater than the number of core computing units, rechecking is started;

[0018] During the recheck, the maximum number of computing units is updated according to the game data in the waiting queue, the queue high threshold, and the queue low threshold;

[0019] When the updated maximum number of computing units is equal to the number of core computing units, the recheck is closed.

[0020] In an optional implementation, updating the maximum number of computing units according to the game data in the waiting queue, a queue high threshold, and a queue low threshold includes:

[0021] When the game data in the waiting queue exceeds the queue high threshold, calculating the product of the maximum number of computing units and a preset ratio, and using the product to update the maximum number of computing units;

[0022] When the game data in the waiting queue is lower than a queue low threshold, the maximum number of computing units is set to the number of core computing units.

[0023] In an optional embodiment, the prediction model is obtained by:

[0024] Determine training data from historical activity data of the game activity based on the number of users participating in the game activity, and obtain labels corresponding to the training data;

[0025] Inputting the training data and corresponding labels into a deep neural network to obtain a prediction result;

[0026] Based on the labels and the loss information of the prediction results, the parameters of the deep neural network are iteratively updated to obtain the prediction model.

[0027] In a second aspect, the present invention provides a data processing device, the device comprising:

[0028] A processing module, used to obtain activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity;

[0029] A prediction module, used for inputting the activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units and the length of the waiting queue;

[0030] A scheduling module is used to start computing units according to the number of core computing units and the maximum number of computing units, and adjust the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store game data corresponding to users participating in the game activity; and the computing unit is used to schedule the game data in the waiting queue.

[0031] In an optional embodiment, the computing unit includes a core computing unit and a temporary computing unit; the scheduling module is used to enable the core computing unit according to the number of core computing units; and enable the temporary computing unit according to the difference between the maximum number of computing units and the number of core computing units.

[0032] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the data processing method described in any of the aforementioned embodiments.

[0033] In a fourth aspect, 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 a data processing method as described in any one of the aforementioned embodiments.

[0034] Compared with the prior art, the data processing method, device, electronic device and computer-readable storage medium provided by the embodiments of the present invention use a prediction model to predict the computing pressure of game activities, and dynamically adjust the number of computing units involved in the calculation and the length of the waiting queue according to the prediction results to achieve early intervention in the computing pressure, so that the game system can run smoothly, effectively avoid the increase of game data processing delay, and enhance the user's gaming experience.

[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A schematic flow chart of a data processing method provided by an embodiment of the present invention is shown.

[0038] Figure 2 Another flow chart of the data processing method provided by the embodiment of the present invention is shown.

[0039] Figure 3 Another flow chart of the data processing method provided by the embodiment of the present invention is shown.

[0040] Figure 4 A schematic diagram of a prediction process of a prediction model provided by an embodiment of the present invention is shown.

[0041] Figure 5 A block diagram of a data processing device provided by an embodiment of the present invention is shown.

[0042] Figure 6 A block diagram of an electronic device provided by an embodiment of the present invention is shown.

[0043] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication module; 200 - data processing device; 201 - processing module; 202 - prediction module; 203 - scheduling module. DETAILED DESCRIPTION

[0044] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0045] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0046] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0047] During the game development process, when the game server is initialized, the computing units of each system will be initialized. After the computing units are initialized, the game data generated by users participating in the game activities will be processed.

[0048] The inventor has found that the computing units in the current game server are initialized according to the system default number settings. When faced with a large amount of game data that needs to be calculated, the insufficient number of computing units will cause the game data to be processed in a timely manner, resulting in logic update delays. At the same time, when the amount of game data is small, the idle computing units still need to keep running, which will cause a waste of game server resources.

[0049] Based on this, the data processing method and device provided by the embodiments of the present invention use a prediction model to predict the computing pressure of game activities, and dynamically adjust the number of computing units participating in the calculation and the length of the waiting queue according to the prediction results, so as to achieve early intervention in the computing pressure, so that the game system can run smoothly, effectively avoid the increase of game data processing delay, and enhance the user's gaming experience.

[0050] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0051] See also Figure 1 , Figure 1 A flow chart of a data processing method provided by an embodiment of the present invention is shown. The method should include the following steps:

[0052] Step S10, obtaining activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity.

[0053] In the embodiment of the present invention, the start time of the game activity and the current system time are obtained. If the difference between the start time and the current system time is less than the preset time threshold, the activity data corresponding to the game activity is obtained to trigger the dynamic adjustment logic of the calculation unit and the waiting queue. The preset time threshold can be set according to the experience value of the actual application scenario, which is not limited by the present invention.

[0054] Step S20, inputting the activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units and the length of the waiting queue.

[0055] Step S30, starting the computing unit according to the number of core computing units and the maximum number of computing units, and adjusting the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store game data corresponding to users participating in the game activity.

[0056] In the embodiment of the present invention, each game activity is independently configured with a computing unit and a waiting queue, and the number of computing units and the size of the waiting queue corresponding to each game activity can be dynamically adjusted according to the activity of users participating in the game activity.

[0057] The computing pressure corresponding to the game activity is predicted using the pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units, and the length of the waiting queue corresponding to the game activity. The computing units are dynamically adjusted according to the number of core computing units and the maximum number of computing units to prevent a large amount of game data from influxing in a short period of time and causing computing pressure. At the same time, the size of the waiting queue is dynamically adjusted according to the length of the waiting queue to avoid the inability to receive the user's game data after the waiting queue is full, causing the user to be unable to continue to participate in the game activity, affecting the user experience.

[0058] Step S40, utilizing the computing unit to schedule the game data in the waiting queue.

[0059] In the embodiment of the present invention, the activated computing unit sequentially obtains the game data in the waiting queue and processes the game data. The computing unit may be a central processing unit, a graphics processing unit, a memory, etc.

[0060] As a possible implementation, assuming that game activity A is carried out during a specified time period every day, then activity data is obtained according to the start time of game activity A, and a prediction model is used to make a prediction based on the activity data to obtain the current optimal configuration data, namely, the number of core computing units, the maximum number of computing units, and the length of the waiting queue. The size of the computing units involved in the calculation and the waiting queue are dynamically adjusted according to the number of core computing units, the maximum number of computing units, and the length of the waiting queue.

[0061] To sum up, the data processing method provided in the embodiment of the present invention uses a prediction model to predict the computing pressure of game activities, and dynamically adjusts the number of computing units participating in the calculation and the length of the waiting queue according to the prediction results, so as to achieve early intervention in the computing pressure, so that the game system can run smoothly, effectively avoid the increase of game data processing delay, and enhance the user's gaming experience.

[0062] Optionally, the computing unit includes a core computing unit and a temporary computing unit. The following provides a possible implementation method for adjusting the computing unit and the waiting queue. Figure 2 , Figure 1 The sub-steps of step S30 may include:

[0063] Step S301, start the core computing units according to the number of core computing units.

[0064] As a possible implementation, when creating a game activity, the core computing units may be enabled according to the default configuration. The number of maximum computing units in the default configuration is the same as the number of core computing units. The number of core computing units to be enabled is determined according to the difference between the number of core computing units and the number of core computing units in the default configuration, and the core computing units are enabled according to the number of core computing units to be enabled.

[0065] Step S302, enabling a temporary computing unit according to the difference between the maximum number of computing units and the number of core computing units.

[0066] In the embodiment of the present invention, when the amount of activity data increases, temporary computing units are enabled to relieve the computing pressure generated by the game activity. The maximum number of computing units is used to represent the upper limit of the number of computing units corresponding to the game activity.

[0067] Step S303: adjusting the size of the waiting queue according to the length of the waiting queue.

[0068] In the embodiment of the present invention, storage space is allocated to the waiting queue according to the length of the waiting queue, so that the waiting queue can receive the game data corresponding to the game activity in time.

[0069] It should be noted that when dynamically adjusting the computing unit, the idle core computing unit will be preferentially searched in the computing unit pool to calculate the game data. If all the current core computing units are occupied, the newly received game data will be added to the waiting queue. When the waiting queue contains game data, the core computing unit or temporary computing unit will be used to schedule the game data in the waiting queue.

[0070] Optionally, the following provides a possible implementation method for dynamically adjusting the computing units corresponding to game activities based on the waiting queue. Figure 3 ,exist Figure 1 After step S40, the following steps are also included:

[0071] Step S50, when the game data in the waiting queue exceeds the queue high threshold, the product of the maximum number of computing units and the preset ratio is calculated, and the maximum number of computing units is updated using the product.

[0072] In an embodiment of the present invention, when the game data in the waiting queue exceeds the queue high threshold, it means that the game activity has generated a large amount of game data, and the computing unit that has been turned on for the current game activity cannot process the game data in the waiting queue in time, and a new computing unit needs to be dynamically turned on to participate in the calculation of the game data.

[0073] Assume that the default value of the maximum number of computing units is the number of core computing units, the preset ratio is set to 1.5, and the queue high threshold is set to 60% of the waiting queue length. When the amount of game data in the waiting queue exceeds 60% of the waiting queue length, 1.5 times the number of core computing units is set as the current maximum number of computing units.

[0074] Step S60, based on the difference between the updated maximum number of computing units and the number of core computing units, a temporary computing unit is enabled, and the game data in the waiting queue is scheduled using the temporary computing unit.

[0075] In an embodiment of the present invention, the difference between the updated maximum number of computing units and the number of core computing units is calculated to obtain the number of temporary computing units. The temporary computing units are turned on according to the number of temporary computing units. Assuming that the number of temporary computing units is 15 and the number of currently turned on temporary computing units is 10, then 5 more temporary computing units need to be turned on, and the game data in the waiting queue is scheduled using the 15 turned on temporary computing units and the turned on core computing units. Among them, the number of turned on temporary computing units cannot exceed the upper limit of the maximum number of computing units.

[0076] Optionally, the following provides a possible implementation method for how to dynamically adjust the maximum number of computing units based on the computing pressure of game activities. Figure 3 , the method further comprises:

[0077] Step S70: When the maximum number of computing units is greater than the number of core computing units, recheck is started.

[0078] In an embodiment of the present invention, after adjusting the number of computing units using a prediction model or adjusting the number of computing units when the game data in the waiting queue exceeds the queue high threshold, the maximum number of computing units and the number of core computing units are compared, and if the maximum number of computing units is greater than the number of core computing units, a recheck is initiated.

[0079] Step S80, during the recheck, the maximum number of computing units is updated according to the game data in the waiting queue, the queue high threshold, and the queue low threshold.

[0080] In an embodiment of the present invention, the recheck timer is turned on, and the recheck timer is waited for. When the recheck time is reached, the game data in the waiting queue is compared with the size of the queue high threshold or the size of the game data in the waiting queue is compared with the size of the queue low threshold.

[0081] Specifically, when the game data in the waiting queue exceeds the queue high threshold, the product of the maximum number of computing units and the preset ratio is calculated, and the product is used to update the maximum number of computing units; when the game data in the waiting queue is lower than the queue low threshold, the maximum number of computing units is set to the number of core computing units.

[0082] In an embodiment of the present invention, if the game data in the waiting queue exceeds the queue high threshold, the maximum number of computing units is iteratively adjusted based on the updated maximum number of computing units and the preset ratio until the game data in the waiting queue does not exceed the queue high threshold. If the game data in the waiting queue is lower than the queue low threshold, the configuration of the computing unit is dynamically adjusted, the maximum number of computing units is updated to the number of core computing units, and the temporary computing unit is closed.

[0083] Step S90, when the updated maximum number of computing units is equal to the number of core computing units, close the recheck.

[0084] It can be seen that the embodiment of the present invention monitors the computing pressure of the game activity in real time through rechecking, dynamically opens the temporary computing unit when the computing pressure is high, and processes the game data corresponding to the game activity through the collaborative operation of the core computing unit and the temporary computing unit, thereby ensuring that the game data is processed quickly and accurately when the data volume is large, reducing the game running delay, and making the game system run more smoothly. When the computing pressure is low, the temporary computing unit is closed in time, the game system resources are automatically released, and the computing consumption of the game device is effectively reduced.

[0085] Optionally, before using the prediction model for prediction, it is necessary to train the deep neural network using historical activity data to obtain the prediction model. A possible implementation is provided below to illustrate the training process of the prediction model.

[0086] Based on the number of users participating in the game activities, the training data is determined from the historical activity data of the game activities, and the labels corresponding to the training data are obtained; the training data and the corresponding labels are input into the deep neural network to obtain the prediction results; based on the loss information of the labels and the prediction results, the parameters of the deep neural network are iteratively updated to obtain the prediction model.

[0087] In the embodiment of the present invention, before training the prediction model, it is necessary to collect a large amount of historical activity data of various game activities. Among them, game activities include battlefield activities, hegemony competitions, etc. The historical activity data includes the number of active users and the collection time, and the number of active users and the collection time correspond one to one.

[0088] For each game activity, obtain the number of active users in each historical activity data, determine the largest number of active users in the historical activity data within the same time period as the user online peak, and determine the collection time corresponding to the user online peak as the peak time. Determine the training data corresponding to the game activity based on the user online peaks and corresponding peak times in different time periods.

[0089] The configured number of core computing units, the configured number of maximum computing units, and the configured length of the waiting queue corresponding to the peak time are obtained, and a label is generated according to the configured number of core computing units, the configured number of maximum computing units, and the configured length of the waiting queue.

[0090] The deep neural network is trained using the training data of each game activity and the corresponding labels to obtain prediction results. The prediction results include the predicted number of core computing units, the predicted number of maximum computing units, and the predicted length of the waiting queue. Loss information is determined based on the configured number of core computing units, the predicted number of core computing units, the configured number of maximum computing units, the predicted number of maximum computing units, the configured length of the waiting queue, and the predicted length of the waiting queue. The parameters of the deep neural network are iteratively updated based on the loss information to obtain a trained prediction model.

[0091] It can be seen that the embodiment of the present invention utilizes the user online peak training prediction model of game activities to significantly improve the prediction accuracy of the prediction model for computing pressure, thereby ensuring that the game system dynamically adjusts the number of computing units in advance according to the output of the prediction model, thereby ensuring fast and accurate processing of game data.

[0092] In order to explain the training process of the prediction model more clearly, a three-layer deep neural network is used for example. Figure 4 , assuming that the deep neural network to be trained includes an input layer, a hidden layer and an output layer, wherein the input layer is used to receive training data and labels and perform feature extraction based on the training data; the hidden layer is used to generate prediction data of different levels; the output layer is used to generate prediction results based on the prediction data. Each neural layer is set with a different number of neurons, and neurons in different layers are connected by weights.

[0093] The training data includes group ID, game activity ID, number of active users, and collection time, where the number of user activities is the above-mentioned user online peak; the collection time is the peak time corresponding to the user online peak; the group ID is used to identify the game group, and the game group includes at least one game activity; the game activity ID is used to identify the game activity.

[0094] The training data and corresponding labels are input into the deep neural network. The deep neural network uses the input layer to extract features from the training data and obtain a 4-dimensional feature vector, such as Figure 4 4 feature vectors in the input layer. Since the input layer needs to process 4-dimensional feature vectors, 4 neurons are set in the input layer.

[0095] The hidden layer performs feature mapping based on the 4-dimensional feature vector, mapping the input 4-dimensional feature vector into a high-dimensional feature vector. Assuming that the number of neurons in the hidden layer is set to 10, a 4*10 linear transformation matrix needs to be set in the hidden layer to map the 4-dimensional feature vector into a 10-dimensional feature vector, such as Figure 4 There are 10 feature vectors in the hidden layer. The 10-dimensional feature vector represents 10 different levels of prediction data, and the 10-dimensional feature vector is input into the output layer.

[0096] The output layer uses the softmax function to obtain 10 probabilities based on the 10-dimensional feature vector, and determines the predicted data with the highest probability as the prediction result. Among them, the sum of the 10 probabilities is 1, and the prediction results include the game activity identifier, the predicted number of core computing units, the predicted number of maximum computing units, and the predicted length of the waiting queue. The loss information is determined based on the prediction results and the corresponding labels, and the parameters of the deep neural network are iteratively updated using the loss information to obtain the prediction model.

[0097] After the prediction model is trained, the prediction model is used to dynamically adjust the computing unit of the game activity to achieve the purpose of running the game activity smoothly. It is worth mentioning that when the prediction model cannot fully predict the computing pressure of the game activity, the activity data currently generated by the game activity can be used again to continue training the prediction model to improve the prediction model's ability to predict the computing pressure.

[0098] Based on the same inventive concept, the embodiment of the present invention further provides a data processing device, the basic principle and technical effects of which are the same as those of the above embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the above embodiment.

[0099] See also Figure 5 , Figure 5 The block diagram of a data processing device 200 provided by an embodiment of the present invention is shown. The data processing device 200 includes a processing module 201, a prediction module 202 and a scheduling module 203.

[0100] Processing module 201, used to obtain activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity;

[0101] Prediction module 202, used to input activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units and the length of the waiting queue;

[0102] The scheduling module 203 is used to start the computing units according to the number of core computing units and the maximum number of computing units, and adjust the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store the game data corresponding to the users participating in the game activities; and the computing units are used to schedule the game data in the waiting queue.

[0103] To summarize, the data processing device provided in the embodiment of the present invention uses a prediction model to predict the computing pressure of game activities, and dynamically adjusts the number of computing units participating in the calculation and the length of the waiting queue according to the prediction results, so as to achieve early intervention in the computing pressure, so that the game system can run smoothly, effectively avoid the increase of game data processing delay, and enhance the user's gaming experience.

[0104] Optionally, the computing unit includes a core computing unit and a temporary computing unit; the scheduling module 203 is used to enable the core computing unit according to the number of core computing units; and enable the temporary computing unit according to the difference between the maximum number of computing units and the number of core computing units.

[0105] Optionally, the scheduling module 203 is also used to calculate the product of the maximum number of computing units and a preset ratio when the game data in the waiting queue exceeds the queue high threshold, and use the product to update the maximum number of computing units; based on the difference between the updated maximum number of computing units and the number of core computing units, start temporary computing units, and use the temporary computing units to schedule the game data in the waiting queue.

[0106] Optionally, the scheduling module 203 is also used to start rechecking when the maximum number of computing units is greater than the number of core computing units; during the rechecking, the maximum number of computing units is updated according to the game data in the waiting queue, the queue high threshold, and the queue low threshold; when the updated maximum number of computing units is equal to the number of core computing units, the rechecking is closed.

[0107] Optionally, the scheduling module 203 is specifically used to calculate the product of the maximum number of computing units and a preset ratio when the game data in the waiting queue exceeds the queue high threshold, and use the product to update the maximum number of computing units; when the game data in the waiting queue is lower than the queue low threshold, the maximum number of computing units is set to the number of core computing units.

[0108] Optionally, the processing module 201 is also used to determine training data from the historical activity data of the game activity based on the number of users participating in the game activity, and obtain labels corresponding to the training data; input the training data and the corresponding labels into the deep neural network to obtain prediction results; based on the loss information of the labels and the prediction results, iteratively update the parameters of the deep neural network to obtain a prediction model.

[0109] See also Figure 6 , Figure 6 A block diagram of an electronic device 100 provided in an embodiment of the present invention. The electronic device 100 may be any device having a data processing function, such as a personal computer, a laptop computer, a server, etc. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0110] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0111] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, when the computer program stored in the memory 110 is executed by the processor 120, the data processing method disclosed in the above embodiments can be implemented.

[0112] The communication module 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.

[0113] It should be understood that Figure 6 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown. Figure 6Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0114] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 120, the data processing method disclosed in the above embodiments is implemented.

[0115] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0117] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity; Inputting the activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units, and the length of the waiting queue; Turning on computing units according to the number of core computing units and the maximum number of computing units, and adjusting the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store game data corresponding to users participating in the game activity; The computing unit is used to schedule the game data in the waiting queue.

2. The data processing method according to claim 1, characterized in that: The computing units include core computing units and temporary computing units; and the step of starting computing units according to the number of core computing units and the maximum number of computing units includes: Enable the core computing unit according to the number of the core computing units; The temporary computing unit is enabled according to the difference between the maximum number of computing units and the number of core computing units.

3. The data processing method according to claim 2, characterized in that: After the step of scheduling the game data in the waiting queue by using the computing unit, the method further includes: When the game data in the waiting queue exceeds the queue high threshold, calculating the product of the maximum number of computing units and a preset ratio, and using the product to update the maximum number of computing units; The temporary computing unit is enabled according to the difference between the updated maximum number of computing units and the number of core computing units, and the game data in the waiting queue is scheduled using the temporary computing unit.

4. The data processing method according to claim 1, characterized in that: The method further comprises: When the maximum number of computing units is greater than the number of core computing units, rechecking is started; During the recheck, the maximum number of computing units is updated according to the game data in the waiting queue, the queue high threshold, and the queue low threshold; When the updated maximum number of computing units is equal to the number of core computing units, the recheck is closed.

5. The data processing method according to claim 4, characterized in that: The updating of the maximum number of computing units according to the game data in the waiting queue, the queue high threshold, and the queue low threshold comprises: When the game data in the waiting queue exceeds the queue high threshold, calculating the product of the maximum number of computing units and a preset ratio, and using the product to update the maximum number of computing units; When the game data in the waiting queue is lower than a queue low threshold, the maximum number of computing units is set to the number of core computing units.

6. The data processing method according to claim 1, characterized in that: The prediction model is obtained by: Determine training data from historical activity data of the game activity based on the number of users participating in the game activity, and obtain labels corresponding to the training data; Inputting the training data and corresponding labels into a deep neural network to obtain a prediction result; Based on the labels and the loss information of the prediction results, the parameters of the deep neural network are iteratively updated to obtain the prediction model.

7. A data processing device, characterized in that: The device comprises: A processing module, used to obtain activity data according to the start time of the game activity; the activity data is used to characterize the activity of users participating in the game activity; A prediction module, used for inputting the activity data into a pre-trained prediction model to obtain the number of core computing units, the maximum number of computing units and the length of the waiting queue; A scheduling module is used to start computing units according to the number of core computing units and the maximum number of computing units, and adjust the size of the waiting queue according to the length of the waiting queue; the waiting queue is used to store game data corresponding to users participating in the game activity; and the computing unit is used to schedule the game data in the waiting queue.

8. The data processing device according to claim 7, characterized in that: The computing units include core computing units and temporary computing units; the scheduling module is used to enable the core computing units according to the number of the core computing units; and enable the temporary computing units according to the difference between the maximum number of computing units and the number of core computing units.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the data processing method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Resource allocation method and device, computer readable medium and electronic equipment

    CN113230658A

  • Method, device and equipment for operator scheduling of artificial intelligence model and storage medium

    CN114741172A

  • Game device, game system and game method

    JP2006149663A