Interaction methods and devices for virtual scenes

By generating expected operation results and mapping relationship queries, the launch of virtual props is controlled, solving the problems of low efficiency in virtual scene design and waste of computing resources, and realizing precise control of operation results and improved stability of virtual scenes.

CN120053958BActive Publication Date: 2026-01-30BEIJING QIMIAO KINGDOM TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510146095.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2026-01-30
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

Existing technologies for virtual scene design are inefficient, make it difficult to accurately control the results of operations, and result in a serious waste of computing resources.

Method used

By generating the desired operation result, the motion information of the virtual prop is obtained, and the target candidate motion information and operation result are queried based on the mapping relationship to control the launch of the virtual prop.

Benefits of technology

It enables precise control over the results of operations within a virtual scene, reduces the consumption of computing resources, and improves design efficiency, stability, smoothness, and realism of the virtual scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120053958B_ABST
    Figure CN120053958B_ABST
Patent Text Reader

Abstract

This application provides an interaction method and apparatus for a virtual scene. The method includes: in response to a launch operation of a virtual prop in the virtual scene, generating a desired operation result of the launch operation and acquiring motion information of the virtual prop indicated by the launch operation; acquiring multiple mapping relationships; querying the multiple mapping relationships based on the motion information and the desired operation result; when a target mapping relationship is found from the multiple mapping relationships, controlling the virtual prop to launch according to the target candidate motion information in the target mapping relationship; and controlling the operation result of the launch operation to be the target candidate operation result in the target mapping relationship; wherein the difference between the target candidate motion information and the motion information satisfies a first difference condition, and the difference between the target candidate operation result and the desired operation result satisfies a second difference condition. This application enables precise control of operation results within a virtual scene, reduces the consumption of computing resources, and improves the design efficiency of the virtual scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technical field, and particularly relates to a virtual scene interaction method and device. BACKGROUND

[0002] With the development of computer technology, electronic devices can realize more rich and vivid virtual scenes. The virtual scene refers to a digital scene outlined by a computer through digital communication technology, and a user can interact with various virtual props in the virtual scene to obtain feedback.

[0003] Taking a player launching a virtual prop in a virtual scene and obtaining an operation result (such as a game score, a game income, etc.) as an example, in the related art, an obtained operation result is determined according to an obstacle layout (such as a position, a density) of the virtual scene and a launching condition (such as a launching angle, a launching direction, etc.) of the virtual prop. However, this way 1) requires repeatedly and accurately adjusting the layout (such as the position and the density of the obstacle) of the virtual scene and the launching condition during virtual scene design, relies on a large amount of manual testing and adjustment, and thus leads to low design efficiency of the virtual scene and difficulty in accurately controlling an expected operation result; and 2) has a large amount of real-time calculation during launching, and thus leads to waste of computing resources. SUMMARY

[0004] Embodiments of the present application provide a virtual scene interaction method, device, electronic device, computer readable storage medium and computer program product, which can realize accurate control of an operation result in a virtual scene, reduce occupation of computing resources, and improve design efficiency of the virtual scene.

[0005] The technical solution of the embodiments of the present application is implemented as follows:

[0006] The embodiments of the present application provide a virtual scene interaction method, comprising:

[0007] In response to a launching operation on a virtual prop in a virtual scene, generating an expected operation result of the launching operation, and obtaining motion information of the virtual prop indicated by the launching operation;

[0008] Obtaining a plurality of mapping relationships, the mapping relationship being a mapping relationship between candidate motion information and candidate operation results;

[0009] Based on the motion information and the expected operation result, querying the plurality of mapping relationships;

[0010] When a target mapping relationship is queried from the plurality of mapping relationships, controlling the virtual prop to be launched according to target candidate motion information in the target mapping relationship, and controlling an operation result of the launching operation to be a target candidate operation result in the target mapping relationship;

[0011] wherein a difference between the target candidate motion information and the motion information satisfies a first difference condition, and a difference between the target candidate operation result and the expected operation result satisfies a second difference condition.

[0012] The embodiment of the present application further provides an interaction device of a virtual scene, comprising:

[0013] a generating module, configured to generate an expected operation result of a shooting operation of a virtual prop in a virtual scene, and acquire motion information of the virtual prop indicated by the shooting operation;

[0014] a acquiring module, configured to acquire a plurality of mapping relationships, the mapping relationship being a mapping relationship between candidate motion information and candidate operation results;

[0015] a querying module, configured to query the plurality of mapping relationships based on the motion information and the expected operation result;

[0016] a control module, configured to control the virtual prop to shoot according to target candidate motion information in a target mapping relationship when the target mapping relationship is queried from the plurality of mapping relationships, and control an operation result of the shooting operation to be a target candidate operation result in the target mapping relationship;

[0017] wherein a difference between the target candidate motion information and the motion information satisfies a first difference condition, and a difference between the target candidate operation result and the expected operation result satisfies a second difference condition.

[0018] The embodiment of the present application further provides an electronic device, comprising:

[0019] a memory, configured to store computer executable instructions;

[0020] a processor, configured to execute the computer executable instructions stored in the memory, so as to realize the interaction method of the virtual scene provided by the embodiment of the present application.

[0021] The embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions or computer programs, and the computer executable instructions or computer programs are executed by a processor, so as to realize the interaction method of the virtual scene provided by the embodiment of the present application.

[0022] The embodiment of the present application further provides a computer program product, comprising computer executable instructions or computer programs, and the computer executable instructions or computer programs are executed by a processor, so as to realize the interaction method of the virtual scene provided by the embodiment of the present application.

[0023] The embodiment of the present application has the following beneficial effects:

[0024] With the above embodiments of the present application, when a shooting operation on a virtual prop in a virtual scene is received, a desired operation result of the shooting operation is first generated, and motion information of the virtual prop indicated by the shooting operation is acquired, then based on the motion information and the desired operation result, a plurality of mapping relationships are queried, when a target mapping relationship is queried from the plurality of mapping relationships, the virtual prop is controlled to shoot according to target candidate motion information in the target mapping relationship, and the operation result of the shooting operation is controlled to be a target candidate operation result in the target mapping relationship; wherein the difference between the target candidate motion information and the motion information satisfies a first difference condition, and the difference between the target candidate operation result and the desired operation result satisfies a second difference condition.

[0025] In this way, by querying the mapping relationship based on the motion information and the desired operation result, the motion information required for shooting the virtual prop and the operation result that can be obtained by shooting the virtual prop can be determined, therefore, 1) without considering the layout of the virtual scene, the operation result can be quickly determined, reducing the occupation of computing resources and improving the performance of the computing device, thereby improving the stability, smoothness and reality of the virtual scene; 2) based on the mapping relationship to determine the operation result, the accurate control of the operation result of shooting the virtual prop can be realized, so that the distribution of the operation result can be controlled to be more reasonable, the balance of the operation result of the virtual scene is maintained, and the experience of the virtual scene is improved; 3) since the operation result can be quickly determined without relying on the layout of the virtual scene, when designing the virtual scene, the designer does not need to repeatedly adjust the layout of the virtual scene, thereby improving the design efficiency of the virtual scene and the scalability of the virtual scene, and adapting to the rapidly changing design requirements of the virtual scene. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 is an architecture schematic diagram of an interaction system of a virtual scene provided by an embodiment of the present application;

[0027] Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0028] Figure 3 is a flow schematic diagram of an interaction method of a virtual scene provided by an embodiment of the present application;

