Virtual map generation method, device, electronic device and readable storage medium

By obtaining the evaluation data of the initial virtual map, determining the target configuration plan and generating the target virtual map, the problem of unreasonable layout in virtual map generation is solved, and a more reasonable virtual map generation is achieved.

CN112562037BActive Publication Date: 2025-08-19BIGO TECH PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011497994.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-17
Publication Date
2025-08-19
Estimated Expiration
2040-12-17

AI Technical Summary

Technical Problem

In the prior art, in the process of generating virtual maps, there are a large number of virtual maps with unreasonable layouts, and it is difficult to generate reasonable virtual maps.

Method used

By obtaining the evaluation data of the initial virtual map, determining the target configuration plan based on the evaluation data and the initial configuration plan, generating the target virtual map, and repeating this process until the set end condition is reached, the initial virtual map with the evaluation data meeting the conditions is used as the new virtual map.

Benefits of technology

The generated virtual map layout is more reasonable, reducing the number of virtual maps with unreasonable layout and improving the efficiency and quality of map generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112562037B_ABST
    Figure CN112562037B_ABST
Patent Text Reader

Abstract

The present application discloses a virtual map generation method, apparatus, device, and readable storage medium, belonging to the field of Internet technology. The method comprises: obtaining evaluation data of an initial virtual map; determining a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme; generating a target virtual map using the target configuration scheme; replacing the initial virtual map with the target virtual map; and repeating the process of generating the target virtual map until a set end condition is met, whereupon the initial virtual map whose evaluation data meets the evaluation condition is used as the new virtual map. During the virtual map generation process, the configuration of map elements is adjusted based on the virtual map evaluation data to generate a new virtual map. This can make the layout of the generated virtual map more reasonable and avoid the occurrence of a large number of virtual maps with unreasonable layouts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of Internet technology, and in particular relates to a virtual map generation method, device, electronic device and readable storage medium. Background Art

[0002] With the development of Internet technology, applications based on virtual scenes are increasing, such as virtual shopping, virtual games, and virtual exhibitions. The construction of virtual scenes requires virtual maps. In some cases, the virtual scenes need to be constantly changed, so different virtual maps need to be set up for each virtual scene.

[0003] In the prior art, to generate a large number of unique virtual maps, map elements within the virtual map are typically randomly combined according to certain rules to generate different virtual maps. While this random combination approach can generate a large number of virtual maps, the generation process is subject to significant randomness, resulting in a high number of virtual maps with illogical layouts. Summary of the Invention

[0004] In view of this, the present invention provides a virtual map generation method, device, electronic device and readable storage medium, which to a certain extent solve the problem of a large number of virtual maps with unreasonable layouts during the virtual map generation process.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for generating a virtual map, the method comprising:

[0007] Acquiring evaluation data of an initial virtual map; wherein the evaluation data is determined based on an initial configuration scheme of at least one map element in the initial virtual map;

[0008] Determining a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme;

[0009] Generating a target virtual map using the target configuration scheme;

[0010] The target virtual map is used to replace the initial virtual map, and the process of generating the target virtual map is repeated until a set end condition is met;

[0011] The initial virtual map whose evaluation data meets the evaluation conditions is used as a new virtual map.

[0012] In a second aspect, an embodiment of the present application provides a virtual map generation device, the device comprising:

[0013] Acquiring evaluation data of an initial virtual map; wherein the evaluation data is determined based on an initial configuration scheme of at least one map element in the initial virtual map;

[0014] Determining a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme;

[0015] Generating a target virtual map using the target configuration scheme;

[0016] The target virtual map is used to replace the initial virtual map, and the process of generating the target virtual map is repeated until a set end condition is met;

[0017] The initial virtual map whose evaluation data meets the evaluation conditions is used as a new virtual map.

[0018] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.

[0021] In an embodiment of the present application, an electronic device obtains evaluation data for an initial virtual map, determines a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme, generates a target virtual map using the target configuration scheme, replaces the initial virtual map with the target virtual map, and repeats the process of generating the target virtual map until a set termination condition is met, at which point the initial virtual map whose evaluation data meets the evaluation condition is used as the new virtual map. During the virtual map generation process, the configuration of map elements is adjusted based on the virtual map evaluation data to generate a new virtual map. This can make the layout of the new virtual map more reasonable and avoid the occurrence of a large number of virtual maps with unreasonable layouts. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0023] Figure 1 This is a flowchart of the steps of a virtual map generation method provided by an embodiment of the present application;

[0024] Figure 2 This is a schematic diagram of the structure of a virtual map provided in an embodiment of the present application;

[0025] Figure 3 This is a Bayesian optimization diagram provided in an embodiment of the present application;

[0026] Figure 4 This is a schematic diagram of an optimization process provided by an embodiment of the present application;

[0027] Figure 5 This is a flowchart of another method for generating a virtual map provided by an embodiment of the present application;

