Target event execution method and device, storage medium and electronic device

By using the inverse function of random number generation and cumulative probability distribution function in the target game application to determine the resource configuration value, the problem of complex and inefficient event resource allocation in the prior art is solved, and more efficient event execution is achieved.

CN114870398BActive Publication Date: 2025-05-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110163430.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-05
Publication Date
2025-05-13
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

In the prior art, the resource allocation method of events is relatively complex and not comprehensive enough, resulting in low event execution efficiency.

Method used

By obtaining the target operation in the target game application, a random number generator is used to generate a first random number, and the target value interval in which it is located is determined in a plurality of value intervals. Based on the preset minimum, maximum and expected values, the inverse function of the cumulative probability distribution function is determined, thereby determining the second random number and configuring the resource of the random number for the target event.

Benefits of technology

It has achieved the optimization of resource allocation, improved event execution efficiency, and solved the problem of complex and incomplete resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114870398B_ABST
    Figure CN114870398B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for executing a target event, a storage medium and an electronic device. The method comprises: obtaining a target operation in a target game application, generating a first random number using a random number generator in response to the target operation, determining a target value interval in which the first random number is located in multiple value intervals, determining a second random number according to a target piecewise function corresponding to the target value interval in multiple piecewise functions and the first random number, configuring a target resource with a number equal to the second random number for the target event in the target game application, and executing the target event. The present invention solves the technical problems in the related art that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method and device for executing a target event, a storage medium and an electronic device. Background Art

[0002] In the current related technologies, during the execution of an event, the solutions for resource configuration required for the event are generally complex and difficult to solve, or the maintenance cost is extremely high.

[0003] For example, taking game events as an example, game design is a complex systematic task, and game planners often need to configure random values ​​for game elements to provide feedback to users on their gameplay.

[0004] The design of random values ​​for various game elements is very complex, and needs to take into account the difficulty of the user in the game, the psychology of comparing values ​​with others, vanity, frustration, repetition rate, etc. For some randomly generated values, planners need to repeatedly consider the above factors and adjust the balance between game elements.

[0005] In the actual development process, common technical solutions are generally implemented by planning table matching or binomial distribution. The random value fitting effect obtained by binomial distribution is poor, and a large number of sampling processes are required to obtain random numbers that meet the requirements. The error is large for random values ​​with low probabilities. The planning table matching method requires planners to repeatedly calculate various values ​​and configure very complex tables to produce random values. When many tables need to be configured, the work cost increases without limit, resulting in low efficiency.

[0006] Therefore, there are technical problems in the current related technologies that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0007] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0008] The embodiments of the present invention provide a method and device for executing a target event, a storage medium and an electronic device, so as to at least solve the technical problems existing in the related art that the resource configuration mode of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0009] According to one aspect of an embodiment of the present invention, a method for executing a target event is provided, comprising: obtaining a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for the target event; in response to the target operation, generating a first random number using a random number generator, wherein the first random number is between [0,1]; determining a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals where input values ​​of an inverse function of a target cumulative probability distribution function are located, the inverse function comprising multiple piecewise functions, each of the multiple value intervals corresponding to the multiple piecewise functions. A piecewise function in a function, an inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value and expected value of a random number, wherein the minimum value, the maximum value and the expected value are respectively the minimum value, the maximum value and the expected value of the random number allowed to be output by the inverse function; a second random number is determined according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value; in the target game application, a target resource with a quantity of the second random number is configured for the target event, and the target event is executed.

[0010] According to another aspect of an embodiment of the present invention, there is also provided a device for executing a target event, including:

[0011] An acquisition module, used for acquiring a target operation in a target game application, wherein the target operation is used to trigger random configuration of a target resource for a target event;

[0012] A generating module, configured to generate a first random number using a random number generator in response to the target operation, wherein the first random number is between [0, 1];

[0013] A first determination module is used to determine a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals where input values ​​of an inverse function of a target cumulative probability distribution function are located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of a random number, wherein the minimum value, the maximum value, and the expected value are respectively the minimum value, the maximum value, and the expected value of a random number allowed to be output by the inverse function;

[0014] A second determination module is used to determine a second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value;

[0015] A configuration module is used to configure a number of target resources equal to the second random number for the target event in the target game application, and execute the target event.

[0016] Optionally, the device is also used to: obtain the minimum value, the maximum value and the expected value of the preset random number; and determine the inverse function of the target cumulative probability distribution function based on the minimum value, the maximum value and the expected value.

[0017] Optionally, the device is used to determine the inverse function of the target cumulative probability distribution function according to the minimum value, the maximum value and the expected value in the following manner: determine the inflection point value of the target inflection point according to the expected value and a preset target coefficient, wherein the expected value < the inflection point value < the maximum value; determine a first number and a second number according to the minimum value, the maximum value, the expected value and the inflection point value, wherein the first number indicates the number of times a random number determined by the inverse function is equal to the expected value, and the second number indicates the number of times a random number determined by the inverse function is equal to the inflection point value; determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value.

[0018] Optionally, the device is used to determine the first number and the second number according to the minimum value, the maximum value, the expected value and the inflection point value in the following manner: determine the first number h1 and the second number h2 by the following formula:

[0019]

[0020]

[0021] Among them, b=the expected value-the minimum value, a=k·b, k represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, 1<k<2.

[0022] Optionally, the device is used to determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value in the following manner: determine the multiple value intervals according to the expected value and the inflection point value; determine the corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value and the expected value to obtain the inverse function.

[0023] Optionally, the apparatus is configured to determine a corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value, and the expected value in the following manner to obtain the inverse function:

[0024] The inverse function is determined by the following formula:

[0025]

[0026]

[0027]

[0028] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0029] Optionally, the device is also used for:

[0030] Obtaining an input first parameter adjustment instruction, wherein the first parameter adjustment instruction is used to instruct to adjust the value of k from a first value to a second value;

[0031] In response to the first parameter adjustment instruction, the value of k is adjusted from the first value to the second value, wherein the k after the updated value is used to redetermine the inflection point value.

[0032] Optionally, the device is used to determine the second random number based on a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number in the following manner: obtaining the target piecewise function corresponding to the target value interval from the multiple piecewise functions; and determining the second random number based on the output value of the target piecewise function when the first random number is used as the input value of the target piecewise function.

[0033] Optionally, the apparatus is configured to determine the second random number according to an output value of the target piecewise function when the first random number is used as an input value of the target piecewise function in the following manner:

[0034] The second random number is determined by the following formula:

[0035]

[0036]

[0037]

[0038] Wherein, x represents the output value, y represents the first random number, and the second random number = x + the minimum value;

[0039] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, 1<k<2, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0040] Optionally, the device is used to configure target resources with the second random number for the target event in the target game application in the following manner: when the target event is used to configure resources for a target account, the target resources with the second random number are configured to the target account, or to a virtual character controlled by the target account in the target game application; or when the target event is used to generate a virtual object in the target game application, the number of the virtual objects serving as the target resources is configured to the second random number; when the target event is used to set a task to be performed in the target game application, the attribute value of the task attribute of the target resource in the task to be performed is configured to the second random number.

[0041] Optionally, the apparatus is configured to generate a first random number using a random number generator in the following manner: using the random number generator to generate the first random number, wherein the probability of the random number generator generating different random numbers is the same.

[0042] Optionally, the device is also used to: obtain an input second parameter adjustment instruction, wherein the second parameter adjustment instruction is used to update at least one of the minimum value, the maximum value and the expected value; in response to the second parameter adjustment instruction, update at least one of the minimum value, the maximum value and the expected value, wherein the updated at least one of the minimum value, the maximum value and the expected value is used to redetermine the inverse function.

[0043] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for executing the target event when running.

[0044] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for executing the target event through the computer program.

[0045] In an embodiment of the present invention, a target operation is obtained in a target game application, and in response to the target operation, a first random number is generated using a random number generator, a target value interval in which the first random number is located is determined in multiple value intervals, a second random number is determined according to a target piecewise function corresponding to the target value interval in multiple piecewise functions and the first random number, a target resource with a quantity of the second random number is configured for a target event in the target game application, and the target event is executed. By presetting the above-mentioned minimum value, maximum value and expected value to obtain a cumulative probability distribution function, and then based on the inverse function of the cumulative probability distribution function, the above-mentioned second random number is obtained, and the second random number is configured for the target event. Then, the target event can be effectively executed and realized, and the purpose of configuring the second random number resource for the target event is achieved, thereby realizing the technical effect of optimizing the resource configuration method and improving the event execution efficiency, thereby solving the technical problems existing in the related art that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0047] Figure 1 is a schematic diagram of an application environment of an optional method for executing a target event according to an embodiment of the present invention;

[0048] Figure 2 is a flow chart of an optional method for executing a target event according to an embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of an optional method for executing a target event according to an embodiment of the present invention;

[0050] Figure 4 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0051] Figure 5 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0052] Figure 6 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0053] Figure 7 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0054] Figure 8 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0055] Fig. 9 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0056] Fig.10 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention;

[0057] Fig.11 is a schematic structural diagram of an optional target event execution device according to an embodiment of the present invention;

[0058] Fig.12 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0060] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0061] First, some nouns or terms that appear in the process of describing the embodiments of this application are applicable to the following explanations:

[0062] Maximum (max) / Minimum (min): Refers to the random numerical range given by the planner. The maximum value max is the maximum value of the random range, and the minimum value min refers to the minimum value of the random range.

[0063] Expectation: Expectation is a concept in probability theory and a mathematical characteristic. Expectation is the theoretically calculated average value of all samples based on the probability distribution model before sampling statistics.

[0064] Mean: Mean is a concept in statistics and a statistic. Sampling statistics are performed on the observed samples, and it is the average value of the samples statistically obtained based on the actual results after the experiment.

[0065] Mode: Refers to the value with an obvious concentration trend point in the statistical distribution, representing the general level of the numbers and also the value that appears most frequently in a set of data.

[0066] Long-tail part: Since the probability distribution呈现出山峰形分布 (shows a mountain-shaped distribution), generally refers to the range between "expectation and maximum value", or "expectation and minimum value", where relatively small probabilities close to 0 may continuously appear, looking like a long tail.

[0067] Cumulative Distribution Function (CDF): The cumulative distribution function, abbreviated as the distribution function, is a mathematical representation that describes the distribution law of the values taken by a random variable. For any real number x, the probability of the event [X < x] is of course a function of x. Let F(x) = P(X < x), obviously F(-∞) = 0, F(+∞) = 1, and F(x) is called the distribution function of the random variable X. Therefore, the distribution function F(x) completely determines the probability of the event [a ≤ X ≤ b], or the distribution function F(x) completely describes the statistical characteristics of the random variable X.

[0068] Probability Density Function (PDF): The probability density function of a continuous random variable is a function that describes the possibility of the output value of the random variable near a certain determined value point. The probability that the value of the random variable falls within a certain region is the integral of the probability density function over that region.

[0069] The present invention will be described below in conjunction with the embodiments:

[0070] According to one aspect of an embodiment of the present invention, a method for executing a target event is provided. Optionally, in this embodiment, the method for executing a target event can be applied to: Figure 1 In the hardware environment composed of the server 101 and the user terminal 103 shown in FIG. Figure 1 As shown, the server 101 is connected to the terminal 103 through a network, and can be used to provide services for the user terminal or the client installed on the user terminal. The client can be a video client, an instant messaging client, a browser client, an education client, a game client, etc. A database 105 can be set on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above network can include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The user terminal 103 can be a terminal configured with a media information application and / or a target game application, and can include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a handheld computer, a MID (Mobile Internet Devices, mobile Internet devices), a PAD, a desktop computer, a smart TV and other computer devices. The above server can be a single server, or a server cluster composed of multiple servers, or a cloud server, and can include but is not limited to a router or a gateway. The game application 107 using the above target event execution method is displayed through the user terminal 103.

[0071] Combination Figure 1 As shown, the above target event execution method can be implemented in the user terminal 103 through the following steps:

[0072] S1, the game application 107 is started in the user terminal 103, and the server 101 obtains a target operation in the game application 107, wherein the target operation is used to trigger random configuration of target resources for a target event;

[0073] S2, the server 101 generates a first random number using a random number generator in response to the target operation, wherein the first random number is between [0, 1];

[0074] S3, the server 101 determines a target value interval in which the first random number is located in a plurality of value intervals, wherein the plurality of value intervals are value intervals in which the input value of the inverse function of the target cumulative probability distribution function is located, the inverse function includes a plurality of piecewise functions, each of the plurality of value intervals corresponds to a piecewise function in the plurality of piecewise functions, the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value and expected value of the random number, the minimum value, maximum value and expected value are respectively the minimum value, maximum value and expected value of the random number allowed to be output by the inverse function;