[0029] Figure 4 is a flow schematic diagram of an interaction method of a virtual scene provided by an embodiment of the present application;

[0030] Figure 5 is a flow schematic diagram of an interaction method of a virtual scene provided by an embodiment of the present application;

[0031] Figure 6 is a flow schematic diagram of an interaction method of a virtual scene provided by an embodiment of the present application;

[0032] Figure 7 FIG. 1 is an interface schematic diagram of a virtual scene provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the purposes, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with reference to the drawings, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0034] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0035] In the following description, the terms "first\second\third" are only to distinguish similar objects, and do not represent a specific order of the objects, and it can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0036] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0037] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0038] In the application of the related data collection process in the embodiments of the present application, the informed consent or separate consent of the personal information subject should be obtained strictly in accordance with the requirements of the relevant laws and regulations, and the subsequent data use and processing behavior should be carried out within the scope of authorization of the laws and regulations and the personal information subject.

[0039] Before the embodiments of the present application are further described in detail, the terms and terms involved in the embodiments of the present application are explained, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations.

[0040] 1) Client, an application running in an electronic device for providing various services, such as a client supporting a virtual scene (such as a game scene).

[0041] 2) Responsive, used to indicate a condition or state on which an operation is dependent, when the dependent condition or state is met, one or more operations performed can be real-time or have a set delay; in the absence of a specific description, there is no restriction on the execution order of multiple operations performed.

[0042] 3) Virtual scene, a virtual scene displayed (or provided) by a computer program running on a terminal. The virtual scene can be a simulated environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. In the embodiments of the present application, the virtual scene can support the player character to launch virtual props, for example, the virtual props can be virtual marbles, virtual arrows, virtual bullets, etc. The virtual scene can also include obstacles, such as obstacles that can bounce virtual marbles, targets for virtual arrows or virtual bullets, obstacles that can be hit by virtual arrows or virtual bullets, etc. Therefore, the virtual scene can support players to experience marble play, for example, players launch virtual marbles, virtual marbles bounce in various bouncing obstacles, and finally bounce into the set marble interface to get the operation result (such as score, reward, etc. according to the bouncing situation) of launching the virtual marble; the virtual scene can also support players to experience shooting play, for example, players launch virtual bullets, virtual bullets hit the target after being launched, and get the operation result (such as score according to the position of the target hit) of launching the virtual bullet; the virtual scene can also support players to experience shooting play, for example, players launch virtual arrows, virtual arrows hit obstacles in turn after being launched, and get the operation result (such as score according to the number of obstacles hit) of launching the virtual arrow; etc.

[0043] The embodiments of the present application provide an interaction method, device, electronic device, computer readable storage medium and computer program product of a virtual scene, which can realize accurate control of operation results in a virtual scene, reduce the occupation of computing resources, and improve the design efficiency of the virtual scene. Next, based on the above description of the terms and terms involved in the embodiments of the present application, the embodiments of the present application will be described in detail.

[0044] The interaction system of the virtual scene provided by the embodiments of the present application is described below. Referring to Figure 1 , Figure 1Fig. 1 is a schematic diagram of an architecture of an interactive system of a virtual scene according to an embodiment of the present application. To support an exemplary application, the interactive system of the virtual scene 100 includes a server 200, a network 300, and a terminal 400. The terminal 400 connects to the server 200 through the network 300, which can be a wide area network or a local area network, or a combination of both, and uses wireless or wired links to implement data transmission.

[0045] Here, the terminal 400 (e.g., running a client supporting a virtual scene (e.g., a game scene)) is configured to, in response to a shooting operation on a virtual prop in the virtual scene, generate an expected operation result of the shooting operation and obtain motion information of the virtual prop indicated by the shooting operation; send an operation result obtaining request to the server 200, the operation result obtaining request being configured to obtain an operation result of the shooting operation, the operation result obtaining request including the motion information and the expected operation result; the server 200 is configured to receive the operation result obtaining request; parse the operation result obtaining request to obtain the motion information and the expected operation result; obtain a plurality of mapping relationships, the mapping relationship being a mapping relationship between candidate motion information and candidate operation results; query the plurality of mapping relationships based on the motion information and the expected operation result; when a target mapping relationship is queried from the plurality of mapping relationships, return target candidate motion information and target candidate operation results in the target mapping relationship to the terminal 400; wherein a difference between the target candidate motion information and the motion information satisfies a first difference condition, and a difference between the target candidate operation result and the expected operation result satisfies a second difference condition; the terminal 400 receives the target candidate motion information and the target candidate operation result returned by the server 200; controls the virtual prop to be shot according to the target candidate motion information, and controls the operation result of the shooting operation to be the target candidate operation result.

[0046] The method for interacting with a virtual scene provided in the embodiments of the present application is implemented by an electronic device, for example, can be implemented by a terminal alone, can be implemented by a server alone, and can be implemented by a terminal and a server in cooperation. The electronic device implementing the method for interacting with a virtual scene provided in the embodiments of the present application can be various types of terminals or servers. The server (for example, the server 200) can be a stand-alone physical server, can be a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal (for example, the terminal 400) can be a notebook computer, a tablet computer, a desktop computer, a smart phone, a smart voice interaction device (for example, a smart speaker), a smart home appliance (for example, a smart television), a smart watch, a vehicle-mounted terminal, a wearable device, a virtual reality (VR) device, a flying device, and the like, but is not limited thereto. The terminal and the server can be connected directly or indirectly through wired or wireless communication, and the embodiments of the present application do not limit this.

[0047] In some embodiments, the terminal or the server can implement the method for interacting with a virtual scene provided in the embodiments of the present application by running various computer executable instructions or computer programs. For example, the computer executable instructions can be microprogram level commands, machine instructions or software instructions. The computer program can be a native program or a software module in an operating system; can be a native application program (APP), that is, a program that needs to be installed in an operating system to run, for example, a game APP; or can be a small program that can be embedded into any APP, that is, a program that only needs to be downloaded into a browser environment to run. In summary, the above computer executable instructions can be any form of instructions, and the above computer programs can be any form of application programs, modules or plug-ins.

[0048] The electronic device implementing the method for interacting with a virtual scene provided in the embodiments of the present application is described below. Referring to Figure 2 , Figure 2 is a structural schematic diagram of the electronic device provided in the embodiments of the present application. The electronic device 500 provided in the embodiments of the present application can be a terminal or a server. As shown in Figure 2As shown, the electronic device 500 includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components of the electronic device 500 are coupled together by a bus system 540, which is configured to permit communication between the components. It is understood that the bus system 540 can include power busses, control busses, and status busses, in addition to data busses. For the sake of clarity, the various busses are shown as the bus system 540 in Figure 2

[0049] The processor 510 can be an integrated circuit chip that has processing capability, such as a general purpose processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general purpose processor can be a microprocessor, or any conventional processor, or the like.

[0050] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532 that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons and controls.

[0051] The memory 550 can be removable, non-removable, or a combination thereof. The memory 550 can include one or more memory devices physically located in proximity to the processor 510. The memory 550 includes volatile memory or non-volatile memory, and can include both volatile and non-volatile memory. Non-volatile memory can be read only memory (ROM), and volatile memory can be random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0052] In some embodiments, the memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or a subset or superset thereof, which are exemplarily illustrated below.

[0053] The operating system 551 includes system programs for handling various basic system services and performing hardware-dependent tasks, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks.