[0028] Figure 6 is a block diagram of a virtual map generating device provided in an embodiment of the present application;

[0029] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0031] Figure 1 This is a flowchart of a method for generating a virtual map provided by an embodiment of the present application. Figure 1 As shown, the method may include:

[0032] Step 101: Obtain evaluation data of the initial virtual map.

[0033] The evaluation data is determined according to an initial configuration scheme of at least one map element in the initial virtual map, and the evaluation data is used to measure the rationality of the initial virtual map.

[0034] In this embodiment, the virtual map generation method can be executed by an electronic device such as a personal computer or server. The initial virtual map is a template used to generate the target virtual map. The initial virtual map includes map elements and an initial configuration scheme for the map elements. The electronic device can adjust the initial configuration scheme of at least one map element to obtain a target virtual map corresponding to the initial virtual map.

[0035] For example, Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of a virtual map provided in an embodiment of the present application. Figure 2 The virtual map shown is a virtual map used in a virtual game. The initial virtual map includes map element grids. Multiple grids are arranged in ascending order according to the grid numbers in the initial virtual map. Multiple grids can be represented as follows: G = {G1, G2, G3, G4... G N}, N is a positive integer, and the subscript of each grid represents the position of the grid in the initial virtual map. For example, G2 represents the second grid in the initial virtual map, G N Represents the Nth grid in the initial virtual map, that is, the last grid.

[0036] The user can set the corresponding type of map elements in the initial virtual map according to the game rules. For example, the above virtual game includes character A and character B. According to the game rules, at the beginning of the game, character A and character B are located in the first grid G1 in the initial virtual map. Each time the user rolls the dice, they can roll any number from 1 to 6, and the probability of the six numbers appearing is the same. After getting the number of the dice, the user can choose one of the characters to move forward in the direction indicated by arrow 201 to the grid of the corresponding number. When either character A or character B reaches the last grid in the initial virtual map, that is, the Nth grid G N When , a round of the game ends. The user can set a certain number of first-level reward organs in the initial virtual map. The first-level reward organ is a map element, and set virtual rewards for each first-level reward organ. The virtual rewards can be a certain amount of virtual currency. For example, the first reward organ can be set to G 10 The second reward agency is G 80 , and set up the first reward agency G 10 The corresponding virtual reward is 10 virtual coins, and the second reward mechanism G is set up. 80 The corresponding virtual reward is 15 virtual coins, which can be represented by (V1=10, L1=10) and (V2=80, L2=15) respectively as the initial configuration schemes of the first reward agency and the second reward agency. In the initial configuration scheme of the first reward agency, V1=10 represents the grid G 10, L1 = 10 means 10 virtual currencies; in the initial configuration of the second reward mechanism, V2 = 80 means grid G 80 , L2=15 means 15 virtual currencies. At the same time, you can set the last grid G N The initial configuration of the secondary reward agency is R virtual currency. When two characters reach the last grid G at the same time, N When, the user can get R virtual currency.

[0037] Similarly, the user can set a jumping mechanism in the initial virtual map. The jumping mechanism is a map element. The jumping mechanism includes a starting grid and a target grid. When character A or character B advances to the starting grid, they can jump directly to the target grid to increase the character's forward speed. For example, the 20th grid can be set as the starting grid of the first jumping mechanism, the 25th grid can be set as the target grid of the first jumping mechanism, and the 40th grid can be set as the starting grid of the second jumping mechanism, and the 48th grid can be set as the target grid of the second jumping mechanism. The initial configuration schemes of the first jumping mechanism and the second jumping mechanism can be represented by (S1=20, E1=25) and (S2=40, E2=48) respectively. In the initial configuration scheme of the first jumping mechanism, S1=20 indicates that the starting grid is G 20 , E1=25 means the target grid is G 25 In the initial configuration of the second jump mechanism, S2=40 means the starting grid is G 40 , E2=48 means the target grid is G 48 .

[0038] During the game, the amount of virtual currency used by the user to roll the dice can be represented by C. The cost of each game is C×T, where T is the number of times the user rolls the dice. The total virtual currency obtained by the user in each game is the income, which is represented by S.

[0039] In actual applications, the initial virtual map can also be other types of virtual maps, such as virtual maps in virtual shopping, virtual maps in virtual exhibitions, and the initial virtual map can also include other types of map elements and virtual game rules. The setting method of the initial configuration scheme can be set according to needs, and this implementation does not impose any restrictions on this.

[0040] In one embodiment, during the process of generating the target virtual map, the electronic device may first obtain evaluation data of the initial virtual map, so as to adjust the initial configuration scheme of the map elements according to the evaluation data.

[0041] Exemplarily, step 101 may be implemented as follows:

[0042] Determine the evaluation data based on the initial configuration plan of the target map element.