[0075] S4, the server 101 determines a second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value;

[0076] S5, the server 101 configures a target resource with a second random number for the target event in the target game application 107, and executes the target event.

[0077] Optionally, in this embodiment, the above target event execution method may also be performed by, including but not limited to, being used by the user terminal 103 , or being interactively executed by the user terminal 103 and the server 101 .

[0078] Optionally, in this embodiment, the execution method of the target event may include but is not limited to asynchronous use by the user terminal 103 and the server 101 .

[0079] The above is only an example and is not specifically limited in this embodiment.

[0080] Optionally, as an optional implementation, as Figure 2 As shown, the execution method of the above target event includes:

[0081] S202, obtaining a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for a target event;

[0082] Optionally, in this embodiment, the target game application may be a multiplayer online tactical competitive game (Multiplayer Online Battle Arena, referred to as MOBA) application, or may also be a single-player game (Single-Player Game, referred to as SPG) application. The types of the game applications may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications. The above is only an example, and this embodiment does not impose any limitation on this.

[0083] Optionally, in this embodiment, the target operation may include but is not limited to pre-configuration according to the target event, for example, it may include but is not limited to touch interaction operations, specifically, it may include but is not limited to click, slide, light pressure, heavy pressure, release, long press and other touch interaction operations, and may also include but is not limited to target operations obtained by recognizing received voice information and action information. For example, in the application scenario of grabbing red envelopes, when the voice information of "stop" is received, the target resource is randomly configured for the target event. The above is only an example, and this embodiment does not make any specific limitations.

[0084] Optionally, in this embodiment, the above-mentioned target resources may include but are not limited to resources configured for the account, such as "gold coins", "diamonds", "points", "game time", etc., and may also include but are not limited to resources configured for the virtual character controlled by the account in the target game application, such as the virtual skill enhancement value of the virtual character, the number of times the virtual character is used, etc., and may also include but are not limited to the number of virtual objects, the number of virtual resources, the number of virtual props, etc. when the target event is used to generate virtual objects in the target game application. It may also include but is not limited to the case where the target event is used to set a task to be performed in the target game application, and the attribute value of the task attribute in the task to be performed is used as the target resource. For example, when the task to be performed is to roast a fire, the temperature of the flame or the temperature of the virtual character is used as the above-mentioned target resource; when the task to be performed is to jump over an obstacle, the size and shape of the obstacle are used as the above-mentioned target resources, etc.

[0085] Figure 3 is a schematic diagram of an optional method for executing a target event according to an embodiment of the present invention. Figure 3 As shown, the following steps may be included but not limited to:

[0086] S1, obtain a group of accounts in the target game application (corresponding to Figure 3 )

[0087] S2, when the target event is represented by the random configuration of "gold coins" for the group of accounts, obtaining a target operation for configuring gold coins in the target game application;

[0088] S3, in response to the above target operation, using a random generator to generate a first random number;

[0089] S4, determining a target value interval in which the first random number is located among multiple value intervals;

[0090] S5, determining a second random number (corresponding to Figure 3 The “obtained coins” shown in ), wherein the coins obtained by each player are obtained by inputting the inverse function of the cumulative probability distribution function according to different first random numbers;

[0091] S6. In the target game application, a second random number of gold coins is configured for the target event, wherein the above group of accounts may include a player account whose obtained gold coin amount is 1 (corresponding to the aforementioned minimum value, that is, the unlucky player is the player whose obtained gold coin amount is close to the minimum value), a player account whose obtained gold coin amount is 100 (corresponding to the aforementioned maximum value, that is, the lucky player is the player whose obtained gold coin amount is close to the maximum value) and a player account whose obtained gold coin amount is close to 50 (corresponding to the aforementioned expected value).

[0092] The above is only an example, and this embodiment does not make any specific limitation.

[0093] S204, in response to the target operation, using a random number generator to generate a first random number, wherein the first random number is between [0, 1];

[0094] Optionally, in this embodiment, the first random number generated by the above-mentioned random number generator may include but is not limited to a uniformly distributed random number, and may also include but is not limited to a binomial distributed random number, a Poisson distributed random number, and a normally distributed random number.

[0095] S206, determining a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals in which the input value of the inverse function of the target cumulative probability distribution function is located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of the random number, and the minimum value, maximum value, and expected value are respectively the minimum value, maximum value, and expected value of the random number allowed to be output by the inverse function;

[0096] Optionally, in this embodiment, the multiple value intervals may correspond to one of the multiple piecewise functions, and the multiple value intervals may include but are not limited to the following:

[0097] For example, Figure 4 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention. Figure 4 As shown, the x-axis is used to represent the second random number, the y-axis is used to represent the number of times x appears, min represents the minimum value, max represents the maximum value, and expectation is used to represent the expected value. The multiple value intervals may include but are not limited to the min to exprtctation interval and the exprtctation to max interval.

[0098] In addition, for example, Figure 5 This is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention. The minimum value min and the maximum value max are preset. Planning often requires that the expectation is not necessarily at (min+max) / 2, and planning can conveniently control the expectation to be left or right. Figure 5 As shown, Figure 5 The broken line 502 shown in the figure is to ensure that the expectation and the mode coincide. The point where the broken line 502 is projected on the x-axis is b. The above multiple value intervals may include but are not limited to the min to expression interval, the expression to b interval and the b to max interval.

[0099] The above is only an example, and this embodiment does not make any specific limitation.

[0100] S208, determining a second random number according to a target piecewise function corresponding to the target value interval among the plurality of piecewise functions and the first random number, wherein a minimum value ≤ the second random number ≤ the maximum value;

[0101] For example, Figure 6is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention, such as Figure 6 As shown, the second random number represented by the long tail part 602 is a continuous large number of parts with very small probabilities but not zero, so as to ensure that the second random number of this part can be generated with certain probability. In addition, in some business scenarios, it is required to calculate the value of the long tail part in real time. Specifically, the probability of the rarest card being drawn in the "drawing card" game needs to be announced, and the long tail part can be used to indicate the probability of the rarest card being drawn. The preciousness of the card in the drawing card game can include but is not limited to being configured as a corresponding value. Then, through the probability indicated by the long tail part 602, the technical effect of enhancing user stickiness, enriching the gameplay of the game application, and improving the execution efficiency of the target event is achieved.