[0054] ​The network communication module 552 is configured to communicate with other electronic devices via one or more network interfaces 520 (wired or wireless), such as Bluetooth, WiFi, Universal Serial Bus (USB), and the like.

[0055] The presentation module 553 is configured to enable presentation of information (e.g., user interfaces for operating the peripheral device and displaying content and information) via one or more output devices 531 (e.g., display screen, speaker, and the like) associated with the user interface 530.

[0056] The input processing module 554 is configured to detect and interpret one or more user inputs or interactions from one or more input devices 532.

[0057] In some embodiments, the virtual scene interaction apparatus provided by the embodiments of the present application can be implemented in software, Figure 2 The virtual scene interaction apparatus 555 stored in the memory 550 is in the form of software such as programs and plug-ins, and includes the following software modules: the generation module 5551, the acquisition module 5552, the query module 5553, and the control module 5554. These modules are logical, and thus can be combined or further split according to the implemented functions. The functions of each module will be described below.

[0058] The virtual scene interaction method provided by the embodiments of the present application will be described below. As described above, the virtual scene interaction method provided by the embodiments of the present application is implemented by an electronic device, such as a server or a terminal, alone or in cooperation with each other. Therefore, the execution subject of each step will not be repeated below. Please refer to Figure 3 , Figure 3 FIG. 1 is a flowchart of the virtual scene interaction method provided by the embodiments of the present application. The virtual scene interaction method provided by the embodiments of the present application includes the following steps:

[0059] In step 101, in response to a shooting operation on a virtual prop in a virtual scene, a desired operation result of the shooting operation is generated, and motion information of the virtual prop indicated by the shooting operation is acquired.

[0060] In the embodiments of the present application, the virtual scene can support the player character to launch a virtual prop, for example, the virtual prop can be a virtual marble, a virtual arrow, a virtual bullet, a virtual ball, etc., which can be launched (or thrown); the virtual scene can also include obstacles, such as a bouncing obstacle that can bounce a virtual marble, a target for a virtual arrow or a virtual bullet, an obstacle that can be penetrated by a virtual arrow or a virtual bullet, etc. Therefore, the virtual scene can support the player to experience a marble game, for example, the player launches a virtual marble, the virtual marble repeatedly bounces in various bouncing obstacles, and finally bounces into a set marble interface to obtain an operation result (such as a score, a reward, etc. according to the bouncing situation) of launching the virtual marble; the virtual scene can also support the player to experience a shooting game, for example, the player launches a virtual bullet, the virtual bullet hits a target after being launched to obtain an operation result (such as a score according to the position of the target hit) of launching the virtual bullet; the virtual scene can also support the player to experience a shooting game, for example, the player launches a virtual arrow, the virtual arrow sequentially penetrates obstacles after being launched to obtain an operation result (such as a score according to the number of obstacles penetrated) of launching the virtual arrow; etc. It should be noted that different virtual scenes can be set according to different virtual props (such as the position and number of obstacles, the relationship between the obstacles and the operation result), which are not limited herein.

[0061] For step 101, the player can trigger a launch operation for a virtual prop (such as a virtual marble), and the electronic device (such as a terminal) generates an expected operation result of the launch operation in response to the launch operation. For example, a random number can be generated by a random number generation algorithm, and the random number is taken as the expected operation result. At the same time, the motion information of the virtual prop indicated by the launch operation is obtained, which is the initial motion information of the virtual prop at the time of launch. For example, the motion information can include initial speed, initial force, initial motion direction, initial acceleration, etc.

[0062] In some embodiments, the candidate operation results in the plurality of mapping relationships conform to a target distribution; based on this, referring to Figure 4 The expected operation result of the launch operation can be generated by performing steps 201-204: step 201, obtaining a target kernel function and a bandwidth parameter; step 202, based on the target kernel function and the bandwidth parameter, kernel density estimation is performed on the candidate operation results in the plurality of mapping relationships to obtain a probability density function; step 203, the probability density function is converted to obtain a target function conforming to the target distribution; step 204, based on the target function, the expected operation result of the launch operation is generated.

[0063] Here, the plurality of mapping relationships are pre-constructed, and the mapping relationship is a mapping relationship between a candidate motion information and a candidate operation result, that is, each candidate motion information has a corresponding candidate operation result. It should be noted that the candidate motion information is for a launch operation of a virtual prop, and the candidate operation result is an operation result of the launch operation. When the virtual prop is launched with the candidate motion information, the obtained operation result is the candidate operation result that has a mapping relationship with the candidate motion information. The candidate motion information is similar to the above motion information and can also include an initial speed, an initial force, an initial motion direction, an initial acceleration, and the like. The plurality of candidate operation results included in the plurality of mapping relationships conform to a target distribution. For example, the target distribution can be a normal distribution, which is not limited in this embodiment.

[0064] Since the candidate operation results in the plurality of mapping relationships conform to the target distribution, based thereon, the expected operation result of the launch operation can be generated in the following manner: for step 201, obtaining a target kernel function and a bandwidth parameter. When generating the expected operation result, a probability density function is first constructed through kernel density estimation, and therefore the kernel density estimation parameter for constructing the probability density function needs to be obtained in step 201. The kernel density estimation parameter includes a target kernel function and a bandwidth parameter h used for kernel density estimation. In actual application, different target kernel functions can be selected to perform smoothing processing on data. For example, the target kernel function can be a Gaussian kernel function, and the bandwidth parameter h can be manually set (for example, set according to an empirical value) or automatically set (for example, an optimal value is automatically selected by using a cross-validation method). It should be noted that the bandwidth parameter h is a key parameter in kernel density estimation, which controls the width of the target kernel function, that is, the smoothing degree. If the h value is too small, the estimated probability density function will be too complex and overfitting will occur. If the h value is too large, the estimated function will be too smooth and lose detailed information.

[0065] For step 202, a plurality of candidate operation results included in the plurality of mapping relationships are first extracted, and then kernel density estimation is performed on the candidate operation results in the plurality of mapping relationships based on the target kernel function and the bandwidth parameter, to obtain a probability density function. Here, the plurality of candidate operation results are smoothed by using the target kernel function and the bandwidth parameter, so as to estimate the probability density function of the plurality of candidate operation results. The probability density function can reflect the distribution of the plurality of candidate operation results near different values. Specifically, kernel density estimation estimates the probability density function of the plurality of candidate operation results by using the target kernel function for each candidate operation result and adding up the contributions of these target kernel functions.

[0066] For step 203, the probability density function is transformed to obtain a target function conforming to a target distribution. The transformation process can include standardization and scaling. That is, first the probability density function is standardized to obtain a standard density function, and then the standard density function is scaled to obtain a target function conforming to a target distribution. In some embodiments, the above step 203 "transforming the probability density function to obtain a target function conforming to a target distribution" can be implemented by performing the following steps: obtaining a standard parameter for standardization, and based on the standard parameter, standardizing the probability density function to obtain a standard density function; obtaining a requirement parameter of the target distribution, and based on the requirement parameter, scaling the standard density function to obtain a target function conforming to the target distribution.

[0067] Here, when performing the standardization, the standard parameter for standardization can be first obtained, so that the probability density function is standardized based on the standard parameter to obtain a standard density function. In practical applications, since the probability density function describes the distribution of the plurality of candidate operation results, it is first necessary to check the distribution characteristics of the plurality of candidate operation results, and if it is determined that the plurality of candidate operation results are approximately uniformly distributed within a set interval, then the probability density function is standardized. Further, the standard parameter can be pre-set, such as the standardization parameter can be the mean value of 0 and the variance of 1, so that the standardization of the probability density function based on the standardization parameter will make the mean value of the obtained standard density function 0 and the variance 1.