[0043] In this embodiment, the electronic device can directly evaluate the rationality of the initial virtual map based on the initial configuration of map elements to obtain evaluation data for the initial virtual map. For example, the jump length of a jump mechanism can be used as an indicator of rationality. The target map elements can include the first jump mechanism and the second jump mechanism in the above embodiment. The evaluation data of the initial virtual map can be calculated using the following method:

[0044]

[0045] Among them, Y1 is the evaluation data, "abs(S1-E1)" represents the absolute value of S1 minus E1. When the difference between the starting grid and the target grid in the initial configuration scheme of the first jump mechanism is greater than or equal to 8, and the difference between the starting grid and the target grid in the initial configuration scheme of the second jump mechanism is greater than or equal to 8, the evaluation data Y1 of the initial virtual map is positive 20; on the contrary, when the difference between the starting grid and the target grid of any jump mechanism is less than 8, the evaluation data Y1 of the initial virtual map is negative 20.

[0046] For another example, the difference between the secondary reward agency and the primary reward agency can be used as an indicator to measure the rationality of the initial virtual map. The target map elements may include the first reward agency, the second reward agency, and the secondary reward agency in the above embodiment. The evaluation data of the initial virtual map can be calculated using the following processing method:

[0047]

[0048]

[0049] Among them, Y2 is the evaluation data, mean(L1+L2) is the average value of L1 and L2, that is, the average reward amount of the first-level reward agency. When the ratio of the reward amount of the second-level reward agency to the average reward amount is greater than or equal to 2, the evaluation data Y2 is positive 20; otherwise, the evaluation data Y2 is negative 10.

[0050] In practical applications, determining evaluation data based on the initial configuration of target map elements can quickly and easily determine the evaluation data for the initial virtual map, improving map generation efficiency. The rationality of the initial virtual map can also be measured using other indicators. The specific calculation method for the evaluation data can be set based on the specific map elements, and this embodiment does not impose any restrictions on this.

[0051] Step 102: Determine a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme.

[0052] In one embodiment, after determining the evaluation data of the initial virtual map and the initial configuration scheme of the map elements, the initial configuration scheme can be optimized based on the evaluation data to obtain a target configuration scheme corresponding to the initial configuration scheme. For example, the initial configuration scheme can be optimized using an optimization algorithm based on the evaluation data and the initial configuration scheme. The optimization algorithm can be a Bayesian optimization algorithm (BOA), which includes a Gaussian process (GP) and a parameter selection process. The electronic device can first determine a selection range corresponding to the initial configuration scheme, i.e., the selection range of the target configuration scheme, through the Gaussian process, and then sample within the selection range through an acquisition function to obtain the target configuration scheme.

[0053] Specifically, we can first define an objective function f(x) about the evaluation data and the initial configuration scheme. The objective function f(x) can be expressed as follows:

[0054] y i =f(x i )+∈,∈~N(0,σ_n^2)

[0055] Among them, x i is the independent variable of the objective function, i.e. the initial configuration scheme of the map elements, y i is the dependent variable of the objective function, that is, the evaluation data corresponding to the initial configuration scheme. The objective function can be optimized by the Bayesian optimization algorithm to determine the target configuration scheme corresponding to the initial configuration scheme. In combination with the above example, if the map element includes the first jump mechanism and the second jump mechanism, then x i is a multidimensional vector including S1, E1, S2 and E2, x i It can be represented by X = (S1, E1, S2, E2). "∈" is the noise of the objective function, which follows a normal distribution with mean 0. In this case, the objective function f(x) follows a joint Gaussian distribution, which can be determined by the mean vector μ and the covariance matrix ∑. The Gaussian process is determined by the mathematical expectation function (mean function) and the kernel function (kernel function), also known as the covariance function. For ease of reference, "m" is used here to represent the mathematical expectation function, and "k" is used to represent the kernel function.

[0056] According to Bayes' theorem, the posterior distribution probability of the target function f(x) can be determined as:

[0057]

[0058] Wherein, p(f)=GP(m,k) is the prior probability distribution of the target function, m is the above-mentioned mathematical expectation function, and k is the kernel function.

[0059] is the likelihood function, p(y / X)=∫p(y|f,X)p(f|X)df is the evidence function, p(f|X,y)=GP(m post , k post ) is the posterior distribution probability function of the objective function. It can be derived from the above formula:

[0060]

[0061]

[0062] Among them, x ★ is the input variable obtained after discretizing the vector in X, m post (x ★ ) is the target function learned by the Gaussian process function at x ★ The mean of the posterior predictive distribution at k post (x ★ , x ★ ) is the target function learned by the Gaussian process function at x ★ The variance of the posterior predictive distribution at . m(X) is the prior distribution of the mathematical expectation function, K = k(X, X) is the covariance matrix of the input variables, k(x ★ , X) is the covariance vector of the input variables of the data points to be predicted, k(X, x ★ ) is k(x ★ , the transpose of X). k(x ★ , x ★ ) is the kernel function, and the kernel function can be in the form of:

