Object interaction method and device in virtual scene

By separating the visual model of the object in the virtual scene from the interactive model, and dynamically loading and cache it, the interface lag caused by the loading of multiple interactive objects in the virtual scene is solved, and faster loading speed and smooth interface display are achieved.

CN113856197BActive Publication Date: 2024-12-20SHANGHAI MIHOYO TIANMING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111282847.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2024-12-20
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

In a virtual scene, the loading of multiple interactive virtual objects causes time-consuming loading and interface lag, and the prior art is difficult to effectively solve this problem.

Method used

By separating the object visual model from the object interaction model, the object visual model is loaded only in the initial state, and the interactive object is dynamically determined based on the scene information of the virtual scene, the corresponding object interaction model is loaded, and the interaction model is cached to Cache space.

Benefits of technology

Improves object loading speed, avoids interface lag, ensures smooth interface display, and improves response speed when loading again.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113856197B_ABST
    Figure CN113856197B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of electronic information, and specifically discloses an object interaction method and device in a virtual scene, which is used to solve the problem of slow object loading speed. The method includes: obtaining scene information corresponding to the virtual scene, determining the interactive object that meets the interaction conditions in the target object; wherein the target object is an object of the loaded object visual model contained in the virtual scene; loading the object interaction model of the interactive object; wherein the object interaction model is used to respond to the interactive operation triggered for the interactive object; when it is determined that the interactive object of the loaded object interaction model meets the unloading conditions, unloading the object interaction model, and caching the unloaded object interaction model to the cache space. This method separates the object visual model from the object interaction model, so that the object interaction model can be loaded on demand, thereby greatly improving the object loading speed and ensuring the smoothness of the interface display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of electronic information, and in particular to a method and device for object interaction in a virtual scene. Background Art

[0002] With the development of virtual reality technology, the types and number of objects that can be displayed in virtual scenes are increasing. Moreover, with the increasing maturity of interactive technology, many objects contained in virtual scenes can realize interactive functions. For example, some virtual objects can respond to interactive operations triggered by action objects in virtual scenes, thereby displaying states corresponding to the interactive operations. For example, in a virtual scene, if an animal or plant object is attacked by other users, the animal or plant object should present a state corresponding to the attack, such as falling to the ground or dropping branches and leaves.

[0003] In the related art, the object model of the virtual object contains both visual information and interactive information. The visual information is used to implement the visual display function, and the interactive information is used to implement the interactive response function. Accordingly, when loading the virtual object, the visual information and the interactive information contained in the object model need to be loaded at the same time.

[0004] In the process of implementing the present invention, the inventors discovered that the existing object loading method has at least the following defects: when the number of interactive virtual objects contained in the virtual scene is large, it is necessary to load the object model of each virtual object one by one. Due to the large amount of information in the object model, technical problems such as time-consuming loading and interface jamming occur. Summary of the invention

[0005] In view of the above problems, the present invention is proposed to provide a method and device for object interaction in a virtual scene that overcomes the above problems or at least partially solves the above problems.

[0006] According to one aspect of the present invention, there is provided a method for object interaction in a virtual scene, comprising:

[0007] Acquire scene information corresponding to the virtual scene, and determine the interactive object that meets the interactive condition among the target objects according to the scene information; wherein the target object is an object of the loaded object visual model contained in the virtual scene;

[0008] Loading an object interaction model of the interactive object; wherein the object interaction model is used to respond to an interactive operation triggered for the interactive object;

[0009] When it is determined that the interactive object of the loaded object interaction model meets the uninstallation condition, the object interaction model of the interactive object meeting the uninstallation condition is uninstalled, and the object interaction model of the interactive object meeting the uninstallation condition is cached in the cache space.

[0010] According to another aspect of the present invention, there is provided a device for loading an object in a virtual scene, comprising:

[0011] An acquisition module, adapted to acquire scene information corresponding to the virtual scene, and determine, according to the scene information, an interactive object among target objects that meets the interactive condition; wherein the target object is an object in the virtual scene that has a loaded object visual model;

[0012] A loading module, adapted to load an object interaction model of the interactive object; wherein the object interaction model is used to respond to an interactive operation triggered for the interactive object;

[0013] The unloading module is adapted to, when determining that the interactive object of the loaded object interaction model meets the unloading condition, unload the object interaction model of the interactive object meeting the unloading condition, and cache the object interaction model of the interactive object meeting the unloading condition into the cache space.

[0014] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0015] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the object interaction method in the virtual scene as described above.

[0016] According to another aspect of an embodiment of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the object interaction method in the virtual scene as described above.

[0017] In the object interaction method and device in the virtual scene provided by the present invention, the interactive object that meets the interactive condition in the target object is determined according to the scene information corresponding to the virtual scene; wherein the target object is an object of the loaded object visual model contained in the virtual scene; the object interaction model of the interactive object is loaded; and, when it is determined that the interactive object of the loaded object interaction model meets the unloading condition, the object interaction model of the interactive object that meets the unloading condition is unloaded, and the object interaction model of the interactive object that meets the unloading condition is cached to the cache space. In the present invention, the object visual model is separated from the object interaction model, and each target object only loads the object visual model in the initial state. Since the object visual model does not contain interactive information, it occupies less resources, so it can improve the loading speed and avoid interface jamming. In addition, the interactive object that meets the interactive condition is dynamically determined according to the scene information corresponding to the virtual scene, and then the object interaction model of the interactive object is loaded, so as to respond to the interactive operation through the object interaction model. It can be seen that the method separates the object visual model from the object interaction model, so that the object interaction model can be loaded on demand, thereby greatly improving the object loading speed and ensuring the smoothness of the interface display. Furthermore, when the object interaction model is unloaded, the object interaction model is cached in the cache space, so that the loading speed can be improved when it is loaded again.

[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0020] Figure 1 A flowchart of an object interaction method in a virtual scene provided by an embodiment of the present invention is shown;

[0021] Figure 2 A flowchart of a method for object interaction in a virtual scene provided by another embodiment of the present invention is shown;

[0022] Figure 3 A structural diagram of an object interaction device in a virtual scene provided by another embodiment of the present invention is shown;

[0023] Figure 4 A schematic structural diagram of an electronic device provided by yet another embodiment of the present invention is shown. DETAILED DESCRIPTION

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

[0025] Figure 1 FIG. 1 is a flow chart showing a method for object interaction in a virtual scene provided by an embodiment of the present invention. Figure 1 As shown, the method includes:

[0026] Step S110: Acquire scene information corresponding to the virtual scene, and determine the interactive object that meets the interactive condition in the target object according to the scene information; wherein the target object is an object of the loaded object visual model contained in the virtual scene.

