Game activity generation method and device, server, server cluster and medium

By using the same random number table and mapping table in the server cluster of MMORPG games, random parameters are calculated and selected activity identifiers are solved, the problem of inconsistent monthly activities is achieved, the randomness and consistency of activities are achieved, and the player experience and configuration efficiency is improved.

CN119792909AActive Publication Date: 2025-04-11BEIJING PIXEL SOFTWARE TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411877741.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the existing MMORPG games, the configuration of monthly activities results in inconsistent monthly activities of each server in the same month, and the configuration of modification activities is cumbersome and error-prone.

Method used

In the server cluster, each server stores the same random number table and mapping table, calculates random parameters through random number seeds and year, and selects the corresponding activity identifier to generate monthly activities to ensure that the activities in the same month are consistent.

Benefits of technology

It realizes that the monthly activities of the same month in different years are random, ensuring that each server has consistent monthly activities in the same month, improving the freshness of the player experience, and simplifying the activity configuration and maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119792909A_ABST
    Figure CN119792909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of games, and provides a game activity generation method and device, a server, a server cluster and a medium. Each server in the server cluster stores the same random number table and mapping table, the random number table comprises a random number seed corresponding to each month, and the mapping table comprises index values corresponding to a plurality of activity identifiers. The method comprises the following steps: acquiring a corresponding initial random number seed from a random number table according to a current month; determining a target random number seed according to the current year and the initial random number seed, and calculating a random parameter, wherein the value range of the random parameter is the same as the range of the index value; taking an index value which is the same as the value of the random parameter as a target index value, and obtaining a corresponding target activity identifier from a mapping table; and generating a game activity based on the target activity identifier and taking the game activity as a monthly activity of the current month. Therefore, the feeling of freshness of players for game activities is improved, and the operation process of configuring and maintaining monthly frequent activities is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a method, device, server, server cluster and medium for generating game activities. Background Art

[0002] In MMORPG (Massively Multiplayer Online Role-Playing Game), game activities are refreshed every month, and this kind of game activity is called monthly activity. There are currently two ways to configure monthly activities in the server: the first is to pre-configure fixed monthly activities for each server every month. However, this method will result in the same game activity being the same in the same month, which will make players lack a sense of freshness. And if the game activity is modified, the configuration needs to be modified manually, which will make the operation cumbersome and prone to errors. The second is to configure multiple monthly activities in each server, and then each server randomly selects one from these multiple monthly activities as the monthly activity for the current month. However, this method cannot guarantee that the monthly activities of each server in the same month are consistent. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a method, device, server, server cluster and medium for generating game activities.

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

[0005] In a first aspect, the present invention provides a method for generating a game activity, which is applied to each server in a server cluster, each of which stores the same random number table and mapping table, wherein the random number table includes a random number seed corresponding to each month, and the mapping table includes index values ​​corresponding to each of a plurality of activity identifiers, and the method for generating a game activity includes:

[0006] According to the current month, obtain the corresponding random number seed from the random number table to obtain an initial random number seed;

[0007] Determine a target random number seed according to the current year and the initial random number seed, and calculate a random parameter according to the target random number seed; the value range of the random parameter is the same as the range of the index value;

[0008] Using the same index value as the value of the random parameter as the target index value, and acquiring the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier;

[0009] A game activity is generated based on the target activity identifier and used as a monthly activity for the current month.

[0010] In an optional implementation, each server stores the same start time in the format of year, month, day, hour, minute, and second; each random number seed is a different reference time in the format of month, day, hour, minute, and second, and the month therein is consistent with the corresponding month;

[0011] The step of determining the target random number seed according to the current year and the initial random number seed comprises:

[0012] Obtaining the initial random number seed to obtain an initial reference time;

[0013] The current year is combined with the initial reference time to obtain the target time; the format of the target time is year, month, day, hour, minute, and second;

[0014] A time difference is calculated according to the target time and the start time, and the time difference is used as the target random number seed.

[0015] In an optional implementation, the step of calculating random parameters according to the target random number seed includes:

[0016] The time difference is divided by the total number of all activity identifiers, and the remainder thereof is used as the value of the random parameter.

[0017] In an optional implementation, the mapping table is a hash table, and the hash table stores the index value corresponding to each activity identifier through a key-value pair, where the index value is the key and the activity identifier is the value;

[0018] The step of acquiring the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier comprises:

[0019] Performing a hash operation based on the target index value to obtain a target hash code;

[0020] According to the target hash code, a corresponding activity identifier is obtained from the hash table to obtain a target activity identifier.

[0021] In an optional implementation, each activity identifier has a corresponding activity content table;

[0022] The step of generating a game activity based on the target activity identifier and using it as the monthly activity of the current month includes:

[0023] Obtaining the activity content table corresponding to the target activity identifier to obtain the target activity content table;

[0024] A game activity is generated according to the target activity content table, and the game activity is used as a monthly activity for the current month.

[0025] In a second aspect, the present invention provides a game activity generating device, which is applied to each server in a server cluster, each of which stores the same random number table and mapping table, wherein the random number table includes a random number seed corresponding to each month, and the mapping table includes index values ​​corresponding to each of a plurality of activity identifiers, and the game activity generating device includes:

[0026] An acquisition module is used to obtain a corresponding random number seed from the random number table according to the current month to obtain an initial random number seed;

[0027] Determine a target random number seed according to the current year and the initial random number seed, and calculate a random parameter according to the target random number seed; the value range of the random parameter is the same as the range of the index value;

[0028] A selection module, configured to use an index value that is the same as the value of the random parameter as a target index value, and obtain a corresponding activity identifier from the mapping table according to the target index value to obtain a target activity identifier;

[0029] A generation module is used to generate a game activity based on the target activity identifier and use it as a monthly activity for the current month.

[0030] In an optional implementation, each server stores the same start time, the format of which is year, month, day, hour, minute, and second; each of the random number seeds is a different reference time, the format of which is month, day, hour, minute, and second, and the month therein is consistent with the corresponding month, and the acquisition module is further used to:

[0031] Obtaining the initial random number seed to obtain an initial reference time;

[0032] The current year is combined with the initial reference time to obtain the target time; the target time is in the format of year, month, day, hour, minute, and second;

[0033] A time difference is calculated according to the target time and the start time, and the time difference is used as the target random number seed.

[0034] In a third aspect, the present invention provides a server, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the game activity generation method described in any one of the aforementioned embodiments is implemented.

[0035] In a fourth aspect, the present invention provides a server cluster, comprising the server in the aforementioned embodiment.

[0036] In a fifth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating a game activity described in any one of the aforementioned embodiments.

[0037] The present invention provides a method, device, server, server cluster and medium for generating game activities. Each server in the server cluster stores the same random number table and mapping table. The random number table includes a random number seed corresponding to each month, and the mapping table includes index values ​​corresponding to multiple activity identifiers. The method includes: first, according to the current month, the corresponding random number seed is obtained from the random number table to obtain an initial random number seed; then, the target random number seed is determined according to the current year and the initial random number seed, and a random parameter is calculated according to the target random number seed, and the value range of the random parameter is the same as the range of the index value; then, the index value that is the same as the value of the random parameter is used as the target index value, and according to the target index value, the corresponding activity identifier is obtained from the mapping table to obtain the target activity identifier; finally, the game activity is generated based on the target activity identifier and used as the monthly regular activity of the current month. Through a simple activity selection method, the monthly regular activities of the same server in the same month in different years are random, and the monthly regular activities of each server in the same month are guaranteed to be consistent. Thereby, the players' sense of freshness for game activities is enhanced, the operation process of configuring and maintaining monthly regular activities is simplified, and the efficiency of generating game activities is improved.

[0038] 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

[0039] 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.

[0040] Figure 1 A block diagram of a server provided by an embodiment of the present invention is shown;

[0041] Figure 2 One of the flowcharts of the method for generating a game activity provided by an embodiment of the present invention is shown;

[0042] Figure 3 The second flowchart of the method for generating a game activity provided by an embodiment of the present invention is shown;