[0063] k(x1,x2)=exp(-|d(x1,x2)| 2 )

[0064] Where d(x1, x2) is the Euclidean distance between x1 and x2.

[0065] like Figure 3 As shown, Figure 3 This is a Bayesian optimization diagram provided in an embodiment of the present application. The horizontal axis represents the independent variable of the objective function, the vertical axis represents the dependent variable of the objective function, and the solid line 301 is the predicted mean m of the objective function. post (x ★), the dotted line 302 is the objective function generated based on the input of multiple observation points 303 (the observation points are the multidimensional vectors corresponding to the initial configuration scheme), and the gray area 304 is the confidence interval, which is determined by the variance k post (x ★ , x ★ ) decision. Figure 3 As shown, in the interval [0, 4], there are multiple observation points 303 corresponding to observation values, and the confidence intervals determined by the multiple observation points 303 are very small, indicating that the Gaussian process function is very certain about the target function f(x); on the contrary, in the interval [5, 7], there are fewer observation points 303, and the confidence intervals are very large, so the Gaussian process function cannot determine the target function f(x).

[0066] After determining the confidence interval of X, i.e., the selection range, through the Gaussian process, the next observation point corresponding to the current observation point, i.e., the target configuration solution, can be selected from the selection range through the exploration and exploitation rule. For example, the acquisition function can use the UCB (Upper Confidence Bound) function:

[0067] α UCB (x)=μ(x)+βσ(x)

[0068] Where μ(x) is the mean of the objective function, and σ(x) is the variance of the objective function. The maximum value of the acquisition function can be calculated, and the mean and variance corresponding to the maximum value of the acquisition function can be used as the mean and variance of the next observation point in the objective function. Based on the mean and variance at the next observation point, X at the next observation point can be determined, i.e., the target configuration scheme. For example, the target configuration scheme is (S1=60, E1=68, S2=54, E2=71).

[0069] In practical applications, the specific process of Bayesian optimization can be set according to needs and will not be described in detail in this embodiment. The optimization algorithm may also adopt a genetic algorithm, a particle swarm optimization algorithm, an ant colony optimization algorithm, or the like, and the acquisition function may also adopt an expected improvement, a knowledge gradient, or other acquisition function. This embodiment does not limit the specific types of the optimization algorithm and acquisition function.

[0070] Step 103: Generate a target virtual map using the target configuration solution.

[0071] In this embodiment, after determining the target configuration scheme corresponding to the initial configuration scheme, the initial configuration scheme in the initial virtual map may be replaced with the corresponding target configuration scheme to obtain the target virtual map.

[0072] In the example above, in the initial configuration of the first jump mechanism in the initial virtual map, the initial configuration of the starting grid is 20, and the initial configuration of the target grid is 25. In the target configuration corresponding to the initial configuration of the first jump mechanism, the starting grid is 60 and the target grid is 68. At this time, the starting grid in the first jump mechanism can be set to G 60 , the target grid is set to G 68 Similarly, by replacing the initial configuration scheme of the second jump mechanism with the target configuration scheme, a target virtual map corresponding to the initial virtual map can be obtained. The configurations of the jump mechanisms in the initial virtual map and the target virtual map are different.

[0073] Step 104: The target virtual map is used to replace the initial virtual map, and the process of generating the target virtual map is repeated until a set end condition is met.

[0074] In this embodiment, after the target virtual map is obtained, the target virtual map can be used as a new initial virtual map, and steps 101 to 103 are continued to be performed according to the new initial virtual map to obtain another target virtual map.

[0075] like Figure 4 As shown, Figure 4 1 is a schematic diagram of an optimization process provided by an embodiment of the present application. In the initial virtual map, X = (S1, E1, S2, E2) corresponds to a first observation point 401. After the first optimization, a second observation point 402 corresponding to the first observation point 401 can be determined, that is, a target configuration scheme corresponding to the initial configuration scheme. After generating a first target virtual map according to the target configuration scheme, the first target virtual map is used as a new initial virtual map, and steps 101 to 103 are repeated to obtain a predicted mean value of the objective function shown by the solid line 403, an objective function shown by the dotted line 404, and an acquisition function shown by the solid line 405.

[0076] Determine the maximum value of the acquisition function. Arrow 406 shows the maximum value of the acquisition function. The mean and variance corresponding to the position of arrow 406 are the mean and variance of the next observation point, that is, the mean and variance corresponding to the third observation point 407. Based on the mean and variance of the third observation point 407, the target configuration scheme corresponding to the third observation point 407 can be determined. Based on the target configuration scheme corresponding to the third observation point 407, a second target virtual map can be generated.

[0077] By analogy, the fourth observation point 408 can be determined according to the first observation point 401, the second observation point 402 and the third observation point 407, and the target configuration scheme corresponding to the fourth observation point 408 is determined to generate a third target virtual map.