[0027] Among them, the scene information corresponding to the virtual scene includes: content related to the loading progress of the scene, the switching state of the scene, and the state of each object contained in the scene. In the specific implementation, all information associated with the virtual scene can be used as scene information, and the present invention does not limit the specific connotation of the scene information. Among them, the virtual scene usually contains multiple virtual objects, such as human objects, plant objects, and object objects. Each object in the virtual scene has object state information, and the object state information is used to reflect the properties of the object such as the position state and the interaction state. Correspondingly, the scene information corresponding to the virtual scene includes: object state information of each object that appears directly and / or indirectly in the virtual scene. Among them, the object that appears directly in the virtual scene refers to: objects presented in the virtual scene, such as human objects, plant objects, etc. presented in the virtual scene; objects that appear indirectly in the virtual scene refer to: objects that are not directly presented in the virtual scene, but the movement state of the object will affect the display state of other objects in the virtual scene. For example, for a game-type virtual scene, a corresponding virtual object is usually set for the game user. The virtual object may not be directly presented in the game interface, but as the virtual object moves, the display state of other objects in the game interface will be adjusted accordingly. Among them, the virtual object corresponding to the game user is also called a controlled object, which is used to perform corresponding operations according to the control of the game user.

[0028] It can be seen that in this step, scene information corresponding to the virtual scene is dynamically detected, wherein the scene information mainly includes status information of objects corresponding to the virtual scene, and those skilled in the art can flexibly set the types and quantities of objects corresponding to the virtual scene, and the present invention does not limit this.

[0029] In addition, in addition to the state information related to the object, the scene information can also be set to information related to the loading progress, perspective change or switching state of the scene. For example, when the perspective of the virtual scene gradually changes, the display state of the virtual scene will also be adjusted as the perspective changes (such as the image in the scene presents a dynamic change from far to near), and accordingly, the perspective change information of the virtual scene can be used as the above-mentioned scene information.

[0030] Among them, when determining the interactive objects that meet the interactive conditions in the target object according to the scene information, the interactive conditions can be set in a variety of ways. For example, the interactive conditions can be set according to the object state information of the action object corresponding to the virtual scene, and / or the object state information of the target object contained in the virtual scene. Among them, the action object corresponding to the virtual scene refers to: an object that appears directly or indirectly in the virtual scene, and can actively trigger interactive operations and / or can dynamically move positions. For example, people and animals in the virtual scene can be used as action objects. Correspondingly, the object state information of the action object includes various types of information related to the interactive operation and / or position change of the action object. For example, the object state information includes: the relative position information of the action object relative to the target object, and / or the operation state information of the interactive operation triggered by the action object. Among them, the operation state information of the interactive operation triggered by the action object is used to describe various contents related to the interactive operation, such as the operation type, operation position, and / or operation result of the interactive operation. Similarly, the object state information of the target object is similar to the object state information of the action object. In specific implementation, the object state information of the action object can be used as an interaction condition, so that when the action object approaches the target object or initiates an interactive operation for the target object, it is determined that the target object meets the interaction condition; the object state information of the target object can also be used as an interaction condition, so that when the target object approaches a preset position, it is determined that the target object meets the interaction condition. In short, the present invention does not limit the specific connotation of the interaction condition, and those skilled in the art can flexibly set the interaction condition according to the object state information of each object dynamically monitored. For example, in an optional implementation method, the interaction condition mainly includes: a distance interaction condition and an operation interaction condition. The distance interaction condition is used to determine whether the relative distance between the action object and the target object is less than the second preset distance threshold, and the operation interaction condition is used to determine whether the action object has an interaction intention for the target object. Among them, the distance condition and the operation condition can be used separately. Alternatively, the distance condition and the interaction condition can also be used in combination. When the two are used in combination, the interaction condition is a combination condition that includes both the distance interaction condition and the operation interaction condition.

[0031] In addition, in addition to setting interaction conditions based on the status information of the object corresponding to the virtual scene, interaction conditions can also be set based on other types of scene information. For example, when the perspective of the virtual scene gradually changes, the change in the scene perspective is dynamically detected, and the interaction conditions are set according to the image content displayed by the virtual scene after the scene perspective changes. For example, when the scene perspective changes, if it is detected that the preset image area in the virtual scene moves to a specified position, it is determined that the target object located in the preset image area meets the interaction conditions. Among them, the preset image area and the specified position can be flexibly set according to actual conditions. In short, the present invention does not limit the specific connotation of the interaction conditions, and those skilled in the art can flexibly set them according to the content related to the scene information of the virtual scene.

[0032] In addition, the object visual model of the target object is used to present visual information of the target object, such as color, shape, and material, etc. Therefore, the object visual model of the target object needs to be loaded to ensure normal presentation of the target object.

[0033] Step S120: Loading an object interaction model of the interactive object; wherein the object interaction model is used to respond to interactive operations triggered on the interactive object.

[0034] In addition to the object visual model, the target object also has an object interaction model. The object interaction model is used to provide interactive functions. Therefore, for interactive objects that meet the interactive conditions, it is necessary to further load the object interaction model to ensure that the target object can respond to interactive operations normally.

[0035] Step S130: when it is determined that the interactive object of the loaded object interaction model meets the uninstallation condition, the object interaction model of the interactive object meeting the uninstallation condition is uninstalled, and the object interaction model of the interactive object meeting the uninstallation condition is cached in the cache space.

[0036] The uninstallation condition corresponds to the interaction condition, and can be a distance uninstallation condition or an operation uninstallation condition. In short, the present invention does not limit the specific connotation of the uninstallation condition, and any information that can indicate that the target object does not have an interactive response requirement can be used as the uninstallation condition.

[0037] In order to improve the speed of subsequent loading, in this embodiment, the object interaction model of the interactive object that meets the unloading condition is not directly deleted, but the object interaction model of the interactive object that meets the unloading condition is cached in the cache space. In this way, when the target object meets the interaction condition again, it can be quickly loaded from the cache space, thereby improving the response speed.

[0038] It can be seen that in the object interaction method in the virtual scene provided by the present invention, the interactive object that meets the interactive condition in the target object is determined according to the scene information corresponding to the virtual scene; wherein the target object is an object of the loaded object visual model contained in the virtual scene; the object interaction model of the interactive object is loaded; and, when it is determined that the interactive object of the loaded object interaction model meets the unloading condition, the object interaction model of the interactive object that meets the unloading condition is unloaded, and the object interaction model of the interactive object that meets the unloading condition is cached to the cache space. In the present invention, the object visual model is separated from the object interaction model, and each target object only loads the object visual model in the initial state. Since the object visual model does not contain interactive information, it occupies less resources, so it can improve the loading speed and avoid interface jamming. In addition, the interactive object that meets the interactive condition is dynamically determined according to the scene information corresponding to the virtual scene, and then the object interaction model of the interactive object is loaded, so as to respond to the interactive operation through the object interaction model. It can be seen that the method separates the object visual model from the object interaction model, so that the object interaction model can be loaded on demand, thereby greatly improving the object loading speed and ensuring the smoothness of the interface display. Furthermore, when the object interaction model is unloaded, the object interaction model is cached in the cache space, so that the loading speed can be improved when it is loaded again.

[0039] Figure 2 FIG. 2 is a flowchart of a method for object interaction in a virtual scene provided by another embodiment of the present invention. Figure 2 As shown, the method includes:

[0040] Step S200: determining a target object contained in a virtual scene.

[0041] Specifically, the inventors found in the process of implementing the present invention that in the traditional object loading method, for objects that can present an interactive state contained in a virtual scene, it is necessary to set an object model for the object, and the object model needs to support both the visual display function and the interactive operation function of the object. Accordingly, when loading a virtual object that can present an interactive state, it is necessary to load the object model that supports both the visual display function and the interactive operation function. Due to the complexity of the model functions, loading is time-consuming and easily causes interface freezes.