[0068] Next, in order to make the standard density function conform to the required target distribution (such as a normal distribution), the standard density function needs to be scaled. When performing the scaling, first the requirement parameter of the target distribution is obtained, such as the requirement parameter of the normal distribution includes: mean and standard deviation, which can be set according to the requirement, such as the target distribution is a standard normal distribution, then the mean included in the requirement parameter is 0, and the standard deviation is 1. After obtaining the requirement parameter, the scaling coefficient can be determined according to the requirement parameter, which can make the mean and standard deviation of the scaled target function conform to the requirement parameter. The scaling coefficient can be the inverse of the standard deviation of the normal distribution. For example, the mean included in the requirement parameter is 0, and the standard deviation is 1, then the scaling coefficient can be the inverse of the standard deviation of the standard normal distribution. Finally, the standard density function is scaled according to the scaling coefficient to obtain a target function conforming to the target distribution. In this way, the probability density function obtained by kernel density estimation is adjusted to a target distribution (such as a normal distribution) conforming to specific parameters (i.e. the above requirement parameter).

[0069] For step 204, the expected operation result of the emission operation is generated based on the target function. In some embodiments, referring toFigure 5 The step 204 of "generating the expected operation result of the launch operation based on the target function" can be implemented by performing the following steps 2041-2043: step 2041, determining the inverse function of the cumulative distribution function of the target function; step 2042, generating a first random number conforming to a uniform distribution; and step 2043, calling the inverse function to process the first random number to obtain a second random number sampled from the target distribution, and taking the second random number as the expected operation result of the launch operation.

[0070] Here, for the step 2041, first, the cumulative distribution function of the target function is determined, and then the inverse function of the cumulative distribution function is determined. For the step 2042, a set of first random numbers conforming to a uniform distribution is needed to be generated, and these first random numbers are usually in the interval [0, 1). The first random number can be generated by a pre-set random number generator. For the step 2043, first, a target first random number is randomly sampled from the first random numbers conforming to a uniform distribution, and then the inverse function of the cumulative distribution function of the target function is called to process the target first random number to obtain a second random number sampled from the target distribution. Specifically, the target first random number can be input into the inverse function, and the inverse function is used to perform function calculation on the target first random number to obtain the second random number. The second random number can be considered as being randomly drawn from the target distribution (i.e., a random number conforming to the target distribution). Finally, the second random number is taken as the expected operation result of the launch operation.

[0071] Step 102: Obtain a plurality of mapping relationships.

[0072] The mapping relationship is a mapping relationship between candidate motion information and candidate operation results.

[0073] For the step 102, a plurality of mapping relationships are obtained, and the plurality of mapping relationships are pre-constructed. The mapping relationship is a mapping relationship between candidate motion information and candidate operation results, that is, each candidate motion information has a corresponding candidate operation result. It should be noted that the candidate motion information is for the launch operation of the virtual prop, and the candidate operation result is the operation result of the launch operation. When the virtual prop is launched with the candidate motion information, the operation result obtained is the candidate operation result that has a mapping relationship with the candidate motion information. The candidate motion information is similar to the above-mentioned motion information, and can also include initial speed, initial force size, initial motion direction, initial acceleration, etc.

[0074] In some embodiments, referring to Figure 6The mapping relationship can be constructed by performing the following steps 301-305: step 301, obtaining a plurality of simulation motion information of the virtual prop; step 302, for each simulation motion information, simulating the virtual prop being launched according to the simulation motion information, and simulating the launched virtual prop moving in the virtual scene; step 303, for each simulation motion information, when the virtual prop launched based on the simulation motion information stops moving, determining the simulation operation result corresponding to the simulation motion information based on the simulation motion data of the virtual prop in the virtual scene; step 304, collecting target simulation operation result meeting a target distribution from the plurality of simulation operation results, and collecting target simulation motion information corresponding to the target simulation operation result from the plurality of simulation motion information; and step 305, for each target simulation motion information, taking the target simulation motion information as candidate motion information, taking the target simulation operation result corresponding to the target simulation motion information as candidate operation result, and constructing the mapping relationship between the candidate motion information and the candidate operation result.

[0075] Here, the movement of the virtual prop in the virtual scene (including the launch, movement, and operation result after stopping of the virtual prop) can be simulated multiple times, and the number of times of simulation can be set according to requirements. Based on this, for step 301, a plurality of simulation motion information of the virtual prop in the simulation process is obtained. The simulation motion information is the motion information of the virtual prop generated by the above multiple simulation behaviors, and the simulation motion information can include but is not limited to initial speed, initial force, initial movement direction, initial acceleration, etc. For step 302, for each simulation motion information, the movement process of the virtual prop in the virtual scene is simulated based on the simulation motion information, that is, the virtual prop is launched according to the simulation motion information, and the launched virtual prop is simulated to move in the virtual scene.

[0076] For step 303, for each simulation motion information, when the virtual prop launched based on the simulation motion information stops moving, the simulation motion data of the virtual prop in the virtual scene is obtained. For example, taking a virtual prop as a virtual marble, the player launches the virtual marble, the virtual marble repeatedly rebounds in various rebound obstacles, and finally rebounds into a set marble interface to obtain the operation result of launching the virtual marble. The simulation motion data can include the rebound obstacles contacted by the virtual marble, the rebounding rate of each rebound obstacle, the final marble interface entered, and the like. Thus, the simulation operation result corresponding to the simulation motion information is determined based on the simulation motion data of the virtual prop in the virtual scene. Continuing the above example, for example, a corresponding rebounding rate can be set for each rebound obstacle, and a corresponding final rate can be set for the marble interface. Based on this, the rebounding rates of all rebound obstacles contacted by the virtual marble can be multiplied to obtain a first result, and the first result and the final rate of the marble interface can be multiplied to obtain the simulation operation result.

[0077] For step 304, after obtaining the plurality of simulation operation results, target simulation operation results conforming to a target distribution are collected from the plurality of simulation operation results, and the target distribution can be set according to requirements, such as a normal distribution; at the same time, target simulation motion information corresponding to the target simulation operation results is collected from the plurality of simulation motion information. For step 305, for each target simulation motion information, the target simulation motion information is taken as candidate motion information, and the target simulation operation result corresponding to the target simulation motion information is taken as candidate operation result, so as to construct a mapping relationship between the candidate motion information and the candidate operation result. In this way, a plurality of mapping relationships are obtained.

[0078] In some embodiments, the "collecting target simulation operation results conforming to a target distribution from the plurality of simulation operation results" in step 304 can be implemented by performing the following steps: obtaining distribution parameters of the target distribution, and determining an operation result interval based on the distribution parameters; collecting a plurality of target simulation operation results conforming to the target distribution and located in the operation result interval from the plurality of simulation operation results; the "collecting target simulation motion information corresponding to the target simulation operation results from the plurality of simulation motion information" in step 304 can be implemented by performing the following steps: for each target simulation operation result, collecting target simulation motion information corresponding to the target simulation operation result and having a target number from the plurality of simulation motion information.