[0078] In this embodiment, when the number of target virtual maps reaches the target number, it can be determined that the set end condition is met and the generation of the target virtual map is stopped. At this time, multiple target virtual maps and corresponding multiple initial virtual maps are obtained, and the evaluation data of each initial virtual map is determined.

[0079] In practical applications, generation of the target virtual map can also be stopped after the function value of the objective function stabilizes. That is, the process of generating the target virtual map ends when the evaluation data of multiple consecutive initial virtual maps stabilizes within a preset range. The termination condition can be set as needed and is not limited in this embodiment.

[0080] Step 105: The initial virtual map whose evaluation data meets the evaluation conditions is used as a new virtual map.

[0081] In this embodiment, after obtaining a plurality of initial virtual maps, an initial virtual map that meets the evaluation conditions may be selected from the plurality of initial virtual maps as a new virtual map based on the evaluation data of the plurality of initial virtual maps.

[0082] Exemplarily, step 105 may be implemented as follows:

[0083] The initial virtual map whose evaluation data is greater than or equal to the preset evaluation threshold is used as the new virtual map.

[0084] In the above example, after obtaining the target virtual map, the target virtual map is used as the new initial virtual map, and evaluation data for the new initial virtual map is obtained. A preset evaluation threshold can be set to 20. When the evaluation data of the initial virtual map is greater than or equal to the preset evaluation threshold, the initial virtual map is determined to meet the evaluation criteria and can be used as the new virtual map. At this point, the new virtual map can be applied to the virtual game, creating a new virtual scene for the virtual game.

[0085] It should be noted that when generating a target virtual map, the initial virtual map used for the first time is the virtual map manually set by the user. After generating a certain number of virtual maps, the virtual map with evaluation data greater than or equal to the preset evaluation threshold is selected as the new virtual map. The virtual map with higher evaluation data, i.e., more reasonable, can be selected.

[0086] In summary, in this embodiment, evaluation data for an initial virtual map is obtained. Based on the evaluation data and the initial configuration plan, a target configuration plan corresponding to the initial configuration plan is determined. The target configuration plan is used to generate a target virtual map. The target virtual map is then used to replace the initial virtual map. This process of generating the target virtual map is repeated until a set termination condition is met. The initial virtual map whose evaluation data meets the evaluation condition is then used as the new virtual map. During the virtual map generation process, the configuration of map elements is adjusted based on the virtual map evaluation data to generate a new virtual map. This can make the layout of the generated virtual map more reasonable and avoid the occurrence of numerous virtual maps with unreasonable layouts.

[0087] Figure 5 This is a flowchart of another method for generating a virtual map provided by an embodiment of the present application. Figure 5 As shown, the method may include:

[0088] Step 501: Acquire simulation result data generated when the initial virtual map is simulated multiple times.

[0089] Among them, the simulation result data corresponds to the map elements.

[0090] In this embodiment, the electronic device can perform multiple simulation runs on the initial virtual map to obtain simulation result data generated by the multiple simulation runs. For example, the electronic device can input the initial virtual map into the user simulation system, and the user simulation system can simulate the user's use of the virtual map. In conjunction with the above example, the user simulation system can simulate the user throwing a dice, and after the corresponding points are obtained, the character A or character B moves forward by the corresponding grid. When character A or character B moves to the last grid, the game ends, and simulation result data such as the profit S obtained from the game, the cost C×T of the game, and the number of dice rolls T during the game are obtained.

[0091] The electronic device may repeat the simulation multiple times (for example, 100 times), perform statistics on the results of the multiple simulations, and obtain simulation result data generated by the multiple simulation runs.

[0092] In practical applications, the simulation result data may also include other data, and the specific process of the simulation operation may be set according to requirements, which is not limited in this implementation.

[0093] Step 502: Determine evaluation data based on the initial configuration solution and simulation result data.

[0094] In this embodiment, the electronic device can determine the evaluation data based on the simulation result data and the initial configuration plan. For example, the electronic device can determine the evaluation data based on the total revenue and total cost generated by multiple simulation runs. In combination with the above example, after multiple simulation runs of the initial virtual map, the cost C×T generated by each simulation run and the revenue S generated by each simulation run can be obtained. If the number of simulations is N times, the total cost of the N simulation runs is N×C×T, and the total revenue is N×S. At this time, the ratio of total revenue to total cost can be used as an indicator to measure the rationality of the initial virtual map. The evaluation data can be determined by the ratio of total revenue to total cost. The ratio of total revenue to total cost can be expressed by RTP, V total represents the total revenue, C total Represents the total cost. The value of RTB can be determined as follows:

[0095]