[0042] In order to solve the above problems, in this embodiment, the target object contained in the virtual scene is predetermined so as to set a mutually separated visual model and an interaction model for the target object. Wherein, the target object in this embodiment is the object that can present an interactive state mentioned above. Preferably, the target object in this embodiment mainly refers to: an object that can respond to the trigger operation of the action object and present a collision response state corresponding to the trigger operation. Under normal circumstances, the target object cannot actively trigger an interactive operation, but can only passively respond to the interactive operation triggered by the action object. Wherein, the action object refers to: a virtual object that can actively trigger an interactive operation, such as a movable animal object. The action object includes an object that appears directly or indirectly in the virtual scene. During the specific implementation, the object description information of each object contained in the virtual scene is obtained, and the target object contained in the virtual scene is determined according to the object description information. Accordingly, in the subsequent steps, mutually separated object visual models and object interaction models are set for the target object, so as to improve the object loading speed by loading the object visual model and the object interaction model respectively. It can be seen that by selecting a specific object as the target object through the object description information, the on-demand loading of the object interaction model can be realized, thereby optimizing the loading efficiency of the target object. For example, you can choose to set interactive objects that cannot actively trigger interactive operations and / or have a low interaction frequency as target objects. Since this type of object is usually only used to passively respond to interactive operations and does not need to respond when no interactive operations are received, using this type of object as the target object can improve loading efficiency without affecting the interactive effect.

[0043] Specifically, the object description information includes at least one of the following: object category information, the number of objects of the same type, object interaction mode, and historical interaction records. Accordingly, the target object can be determined by at least one of the following methods:

[0044] In the first implementation, the object description information is object category information, and the target object and the non-target object are determined according to the object category information. For example, virtual objects whose object category information is animals are classified as non-target objects, and virtual objects whose object category information is plants are classified as target objects. Among them, non-target objects are loaded in a one-time loading manner, while target objects are loaded in a manner in which the object visual model and the object interaction model are separated from each other. Since plant virtual objects cannot actively trigger interactive operations, the object interaction model can be temporarily not loaded in the initial loading stage, thereby improving loading efficiency. In addition, non-target objects may include: animal objects whose object models support both visual display functions and interactive operation functions in one-time loading, and static objects (such as mountains, cliffs, etc.) whose object models only support visual display functions.

[0045] In the second implementation, the object description information is the number of objects of the same type, and the target objects and non-target objects are divided according to the number of objects of the same type. For example, virtual objects whose number of objects of the same type exceeds a preset value are classified as target objects. In actual situations, a large number of plant objects (such as grass objects) may be included in a virtual scene of a game. Due to the large number of plant objects, it takes a long time to load. By determining plant objects as target objects, the loading time of plant objects can be greatly shortened.

[0046] In the third implementation, the object description information is the object interaction mode, and the target object and the non-target object are determined according to the object interaction mode. For example, an object with a single interaction mode is determined as a target object. In actual situations, some objects have multiple interaction modes, while other objects have only a single interaction mode. Accordingly, the interaction probability of objects with a single interaction mode is low. Therefore, classifying objects with a single interaction mode as target objects helps improve loading efficiency.

[0047] In the fourth implementation, the object description information is a historical interaction record, and the target object and the non-target object are determined based on the historical interaction record of the object. For example, the historical interaction records of each user for various types of objects are obtained in advance, and then classified according to the interaction frequency, and the objects with low interaction frequency are classified as target objects. Since the probability of objects with low interaction frequency to generate interaction is low, there is no need to load the object interaction model when such objects do not generate interaction. Therefore, this method also helps to improve loading efficiency.

[0048] The above-mentioned division methods may be used alone or in combination, and the present invention does not limit the specific details.

[0049] In addition, step S200 is an optional step, and can be omitted in a scene with a small number of objects or a single type of objects, and all objects in the virtual scene can be directly determined as target objects.

[0050] Step S210: setting mutually separate object visual models and object interaction models for the target object.

[0051] On the one hand, the visual display features of the target object are obtained, and an object visual model of the target object is generated according to the visual display features of the target object. The object visual model is used to realize the visual display function of the target object, and specifically includes attribute information related to the visual effect of the target object, such as the coordinate position, color, size, rotation angle, and scaling of the target object. On the other hand, the interactive response method of the target object is obtained, and an object interaction model of the target object is generated according to the interactive response method of the target object. The object interaction model is used to enable the target object to have the ability to respond to interactive operations, and specifically includes logical functions related to collision detection. It can be seen that by separately setting the object visual model and the object interaction model of the target object, the on-demand loading of the object interaction model can be realized, thereby improving the loading speed.

[0052] In addition, the inventor discovered in the process of implementing the present invention that a virtual scene may contain multiple target objects of the same type. Therefore, it takes a lot of system resources to set up an object visual model and an object interaction model for each target object separately. In order to save system resources and improve storage efficiency, it is optional to further divide the target objects according to the object type, and set a corresponding type visual model and type interaction model for each object type. Among them, the type visual model is used to realize the visual display function of the target object of the corresponding type, and the type interaction model is used to realize the interactive operation function of the target object of the corresponding type. By making the target objects of the same type reuse the same type visual model or type interaction model, the consumption of storage resources can be greatly reduced, and it is convenient to realize batch loading of target objects of the same type.

[0053] In one implementation, each target object included in the virtual scene is clustered to obtain at least one object type; and a type interaction model corresponding to each object type is set. For example, the target objects of the tree class are clustered into the tree object type, and the target objects of the shrub class are clustered into the shrub object type, and corresponding type interaction models are set for each object type.

[0054] In one implementation, clustering can be performed according to the object type and object visual information of each target object to obtain at least one object type. Among them, the object type can be the tree type mentioned above, etc.; the object visual information includes: object size, object shape, and visual modules contained in the object. For example, multiple target objects with similar object sizes or similar object shapes are clustered into one object type. For example, the sizes or shapes of various trees are similar, so a unified type interaction model can be set for trees. For another example, multiple target objects containing the same visual module are clustered into one object type, and a type interaction model is set according to the same visual module. Among them, the visual module refers to: a module for presenting the visual effects of each object component of the target object. For example, the apple tree object includes: a branch class visual module for presenting the visual effect of the branch, a trunk class visual module for presenting the visual effect of the trunk, and a fruit class visual module for presenting the visual effect of the fruit. Accordingly, a main visual module can be extracted from the multiple visual modules corresponding to the target object, and a type interaction model can be set based on the main visual module. The main visual module is usually a visual module shared by multiple target objects, or a visual module with a larger surface area or a more regular shape. In one implementation, for each target object, the main visual module is extracted from the multiple visual modules of the target object; multiple target objects with the same main visual module are clustered into object types corresponding to the main visual module. Accordingly, for each object type, a type interaction model is set according to the main visual module corresponding to the object type. For example, a trunk-like visual module is used as the main visual module, and a type interaction model is set based on the trunk-like visual module. Accordingly, the shape and position of the type interaction model match the trunk. Specifically, a rectangular collision box can be added at the trunk position as a type interaction model.

[0055] In addition, step S210 is an optional step, the purpose of which is to improve the subsequent loading speed. In other embodiments of the present invention, step S210 may also be omitted, and the object visual model and the object interaction model may be generated and loaded in real time in subsequent steps.