[0043] Figure 4A functional module diagram of a game activity generating device provided by an embodiment of the present invention is shown.

[0044] Icons: 100 - server; 110 - processor; 120 - memory; 130 - communication module; 300 - game activity generating device; 310 - acquisition module; 330 - selection module; 350 - generation module. DETAILED DESCRIPTION

[0045] 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.

[0046] 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.

[0047] 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.

[0048] See also Figure 1 , is a block diagram of a server provided in an embodiment of the present invention. The server 100 includes a processor 110, a memory 120, and a communication module 130, and each component is directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0049] The processor 110 is used to read / write data or programs stored in the memory 120 and execute corresponding functions. It can be a general-purpose processor, including a CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be a DSP digital signal processor, an ASIC application-specific integrated circuit, an FPGA off-the-shelf programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0050] The memory 120 is used to store programs or data. The memory 120 can be a RAM (Random Access Memory), a ROM (Read Only Memory), a PROM (Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electric Erasable Programmable Read-Only Memory), etc.

[0051] The communication module 130 is used to perform signaling or data communications with other devices.

[0052] Understandably, Figure 1 The structure shown is only a schematic diagram of the structure of the server 100. The server 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0053] The above-mentioned server 100 will be used as the execution subject to execute each step in each method provided in the embodiment of the present invention and achieve corresponding technical effects.

[0054] See also Figure 2 , is a flow chart of a method for generating a game activity provided by an embodiment of the present invention.

[0055] Step S202, according to the current month, obtain the corresponding random number seed from the random number table to obtain an initial random number seed.

[0056] Step S204, determining the target random number seed according to the current year and the initial random number seed, and calculating the random parameters according to the target random number seed; the value range of the random parameters is the same as the range of the index value.

[0057] It should be noted that the execution process of each server in the server cluster in the embodiment of the present invention is similar. For the sake of brevity, the embodiment of the present invention is described by taking one server as an example.

[0058] In this embodiment, each server in the server cluster stores the same random number table and mapping table. The random number table includes a random number seed corresponding to each month, which can be understood as an initial value for generating random numbers; the mapping table includes index values ​​corresponding to multiple activity identifiers, that is, each type of activity has a corresponding index value.

[0059] The server can obtain the random number seed corresponding to the current month from its own pre-stored random number table to obtain the initial random number seed. Then the target random number seed is determined based on the current year and the initial random number seed, and the random parameter is calculated based on the target random number seed. The value range of the random parameter is the same as the range of the index value.

[0060] It can be understood that, since the random number table in each server is the same, the initial random number seed obtained by each server in the same month is the same, and then the target random number seed is determined based on the current year and the initial random number seed. In this way, the random number seed of each server in the same month of the same year can be the same, and the random number seeds of the same month in different years can be different.

[0061] Step S206: taking the index value that is the same as the value of the random parameter as the target index value, and obtaining the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier.

[0062] Step S208: Generate a game activity based on the target activity identifier and use it as the monthly activity for the current month.

[0063] In this embodiment, since the range of the random parameter is the same as the range of the index value, the index value that is the same as the value of the random parameter can be used as the target index value. Then, the activity identifier corresponding to the target index value is obtained from the mapping table to obtain the target activity identifier. Then, the game activity is generated based on the target activity identifier and used as the monthly activity of the current month.

[0064] It can be understood that, according to the above method, the random number seeds used by a server in the same month of different years can be different, so the value of the random parameter calculated based on the random number seed is random, and the selected activity identifier is also random, so that the monthly activities in the same month of different years can be random, so as to enhance the players' freshness of game activities. In addition, the random number seeds used by all servers in the same month of the same year can be the same, so the value of the random parameter calculated by each server based on the random number seed is the same, and the selected activity identifier is also the same, so that the monthly activities of all servers in the same month can be guaranteed to be consistent.