[0102] It should be noted that the number of occurrences of the second random number x reaches the maximum at the expected value expectation given by the game planner, that is, the number of times x=expectation is reached is the largest, and the expected expectation coincides with the mode mode; the overall distribution is peak-shaped, that is, high in the middle and low on both sides (the probability of output at expectation is the highest, and the probability of output on both sides is the lowest).

[0103] S210, configuring a target resource having a second random number as a number for a target event in a target game application, and executing the target event.

[0104] Optionally, in this embodiment, configuring a second random number of target resources for the target event in the target game application, and executing the target event may include but is not limited to displaying corresponding content in the target game application to indicate that the target event has been executed.

[0105] Through this embodiment, a target operation is obtained in a target game application, and in response to the target operation, a first random number is generated using a random number generator, a target value interval in which the first random number is located is determined in multiple value intervals, and a second random number is determined according to a target piecewise function corresponding to the target value interval in multiple piecewise functions and the first random number. In the target game application, a target resource with a quantity of the second random number is configured for a target event, and the target event is executed. By presetting the above-mentioned minimum value, maximum value and expected value to obtain a cumulative probability distribution function, and then based on the inverse function of the cumulative probability distribution function, the above-mentioned second random number is obtained, and the second random number is configured for the target event. Then, the target event can be effectively executed and realized, and the purpose of configuring the second random number resource for the target event is achieved, thereby realizing the technical effect of optimizing the resource configuration method and improving the event execution efficiency, thereby solving the technical problems existing in the related art that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0106] As an optional solution, the method further includes:

[0107] Obtaining the minimum value, the maximum value, and the expected value of the preset random number;

[0108] An inverse function of the target cumulative probability distribution function is determined according to the minimum value, the maximum value and the expected value.

[0109] Optionally, in this embodiment, the inverse function of the target cumulative probability distribution function determined based on the minimum value, maximum value and expected value may include but is not limited to determining the target cumulative probability distribution function based on the minimum value, maximum value and expected value preset by the system or server, and then determining the inverse function of the target cumulative probability distribution function.

[0110] Specifically, Figure 7 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention. The target cumulative probability distribution function may include but is not limited to the following: Figure 7 As shown, the target cumulative probability distribution function is composed of multiple piecewise functions, and the multiple piecewise functions may include but are not limited to probability density functions y pdf , then the multi-segment distribution function included in the above target cumulative probability distribution function is Figure 7 The function composed of formula ①, formula ② and formula ③ shown in the figure.

[0111] The above is only an example, and this embodiment does not make any specific limitation.

[0112] Then the above target cumulative probability distribution function is:

[0113]

[0114] Among them, b = the expected value - the minimum value, a represents the inflection point value, and p = the maximum value - the minimum value.

[0115] In other words, the input of the above-mentioned target cumulative probability distribution function is a value between the minimum value and the maximum value, and the output is the probability value corresponding to the value. Therefore, the input of the inverse function of the above-mentioned target cumulative probability distribution function is the probability value (corresponding to the aforementioned first random number), and the output is the value between the minimum value and the maximum value corresponding to the probability value.

[0116] Through this embodiment, the minimum value, maximum value and expected value of the preset random number are obtained, and the inverse function of the target cumulative probability distribution function is determined according to the minimum value, maximum value and expected value. The staff pre-sets the minimum value, maximum value and expected value of the random number according to different business scenarios to configure the second random number for the target event, and then, the target event can be effectively executed, achieving the purpose of configuring the second random number resources for the target event, thereby realizing the technical effect of optimizing resource configuration and improving event execution efficiency, and then solving the technical problems existing in the related technology that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0117] As an optional solution, determining the inverse function of the target cumulative probability distribution function according to the minimum value, the maximum value and the expected value includes:

[0118] Determine the inflection point value of the target inflection point according to the expected value and the preset target coefficient, wherein the expected value < the inflection point value < the maximum value;

[0119] Determine a first number and a second number according to the minimum value, the maximum value, the expected value and the inflection point value, wherein the first number indicates the number of times the random number determined by the inverse function is equal to the expected value, and the second number indicates the number of times the random number determined by the inverse function is equal to the inflection point value;

[0120] An inverse function of the target cumulative probability distribution function is determined according to the first number of times, the second number of times, and the expected value.

[0121] Optionally, in this embodiment, the above-mentioned target coefficient is flexibly set by the staff according to different business scenarios, and is used to determine the functional relationship between the above-mentioned expected value and the inflection point value.

[0122] For example, Figure 7 For example, when 0<h2 Figure 7 The target cumulative probability distribution function is shown.

[0123] ​Through this embodiment, the inflection point value of the target inflection point is determined according to the expected value and the preset target coefficient, the first number and the second number are determined according to the minimum value, the maximum value, the expected value and the inflection point value, and the inverse function of the target cumulative probability distribution function is determined according to the first number, the second number and the expected value. The staff pre-sets the minimum value, the maximum value and the expected value of the random number and the target coefficient according to different business scenarios to configure the second random number for the target event, and then, the target event can be effectively executed, achieving the purpose of configuring the second random number resources for the target event, thereby optimizing the resource configuration method and improving the event execution efficiency. The technical effect, thereby solving the technical problems existing in the related technology that the resource configuration method of events is relatively complex and not comprehensive enough and the event execution efficiency is too low.

[0124] As an optional solution, determining the first number and the second number according to the minimum value, the maximum value, the expected value, and the inflection point value includes:

[0125] The first number h1 and the second number h2 are determined by the following formula:

[0126]

[0127]

[0128] Among them, b=the expected value-the minimum value, a=k·b, k represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, 1<k<2.

[0129] Optionally, in this embodiment, Figure 8 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention, such as Figure 8 As shown in the above formula The corresponding geometric meaning is the first and second times mentioned above. By inputting the minimum value, maximum value, expected value and inflection point value, h1 and h2 can be calculated.

[0130] Through this embodiment, the above formula is used to determine the above-mentioned first number and second number, and then, the inverse function of the above-mentioned target cumulative probability distribution function can be calculated, thereby achieving the technical effect of improving the event execution efficiency, and thus solving the technical problems existing in the related technology that the resource allocation method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0131] As an optional solution, determining the inverse function of the target cumulative probability distribution function according to the first number, the second number, and the expected value includes:

[0132] Determining the multiple value intervals according to the expected value and the inflection point value;

[0133] According to the first number, the second number, the minimum value, the maximum value and the expected value, a corresponding piecewise function is determined on each value interval in the multiple value intervals to obtain the inverse function.