[0096] Wherein, Y3 is the evaluation data, RTP is the ratio of total revenue to total cost, and abs(1-RTP) is the absolute value between RTP and 1. When the ratio of total revenue to total cost is greater than or equal to 0.9 and less than or equal to 1.1, the evaluation data Y3 = 100-abs(1-RTP)×1000; otherwise, the evaluation data Y3 is negative 30. The specific calculation method of the evaluation data can be set as required and is not limited in this embodiment.

[0097] For another example, the average number of dice rolls per game can be used as an indicator to measure the rationality of the initial virtual map. The electronic device can count the number of dice rolls during each simulation run and calculate the total number of dice rolls. The average number of dice rolls can be obtained by dividing the total number of rolls by the number of simulations. In this case, the evaluation data can be calculated as follows:

[0098]

[0099] Among them, Y4 is the evaluation data, R a is the average number of throws, "abs(35-R a )” is 35 minus R a When the average number of throws is greater than or equal to 20 and less than or equal to 50, the evaluation data Y4 is 100-abs(35-R a )×7; On the contrary, the evaluation data Y4 is negative 20.

[0100] In practical applications, a virtual map is simulated and run to generate simulation result data. Evaluation data of the virtual map is determined based on the simulation result data, which can make the evaluation data more consistent with the actual situation. Furthermore, the virtual map generated based on the evaluation data is more consistent with the actual situation and more reasonable.

[0101] Optionally, the assessment data includes multiple sub-assessment items;

[0102] Accordingly, step 302 can be implemented as follows:

[0103] Determine the sub-assessment data corresponding to the sub-assessment item based on the simulation result data and the initial configuration plan corresponding to the sub-assessment item;

[0104] Determine the evaluation data based on the sub-evaluation data corresponding to the sub-evaluation items.

[0105] In the present embodiment, the evaluation data of the initial virtual map can be determined by multiple evaluation indicators. Wherein, each evaluation indicator can correspond to a sub-evaluation item, and the evaluation data can be determined by the sub-evaluation data corresponding to all sub-evaluation items. In conjunction with the above examples, the rationality of the virtual map can be measured in conjunction with indicators such as the length of the jump mechanism, the difference between the secondary reward mechanism and the primary reward mechanism, the ratio of total benefit to total cost, and the average number of throws. At this time, the sub-evaluation items can include the sub-evaluation items corresponding to the length of the jump mechanism, the sub-evaluation items corresponding to the difference between the secondary reward mechanism and the primary reward mechanism, the sub-evaluation items corresponding to the ratio of total benefit to total cost, and the sub-evaluation items corresponding to the average number of throws. The commentary data of the initial virtual map can be the sum of Y1, Y2, Y3 and Y4. Alternatively, different weights can be set for different sub-evaluation scores according to the importance of different evaluation indicators.

[0106] In practical applications, determining the evaluation data of a virtual map based on the sub-evaluation scores corresponding to multiple sub-evaluation items can make the evaluation data more scientific and reasonable, and thus generate a more reasonable virtual map.

[0107] Step 503: Determine a target configuration solution corresponding to the initial configuration solution based on the evaluation data and the initial configuration solution.

[0108] Step 504: Generate a target virtual map using the target configuration solution.

[0109] Optionally, step 504 may be implemented as follows:

[0110] When the target configuration scheme does not meet the preset restriction conditions, a target virtual map is generated according to the preset configuration scheme corresponding to the preset restriction conditions.

[0111] In one embodiment, constraints can be set for the target configuration scheme to control the virtual map generation process and ensure that the virtual map meets certain conditions. In conjunction with step 103, to prevent the first jump mechanism from appearing at the end of the virtual map, the preset constraint for the starting grid for the first jump mechanism can be less than or equal to 45, and the preset constraint for the target grid can be less than or equal to 60. Accordingly, the preset configuration scheme corresponding to the preset constraints can be set with a starting grid of 45 and a target grid of 60. If the starting grid of the first jump mechanism in the target configuration scheme is 60, it can be determined that the starting grid does not meet the preset constraint, and if the target grid is 68, it can be determined that the target grid does not meet the preset constraint. In this case, the target virtual map can be generated based on the starting grid 45 and the target grid 60 in the preset configuration scheme, with the starting grid of the first jump mechanism in the target virtual map being 45 and the target grid being 60. Similarly, to prevent the second jump mechanism from appearing at the front of the virtual map, the preset constraint for the starting grid for the second jump mechanism can be greater than or equal to 50, and the preset constraint for the target grid can be less than or equal to 95. The preset restriction scheme and preset restriction conditions can be specifically set according to map elements and user needs, and this embodiment does not impose any restrictions on this.

[0112] In practical applications, setting corresponding preset constraints for target configurations can control the virtual map generation process, ensuring that the virtual map generation meets certain requirements. For example, setting constraints for the first and second jump mechanisms can ensure that they appear in the desired locations on the map, allowing for a more rational placement of the first and second jump mechanisms within the virtual map.

[0113] Step 505: The target virtual map is used to replace the initial virtual map, and the process of generating the target virtual map is repeated until the set end condition is met.