[0065] It can be seen that based on the above steps, first, according to the current month, the corresponding random number seed is obtained from the random number table to obtain the initial random number seed; then the target random number seed is determined according to the current year and the initial random number seed, and the random parameter is calculated according to the target random number seed, and the value range of the random parameter is the same as the range of the index value; then the index value that is the same as the value of the random parameter is used as the target index value, and according to the target index value, the corresponding activity identifier is obtained from the mapping table to obtain the target activity identifier; finally, the game activity is generated based on the target activity identifier and used as the monthly activity of the current month. Through a simple activity selection method, the monthly activities of the same server in the same month in different years are random, and the monthly activities of each server in the same month are consistent. Thereby enhancing the players' sense of freshness for game activities, simplifying the operational procedures for configuring and maintaining monthly activities, and improving the efficiency of generating game activities.

[0066] Optionally, for the process of determining the target random number seed according to the current year and the initial random number seed in step S204, the embodiment of the present invention provides a possible implementation method, see Figure 3 .

[0067] Step S204-1, obtain an initial random number seed to obtain an initial reference time.

[0068] Step S204-3, combining the current year with the initial reference time to obtain the target time; the target time is in the format of year, month, day, hour, minute, and second.

[0069] Step S204-5, calculating the time difference according to the target time and the start time, and using the time difference as the target random number seed.

[0070] In this embodiment, each server stores the same start time in the format of year-month-day-hour-minute-second; each random number seed is a different reference time in the format of month-day-hour-minute-second, where the month is consistent with the corresponding month. The start time can be the start timestamp of the server's operating system, such as a Unix system.

[0071] For ease of understanding, the embodiment of the present invention provides an example. For example, the start time stored in each server is 00:00:00 on January 1, 1970. Assume that the current month is January, and the random number seed corresponding to January is 05:05:00 on January 1.

[0072] Get the random number seed corresponding to the current month, get the initial random number seed, that is, get the initial reference time, which is 05:05:00 on January 1st. Then combine the current year, such as 2024, with the initial reference time to get the target time, which is 05:05:00 on January 1st, 2024. Then calculate the time difference between the target time, which is 05:05:00 on January 1st, 2024, and the starting time, which is 00:00:00 on January 1st, 1970, and get a time difference of 1704085500 seconds, and use this time difference as the target random number seed.

[0073] It should be understood that the starting time and the random number seed corresponding to each month, ie, the reference time, can be set according to actual conditions, and the embodiment of the present invention is not limited to this.

[0074] Optionally, for the process of calculating random parameters according to the target random number seed in step S204, the embodiment of the present invention provides a possible implementation method, please continue to refer to Figure 3 .

[0075] Step S204-7, divide the time difference by the total number of all activity identifiers, and use the remainder as the value of the random parameter.

[0076] In this embodiment, the total number of activity identifiers and the value range of the index value have the following relationship: if the total number of activity identifiers is m, then the value range of the index value is a positive integer in [0, m-1].

[0077] For ease of understanding, the above example is continued for illustration. For example, assuming that there are 9 types of activities, that is, there are 9 activity identifiers, then the value range of the index value is a positive integer in [0,8], namely 0, 1, 2, 3, 4, 5, 6, 7 and 8. Based on the target random number seed obtained above, i.e. 1704085500, divided by the total number of all activity identifiers, i.e. 9, and taking the remainder of the two as the value of the random parameter, the value of the random parameter is 3. Then the index value 3 is used as the target index value, and the target activity identifier is selected based on the target index value. It should be understood that the total number of activity identifiers can be set according to actual conditions, and the embodiments of the present invention do not limit this.

[0078] It can be understood that the embodiment of the present invention sets the value range of the index value by the total number of activity identifiers, and obtains the random parameter by performing a modulo operation on the target random number seed and the total number of activity identifiers. Thus, the value range of the random parameter is cleverly made the same as the range of the index value, and the activity identifier can be selected based on the value of the random parameter. That is, the random selection of activities is achieved in a simple way, the generation efficiency of game activities is improved, and the computing resources of the server are saved.

[0079] Optionally, for the process of obtaining the target activity identifier from the mapping table according to the target index value in step S206, an embodiment of the present invention provides an implementation method.

[0080] Step S206 - 1 , performing a hash operation based on the target index value to obtain a target hash code.