[0134] Optionally, in this embodiment, the determination of multiple value intervals based on expected values ​​and inflection point values ​​may include but is not limited to determining the dividing points of the multiple value intervals through predetermined expected values ​​and inflection point values ​​to obtain the multiple value intervals.

[0135] Optionally, in this embodiment, the corresponding piecewise function is determined on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value and the expected value, and the inverse function can be determined including but not limited to by the following formula.

[0136] For example:

[0137]

[0138]

[0139]

[0140] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0141] Through this embodiment, a plurality of value intervals are determined according to expected values ​​and inflection point values, and a corresponding piecewise function is determined on each value interval in the plurality of value intervals according to the first number, the second number, the minimum value, the maximum value and the expected value to obtain an inverse function, so as to obtain the inverse function of the above-mentioned target cumulative probability distribution function, thereby achieving the technical effect of improving the event execution efficiency, and further solving the technical problems existing in the related technology that the resource allocation method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0142] As an optional solution, determining a corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value, and the expected value to obtain the inverse function includes:

[0143] The inverse function is determined by the following formula:

[0144]

[0145]

[0146]

[0147] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0148] Optionally, in this embodiment, Fig. 9 is a schematic diagram of another optional method for executing a target event according to an embodiment of the present invention, such as Fig. 9 As shown, taking the above p = 100, b = 40, a = 60 as an example, the above CDF (a) = 0.8667, CDF (b) = 0.5333, then the above inverse function x = CDF -1 (y) Fig. 9 Shown as shaded area.

[0149] The above is only an example, and this embodiment does not make any specific limitation.

[0150] Through this embodiment, the above formula is used to determine the inverse function of the above-mentioned target cumulative probability distribution function, thereby achieving the technical effect of improving the event execution efficiency, thereby solving the technical problems existing in the related technology that the resource allocation method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0151] As an optional scheme, the method also includes: obtaining an input first parameter adjustment instruction, wherein the first parameter adjustment instruction is used to indicate that the value of k is adjusted from a first value to a second value; in response to the first parameter adjustment instruction, adjusting the value of k from the first value to the second value, wherein the k after the updated value is used to redetermine the inflection point value.

[0152] Optionally, in this embodiment, the above-mentioned first parameter adjustment instruction is used to adjust the value of the target parameter k, and then, can adjust the relationship between a and b to update the inverse function of the above-mentioned target cumulative probability distribution function, thereby achieving the technical effect of improving the event execution efficiency, and thus solving the technical problems existing in the related technology that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0153] As an optional solution, determining the second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number includes:

[0154] Acquire the target piecewise function corresponding to the target value interval from the multiple piecewise functions;

[0155] When the first random number is used as an input value of the target piecewise function, the second random number is determined according to an output value of the target piecewise function.

[0156] Optionally, in this embodiment, it may include but not be limited to determining the target value interval according to the first random number, and then determining a corresponding target piecewise function from the multiple piecewise functions according to the size of the first random number.

[0157] Optionally, in this embodiment, it may include but is not limited to inputting the first random number into the target piecewise function to obtain the second random number, which is used to configure a target resource with a second random number for a target event in a target game application.

[0158] Through this embodiment, a target piecewise function corresponding to a target value interval is obtained from a plurality of piecewise functions. When a first random number is used as an input value of the target piecewise function, a second random number is determined according to an output value of the target piecewise function. In this way, a second random number is determined, and then, in a target game application, a target resource with a number equal to the second random number is configured for a target event, thereby achieving a technical effect of improving event execution efficiency, thereby solving the technical problems existing in the related art that the resource configuration method for events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0159] As an optional solution, when the first random number is used as an input value of the target piecewise function, determining the second random number according to an output value of the target piecewise function includes:

[0160] The second random number is determined by the following formula:

[0161]

[0162]

[0163]

[0164] Wherein, x represents the output value, y represents the first random number, and the second random number = x + the minimum value;

[0165] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, 1<k<2, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0166] Optionally, in this embodiment, Fig. 9 is a schematic diagram of another method for executing a target event according to an embodiment of the present invention, such as Fig. 9 As shown, taking a=60, b=40, P=100 as an example, when the first random number is 0.3413 and CDF(b) is 0.5333, the target piecewise function is The second random number obtained is 32.

[0167] Specifically, the steps may include but are not limited to the following:

[0168] S1, use a uniform distribution generator to randomly generate a number y(0.3413) between [0,1];

[0169] S2, when it is determined that 0<0.3413<CDF(b), it is judged to fall into interval 1;

[0170] S3, use the inverse function formula corresponding to interval 1 to calculate x;

[0171] S4,

[0172] Through this embodiment, the above formula is used to determine the second random number, and then, in the target game application, a target resource with a number equal to the second random number is configured for the target event, thereby achieving the technical effect of improving the event execution efficiency, thereby solving the technical problems existing in the related technology that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0173] As an optional solution, configuring the target resource with the second random number as the number for the target event in the target game application includes:

[0174] In the case where the target event is used to configure resources for a target account, the target resources having a quantity equal to the second random number are configured to the target account, or to a virtual character controlled by the target account in the target game application; or

[0175] In a case where the target event is used to generate a virtual object in the target game application, configuring the number of the virtual objects as the target resource to be the second random number;

[0176] In a case where the target event is used to set a task to be executed in the target game application, the attribute value of the task attribute of the target resource in the task to be executed is configured as the second random number.

[0177] Optionally, in this embodiment, the above-mentioned target resources may include but are not limited to resources configured for the account, such as "gold coins", "diamonds", "points", "game time", etc., and may also include but are not limited to resources configured for the virtual character controlled by the account in the target game application, such as the virtual skill enhancement value of the virtual character, the number of times the virtual character is used, etc., and may also include but are not limited to the number of virtual objects, the number of virtual resources, the number of virtual props, etc. when the target event is used to generate virtual objects in the target game application. It may also include but is not limited to the case where the target event is used to set a task to be performed in the target game application, and the attribute value of the task attribute in the task to be performed is used as the target resource. For example, when the task to be performed is to roast a fire, the temperature of the flame or the temperature of the virtual character is used as the above-mentioned target resource; when the task to be performed is to jump over an obstacle, the size and shape of the obstacle are used as the above-mentioned target resources, etc.

[0178] As an optional solution, the step of using a random number generator to generate the first random number includes:

[0179] The first random number is generated using the random number generator, wherein the random number generator has the same probability of generating different random numbers.

[0180] Optionally, in this embodiment, the probability that the random number generator generates different random numbers with the same probability may include but is not limited to using a uniform distribution generator to generate them.

[0181] As an optional solution, the method further includes:

[0182] Obtaining an input second parameter adjustment instruction, wherein the second parameter adjustment instruction is used to update at least one of the minimum value, the maximum value, and the expected value;

[0183] In response to the second parameter adjustment instruction, at least one of the minimum value, the maximum value and the expected value is updated, wherein the updated at least one of the minimum value, the maximum value and the expected value is used to redetermine the inverse function.

[0184] Optionally, in this embodiment, the second parameter adjustment instruction is used to update at least one of the minimum value, maximum value and expected value to redefine the inverse function, thereby achieving the technical effect of improving the event execution efficiency, thereby solving the technical problems existing in the related technology that the resource configuration method of events is relatively complex and not comprehensive enough, and the event execution efficiency is too low.

[0185] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0186] The following is a further explanation of this application with reference to specific examples:

[0187] Each language's pseudo-random number generator (for example, C's rand() / Lua's math.random()) can be used as a uniformly distributed random number generator, by taking a uniform distribution U(0,1) between [0,1], Fig.10 is a schematic diagram of another method for executing a target event according to an embodiment of the present invention, such as Fig.10 As shown, the CDF corresponding to the PDF piecewise function can be obtained by using the function properties that CDF is monotonically non-decreasing and injective and surjective, and the second random number mentioned above can be obtained as follows.

[0188] S1, use a uniform distribution generator to randomly generate a number y in the interval [0,1] (corresponding to the first random number mentioned above);

[0189] S2, find the inverse function of CDF x = F -1 (y);

[0190] S3, x is the generated number that satisfies the specified distribution F (corresponding to the second random number mentioned above).

[0191] This embodiment solves the problem of generating a peak-shaped probability distribution of random numbers in the game without loss of generality, and meets the common requirements of game planners for controllable expectations, coincidence of expectations with the majority (maximum expected values), and very few lucky / unlucky people (maximum values ​​max / minimum values ​​min). Compared with other solutions, it has the technical effects of strong applicability, controllable maintenance costs, high development efficiency, and very fast generation speed.

[0192] According to another aspect of the embodiments of the present invention, a target event execution device for implementing the above target event execution method is also provided. Fig.11 As shown, the device comprises:

[0193] An acquisition module 1102 is used to acquire a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for a target event;

[0194] A generating module 1104 is configured to generate a first random number using a random number generator in response to the target operation, wherein the first random number is between [0, 1];

[0195] A first determination module 1106 is used to determine a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals where input values ​​of an inverse function of a target cumulative probability distribution function are located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of a random number, wherein the minimum value, the maximum value, and the expected value are respectively the minimum value, the maximum value, and the expected value of a random number allowed to be output by the inverse function;

[0196] A second determination module 1108 is configured to determine a second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value;

[0197] The configuration module 1110 is used to configure the target resources whose quantity is the second random number for the target event in the target game application, and execute the target event.

[0198] As an optional scheme, the device is also used to: obtain the minimum value, the maximum value and the expected value of the preset random number; and determine the inverse function of the target cumulative probability distribution function based on the minimum value, the maximum value and the expected value.

[0199] As an optional scheme, the device is used to determine the inverse function of the target cumulative probability distribution function according to the minimum value, the maximum value and the expected value in the following manner: determine the inflection point value of the target inflection point according to the expected value and a preset target coefficient, wherein the expected value < the inflection point value < the maximum value; determine a first number and a second number according to the minimum value, the maximum value, the expected value and the inflection point value, wherein the first number indicates the number of times the random number determined by the inverse function is equal to the expected value, and the second number indicates the number of times the random number determined by the inverse function is equal to the inflection point value; determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value.

[0200] As an optional solution, the device is used to determine the first number and the second number according to the minimum value, the maximum value, the expected value and the inflection point value in the following manner: the first number h1 and the second number h2 are determined by the following formula:

[0201]

[0202]

[0203] Among them, b=the expected value-the minimum value, a=k·b, k represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, 1<k<2.

[0204] As an optional scheme, the device is used to determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value in the following manner: determine the multiple value intervals according to the expected value and the inflection point value; determine the corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value and the expected value to obtain the inverse function.

[0205] As an optional solution, the device is used to determine a corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value, and the expected value in the following manner to obtain the inverse function:

[0206] The inverse function is determined by the following formula:

[0207]

[0208]

[0209]

[0210] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0211] As an optional solution, the device is also used for:

[0212] Obtaining an input first parameter adjustment instruction, wherein the first parameter adjustment instruction is used to instruct to adjust the value of k from a first value to a second value;

[0213] In response to the first parameter adjustment instruction, the value of k is adjusted from the first value to the second value, wherein the k after the updated value is used to redetermine the inflection point value.

[0214] As an optional scheme, the device is used to determine the second random number based on the target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number in the following manner: obtain the target piecewise function corresponding to the target value interval from the multiple piecewise functions; when the first random number is used as the input value of the target piecewise function, determine the second random number based on the output value of the target piecewise function.

[0215] As an optional solution, the device is used to determine the second random number according to the output value of the target piecewise function in the following manner when the first random number is used as the input value of the target piecewise function:

[0216] The second random number is determined by the following formula:

[0217]

[0218]

[0219]

[0220] Wherein, x represents the output value, y represents the first random number, and the second random number = x + the minimum value;

[0221] Among them, b = the expected value - the minimum value, a = k·b, k represents the target coefficient, 1<k<2, a represents the inflection point value, p = the maximum value - the minimum value, h1 represents the first number, and h2 represents the second number.

[0222] As an optional scheme, the device is used to configure target resources with a quantity equal to the second random number for the target event in the target game application in the following manner: when the target event is used to configure resources for a target account, the target resources with a quantity equal to the second random number are configured to the target account, or to a virtual character controlled by the target account in the target game application; or when the target event is used to generate a virtual object in the target game application, the quantity of the virtual objects serving as the target resources is configured to the second random number; when the target event is used to set a task to be performed in the target game application, the attribute value of the task attribute of the target resource in the task to be performed is configured to the second random number.

[0223] As an optional solution, the device is used to generate a first random number using a random number generator in the following manner: using the random number generator to generate the first random number, wherein the probability of the random number generator generating different random numbers is the same.