[0079] Here, step 304 can be implemented based on the following manner: first, obtaining distribution parameters of the target distribution, which can include a mean and a standard deviation of the target distribution, and the target distribution can be a normal distribution; then, determining an operation result interval according to the distribution parameters, and the operation result interval is an interval in which the target simulation operation result is located. Thus, a plurality of target simulation operation results conforming to the target distribution and located in the operation result interval are collected from the plurality of simulation operation results. Based on this, step 305 can be implemented based on the following manner: for each target simulation operation result, the following processing is performed respectively: collecting target simulation motion information corresponding to the target simulation operation result and having a target number from the plurality of simulation motion information. It should be noted that the target number is not less than a preset number, and the distribution density of the target simulation motion information in the motion information interval is not less than a preset density.

[0080] In some embodiments, the virtual scene includes at least one virtual obstacle and at least one virtual interface of a virtual prop. After controlling the virtual prop to launch according to the target candidate motion information in the target mapping relationship, the following steps can also be performed: controlling the virtual prop to move between at least one virtual obstacle; based on the movement of the virtual prop between at least one virtual obstacle, controlling the virtual prop to enter the target virtual interface among at least one virtual interface; correspondingly, the following step can also be performed: displaying the target candidate operation result. It should be noted that controlling the movement of the virtual prop between at least one virtual obstacle can be implemented through physical simulation by a physics engine, and the target virtual interface entered is also determined based on the movement obtained from the physical simulation.

[0081] The following section uses virtual marbles as the virtual props, a normal distribution as the target distribution, and initial velocity as the motion information as an example to provide a detailed description of the embodiments of this application. See also... Figure 7 , Figure 7 The diagram shows the interface of a virtual scene that allows players to experience pinball gameplay. Pinball is a module within the game; players can obtain virtual pinballs from other game modules and then experience the game within this virtual scene. Specifically, players can launch a virtual pinball 71 with a fixed direction and initial force (corresponding to the initial launch velocity). The virtual pinball repeatedly bounces through various obstacles 72 (each bounce yields a "bounce multiplier or score"). Finally, under the influence of virtual gravity, the virtual pinball falls into the final pinball interface 73 (there can be multiple pinball interfaces, each corresponding to a different "final score"). The final output is the result 74 of the launch operation (e.g., a score of 245). In practical applications, players can accumulate rewards (i.e., operation results) to obtain stage rewards and a final reward. Once the final reward is obtained, the pinball machine module's process ends.

[0082] First, let's illustrate the process of constructing the mapping relationship based on the above example. In practical applications, a database system can be established beforehand through extensive simulation testing. This database system records the mapping relationship between various candidate initial velocities and candidate operation results (such as the rate of return of launching virtual marbles). Based on this, when the player launches a virtual marble, a random number conforming to a normal distribution is generated, and this random number is used as the expected operation result (i.e., the expected rate of return) obtained from this launch. Then, the database system is quickly queried to obtain a target candidate operation result that is close to the expected operation result and a target candidate initial velocity that is close to the player's initial velocity when launching the virtual marble. There is a mapping relationship between this target candidate initial velocity and the target candidate operation result, thereby controlling the virtual marble to launch according to the target candidate initial velocity and obtaining the target candidate operation result. This ensures that the operation result of each launch operation is within the range of the expected operation result.

[0083] The specific process of constructing the plurality of mapping relationships includes the following steps:

[0084] (1) First, determine the construction of the virtual scene, including the layout of the bounce barriers, the bounce rate brought by each bounce barrier, and the calculation formula of the final yield rate (as mentioned above, generally the bounce rates are added, and the result is multiplied by the final rate).

[0085] (2) After determining the virtual scene, a large number of simulated bounces are performed to collect data.

[0086] (a) Each time the simulation is performed, a candidate initial speed v is used to launch the virtual ball, which accumulates the bounce rate during a series of bounces and finally obtains a candidate operation result (i.e., the final yield rate) S. Record the mapping relationship between the candidate initial speed v and the candidate operation result S. In other words, S can be considered as a function of v, and this function relationship is denoted as f. Through a large number of simulations and data collection, a large number of candidate initial speeds v and their corresponding function values f(v) (i.e., candidate operation results S) are obtained.