[0056] Step S220: Acquire the target object contained in the virtual scene, and load the object visual model of the target object in the virtual scene.

[0057] The virtual scene in this embodiment includes various scenes such as virtual reality scene, game scene, human-computer interaction scene, etc. Since the target objects have been pre-divided in step S200 and step S210, in this step, the target objects contained in the virtual scene can be directly obtained according to the object identification of each object, and then the object visual model of the target object is loaded in the virtual scene.

[0058] In addition, as mentioned above, in order to save system resources and improve storage efficiency, the target objects can be divided according to object types, and corresponding type visual models and type interaction models can be set for each object type. Accordingly, before loading the object visual model of the target object in the virtual scene, the type visual model corresponding to the object type of the target object is further obtained, and the object visual model of the target object is obtained according to the type visual model.

[0059] Considering that each target object in the actual scene may have a unique posture state, for example, multiple grass objects of the same type have different growth directions, sizes, coordinates and other information when growing in different positions. Therefore, in order to accurately display the posture of each target object, in this step, first, obtain the type visual model corresponding to the object type of the target object; then, obtain the object posture information corresponding to the object identifier of the target object; finally, according to the object posture information, adjust the posture state of the type visual model to obtain the object visual model of the target object. It can be seen that the method can load the adjusted type visual model as the object visual model of the target object. Among them, the object posture information is stored in association with the object identifier of the target object, and is used to describe the posture state of the target object. Specifically, the object posture information includes: the position coordinates, size, rotation angle, and scaling of the object, etc., which are related to the position and posture of the object. In addition, the object posture information can also include: the color information, material information, etc. of the object. In short, all attribute features related to the position and posture of the object can be used as object posture information. It can be seen that in this embodiment, a target object is represented by an object type and an object identifier, wherein the object type is used to indicate the type to which the object belongs, and the object identifier is used to uniquely identify a specific object. In addition, by storing the common visual features of target objects of the same type in the type visual model associated with the object type, and storing the unique posture features of each target object in the object posture information associated with the object identifier, it is possible to take into account the commonalities of objects of the same type and the characteristics of each object.

[0060] Step S230: Detecting scene information corresponding to the virtual scene.

[0061] In the present embodiment, the scene information corresponding to the virtual scene mainly refers to: the object state information of the action object corresponding to the virtual scene. Among them, the action object corresponding to the virtual scene includes: the action object that appears directly or indirectly in the virtual scene, and the action object mainly refers to the object that can actively trigger the interactive action, which can be an animal object, a character object, etc. in the virtual scene. Alternatively, it can also be a controlled object corresponding to the game user in the game scene. Specifically, the object state information of the action object includes: the relative position information of the action object relative to the target object, and / or the operation state information of the interactive operation triggered by the action object. Among them, since the action object can move, the relative position information of the action object relative to the target object is constantly changing. In addition, the interactive operation triggered by the action object is dynamically detected to obtain the operation state information of the interactive operation.

[0062] Of course, those skilled in the art will appreciate that the scene information corresponding to the virtual scene may also be other types of scene-related information, and the present invention is not limited thereto.

[0063] Step S240: Determine the interactive objects that meet the interactive conditions among the target objects according to the scene information.

[0064] Specifically, it is determined whether the target object meets the interaction condition according to the scene information, and the target object meeting the interaction condition is determined as the interaction object. Among them, the number of target objects may be one or more. When the number of target objects is multiple, if all target objects meet the interaction condition, then all target objects are interaction objects; if only some target objects meet the interaction condition, then these target objects are interaction objects. Since the scene information changes dynamically, the interaction objects in the target objects that meet the interaction condition also change dynamically. Specifically, the interaction condition includes at least one of the following:

[0065] The first interaction condition is a distance judgment condition: the relative distance between the action object and the target object is less than the first preset distance threshold. Specifically, according to the relative position information of the action object relative to the target object, when it is determined that the relative distance between the action object and the target object is less than the first preset distance threshold, it is determined that the target object meets the interaction condition. It can be seen that the first interaction condition is a distance condition, which is mainly judged based on the relative distance of the target object relative to the action object or the preset position. In specific implementation, if the relative distance between the action object and any target object is less than the first preset distance threshold, the target object whose relative distance is less than the first preset distance threshold is determined as an interactive object that meets the interaction condition. Among them, the first preset distance threshold can be set according to the specific scene. For example, in the game scene, the first preset distance threshold can be set according to the distance value corresponding to the normal attack range.

[0066] The second interaction condition is the interaction intention judgment condition: the action object has an interaction intention with respect to the target object; wherein the interaction intention is determined according to the operation type of the interaction operation triggered by the action object. In the specific implementation, the operation type and other information of the interaction operation triggered by the action object are obtained, and when it is determined according to the operation type that the action object has an interaction intention with respect to any target object, the target object with the interaction intention is determined as an interaction object that meets the interaction condition. Specifically, the interaction operation triggered by the action object is detected, and the target object with the interaction intention of the action object is determined according to the operation type and operation state of the interaction operation. Among them, the target object for which the action object has triggered an interaction behavior can be determined as an interaction object with an interaction intention, such as determining the target object for which the action object has performed an attack operation as an interaction object with an interaction intention; and the target object for which the action object has not yet triggered an attack behavior and is about to trigger an attack operation (such as performing a preparatory action before an attack such as raising an arm) can also be determined as an interaction object with an interaction intention.

[0067] Among them, the second interaction condition is intended to determine whether the action object has an interaction intention with respect to the target object. In specific implementation, the operation types of various interaction operations related to the interaction intention can be predetermined, so as to determine whether the action object has an interaction intention according to the operation type of the interaction operation triggered by the action object. Among them, the operation types of various interaction operations related to the interaction intention can be further divided into: a first operation type corresponding to direct intention, such as attack-type operations; and a second operation type corresponding to indirect intention, such as a preparation operation corresponding to an attack-type operation. By detecting whether the operation type of the interaction operation triggered by the action object for the target object belongs to the first operation type or the second operation type, the operation intention of the action object can be accurately determined. Among them, by setting the second operation type, the intention of the action object can be predicted in advance, thereby ensuring the timely loading of the object interaction model of the target object.

[0068] The above two methods can be used alone or in combination. When the two methods are used in combination, the target object can be determined as an interactive object when it satisfies the above two conditions at the same time, that is, the distance is close and there is an intention to interact. Alternatively, when the two methods are used in combination, priorities can also be set for the above two conditions. For example, the distance judgment condition is executed first, and when the distance judgment condition is met, the interaction intention judgment condition is further executed, so that the interaction intention is only monitored for several target objects with a close distance, thereby reducing the monitoring cost. For another example, the interaction intention judgment condition is executed first, and when there is an interaction intention, the distance judgment condition is further executed, so that the distance is only monitored for several target objects with interaction intention, which can also achieve the purpose of reducing the monitoring cost.

[0069] Step S250: Loading the object interaction model of the interactive object.

[0070] After the interactive object is determined, the object interaction model of the interactive object is loaded. As described above, in order to improve the reuse rate of the model and reduce the storage space, a type interaction model is set for the target object of the same type. Accordingly, before loading the object interaction model of the interactive object, the type interaction model corresponding to the object type of the interactive object is further obtained, and the object interaction model of the interactive object is obtained according to the type interaction model.