[0224] As an optional scheme, the device is also used to: obtain an input second parameter adjustment instruction, wherein the second parameter adjustment instruction is used to update at least one of the minimum value, the maximum value and the expected value; in response to the second parameter adjustment instruction, update at least one of the minimum value, the maximum value and the expected value, wherein the updated at least one of the minimum value, the maximum value and the expected value is used to redetermine the inverse function.

[0225] According to another aspect of the embodiment of the present invention, an electronic device for implementing the above-mentioned target event execution method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a server as an example. Fig.12 As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.

[0226] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0227] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0228] S1, obtaining a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for a target event;

[0229] S2, in response to the target operation, using a random number generator to generate a first random number, wherein the first random number is between [0, 1];

[0230] S3, determining a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals in which the input value of the inverse function of the target cumulative probability distribution function is located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of the random number, and the minimum value, maximum value, and expected value are respectively the minimum value, maximum value, and expected value of the random number allowed to be output by the inverse function;

[0231] S4, determining a second random number according to a target piecewise function corresponding to the target value interval among the plurality of piecewise functions and the first random number, wherein a minimum value ≤ the second random number ≤ the maximum value;

[0232] S5, configuring a target resource having a second random number for the target event in the target game application, and executing the target event.

[0233] Alternatively, a person skilled in the art may understand that: Fig.12 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.12 The electronic device and the electronic equipment described above are not limited in structure. Fig.12 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.12 Different configurations are shown.

[0234] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for executing the target event in the embodiment of the present invention. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, realizing the above-mentioned method for executing the target event. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely arranged relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1202 can be specifically, but not limited to, used to store information such as target resources or target events. As an example, such as Fig.12 As shown, the above-mentioned memory 1202 may include but is not limited to the acquisition module 1102, generation module 1104, first determination module 1106, second determination module 1108 and configuration module 1110 in the execution device of the above-mentioned target event. In addition, it may also include but is not limited to other module units in the execution device of the above-mentioned target event, which will not be repeated in this example.

[0235] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0236] In addition, the electronic device further includes: a display 1208 for displaying the target event; and a connection bus 1210 for connecting various module components in the electronic device.

[0237] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.

[0238] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations of the execution of the above-mentioned target event. The computer program is configured to execute the steps of any of the above-mentioned method embodiments when it is run.

[0239] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0240] S1, obtaining a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for a target event;

[0241] S2, in response to the target operation, using a random number generator to generate a first random number, wherein the first random number is between [0, 1];

[0242] S3, determining a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals in which the input value of the inverse function of the target cumulative probability distribution function is located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of the random number, and the minimum value, maximum value, and expected value are respectively the minimum value, maximum value, and expected value of the random number allowed to be output by the inverse function;

[0243] S4, determining a second random number according to a target piecewise function corresponding to the target value interval among the plurality of piecewise functions and the first random number, wherein a minimum value ≤ the second random number ≤ the maximum value;

[0244] S5, configuring a target resource having a second random number for the target event in the target game application, and executing the target event.

[0245] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0246] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0247] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0248] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0249] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0251] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0252] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for executing a target event, characterized in that: include: Acquire a target operation in a target game application, wherein the target operation is used to trigger random configuration of target resources for a target event; In response to the target operation, using a random number generator to generate a first random number, wherein the first random number is between [0, 1]; Determine a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals where input values ​​of an inverse function of a target cumulative probability distribution function are located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of a random number, and the minimum value, the maximum value, and the expected value are respectively the minimum value, the maximum value, and the expected value of a random number allowed to be output by the inverse function; Determine a second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value; In the target game application, configure target resources with a quantity of the second random number for the target event, and execute the target event; The method also includes: determining a breakpoint value of a target breakpoint according to the expected value and a preset target coefficient, wherein the expected value is less than the breakpoint value, and the breakpoint value is less than the maximum value; determining a first number and a second number according to the minimum value, the maximum value, the expected value, and the breakpoint value, wherein the first number indicates the number of times a random number determined by the inverse function is equal to the expected value, and the second number indicates the number of times a random number determined by the inverse function is equal to the breakpoint value; determining an inverse function of the target cumulative probability distribution function according to the first number, the second number, and the expected value.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining the minimum value, the maximum value, and the expected value of the preset random number; An inverse function of the target cumulative probability distribution function is determined according to the minimum value, the maximum value and the expected value.

3. The method according to claim 1, characterized in that Determining the first number and the second number according to the minimum value, the maximum value, the expected value, and the inflection point value includes: The first number is determined by the following formula and the second number : , , Wherein, b=the expected value-the minimum value, , represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, .

4. The method according to claim 1, characterized in that: The determining, according to the first number, the second number, and the expected value, an inverse function of the target cumulative probability distribution function comprises: Determining the multiple value intervals according to the expected value and the inflection point value; According to the first number, the second number, the minimum value, the maximum value and the expected value, a corresponding piecewise function is determined on each value interval in the multiple value intervals to obtain the inverse function.

5. The method according to claim 4, characterized in that The step of determining a corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value, and the expected value to obtain the inverse function includes: The inverse function is determined by the following formula: , , , Wherein, b=the expected value-the minimum value, , represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, represents the first number of times, Indicates the second number of times.

6. The method according to claim 3, characterized in that The method further comprises: Obtaining an input first parameter adjustment instruction, wherein the first parameter adjustment instruction is used to instruct to adjust the value of k from a first value to a second value; In response to the first parameter adjustment instruction, the value of k is adjusted from the first value to the second value, wherein the k after the updated value is used to redetermine the inflection point value.

7. The method according to claim 1, characterized in that The determining the second random number according to the target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number comprises: Acquire the target piecewise function corresponding to the target value interval from the multiple piecewise functions; When the first random number is used as an input value of the target piecewise function, the second random number is determined according to an output value of the target piecewise function.

8. The method according to claim 7, characterized in that The step of determining the second random number according to an output value of the target piecewise function when the first random number is used as an input value of the target piecewise function comprises: The second random number is determined by the following formula: , , , Wherein, x represents the output value, y represents the first random number, and the second random number=x+the minimum value; Wherein, b=the expected value-the minimum value, , represents the target coefficient, , a represents the inflection point value, p = the maximum value - the minimum value, represents the first number of times, Indicates the second number of times.