[0087] (b) For all f(v) = S, the ideal condition needs to be met. The condition is that the collected v and S need to cover the required interval with sufficient density. For example, if the expectation of X(t) is 100 and the standard deviation is 20, then according to the 3σ principle, f(v) needs to cover the interval [40, 160] with a density not lower than the preset density. The density not lower than the preset density can be set as an index to judge, for example, for each integer n in the interval [40, 160], the number of its inverse function values f^{-1}(n) >= p, where p is a positive integer (i.e., the above-mentioned preset number). That is, there are more than p different candidate initial speeds v_n such that f(v_n) = n, and at the same time, the p different candidate initial speeds v_n need to be as evenly distributed as possible to "fill up" the range of initial speeds. This ideal condition can be summarized as follows: as much as possible, simulate the complete mapping relationship f: [defined interval of candidate initial speed] -> [defined interval of candidate operation result], so that for a given candidate operation result S and a random initial speed v_0, there is always a candidate initial speed v' that satisfies |v'-v_0| as small as possible, and satisfies f(v') = S.

[0088] Due to the existence of the bounce barrier, a slight change in the initial speed v can result in a large difference in the operation result, and the more and more complex the barriers are, the greater the disturbance is. However, through the embodiment of the present application, the operation result can be ensured to be within the expected operation result range, the dependence on the accurate layout of the barriers is reduced, the designer is given greater freedom of creation, the overall fluency and realism of the game are improved, the calculation complexity is reduced, and the calculation efficiency is improved.

[0089] After a large number of simulations and collections, a mapping relationship (v, f(v)) between a plurality of candidate initial speeds and corresponding candidate operation results is obtained. In this way, a plurality of mapping relationships are constructed. It should be noted that only the numerical pairs (v, f(v)) need to be stored, and the motion curve of the virtual billiard ball does not need to be stored. The actual running condition of the virtual billiard ball can be processed by the game client in real time, thereby reducing the occupation of storage resources.

[0090] Step 103: querying the plurality of mapping relationships based on the motion information and the expected operation result.

[0091] In step 103, the plurality of mapping relationships are queried according to the motion information and the expected operation result. Specifically, the difference between each candidate motion information and the motion information can be calculated, so as to select a first candidate motion information from the plurality of candidate motion information, which satisfies a first difference value condition. Meanwhile, the difference between each candidate operation result and the expected operation result is also calculated, so as to select a first candidate operation result from the plurality of candidate operation results, which satisfies a second difference value condition. Further, the target candidate motion information and the target candidate operation result having the mapping relationship are searched from the first candidate motion information and the first candidate operation result, that is, the target candidate motion information and the target candidate operation result have the mapping relationship, and the target candidate motion information belongs to the first candidate motion information, and the target candidate operation result belongs to the first candidate operation result. If the target candidate motion information and the target candidate operation result having the mapping relationship can be found, the mapping relationship of the target candidate motion information and the target candidate operation result is taken as the target mapping relationship.

[0092] In some embodiments, based on the motion information and the expected operation result, the plurality of mapping relationships can be queried by performing the following steps: determining a first difference value between the candidate motion information and the motion information in each mapping relationship, and determining a second difference value between the candidate operation result and the expected operation result in each mapping relationship; from the candidate motion information in the plurality of mapping relationships, screening the first candidate motion information corresponding to the first difference value that meets the first difference value condition; from the candidate operation result in the plurality of mapping relationships, screening the first candidate operation result corresponding to the second difference value that meets the second difference value condition and having a mapping relationship with the first candidate motion information; when the first candidate motion information and the first candidate operation result are screened, querying the target mapping relationship from the mapping relationship formed by the first candidate motion information and the first candidate operation result.

[0093] Here, if there is one mapping relationship formed by the first candidate motion information and the first candidate operation result, the one mapping relationship is taken as the target mapping relationship; if there are multiple mapping relationships formed by the first candidate motion information and the first candidate operation result, one of the multiple mapping relationships can be randomly selected as the target mapping relationship.

[0094] Step 104: When the target mapping relationship is queried from the plurality of mapping relationships, the virtual prop is controlled to be launched according to the target candidate motion information in the target mapping relationship, and the operation result of the launching operation is controlled to be the target candidate operation result in the target mapping relationship.

[0095] Among them, the difference value between the target candidate motion information and the motion information meets the first difference value condition, and the difference value between the target candidate operation result and the expected operation result meets the second difference value condition.

[0096] In step 104, when the target mapping relationship is queried from the plurality of mapping relationships, the virtual prop can be launched according to the target candidate motion information in the target mapping relationship, and the operation result of the launching operation can be controlled to be the target candidate operation result in the target mapping relationship. For example, taking a virtual prop as a virtual marble, in response to a launching instruction for the virtual marble, the virtual marble is controlled to be launched according to the target candidate motion information, and the virtual marble is repeatedly launched in various launching obstacles, and finally launched into a set marble interface to obtain the operation result of launching the virtual marble. The operation result is the target candidate operation result.

[0097] In some embodiments, the first difference condition refers to that the difference between the target candidate motion information and the motion information is lower than a first difference value; and the second difference condition refers to that the difference between the target candidate operation result and the expected operation result is lower than a second difference value. The first difference value and the second difference value can be pre-set, can be fixed values, or can be variable, and both the first difference value and the second difference value are greater than or equal to 0, and the first difference value and the second difference value can be set as small as possible, for example, both the first difference value and the second difference value are less than a corresponding difference threshold.

[0098] In some embodiments, the first difference condition can also refer to that the difference between the candidate motion information and the motion information is sorted in ascending order, and a first number of candidate motion information with a high ranking is selected according to the sorting result; and the second difference condition can also refer to that the difference between the candidate operation result and the expected operation result is sorted in ascending order, and a second number of candidate operation results with a high ranking is selected according to the sorting result.

[0099] It should be noted that the target candidate motion information and the target candidate operation result determined based on the first difference condition and the second difference condition have a mapping relationship.

[0100] Thus, 1) by pre-constructing the mapping relationship, and then determining the operation result by querying the mapping relationship, the operation result is no longer completely dependent on randomness, the operation result of launching the virtual prop is accurately controlled, and the operation result conforms to the set target distribution, the distribution of the operation result can be controlled to be more reasonable, the balance and controllability of the operation result of the virtual scene are maintained, and the experience of the virtual scene is improved. 2) As the dependence on the accurate placement of the layout of objects (such as virtual obstacles) in the virtual scene is reduced, designers can have greater freedom in creative layout design. Whether it is to increase the number of objects in the virtual scene or to adjust their positions, the expected revenue distribution can be achieved in the game. This flexibility makes the game more adaptable to different themes, activities or player preferences, improving the flexibility of game design. 3) According to different operation result distribution models (such as normal distribution), the game content is dynamically adjusted, thereby constantly providing freshness to players. Whether it is to design special virtual scene levels or to hold virtual scene time-limited activities, the diversity and appeal of the game can be maintained by adjusting the operation result, so that players are willing to participate in the game for a long time. 4) As the system has high automation, developers do not need to perform a large amount of manual adjustment and testing, thereby significantly reducing the time cost and labor cost of game development and maintenance. This also enables the development team to invest more resources in innovation and expansion of game play. These beneficial effects collectively improve the user experience, competitiveness and development efficiency of the game, bringing significant value to players and developers. 5) Determining the operation result based only on the mapping relationship can ensure that two completely identical virtual prop launching operations can produce as consistent a running track as possible, thereby producing the same operation result, thereby ensuring the stability of the virtual scene operation, and also reducing the computational complexity and improving the computational efficiency, thereby improving the utilization rate of computing resources.

[0101] Taking the above example, when the player launches the virtual ball, the entire process is processed as follows: (1) the player starts the ball launcher for the tth time, and prepares to shoot the virtual ball; (2) a desired operation result X(t) is randomly generated, and a plurality of mapping relationships are queried; (3) assuming that the initial speed of the player when launching the virtual ball this time is v_t, a target candidate initial speed v’_t similar to v_t (not necessarily the closest) is found in the plurality of mapping relationships, and a target candidate operation result S having a mapping relationship with the target candidate initial speed v’_t is ensured to be similar to X(t) (not necessarily the closest), so that the virtual ball is launched at v’_t, and the operation result obtained by launching the virtual ball is controlled to be the target candidate operation result S.

[0102] In some embodiments, the candidate operation results in the plurality of mapping relationships conform to a target distribution; when T virtual props need to be launched to complete a target task of the virtual scene, a distribution of T conforms to the target distribution, and T is an integer greater than 0. It should be noted that the target task can be pre-set, such as an operation result reaching a target operation result (such as a score reaching a target score); and the target distribution can be a normal distribution. In this way, the experience of completing the target task in the virtual scene can be improved, and its rationality and controllability can be ensured.

[0103] Taking the above example, assuming that a single player spends a number of virtual marbles T to obtain a final reward (i.e., complete a target task), then the distribution of "single launch operation results (such as single yield value)" and T can be controlled. The control of the single launch operation result has been described above (i.e., controlled by simulation to obtain a plurality of mapping relationships), and the distribution of T is described below. Here, the generation of the player's "single launch operation result" is regarded as an independent and identically distributed random variable, the launch result obtained at the t-th time is X(t), and the cumulative operation result (such as the cumulative yield value) required to finally complete the target task is N. Based on this, (1) assuming that X(t) ~ N(μ,σ 2 ) are independently and identically distributed, because the "single launch operation result" is always positive, μ-3σ>0 can be assumed. According to the properties of the normal distribution, the cumulative operation result S(t) ~ N(tμ,tσ 2 ) at the t-th time, so the behavior of the cumulative operation result can be approximated using a drift Brownian motion, and under this model, when σ is relatively small compared to μ, and N is relatively large (the characteristic embodied is that S(t) is mainly dominated by the drift coefficient), the distribution of T can be approximated as a normal distribution: T ~ N(N / μ,σ 2 N / μ 3 ).

[0104] For example, assuming that the player's single launch operation result follows a normal distribution with an expected value of 150 and a standard deviation of 40, and the cumulative operation result required for the final reward is 10,000. Then, for unbiasedness checking, the Signal-to-Noise Ratio (SNR) = μ / σ = 3.75 > 1, indicating that the drift dominates; the premise for T to approximate a normal distribution is that random fluctuations do not significantly change the mechanism of hitting N (for example, if the fluctuations are particularly large or N is small, it may result in an asymmetric distribution), and in the current example, N = 10,000 is relatively reasonable in proportion to the drift and fluctuations, and the normal approximation is effective, and T can be further verified by code simulation to approximate a normal distribution. Therefore, it can be considered that the distribution of T approximates a normal distribution with a mean of about 66 and a variance of about 5, which provides accurate reference for the rhythm of virtual marbles obtained in the virtual scene and the design of single launch operation results.