[0081] Step S206 - 3 , according to the target hash code, obtain the corresponding activity identifier from the hash table to obtain the target activity identifier.

[0082] In this embodiment, the mapping table may be a hash table, namely HashMap, which stores the index value corresponding to each activity identifier in a key-value pair, namely Key-Value, wherein the index value is the key, namely Key, and the activity identifier is the value, namely Value.

[0083] For ease of understanding, we continue to use the above example for explanation. For example, based on the target index value 3 obtained above, a hash operation is performed on the target index value 3 to obtain a target hash code. The target hash code represents the position of the key-value pair whose key is the target index value 3 in the hash table. Based on the target hash code, the key-value pair can be taken out from the corresponding position in the hash table, and the value in the key-value pair, i.e., Value, can be obtained to obtain the activity identifier corresponding to the target index value 3, i.e., the target activity identifier.

[0084] It can be understood that the embodiment of the present invention records the mapping relationship between the activity identifier and the index value through a hash table, which can achieve fast access, thereby improving the generation efficiency of the game activity.

[0085] Optionally, for step S208, an embodiment of the present invention provides a possible implementation method.

[0086] Step S208-1, obtaining the activity content table corresponding to the target activity identifier, and obtaining the target activity content table.

[0087] Step S208-3, generating a game activity according to the target activity content table, and taking the game activity as the monthly regular activity of the current month.

[0088] It is understandable that each activity identifier has a corresponding activity content table, which includes the activity name for display in the game interface and announcement, activity description such as participation method, participation conditions, etc., activity time including start time and end time, activity rewards such as in-game currency, props, experience points, titles, etc. It should be understood that the specific information in the activity content table can be set according to actual conditions, and the embodiment of the present invention is not limited to this.

[0089] In this embodiment, based on the obtained target activity identifier, the corresponding activity content table can be obtained to obtain the target activity content table. Then, a game activity is generated according to the target activity content table, and the game activity is used as the monthly regular activity of the current month.

[0090] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a game activity generation device is provided below. Figure 4 , is a functional module diagram of a game activity generating device 300 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the game activity generating device 300 provided in this embodiment are the same as those of the above embodiment. For the sake of brief description, for matters not mentioned in this embodiment, reference may be made to the corresponding contents in the above embodiment. The game activity generating device 300 includes:

[0091] The acquisition module 310 is used to obtain the corresponding random number seed from the random number table according to the current month to obtain the initial random number seed; determine the target random number seed according to the current year and the initial random number seed, and calculate the random parameter according to the target random number seed; the value range of the random parameter is the same as the range of the index value.

[0092] A selection module 330 is used to use the index value that is the same as the value of the random parameter as the target index value, and obtain the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier;

[0093] The generating module 350 is used to generate a game activity based on the target activity identifier and use it as the monthly activity of the current month.

[0094] Optionally, the acquisition module 310 is also used to: obtain an initial random number seed to obtain an initial reference time; combine the current year with the initial reference time to obtain a target time; the format of the target time is year, month, day, hour, minute, and second; calculate the time difference based on the target time and the start time, and use the time difference as the target random number seed.

[0095] Optionally, the acquisition module 310 is further configured to: divide the time difference by the total number of all activity identifiers, and use the remainder thereof as the value of the random parameter.

[0096] Optionally, the selection module 330 is further used to: perform a hash operation based on the target index value to obtain a target hash code; and obtain a corresponding activity identifier from a hash table according to the target hash code to obtain a target activity identifier.

[0097] Optionally, the generating module 350 is further used to: obtain an activity content table corresponding to the target activity identifier to obtain the target activity content table; generate a game activity according to the target activity content table, and use the game activity as a monthly regular activity for the current month.

[0098] The embodiment of the present invention further provides a server, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the game activity generation method disclosed in the embodiment of the present invention is implemented.

[0099] The embodiment of the present invention further provides a server cluster, which includes the server provided by the embodiment of the present invention.

[0100] The embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the game activity generation method disclosed in the embodiment of the present invention is implemented.

[0101] 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.

[0102] 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.

[0103] 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.