9. The method according to any one of claims 1 to 8, characterized in that The configuring the target resource with the second random number as the number for the target event in the target game application includes: In the case where the target event is used to configure resources for a target account, the target resources having a quantity equal to the second random number are configured to the target account, or to a virtual character controlled by the target account in the target game application; or In a case where the target event is used to generate a virtual object in the target game application, configuring the number of the virtual objects as the target resource to be the second random number; In a case where the target event is used to set a task to be executed in the target game application, the attribute value of the task attribute of the target resource in the task to be executed is configured as the second random number.

10. The method according to any one of claims 1 to 8, characterized in that The step of using a random number generator to generate a first random number comprises: The first random number is generated using the random number generator, wherein the random number generator has the same probability of generating different random numbers.

11. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Obtaining an input second parameter adjustment instruction, wherein the second parameter adjustment instruction is used to update at least one of the minimum value, the maximum value, and the expected value; In response to the second parameter adjustment instruction, at least one of the minimum value, the maximum value and the expected value is updated, wherein the updated at least one of the minimum value, the maximum value and the expected value is used to redetermine the inverse function.

12. A device for executing a target event, characterized in that: include: An acquisition module, used for acquiring a target operation in a target game application, wherein the target operation is used to trigger random configuration of a target resource for a target event; A generating module, configured to generate a first random number using a random number generator in response to the target operation, wherein the first random number is between [0, 1]; A first determination module is used to determine a target value interval in which the first random number is located among multiple value intervals, wherein the multiple value intervals are value intervals where input values ​​of an inverse function of a target cumulative probability distribution function are located, the inverse function includes multiple piecewise functions, each value interval in the multiple value intervals corresponds to a piecewise function in the multiple piecewise functions, and the inverse function of the target cumulative probability distribution function is determined according to a preset minimum value, maximum value, and expected value of a random number, wherein the minimum value, the maximum value, and the expected value are respectively the minimum value, the maximum value, and the expected value of a random number allowed to be output by the inverse function; A second determination module is used to determine a second random number according to a target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number, wherein the minimum value ≤ the second random number ≤ the maximum value; A configuration module, configured to configure a target resource with a quantity of the second random number for the target event in the target game application, and execute the target event; The device is also used to: determine the inflection point value of the target inflection point according to the expected value and a preset target coefficient, wherein the expected value is less than the inflection point value, and the inflection point value is less than the maximum value; determine the first number and the second number according to the minimum value, the maximum value, the expected value and the inflection point value, wherein the first number indicates the number of times the random number determined by the inverse function is equal to the expected value, and the second number indicates the number of times the random number determined by the inverse function is equal to the inflection point value; determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value.

13. The device according to claim 12, characterized in that The device is also used for: Obtaining the minimum value, the maximum value, and the expected value of the preset random number; An inverse function of the target cumulative probability distribution function is determined according to the minimum value, the maximum value and the expected value.

14. The device according to claim 12, characterized in that The device is used to determine the first number and the second number according to the minimum value, the maximum value, the expected value and the inflection point value in the following manner: The first number is determined by the following formula and the second number : , , Wherein, b=the expected value-the minimum value, , represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, .

15. The device according to claim 12, characterized in that The device is used to determine the inverse function of the target cumulative probability distribution function according to the first number, the second number and the expected value in the following manner: Determining the multiple value intervals according to the expected value and the inflection point value; According to the first number, the second number, the minimum value, the maximum value and the expected value, a corresponding piecewise function is determined on each value interval in the multiple value intervals to obtain the inverse function.

16. The device according to claim 15, characterized in that The device is used to determine a corresponding piecewise function on each value interval in the multiple value intervals according to the first number, the second number, the minimum value, the maximum value, and the expected value in the following manner to obtain the inverse function: The inverse function is determined by the following formula: , , , Wherein, b=the expected value-the minimum value, , represents the target coefficient, a represents the inflection point value, p=the maximum value-the minimum value, represents the first number of times, Indicates the second number of times.

17. The device according to claim 14, characterized in that The device is also used for: Obtaining an input first parameter adjustment instruction, wherein the first parameter adjustment instruction is used to instruct to adjust the value of k from a first value to a second value; In response to the first parameter adjustment instruction, the value of k is adjusted from the first value to the second value, wherein the k after the updated value is used to redetermine the inflection point value.

18. The device according to claim 12, characterized in that The device is used to determine the second random number according to the target piecewise function corresponding to the target value interval among the multiple piecewise functions and the first random number in the following manner: Acquire the target piecewise function corresponding to the target value interval from the multiple piecewise functions; When the first random number is used as an input value of the target piecewise function, the second random number is determined according to an output value of the target piecewise function.

19. The device according to claim 18, characterized in that The device is used to determine the second random number according to the output value of the target piecewise function when the first random number is used as the input value of the target piecewise function in the following manner: The second random number is determined by the following formula: , , , Wherein, x represents the output value, y represents the first random number, and the second random number=x+the minimum value; Wherein, b=the expected value-the minimum value, , represents the target coefficient, , a represents the inflection point value, p = the maximum value - the minimum value, represents the first number of times, Indicates the second number of times.

20. The device according to any one of claims 12 to 19, characterized in that The device is used to configure the target resource with the second random number for the target event in the target game application in the following manner: In the case where the target event is used to configure resources for a target account, configuring the target resources equal to the second random number to the target account, or configuring to a virtual character controlled by the target account in the target game application; or In a case where the target event is used to generate a virtual object in the target game application, configuring the number of the virtual objects as the target resource to be the second random number; In a case where the target event is used to set a task to be executed in the target game application, the attribute value of the task attribute of the target resource in the task to be executed is configured as the second random number.

21. The device according to any one of claims 12 to 19, characterized in that The device is used to generate a first random number using a random number generator in the following manner: The first random number is generated using the random number generator, wherein the random number generator has the same probability of generating different random numbers.

22. The device according to any one of claims 12 to 19, characterized in that The device is also used for: Obtaining an input second parameter adjustment instruction, wherein the second parameter adjustment instruction is used to update at least one of the minimum value, the maximum value, and the expected value; In response to the second parameter adjustment instruction, at least one of the minimum value, the maximum value and the expected value is updated, wherein the updated at least one of the minimum value, the maximum value and the expected value is used to redetermine the inverse function.

23. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 11.

24. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.

Citation Information

Patent Citations

  • Resource allocation method and device

    CN110012001A

  • Reliability evaluation method and device, computer equipment and storage medium

    CN111104644A