[0105] With the above embodiments of the present application, when a shooting operation on a virtual prop in a virtual scene is received, a desired operation result of the shooting operation is first generated, and movement information of the virtual prop indicated by the shooting operation is acquired, then based on the movement information and the desired operation result, a plurality of mapping relationships are queried, when a target mapping relationship is queried from the plurality of mapping relationships, the virtual prop is controlled to shoot according to target candidate movement information in the target mapping relationship, and an operation result of the shooting operation is controlled to be a target candidate operation result in the target mapping relationship; wherein a difference between the target candidate movement information and the movement information satisfies a first difference condition, and a difference between the target candidate operation result and the desired operation result satisfies a second difference condition.

[0106] In this way, by querying the mapping relationship based on the movement information and the desired operation result, the movement information required for shooting the virtual prop and the operation result that can be obtained by shooting the virtual prop can be determined, therefore, 1) without considering the layout of the virtual scene, the operation result can be quickly determined, reducing the occupation of computing resources and improving the performance of the computing device, thereby improving the stability, smoothness and reality of the virtual scene; 2) based on the mapping relationship, the operation result can be determined, which can realize accurate control of the operation result of shooting the virtual prop, thereby controlling the distribution of the operation result to be more reasonable, maintaining the balance of the operation result of the virtual scene, and improving the experience of the virtual scene; 3) since the operation result can be quickly determined without relying on the layout of the virtual scene, when designing the virtual scene, the designer does not need to repeatedly adjust the layout of the virtual scene, thereby improving the design efficiency of the virtual scene and the scalability of the virtual scene, and adapting to the design requirements of the rapidly changing virtual scene.

[0107] The following continues to illustrate an exemplary structure of the implementation of the virtual scene interaction device 555 provided by the embodiments of the present application as a software module, in some embodiments, such as Figure 2As shown, the software modules stored in the interaction device 555 of the virtual scene in the memory 550 can include: a generation module 5551 configured to, in response to a shooting operation on a virtual prop in a virtual scene, generate an expected operation result of the shooting operation, and obtain motion information of the virtual prop indicated by the shooting operation; an acquisition module 5552 configured to acquire a plurality of mapping relationships, the mapping relationships being mapping relationships between candidate motion information and candidate operation results; a query module 5553 configured to query the plurality of mapping relationships based on the motion information and the expected operation result; and a control module 5554 configured to, when a target mapping relationship is queried from the plurality of mapping relationships, control the virtual prop to be shot according to target candidate motion information in the target mapping relationship, and control an operation result of the shooting operation to be the target candidate operation result in the target mapping relationship; wherein a difference between the target candidate motion information and the motion information satisfies a first difference condition, and a difference between the target candidate operation result and the expected operation result satisfies a second difference condition.

[0108] In some embodiments, the generation module 5551 is further configured to: the candidate operation results in the plurality of mapping relationships conform to a target distribution; and the generation of the expected operation result of the shooting operation includes: acquiring a target kernel function and a bandwidth parameter; performing kernel density estimation on the candidate operation results in the plurality of mapping relationships based on the target kernel function and the bandwidth parameter to obtain a probability density function; converting the probability density function to obtain a target function conforming to the target distribution; and generating the expected operation result of the shooting operation based on the target function.

[0109] In some embodiments, the generation module 5551 is further configured to: acquire a standard parameter for standardization processing, and perform standardization processing on the probability density function based on the standard parameter to obtain a standard density function; acquire a requirement parameter of the target distribution, and perform scale transformation processing on the standard density function based on the requirement parameter to obtain the target function conforming to the target distribution.

[0110] In some embodiments, the generation module 5551 is further configured to: determine an inverse function of a cumulative distribution function of the target function; generate a first random number conforming to a uniform distribution; call the inverse function to process the first random number to obtain a second random number sampled from the target distribution, and take the second random number as the expected operation result of the shooting operation.

[0111] In some embodiments, the acquisition module 5552 is further configured to acquire a plurality of simulation motion information of the virtual prop; for each simulation motion information, simulate the virtual prop being launched according to the simulation motion information, and simulate the launched virtual prop moving in the virtual scene; for each simulation motion information, when the virtual prop launched based on the simulation motion information stops moving, determine a simulation operation result corresponding to the simulation motion information based on simulation motion data of the virtual prop in the virtual scene; collect a target simulation operation result meeting a target distribution from a plurality of simulation operation results, and collect a target simulation motion information corresponding to the target simulation operation result from a plurality of simulation motion information; for each target simulation motion information, take the target simulation motion information as a candidate motion information, take a target simulation operation result corresponding to the target simulation motion information as a candidate operation result, and construct a mapping relationship between the candidate motion information and the candidate operation result.

[0112] In some embodiments, the acquisition module 5552 is further configured to acquire a distribution parameter of the target distribution, and determine an operation result interval based on the distribution parameter; collect a plurality of target simulation operation results meeting the target distribution and being in the operation result interval from a plurality of simulation operation results; in some embodiments, the acquisition module 5552 is further configured to, for each target simulation operation result, collect a target number of target simulation motion information corresponding to the target simulation operation result from a plurality of simulation motion information; wherein the target number is not less than a preset number, and a distribution density of the target simulation motion information in a motion information interval is not less than a preset density.

[0113] In some embodiments, the query module 5553 is further configured to determine a first difference value between candidate motion information and the motion information in each mapping relationship, and determine a second difference value between a candidate operation result and the expected operation result in each mapping relationship; from candidate motion information in a plurality of mapping relationships, screen first candidate motion information corresponding to the first difference value meeting the first difference value condition; from candidate operation results in a plurality of mapping relationships, screen first candidate operation results corresponding to the second difference value meeting the second difference value condition and having a mapping relationship with the first candidate motion information; when the first candidate motion information and the first candidate operation result are screened, from a mapping relationship formed by the first candidate motion information and the first candidate operation result, query the target mapping relationship.

[0114] In some embodiments, the candidate operation result in the plurality of mapping relationships meets a target distribution; when T virtual props are needed to be launched to complete the target task of the virtual scene, a distribution of T meets the target distribution, and T is an integer greater than 0.

[0115] In some embodiments, the virtual scene includes at least one virtual obstacle and at least one virtual interface of the virtual prop; the control module 5554 is further configured to control the virtual prop to move between the at least one virtual obstacle after the virtual prop is controlled to launch according to the target candidate motion information in the target mapping relationship; based on a movement condition of the virtual prop between the at least one virtual obstacle, control the virtual prop to enter a target virtual interface in the at least one virtual interface; and the control module 5554 is further configured to display the target candidate operation result.

[0116] It should be noted that the description of the device embodiments in the present application is similar to the description of the above-mentioned method embodiments, and has similar beneficial effects as the method embodiments, which will not be repeated here. For the technical details not described in the virtual scene interaction device provided by the embodiments of the present application, the technical details can be understood based on the description of the technical details in the above-mentioned method embodiments.

[0117] The embodiments of the present application also provide a computer program product, which includes computer executable instructions or computer programs stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions or computer programs from the computer readable storage medium, and the processor executes the computer executable instructions or computer programs, so that the electronic device executes the virtual scene interaction method provided by the embodiments of the present application.

[0118] The embodiments of the present application also provide a computer readable storage medium, which stores computer executable instructions or computer programs. When the computer executable instructions or computer programs are executed by the processor, the processor will execute the virtual scene interaction method provided by the embodiments of the present application.

[0119] In some embodiments, the computer readable storage medium can be RAM, ROM, flash memory, magnetic surface memory, optical disc, or CD-ROM memory; or various devices including one or any combination of the above storage.