[0071] In addition, considering that each target object has different posture information, therefore, in one implementation, the posture state of the type interaction model can be further adjusted according to the object posture information corresponding to the object identifier of the interactive object to obtain the object interaction model of the interactive object. Among them, the object posture information is the object posture information obtained and stored in association with the object identifier in step S220. Through the object posture information, the type interaction model that is common to the same type of target objects can be adjusted to an object interaction model that matches the specific posture state of the current target object, thereby optimizing the display state of each target object while minimizing the storage space.

[0072] Specifically, the type interaction model can be implemented by a collision box, which is specifically used to store collision detection information. In addition, in order to ensure the accuracy of the interaction, it is necessary to make the type interaction model completely match the type visual model. For example, when the shape of the detection area of ​​the collision box is exactly the same as the shape presented by the type visual model, it can ensure that any edge position of the target object can respond accurately when a collision occurs, thereby improving the accuracy. In this embodiment, a general type visual model and a type interaction model are set in advance for target objects of the same type. Compared with the method of setting the object visual model and the object interaction model separately for each target object, it is convenient to achieve accurate matching of the shape of the type visual model and the type interaction model under the premise of reducing the storage space. In addition, this embodiment further sets object posture information for each target object, and accordingly, the type visual model and the type interaction model can adjust the posture state through the object posture information. Since the type visual model and the type interaction model are based on the same object posture information when adjusting the posture, it can ensure that the posture of the adjusted type visual model and the type interaction model is completely matched, thereby further improving the accuracy of the interactive response.

[0073] In addition, in this embodiment, it is necessary to determine whether the object interaction model of the interactive object has been cached in the cache space; if the object interaction model of the interactive object has been cached in the cache space, the object interaction model of the interactive object is loaded from the cache space; if the object interaction model of the interactive object is not cached in the cache space, the object interaction model of the interactive object is loaded from the non-cache space. Among them, the cache space includes: memory space, ultra-high-speed cache and other types of space that can improve access speed. The non-cache space includes: hard disk space contained in the local terminal, or storage space contained in the cloud server. Among them, the hard disk has the advantages of large storage capacity and stable data that is not easy to lose. Therefore, storing the object interaction model in the hard disk has better security. The cloud server can synchronize the data of multiple terminals. Therefore, storing the object interaction model in the cloud server facilitates data synchronization and backup between multiple terminals.

[0074] Step S260: determining an associated object that has an associated relationship with the interactive object, and loading an object interaction model of the associated object.

[0075] The present invention does not limit the order of step S260 and step S250, and those skilled in the art will appreciate that step S260 and step S250 may also be performed simultaneously. In addition, step S260 is an optional step, and in other embodiments of the present invention, step S260 may also be omitted.

[0076] When there are multiple target objects in the virtual scene, the interactive operation may affect multiple adjacent target objects due to its large impact range. In this case, in order to truly simulate the interactive state of each target object, when loading the object interaction model of the interactive object, it is necessary to further determine the associated object that has an associated relationship with the interactive object, so as to further load the object interaction model of the associated object.

[0077] Specifically, when determining the associated object that has an associated relationship with the interactive object, it can be achieved in a variety of ways, for example, determining the target object within the first preset range of the interactive object as the associated object, which is intended to determine the target object in the neighboring area of ​​the interactive object as the associated object; for another example, determining the target object within the second preset range of the action object as the associated object, which is intended to determine the target object in the neighboring area of ​​the action object as the associated object. The above-mentioned first preset range and / or second preset range can be set in a variety of ways, for example, the first preset range and / or the second preset range can be determined in at least one of the following ways:

[0078] In the first determination method, the device attribute information of the terminal device displaying the virtual scene is obtained, the area range threshold corresponding to the device attribute information is determined, and the first preset range and / or the second preset range are determined according to the area range threshold. Among them, the device attribute information of the terminal device includes: device type information (such as mobile device, fixed device, etc.), and / or device performance information (such as hardware configuration information, etc.). Correspondingly, if the device type information is a mobile device, and / or the device configuration is determined to be low according to the device performance information, it is necessary to reduce the area range threshold to avoid the jamming problem caused by excessive loading; if the device type information is a fixed device, and / or the device configuration is determined to be high according to the device performance information, the area range threshold can be increased to load the target object in a larger range, thereby making the interactive experience more realistic. It can be seen that by pre-storing the corresponding relationship between the device attribute information and the area range threshold, the size of the area range threshold can be flexibly determined according to the device attribute information. The area range threshold is used to set the size of the first preset range and / or the second preset range.

[0079] In the second determination method, the motion trajectory information of the action object and the operation position information of the multiple interactive operations continuously triggered by the action object are obtained, and the intended operation area of ​​the action object is predicted according to the motion trajectory information and the operation position information, and the first preset range and / or the second preset range are determined according to the intended operation area. For example, according to the motion trajectory information of the action object, the motion trend and motion direction of the action object can be determined, so as to predict the intended operation area of ​​the action object according to the motion trend and motion direction. For another example, according to the operation position information of the multiple interactive operations continuously triggered by the action object, the interaction trend and interaction direction of the action object can be determined, so as to predict the intended operation area of ​​the action object according to the interaction trend and interaction direction. For example, when the action object performs an attack-type interactive operation, the intended operation area can be predicted according to the attack direction of multiple attack-type interactive operations. By predicting the intended operation area, the possible operation area can be pre-judged before the action object triggers the interactive operation, so that the setting of the associated object is more reasonable. In actual situations, in this method, the associated object that has an associated relationship with the interactive object can also be directly determined according to the predicted intended operation area of ​​the action object, without setting the first preset range and the second preset range.

[0080] In the third determination method, the historical interaction records of the action object are obtained, the interaction preferences of the action object for various types of target objects are determined according to the historical interaction records, the preference type of the action object is determined according to the interaction preferences, and the first preset range and / or the second preset range are determined according to the area where the target object corresponding to the preference type is located. Specifically, through the historical interaction records of the action object, the interaction frequency, interaction mode and other information of the action object for different types of target objects can be determined, so as to obtain the interaction preferences of the action object for various types of target objects, and determine the preference type according to the interaction preferences. For example, target objects with higher interaction frequencies can be screened as associated objects. For another example, the interaction order or interaction combination of the action object for different types of target objects can also be determined according to the historical interaction records, so as to set the associated objects according to the interaction order or interaction combination. The so-called interaction order refers to: the order information of the action object triggering the interaction operation for multiple different target objects, for example, the action object tends to interact in the order of the first type of target object, the second type of target object, and the third type of target object. Correspondingly, if the current interaction object is the second type of target object, the third type of target object can be used as an associated object. The so-called interaction combination means that the action object tends to interact with an object combination composed of multiple target objects. For example, when the action object interacts with target object A, it also interacts with target object B. Then, when target object A is the current interaction object, target object B can be determined as the associated object.