[0104] 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 method for generating a game activity, characterized in that: Applied to each server in the server cluster, each server stores the same random number table and mapping table, the random number table includes a random number seed corresponding to each month, the mapping table includes index values ​​corresponding to multiple activity identifiers, and the game activity generation method includes: According to the current month, obtain the corresponding random number seed from the random number table to obtain an initial random number seed; Determine a target random number seed according to the current year and the initial random number seed, and calculate a random parameter according to the target random number seed; the value range of the random parameter is the same as the range of the index value; Using the same index value as the value of the random parameter as the target index value, and acquiring the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier; A game activity is generated based on the target activity identifier and used as a monthly activity for the current month.

2. The game activity generation method according to claim 1, characterized in that: Each server stores the same start time, the format of which is year, month, day, hour, minute, and second; each random number seed is a different reference time, the format of which is month, day, hour, minute, and second, and the month is consistent with the corresponding month; The step of determining the target random number seed according to the current year and the initial random number seed comprises: Obtaining the initial random number seed to obtain an initial reference time; The current year is combined with the initial reference time to obtain the target time; the format of the target time is year, month, day, hour, minute, and second; A time difference is calculated according to the target time and the start time, and the time difference is used as the target random number seed.

3. The game activity generation method according to claim 2, characterized in that: The step of calculating random parameters according to the target random number seed comprises: The time difference is divided by the total number of all activity identifiers, and the remainder thereof is used as the value of the random parameter.

4. The method for generating game activities according to claim 1, characterized in that: The mapping table is a hash table, and the hash table stores the index value corresponding to each activity identifier through a key-value pair, where the index value is the key and the activity identifier is the value; The step of acquiring the corresponding activity identifier from the mapping table according to the target index value to obtain the target activity identifier comprises: Performing a hash operation based on the target index value to obtain a target hash code; According to the target hash code, a corresponding activity identifier is obtained from the hash table to obtain a target activity identifier.

5. The method for generating game activities according to claim 1, characterized in that: Each activity logo has a corresponding activity content table; The step of generating a game activity based on the target activity identifier and using it as the monthly activity of the current month includes: Obtaining the activity content table corresponding to the target activity identifier to obtain the target activity content table; A game activity is generated according to the target activity content table, and the game activity is used as a monthly activity for the current month.

6. A game activity generating device, characterized in that: Applied to each server in the server cluster, each of the servers stores the same random number table and mapping table, the random number table includes a random number seed corresponding to each month, the mapping table includes index values ​​corresponding to multiple activity identifiers, and the game activity generating device includes: An acquisition module is used to obtain a corresponding random number seed from the random number table according to the current month to obtain an initial random number seed; Determine a target random number seed according to the current year and the initial random number seed, and calculate a random parameter according to the target random number seed; the value range of the random parameter is the same as the range of the index value; A selection module, configured to use an index value that is the same as the value of the random parameter as a target index value, and obtain a corresponding activity identifier from the mapping table according to the target index value to obtain a target activity identifier; A generation module is used to generate a game activity based on the target activity identifier and use it as a monthly activity for the current month.

7. The game activity generating device according to claim 6, characterized in that: Each server stores the same start time, the format of which is year, month, day, hour, minute, and second; each random number seed is a different reference time, the format of which is month, day, hour, minute, and second, and the month is consistent with the corresponding month, and the acquisition module is also used for: Obtaining the initial random number seed to obtain an initial reference time; The current year is combined with the initial reference time to obtain the target time; the format of the target time is year, month, day, hour, minute, and second; A time difference is calculated according to the target time and the start time, and the time difference is used as the target random number seed.

8. A server, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method for generating a game activity according to any one of claims 1 to 5 is implemented.

9. A server cluster, characterized in that: Comprising the server as claimed in claim 8.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the game activity generation method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Game configuration table reading method and device, storage medium and electronic equipment

    CN112685413A

  • Serial number acquisition method and device, server and storage medium

    CN114282968A

  • Method and system for determining random result in game, terminal equipment and server

    CN114917591A

  • Virtual activity starting method and device, equipment and storage medium

    CN116943145A