[0114] Step 506: The initial virtual map whose evaluation data meets the evaluation conditions is used as a new virtual map.

[0115] Optionally, step 506 may be implemented as follows:

[0116] sorting the multiple initial virtual maps according to the evaluation data of the initial virtual maps to obtain a sorting result;

[0117] A preset number of initial virtual maps that are ranked first in the sorting results are used as new virtual maps.

[0118] In this embodiment, after obtaining multiple initial virtual maps and evaluation data for each initial virtual map, a preset number of initial virtual maps with higher evaluation data can be selected from the multiple initial virtual maps based on the evaluation data to serve as new virtual maps. Specifically, after obtaining the multiple initial virtual maps, the multiple initial virtual maps can be sorted from largest to smallest by the size of the evaluation data to obtain a sorted result. After obtaining the sorted result, a preset number of initial virtual maps, starting with the one with the largest evaluation data, are determined to meet the evaluation criteria, thereby obtaining a new virtual map. The specific value of the preset number can be set as needed and is not limited in this embodiment.

[0119] In practical applications, a preset number of virtual maps with the highest rankings are selected from a plurality of virtual maps according to the ranking results as new virtual maps, so that a virtual map that meets the quantity requirements and is relatively reasonable can be obtained.

[0120] In summary, in this embodiment, evaluation data for an initial virtual map is obtained. Based on the evaluation data and the initial configuration plan, a target configuration plan corresponding to the initial configuration plan is determined. The target configuration plan is used to generate a target virtual map. The target virtual map is then used to replace the initial virtual map. This process of generating the target virtual map is repeated until a set termination condition is met. The initial virtual map whose evaluation data meets the evaluation condition is then used as the new virtual map. During the virtual map generation process, the configuration of map elements is adjusted based on the virtual map evaluation data to generate a new virtual map. This can make the layout of the generated virtual map more reasonable and avoid the occurrence of numerous virtual maps with unreasonable layouts.

[0121] Figure 6 This is a block diagram of a virtual map generation device provided by an embodiment of the present application. Figure 6 As shown, the apparatus 600 may include:

[0122] The acquisition module 601 is configured to acquire evaluation data of the initial virtual map; the evaluation data is determined according to an initial configuration scheme of at least one map element in the initial virtual map.

[0123] The determination module 602 is configured to determine a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme.

[0124] The generation module 603 is used to generate a target virtual map using a target configuration solution.

[0125] A replacement module 604 is configured to replace the initial virtual map with the target virtual map, and repeat the process of generating the target virtual map until a set end condition is met;

[0126] The selection module 605 is configured to use the initial virtual map whose evaluation data meets the evaluation conditions as a new virtual map.

[0127] Optionally, the acquisition module 601 includes:

[0128] The acquisition unit is used to acquire simulation result data generated when the initial virtual map is simulated multiple times; the simulation result data corresponds to the map elements.

[0129] The determination unit is used to determine the evaluation data according to the initial configuration scheme and the simulation result data.

[0130] Optionally, the evaluation data includes multiple sub-evaluation items.

[0131] The determination unit is specifically used to determine the sub-assessment data corresponding to the sub-assessment item based on the simulation result data and the initial configuration plan corresponding to the sub-assessment item.

[0132] Determine the evaluation data based on the sub-evaluation data corresponding to the sub-evaluation items.

[0133] Optionally, the acquisition module is specifically configured to determine the evaluation data according to an initial configuration scheme of the target map element.

[0134] Optionally, the selection module 605 is specifically configured to sort the multiple initial virtual maps according to the evaluation data of the initial virtual maps to obtain a sorting result; and use a preset number of initial virtual maps that are ranked first in the sorting result as new virtual maps.

[0135] Optionally, the selection module 605 is specifically configured to use an initial virtual map whose evaluation data is greater than or equal to a preset evaluation threshold as a new virtual map.

[0136] Optionally, the generating module 603 is further configured to generate a target virtual map according to a preset configuration scheme corresponding to the preset restriction condition when the target configuration scheme does not meet the preset restriction condition.

[0137] In summary, in this embodiment, evaluation data for an initial virtual map is obtained. Based on the evaluation data and the initial configuration plan, a target configuration plan corresponding to the initial configuration plan is determined. The target configuration plan is used to generate a target virtual map. The target virtual map is then used to replace the initial virtual map. This process of generating the target virtual map is repeated until a set termination condition is met. The initial virtual map whose evaluation data meets the evaluation condition is then used as the new virtual map. During the virtual map generation process, the configuration of map elements is adjusted based on the virtual map evaluation data to generate a new virtual map. This can make the layout of the generated virtual map more reasonable and avoid the occurrence of numerous virtual maps with unreasonable layouts.

[0138] The virtual map generation device provided in the embodiment of the present application has the corresponding functional modules for executing the virtual map generation method, can execute the virtual map generation method provided in the embodiment of the present application, and can achieve the same beneficial effects.