[0081] In the fourth determination method, the first preset range and / or the second preset range are determined according to the task sequence information corresponding to the action object and / or the route setting information. Wherein, the task sequence information corresponding to the action object is used to describe the various tasks to be performed by the action object. For example, in a game scene, the action object usually performs a series of operation actions for completing the specified task according to the setting of the game level. Accordingly, the above-mentioned first preset range and / or the second preset range can be determined according to the series of operation actions for completing the specified task. It can be seen that the task sequence information can be pre-acquired according to the game level setting. Accordingly, the intended operation area of ​​the action object can be predicted according to the task sequence information, and then the associated objects can be screened according to the intended operation area. In addition, the route setting information can be determined according to the terrain information in the virtual scene. For example, if there are inaccessible areas such as canyons and cliffs around the action object, it is necessary to determine the route according to the accessible area, and then set the associated objects according to the route.

[0082] Step S270: In response to the interactive operation triggered by the action object, the display state of the object visual model of the target object is controlled to be a collision response state.

[0083] Specifically, in response to the interactive operation triggered by the action object, when it is determined according to the object interaction model that the interactive operation collides with the interactive object, a collision response state corresponding to the operation type and / or collision position of the interactive operation is determined, and the display state of the object visual model of the interactive object is controlled to change from the initial state to the collision response state. Wherein, when the object visual model does not collide, the corresponding display state is the initial state.

[0084] During specific implementation, it is necessary to store each collision position and the collision response state corresponding to the collision position in the object interaction model. For example, for a plant target object, each branch in the plant target object is used as a collision position, and the correspondence between each collision position and the collision response state is pre-stored in the object interaction model. For example, when branch A is collided, the collision response state is that branch A and the branches next to it fall off; when branch B is collided, the collision response state is that branch B and the branches next to it fall off; when the fruit is collided, the collision response state is that the fruit and the branches next to it fall off. In short, by pre-storing each collision position and its corresponding collision response state, the display state of the object visual model can be controlled to change.

[0085] In addition, in actual situations, the collision response state is not only related to the collision position of the interactive operation, but also to the operation type of the interactive operation. For example, the collision response states corresponding to interactive operations of different attack types are also different. Therefore, the object interaction model also needs to store various operation types and their corresponding collision response states. It can be seen that the object interaction model stores a collision response mapping table, which is used to store the mapping relationship between the collision position, the interactive operation, and the collision response state.

[0086] Step S280: when it is determined that the interactive object of the loaded object interaction model meets the uninstallation condition, the object interaction model of the interactive object meeting the uninstallation condition is uninstalled, and the object interaction model of the interactive object meeting the uninstallation condition is cached in the cache space.

[0087] Specifically, it is determined whether the interactive object of the loaded object interaction model meets the uninstallation condition; if so, the object interaction model of the interactive object meeting the uninstallation condition is uninstalled. The uninstallation condition includes at least one of the following:

[0088] The first type of unloading condition is a distance-based unloading condition, including: the relative distance between the interactive object of the loaded object interaction model and the action object is greater than a second preset distance threshold. Specifically, it is determined whether the relative distance between the interactive object of the loaded object interaction model and the action object is greater than the second preset distance threshold; if so, the interactive object whose relative distance is greater than the second preset distance threshold is determined as an interactive object that meets the unloading condition.

[0089] The second type of uninstallation condition is an interactive uninstallation condition, including: the non-interaction time between the interactive object and the action object in the loaded object interaction model is greater than a preset time threshold. Specifically, it is determined whether the non-interaction time between the interactive object and the action object in the loaded object interaction model is greater than the preset time threshold; if so, the interactive object whose non-interaction time is greater than the preset time threshold is determined as an interactive object that meets the uninstallation condition.

[0090] The above two unloading conditions can be used alone or in combination. In addition, those skilled in the art can also flexibly set various unloading conditions, which is not limited by the present invention. When the two are used in combination, it can be determined that the interactive object meets the unloading condition when the target object satisfies the above two conditions at the same time, that is, the distance is far and the non-interaction time is greater than the preset time threshold. Alternatively, when the two are used in combination, priorities can also be set for the above two unloading conditions. For example, first determine whether the distance class unloading condition is met, and when the distance class unloading condition is met, further determine whether the interaction class unloading condition is met, so that only the non-interaction time is monitored for several target objects with a long distance, thereby reducing the monitoring cost. For another example, first determine whether the interaction class unloading condition is met, and when the interaction class unloading condition is met, further determine whether the distance class unloading condition is met, so that only the distance is monitored for several target objects with a long non-interaction time, which can also achieve the purpose of reducing the monitoring cost.

[0091] Those skilled in the art can flexibly adjust the execution order of the above steps, and can split the above steps into more steps, or combine them into fewer steps, and can also delete some of the steps. In addition, the above-mentioned embodiment one and embodiment two can be combined with each other, and the present invention is not limited to this. Moreover, the above-mentioned steps can be executed in a loop. For example, after the object interaction model is unloaded, if it is detected again that the target object meets the interaction conditions, the corresponding object interaction model will be loaded again. In short, the loading and unloading operations of the object interaction model can be dynamically executed according to the detection results of the scene information.

[0092] In addition, when it is determined that the associated objects of the loaded object interaction model meet the uninstallation conditions, the object interaction models of the associated objects that meet the uninstallation conditions need to be uninstalled, and the object interaction models of the associated objects that meet the uninstallation conditions are cached in the cache space. In short, by caching the uninstalled object interaction models in the cache space, the speed of subsequent loading can be improved.

[0093] In addition, in an optional implementation, in order to save cache space, the target objects contained in the virtual scene are further divided into first-class target objects and second-class target objects; wherein the response priority of the first-class target objects is higher than that of the second-class target objects. Accordingly, when the object interaction model of the interactive object that meets the unloading conditions is cached into the cache space, it is further determined whether the interactive object that meets the unloading conditions is a first-class target object; if so, the object interaction model of the interactive object that meets the unloading conditions is cached into the cache space; if not, the object interaction model of the interactive object that meets the unloading conditions is directly deleted. Of course, after deletion, the object interaction model of the interactive object is still retained in the non-cache space and can be directly loaded from the non-cache space next time.

[0094] Through the above method, interactive objects with higher response priority can be cached to the cache space so as to improve the loading speed when loading again. Among them, the so-called higher response priority means that the interactive object needs to respond immediately when receiving the interactive operation. If the response is not timely, it will cause abnormal situations such as screen freeze and interactive result errors. For example, in the game scene, when some interactive objects respond to interactive operations, the interactive operation results are related to the entity attributes of the associated entity. Therefore, in order to ensure the accuracy of the entity attributes of the associated entity, it is necessary to respond to the interactive operation of the interactive object in time, that is: the response priority of the target object with an associated entity is higher than the response priority of the target object without an associated entity. For example, assuming that the target object is an "apple tree", it has an associated entity "apple basket"; and whenever an apple is shot down from the "apple tree", the entity attributes of its corresponding associated entity "apple basket" will change dynamically (adjusted according to the number of apples added in the apple basket).

[0095] It can be seen that when the target objects included in the virtual scene are divided into the first type of target objects and the second type of target objects, it can be achieved in a variety of ways. In addition to determining according to the number and type of associated entities of the target objects, the target objects included in the virtual scene can also be divided into the first type of target objects and the second type of target objects according to the object type, interactive response mode, and / or historical interaction frequency of each target object. For example, the target objects with a higher historical interaction frequency are determined as the first type of target objects.