[0120] In some embodiments, the computer-executable instructions can be in the form of programs, procedures, modules, scripts, or code, and can be written in any programming language, including compiled or interpreted languages, or declarative or procedural languages; and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0121] By way of example, computer-executable instructions can be, but are not limited to, programs, procedures, modules, scripts, or code, which can be stored in files in a file system, can be stored in a portion of a file that holds other programs or data, can be stored as one or more scripts stored in a markup language such as Hyper Text Markup Language (HTML), can be stored as a single file dedicated to the program in question, or can be stored in multiple files in different formats, including file servers, databases, arrays, or anywhere that can be used to hold instructions and their necessary data.

[0122] By way of example, the computer-executable instructions can be deployed to be executed on one electronic device, or on multiple electronic devices that are located at one site, or that are distributed across multiple sites and that are interconnected by a communication network.

[0123] The above description is only for the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, and improvement within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. A method of interacting with a virtual scene, the method comprising: The method comprises: in response to a shooting operation on a virtual prop in a virtual scene, generating an expected operation result of the shooting operation, and obtaining motion information of the virtual prop indicated by the shooting operation, wherein the expected operation result is a random number drawn from a random number conforming to a target distribution; obtaining a plurality of mapping relationships, the mapping relationship being a mapping relationship between candidate motion information and candidate operation results; querying the plurality of mapping relationships based on the motion information and the expected operation result; when a target mapping relationship is queried from the plurality of mapping relationships, controlling the virtual prop to be shot according to target candidate motion information in the target mapping relationship, and controlling the operation result of the shooting operation to be the target candidate operation result in the target mapping relationship; wherein the difference between the target candidate motion information and the motion information is less than a first preset difference, and the difference between the target candidate operation result and the expected operation result is less than a second preset difference; wherein the plurality of mapping relationships are obtained by performing the following operations: obtaining a plurality of simulated motion information of the virtual prop, and for each simulated motion information, simulating the virtual prop to be shot according to the simulated motion information, and simulating the motion of the shot virtual prop in the virtual scene; for each simulated motion information, when the virtual prop shot based on the simulated motion information stops moving, determining a simulated operation result corresponding to the simulated motion information based on the simulated motion data of the virtual prop in the virtual scene; obtaining distribution parameters of a target distribution, and determining an operation result interval based on the distribution parameters; from a plurality of simulated operation results, collecting a plurality of target simulated operation results in the operation result interval and conforming to the target distribution, and for each target simulated operation result, collecting a target number of target simulated motion information corresponding to the target simulated operation result from a plurality of simulated motion information; for each target simulated motion information, taking the target simulated motion information as candidate motion information, taking the target simulated operation result corresponding to the target simulated motion information as candidate operation result, and constructing a mapping relationship between the candidate motion information and the candidate operation result.

2. The method of claim 1, wherein, The candidate operation results in the plurality of mapping relationships conform to a target distribution; the generation of the expected operation result of the shooting operation comprises: obtaining a target kernel function and a bandwidth parameter; based on the target kernel function and the bandwidth parameter, performing kernel density estimation on the candidate operation results in the plurality of mapping relationships to obtain a probability density function; transforming the probability density function to obtain a target function conforming to the target distribution; based on the target function, generating the expected operation result of the shooting operation.

3. The method of claim 2, wherein, The transformation of the probability density function to obtain a target function conforming to the target distribution comprises: obtaining a standard parameter for standardization processing, and based on the standard parameter, performing standardization processing on the probability density function to obtain a standard density function; Obtaining a demand parameter of the target distribution, and performing a scale transformation on the standard density function based on the demand parameter to obtain a target function conforming to the target distribution.

4. The method of claim 2, wherein, The generating the expected operation result of the launch operation based on the target function comprises: determining an inverse function of a cumulative distribution function of the target function; generating a first random number conforming to a uniform distribution; calling the inverse function to process the first random number to obtain a second random number sampled from the target distribution, and taking the second random number as the expected operation result of the launch operation.

5. The method of claim 1, wherein, The querying the plurality of mapping relationships based on the motion information and the expected operation result comprises: determining a first difference between candidate motion information in each of the mapping relationships and the motion information, and determining a second difference between candidate operation results in each of the mapping relationships and the expected operation result; from the candidate motion information in the plurality of mapping relationships, screening first candidate motion information corresponding to the first difference lower than the first preset difference value; from the candidate operation results in the plurality of mapping relationships, screening first candidate operation results corresponding to the second difference lower than the second preset difference value and having a mapping relationship with the first candidate motion information; when the first candidate motion information and the first candidate operation result are screened, querying the target mapping relationship from the mapping relationship formed by the first candidate motion information and the first candidate operation result.

6. The method of claim 1, wherein, The candidate operation results in the plurality of mapping relationships conform to a target distribution; when T virtual props need to be launched to complete a target task of the virtual scene, a distribution of the T conforms to the target distribution, and the T is an integer greater than 0.

7. The method of claim 1, wherein, The virtual scene comprises at least one virtual obstacle and at least one virtual interface of the virtual prop; After the controlling the virtual prop to launch according to the target candidate motion information in the target mapping relationship, the method further comprises: controlling the virtual prop to move between the at least one virtual obstacle; controlling the virtual prop to enter a target virtual interface in the at least one virtual interface based on a movement condition of the virtual prop between the at least one virtual obstacle; The method further comprises: displaying the target candidate operation result.

8. An interactive device for a virtual scene, characterized in that, The apparatus comprises: a generating module configured to generate an expected operation result of a launch operation of a virtual prop in a virtual scene in response to the launch operation, and obtain motion information of the virtual prop indicated by the launch operation, wherein the expected operation result is a random number extracted from a random number conforming to a target distribution; an obtaining module configured to obtain a plurality of mapping relationships, the mapping relationships being mapping relationships between candidate motion information and candidate operation results; a querying module configured to query the plurality of mapping relationships based on the motion information and the expected operation result. The control module is configured to control the virtual prop to emit according to target candidate motion information in a target mapping relationship when the target mapping relationship is queried from the plurality of mapping relationships, and control an operation result of the emitting operation to be a target candidate operation result in the target mapping relationship. The difference between the target candidate motion information and the motion information is less than a first preset difference, and the difference between the target candidate operation result and the expected operation result is less than a second preset difference. The plurality of mapping relationships are obtained by performing the following operations: A plurality of simulation motion information of the virtual prop is obtained, and for each simulation motion information, the virtual prop is simulated to emit according to the simulation motion information, and the virtual prop emitted is simulated to move in the virtual scene. For each simulation motion information, when the virtual prop emitted based on the simulation motion information stops moving, a simulation operation result corresponding to the simulation motion information is determined based on simulation motion data of the virtual prop in the virtual scene. Distribution parameters of a target distribution are obtained, and an operation result interval is determined based on the distribution parameters. A plurality of target simulation operation results in the operation result interval and meeting the target distribution are collected from a plurality of simulation operation results, and for each target simulation operation result, a target number of target simulation motion information corresponding to the target simulation operation result is collected from a plurality of simulation motion information. For each target simulation motion information, the target simulation motion information is taken as candidate motion information, the target simulation operation result corresponding to the target simulation motion information is taken as a candidate operation result, and a mapping relationship between the candidate motion information and the candidate operation result is constructed.

Citation Information

Patent Citations

  • Equipment operation evaluation method, device and system, medium and electronic equipment

    CN110163462A

  • Game control method and device, equipment and storage medium

    CN115569381A