[0139] In another embodiment provided by the present invention, an electronic device is also provided. The electronic device may include: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the program, each process of the above-mentioned virtual map generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0140] For example, Figure 7 As shown, Figure 7 This is a hardware structure diagram of an electronic device provided in an embodiment of the present application. The electronic device may specifically include: a processor 701, a storage device 702, a display screen 703 with a touch function, an input device 704, an output device 705, and a communication device 706. The number of processors 701 in the electronic device may be one or more. Figure 7 In the figure, a processor 701 is used as an example. The processor 701, storage device 702, display screen 703, input device 704, output device 705 and communication device 706 of the electronic device can be connected via a bus or other means.

[0141] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when executed on a computer, enable the computer to execute any of the virtual map generation methods described in the above embodiments.

[0142] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the virtual map generating method described in any one of the above embodiments.

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

[0144] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.

[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for generating a virtual map, characterized in that: include: Obtaining evaluation data of an initial virtual map; the evaluation data is determined based on an initial configuration scheme of at least one map element in the initial virtual map; the initial virtual map is obtained by randomly combining the map elements according to a preset rule; the evaluation data is used to measure the rationality of the initial virtual map; The initial virtual map includes the initial configuration scheme; Determining a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme; Generating a target virtual map using the target configuration scheme; The target virtual map is used to replace the initial virtual map, and the process of generating the target virtual map is repeated until a set end condition is met; the end condition includes that the number of the target virtual maps reaches a target number; The initial virtual map whose evaluation data meets the evaluation conditions is used as a new virtual map; The step of determining a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme includes: Optimizing the initial configuration scheme according to the evaluation data to obtain a target configuration scheme corresponding to the initial configuration scheme; The step of using the initial virtual map whose evaluation data meets the evaluation conditions as a new virtual map includes: sorting the plurality of initial virtual maps according to the evaluation data of the initial virtual maps to obtain a sorting result; A preset number of the initial virtual maps that are ranked first in the sorting results are used as new virtual maps.

2. The method according to claim 1, characterized in that The obtaining of evaluation data of the initial virtual map includes: Acquire simulation result data generated when the initial virtual map is simulated multiple times; the simulation result data corresponds to the map element; The evaluation data is determined according to the initial configuration scheme and the simulation result data.

3. The method according to claim 2, characterized in that The evaluation data includes a plurality of sub-evaluation items; The determining of the evaluation data according to the initial configuration scheme and the simulation result data comprises: Determining sub-assessment data corresponding to the sub-assessment item according to the simulation result data corresponding to the sub-assessment item and the initial configuration scheme; The evaluation data is determined according to the sub-evaluation data corresponding to the sub-evaluation items.

4. The method according to claim 1, wherein The obtaining of evaluation data of the initial virtual map includes: The evaluation data is determined according to an initial configuration scheme of the target map element.

5. The method according to claim 1, wherein The step of using the initial virtual map whose evaluation data meets the evaluation conditions as a new virtual map includes: The initial virtual map whose evaluation data is greater than or equal to a preset evaluation threshold is used as a new virtual map.

6. The method according to any one of claims 1 to 5, characterized in that When the target configuration scheme is adopted to generate the target virtual map, the method includes: When the target configuration scheme does not meet the preset restriction condition, the target virtual map is generated according to a preset configuration scheme corresponding to the preset restriction condition.

7. A virtual map generating device, characterized in that: include: an acquisition module, configured to acquire evaluation data of an initial virtual map; the evaluation data being determined based on an initial configuration scheme of at least one map element in the initial virtual map; the initial virtual map being obtained by randomly combining the map elements according to a preset rule; the evaluation data being used to measure the rationality of the initial virtual map; The initial virtual map includes the initial configuration scheme; a determination module, configured to determine a target configuration scheme corresponding to the initial configuration scheme based on the evaluation data and the initial configuration scheme; A generating module, configured to generate a target virtual map using the target configuration scheme; a replacement module, configured to replace the initial virtual map with the target virtual map, and repeatedly execute the process of generating the target virtual map until a set end condition is met; the end condition includes that the number of the target virtual maps reaches a target number; A selection module is used to use the initial virtual map whose evaluation data meets the evaluation conditions as a new virtual map; The determining module is specifically configured to optimize the initial configuration scheme according to the evaluation data to obtain a target configuration scheme corresponding to the initial configuration scheme; The selection module is specifically configured to sort the plurality of initial virtual maps according to the evaluation data of the initial virtual maps to obtain a sorting result; and select a preset number of the initial virtual maps that are ranked first in the sorting result as new virtual maps.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the virtual map generation method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the virtual map generation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for generating random game map, electronic equipment and storage medium

    CN109675313A

  • Game content generation method and device, storage medium and computer equipment

    CN111603769A