[0096] In addition, in another optional implementation, the cache space further includes: multiple cache subspaces, each cache subspace has a different access speed, and each cache subspace corresponds to a different object priority. For example, the cache space is divided into multiple levels, and the access speeds and data cache durations of cache subspaces at different levels are different. In one case, the cache duration of the cache subspace of the first level is the first duration, and the access speed is the first rate; the cache duration of the cache subspace of the second level is the second duration, and the access speed is the second rate... and so on. Among them, the first duration is less than the second duration, and the first rate is greater than the second rate. For example, the cache subspace of the first level only caches object interaction models that are unloaded within 30 minutes, but the access speed is faster; the cache subspace of the second level caches object interaction models that are unloaded within 2 hours, but the access speed is slightly slower. Generally speaking, the object interaction model that has just been uninstalled is more likely to interact again, while the object interaction model that has been uninstalled for a long time is less likely to interact again. Therefore, by reasonably setting the cache duration and access speed of the cache subspaces at each level, the access speed of high-frequency interactive objects can be effectively improved and the cache space can be reduced. Among them, the cache duration of each cache subspace can be determined according to the duration of each game level in the game scene. Accordingly, when the object interaction model of the interactive object that meets the uninstallation conditions is cached into the cache space, the object priority of the interactive object that meets the uninstallation conditions is further determined, and the object interaction model of the interactive object that meets the uninstallation conditions is cached into the cache subspace corresponding to the object priority. Among them, the object priority of the interactive object can be determined based on information such as the type of the object and the frequency of access.

[0097] In summary, this method separates the object visual model from the object interaction model, and dynamically detects the object state information corresponding to the virtual scene, so as to dynamically determine the interactive objects in the target object that meet the interactive conditions, and then realize the on-demand loading of the object interaction model, thereby greatly improving the object loading speed and ensuring the smoothness of the interface display. In addition, by setting the type visual model and type interaction model that are common to the same type of target objects, the storage space can be reduced, the reuse rate of the model can be improved, and it is convenient to ensure the precise match between the type visual model and the type interaction model, thereby improving the accuracy of the interactive response. In addition, by setting the object posture information for the target object, it is convenient to flexibly set the posture state of each target object on the basis of the type visual model and the type interaction model. In addition, this method can improve the speed of subsequent loading by caching the object interaction model of the interactive object that meets the unloading conditions to the cache space, and by dividing the target object into at least two types, dividing the cache space into multiple levels, and setting multiple object priorities for the target object, the loading speed can be further improved, and the utilization rate of the cache space can be improved.

[0098] Of course, those skilled in the art may also cache the object interaction model of the target object in the cache space in advance to increase the speed of the first loading, and the present invention is not limited to this.

[0099] Embodiment 3

[0100] Figure 3 A device for loading objects in a virtual scene provided by a third embodiment of the present invention is shown, comprising:

[0101] The acquisition module 31 is adapted to acquire scene information corresponding to the virtual scene, and determine the interactive object that meets the interactive condition among the target objects according to the scene information; wherein the target object is an object that has been loaded with an object visual model and is contained in the virtual scene;

[0102] A loading module 32, adapted to load an object interaction model of the interactive object; wherein the object interaction model is used to respond to an interactive operation triggered for the interactive object;

[0103] The unloading module 33 is adapted to unload the object interaction model of the interactive object that meets the unloading condition when determining that the interactive object of the loaded object interaction model meets the unloading condition, and cache the object interaction model of the interactive object that meets the unloading condition into the cache space.

[0104] Optionally, the loading module is specifically suitable for:

[0105] Determining whether the object interaction model of the interactive object has been cached in the cache space;

[0106] In a case where the object interaction model of the interactive object has been cached in the cache space, the object interaction model of the interactive object is loaded from the cache space.

[0107] Optionally, the loading module is specifically suitable for:

[0108] In a case where the object interaction model of the interactive object is not cached in the cache space, the object interaction model of the interactive object is loaded from the non-cache space.

[0109] Optionally, the cache space includes: memory space; the non-cache space includes: hard disk space contained in the local terminal, or storage space contained in the cloud server.

[0110] Optionally, the acquisition module is also suitable for:

[0111] Dividing the target objects contained in the virtual scene into a first category of target objects and a second category of target objects; wherein the response priority of the first category of target objects is higher than that of the second category of target objects;

[0112] Then the unloading module is specifically suitable for:

[0113] Determining whether the interactive object meeting the uninstallation condition is a first-category target object;

[0114] If so, the object interaction model of the interactive object that meets the uninstallation condition is cached in the cache space.

[0115] Optionally, the acquisition module is specifically adapted to:

[0116] The target objects included in the virtual scene are divided into first-category target objects and second-category target objects according to the object type, interactive response mode, historical interaction frequency and / or the number of associated entities of each target object.

[0117] Optionally, the cache space includes: a plurality of cache subspaces, each cache subspace has a different access speed, and each cache subspace corresponds to a different object priority;

[0118] Then the unloading module is specifically suitable for:

[0119] An object priority of an interactive object that meets the uninstallation condition is determined, and an object interaction model of the interactive object that meets the uninstallation condition is cached in a cache subspace corresponding to the object priority.

[0120] Optionally, the scene information corresponding to the virtual scene includes at least one of the following: object state information of an action object corresponding to the virtual scene, and object state information of a target object included in the virtual scene;

[0121] Wherein, the object state information of the action object corresponding to the virtual scene includes: relative position information of the action object relative to the target object, and / or operation state information of the interactive operation triggered by the action object;

[0122] The interaction condition includes at least one of the following:

[0123] The relative distance between the action object and the target object is less than a first preset distance threshold;

[0124] The action object has an interaction intention for the target object; wherein the interaction intention is determined according to the operation type of the interaction operation triggered by the action object;

[0125] Furthermore, the uninstallation conditions include:

[0126] The relative distance between the interaction object of the loaded object interaction model and the action object is greater than a second preset distance threshold; and / or,

[0127] The non-interaction time between the interaction object and the action object of the loaded object interaction model is greater than the preset time threshold.

[0128] Optionally, if the virtual scene contains multiple target objects, the loading module is further adapted to:

[0129] Determine an associated object that has an associated relationship with the interactive object, and load an object interaction model of the associated object;

[0130] Wherein, the determining of the associated object having an associated relationship with the interactive object comprises: determining a target object within a first preset range of the interactive object as the associated object; and / or determining a target object within a second preset range of the action object as the associated object;

[0131] Furthermore, the first preset range and / or the second preset range is determined by at least one of the following methods:

[0132] Acquire device attribute information of a terminal device displaying the virtual scene, determine an area range threshold corresponding to the device attribute information, and determine the first preset range and / or the second preset range according to the area range threshold;

[0133] Acquire motion trajectory information of the action object and operation position information of multiple interactive operations continuously triggered by the action object, predict the intended operation area of ​​the action object according to the motion trajectory information and the operation position information, and determine the first preset range and / or the second preset range according to the intended operation area;

[0134] Acquire historical interaction records of the action object, determine interaction preferences of the action object for various types of target objects according to the historical interaction records, determine a preference type of the action object according to the interaction preferences, and determine the first preset range and / or the second preset range according to an area where the target object corresponding to the preference type is located; and

[0135] The first preset range and / or the second preset range is determined according to the task sequence information and / or the route setting information corresponding to the action object.

[0136] The specific structure and working principle of each of the above modules can be referred to the description of the corresponding part of the method embodiment, which will not be repeated here.

[0137] Another embodiment of the present application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the object interaction method in the virtual scene in any of the above method embodiments. The executable instruction can be specifically used to enable the processor to execute the corresponding operations in the above method embodiments.

[0138] Figure 4 A schematic structural diagram of an electronic device according to another embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0139] like Figure 4 As shown, the electronic device may include: a processor (processor) 502 , a communication interface (Communications Interface) 506 , a memory (memory) 504 , and a communication bus 508 .

[0140] in:

[0141] The processor 502 , the communication interface 506 , and the memory 504 communicate with each other via a communication bus 508 .

[0142] The communication interface 506 is used to communicate with other devices such as clients or other servers.

[0143] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned embodiment of the object interaction method in the virtual scene.

[0144] Specifically, the program 510 may include program codes, which include computer operation instructions.

[0145] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0146] The memory 504 is used to store the program 510. The memory 504 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0147] The program 510 may be specifically used to enable the processor 502 to execute the corresponding operations in the above method embodiment.

[0148] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general-purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for the purpose of disclosing the best mode of the present invention.

[0149] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0150] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0151] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0152] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the claimed embodiments may be used in any combination.

[0153] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to an embodiment of the present invention. The present invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0154] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for object interaction in a virtual scene, comprising: Acquire scene information corresponding to the virtual scene, and determine the interactive object that meets the interactive condition among the target objects according to the scene information; wherein the target object is an object of the loaded object visual model contained in the virtual scene; Loading an object interaction model of the interactive object; wherein the object interaction model is used to respond to an interactive operation triggered for the interactive object; When it is determined that the interactive object of the loaded object interaction model meets the uninstallation condition, the object interaction model of the interactive object meeting the uninstallation condition is uninstalled, and the object interaction model of the interactive object meeting the uninstallation condition is cached in the cache space; The target object has an object visual model and an object interaction model that are separated from each other. The object visual model is used to present visual information of the target object, and the object interaction model is used to provide an interactive function.

2. The method according to claim 1, wherein: The object interaction model of loading the interactive object comprises: Determining whether the object interaction model of the interactive object has been cached in the cache space; In a case where the object interaction model of the interactive object has been cached in the cache space, the object interaction model of the interactive object is loaded from the cache space.

3. The method according to claim 2, wherein: After determining whether the object interaction model of the interactive object has been cached in the cache space, the method further includes: In a case where the object interaction model of the interactive object is not cached in the cache space, the object interaction model of the interactive object is loaded from the non-cache space.

4. The method according to claim 3, wherein: The cache space includes: memory space; the non-cache space includes: hard disk space contained in the local terminal, or storage space contained in the cloud server.

5. The method according to any one of claims 1 to 4, wherein: Before acquiring the scene information corresponding to the virtual scene, the method further includes: Dividing the target objects contained in the virtual scene into a first category of target objects and a second category of target objects; wherein the response priority of the first category of target objects is higher than that of the second category of target objects; Then, caching the object interaction model of the interactive object meeting the uninstallation condition into the cache space includes: Determining whether the interactive object meeting the uninstallation condition is a first-category target object; If so, the object interaction model of the interactive object that meets the uninstallation condition is cached in the cache space.

6. The method according to claim 5, wherein: The dividing the target objects contained in the virtual scene into first-category target objects and second-category target objects comprises: The target objects included in the virtual scene are divided into first-category target objects and second-category target objects according to the object type, interactive response mode, historical interaction frequency and / or the number of associated entities of each target object.

7. The method according to claim 6, wherein: The cache space includes: a plurality of cache subspaces, each cache subspace has a different access speed, and each cache subspace corresponds to a different object priority; Then, caching the object interaction model of the interactive object meeting the uninstallation condition into the cache space includes: An object priority of an interactive object that meets the uninstallation condition is determined, and an object interaction model of the interactive object that meets the uninstallation condition is cached in a cache subspace corresponding to the object priority.

8. The method according to any one of claims 1 to 4, wherein: The scene information corresponding to the virtual scene includes at least one of the following: object state information of an action object corresponding to the virtual scene, and object state information of a target object included in the virtual scene; Wherein, the object state information of the action object corresponding to the virtual scene includes: relative position information of the action object relative to the target object, and / or operation state information of the interactive operation triggered by the action object; The interaction condition includes at least one of the following: The relative distance between the action object and the target object is less than a first preset distance threshold; The action object has an interaction intention for the target object; wherein the interaction intention is determined according to the operation type of the interaction operation triggered by the action object; Furthermore, the uninstallation conditions include: The relative distance between the interaction object of the loaded object interaction model and the action object is greater than a second preset distance threshold; and / or, The non-interaction time between the interaction object and the action object of the loaded object interaction model is greater than the preset time threshold.

9. The method according to any one of claims 1 to 4, wherein: If the number of target objects included in the virtual scene is multiple, then after determining the interactive objects that meet the interactive conditions among the target objects according to the scene information, the method further includes: Determine an associated object that has an associated relationship with the interactive object, and load an object interaction model of the associated object; Wherein, the determining of the associated object having an associated relationship with the interactive object comprises: determining a target object within a first preset range of the interactive object as the associated object; and / or determining a target object within a second preset range of the action object as the associated object; Furthermore, the first preset range and / or the second preset range is determined by at least one of the following methods: Acquire device attribute information of a terminal device displaying the virtual scene, determine an area range threshold corresponding to the device attribute information, and determine the first preset range and / or the second preset range according to the area range threshold; Acquire motion trajectory information of the action object and operation position information of multiple interactive operations continuously triggered by the action object, predict the intended operation area of ​​the action object according to the motion trajectory information and the operation position information, and determine the first preset range and / or the second preset range according to the intended operation area; Acquire historical interaction records of the action object, determine interaction preferences of the action object for various types of target objects according to the historical interaction records, determine a preference type of the action object according to the interaction preferences, and determine the first preset range and / or the second preset range according to an area where the target object corresponding to the preference type is located; and The first preset range and / or the second preset range is determined according to the task sequence information and / or the route setting information corresponding to the action object.

10. An object loading device in a virtual scene, comprising: An acquisition module, adapted to acquire scene information corresponding to the virtual scene, and determine, according to the scene information, an interactive object among target objects that meets the interactive condition; wherein the target object is an object in the virtual scene that has a loaded object visual model; A loading module, adapted to load an object interaction model of the interactive object; wherein the object interaction model is used to respond to an interactive operation triggered for the interactive object; an unloading module, adapted to, when determining that an interactive object of a loaded object interaction model meets an unloading condition, unloading the object interaction model of the interactive object that meets the unloading condition, and caching the object interaction model of the interactive object that meets the unloading condition into a cache space; The target object has an object visual model and an object interaction model that are separated from each other. The object visual model is used to present visual information of the target object, and the object interaction model is used to provide an interactive function.

11. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the object interaction method in a virtual scene according to any one of claims 1-9.

12. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute operations corresponding to the object interaction method in a virtual scene as described in any one of claims 1 to 9.