Virtual object processing method and device, equipment, storage medium and program product
By displaying recommended virtual objects in the virtual construction interface of construction games, users can quickly replace or place virtual objects, solving the problem of inefficient replacement of virtual objects in the existing technology and achieving a more efficient virtual construction process.
Patent Information
- Application Number
- CN202510364772.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-06-27
AI Technical Summary
In construction games, when users replace objects in virtual construction, they need to filter them step by step, resulting in inefficient browsing, searching and screening, which in turn reduces the efficiency of virtual objects replacement.
It provides a method of handling virtual objects. By displaying the target virtual objects in the construction interface of the virtual scene, it responds to the user's triggering operation, displays the recommended virtual objects corresponding to the target virtual objects, and allows the user to place the recommended virtual objects in the virtual construction to replace or create new objects.
This method greatly shortens the operation path of replacement or newly placed virtual objects, simplifies operation steps, improves operation efficiency, and improves the construction efficiency of virtual buildings through highly targeted virtual objects selection.
Smart Images

Figure CN120204716A_ABST
Abstract
Description
[0001] Division Case Explanation
[0002] This application is a divisional application of a Chinese patent with an application date of September 1, 2023, an application number of 202311138477.1, and an invention title of "Method, Device, Equipment, Storage Medium, and Program Product for Processing Virtual Objects". Technical Field
[0003] This application relates to human-computer interaction technology, and particularly to a method, device, equipment, storage medium, and program product for processing virtual objects. Background Art
[0004] The display technology based on graphics processing hardware has expanded the channels for perceiving the environment and obtaining information. Especially the display technology of virtual scenes can realize diverse interactions between virtual objects controlled by users or artificial intelligence according to actual application requirements, and has various typical application scenarios. For example, in a virtual scene such as a construction game, it can simulate the real construction process of virtual buildings or virtual homes.
[0005] During the process of a target account (player) controlling a virtual character to build a virtual building in a virtual scene, when it is necessary to replace a virtual object in the virtual building that is currently being built, usually the virtual object to be replaced needs to be selected, and through the "withdraw" or "delete" button, the virtual object to be replaced is stored in the warehouse. Then, a new virtual object that the user wants to place is selected from the warehouse, and the new virtual object is placed in the virtual building through the "place" button to achieve the replacement of the virtual object to be replaced.
[0006] However, in practical applications, the number of object lists in the construction interface of construction games is large and the types are relatively rich. If the user wants to find a specific new virtual object, they need to screen step by step. For example, first find the first-level and second-level tabs corresponding to the new virtual object, and then select the new virtual object that they want to rearrange in the tab. There are problems of low browsing, searching, and screening efficiency, resulting in low replacement efficiency of virtual objects. Summary of the Invention
[0007] Embodiments of this application provide a method, device, electronic device, computer-readable storage medium, and computer program product for processing virtual objects, which can improve the construction efficiency of virtual buildings.
[0008] The technical solution of the embodiments of this application is implemented as follows:
[0009] Embodiments of this application provide a method for processing virtual objects, including:
[0010] Display a virtual building in the construction interface of the virtual scene, where the virtual building includes at least one virtual object;
[0011] In response to a trigger operation on a target virtual object, at least one recommended virtual object is displayed, where the recommended virtual object corresponds to a recommended label of the target virtual object;
[0012] In response to a selection operation on a target recommended object, the target recommended object is placed in the virtual construction.
[0013] An embodiment of the present application provides a processing device for virtual objects, including:
[0014] A first display module for displaying a virtual construction in a construction interface of a virtual scene, where the virtual construction includes at least one virtual object;
[0015] A second display module for displaying at least one recommended virtual object in response to a trigger operation on a target virtual object, where the recommended virtual object corresponds to a recommended label of the target virtual object;
[0016] An object placement module for placing the target recommended object in the virtual construction in response to a selection operation on the target recommended object.
[0017] In the above solution, the second display module is further configured to display at least two recommended labels for selection; in response to a label selection operation, display at least one recommended virtual object corresponding to the selected recommended label.
[0018] In the above solution, the second display module is further configured to, when the selected recommended label indicates recommending a virtual object corresponding to a part to which the target virtual object belongs, display at least one recommended virtual object corresponding to the part; when the selected recommended label indicates recommending a virtual object corresponding to the construction style of the target virtual object, display at least one recommended virtual object corresponding to the target style, where the target style includes at least one of the construction style or an associated style associated with the construction style.
[0019] In the above solution, the second display module is further configured to, when there are multiple types of the target style, determine the degree of association between each type of the target style and the construction style; and sequentially display at least one recommended virtual object corresponding to the corresponding target style in descending order of the degree of association.
[0020] In the above solution, the second display module is further configured to, when the number of recommended virtual objects is at least two, display a first number of recommended virtual objects among the at least two recommended virtual objects in a first display style, and display a second number of recommended virtual objects in a second display style; wherein, the first display style is different from the second display style, the first display style is used to indicate that the first number of recommended virtual objects are in a selectable state, and the second display style is used to indicate that the second number of recommended virtual objects are in a non-selectable state.
[0021] In the above solution, the second display module is further configured to, when the number of recommended virtual objects is at least two, obtain influence parameters for influencing each of the recommended virtual objects; wherein, the influence parameters include at least one of the following: the part to which the recommended virtual object belongs, the degree of association between the recommended virtual object and the construction style corresponding to the target virtual object; based on the influence parameters, determine the selection priority of each of the recommended virtual objects, and display each of the recommended virtual objects in a display manner corresponding to the selection priority.
[0022] In the above solution, the object placement module is further configured to, in response to a selection operation on a target recommended object, display a replacement control and a placement control corresponding to the target recommended object; when a trigger operation on the replacement control is received, place the target recommended object in the virtual building to replace the original virtual object in the virtual building; when a trigger operation on the placement control is received, place the target recommended object at a target position in the virtual building to create the target recommended object at the target position.
[0023] In the above solution, the object placement module is further configured to, when the target recommended object belongs to the same part as the target virtual object, place the target recommended object at the position of the target virtual object in the virtual building to replace the target virtual object; when the target recommended object does not belong to the same part as the target virtual object, place the target recommended object at the position of other virtual objects in the virtual building to replace the other virtual object, wherein the target recommended object belongs to the same part as the other virtual object.
[0024] In the above solution, the object placement module is further configured to, when there are other virtual objects in the virtual building that belong to the same component as the target virtual object, place the target recommended object at the positions of the target virtual object and the other virtual objects in the virtual building to replace the target virtual object and the other virtual objects.
[0025] In the above solution, the object placement module is further configured to, in response to a dragging operation on the target recommended object, control the target recommended object to move in the virtual building, and during the movement of the target recommended object, display the position where the target recommended object is located in a first style; when the target recommended object moves to a target position and the display style of the target position is a second style, in response to a release instruction for the dragging operation, place the target recommended object at the target position; wherein, the first style is different from the second style, the first style is used to indicate that the position where the target recommended object is located is in a non-placeable state, and the second style is used to indicate that the target position is in a placeable state.
[0026] In the above solution, the object placement module is further configured to display guiding indication information corresponding to a target position in the virtual building, wherein the guiding prompt information is used to guide the dragging of the target recommended object to the target position in a placeable state; in response to a dragging operation on the target recommended object triggered based on the guiding indication information, control the target recommended object to move towards the target position; when the target recommended object moves to the target position, in response to a release instruction for the dragging operation, place the target recommended object at the target position.
[0027] In the above solution, after the target recommended object is placed in the virtual building, the device further includes: a details viewing module, configured to, in response to a configuration viewing operation on the virtual building, display a configuration details page of the virtual building; in the configuration details page, display a selection identifier for the target recommended object and a withdrawal control; wherein, the withdrawal control is used to withdraw the target recommended object placed in the virtual building.
[0028] In the above solution, before displaying at least one recommended virtual object, the device further includes: an object recognition module, configured to, in response to a triggering operation on a target area in the virtual building, perform object recognition processing on the object projection carried by the target area to obtain a first recognition result; when the first recognition result indicates that the object projection carried by the target area is a projection of a virtual object, use the virtual object corresponding to the object projection as the target virtual object; when the first recognition result indicates that the object projection carried by the target area is a projection of multiple virtual objects, recognize the projection integrity of the multiple virtual objects in the target area to obtain a second recognition result, and determine the target virtual object based on the second recognition result; use the triggering operation on the target area as the triggering operation on the target virtual object.
[0029] In the above solution, the object recognition module is further configured to, when the second recognition result indicates that the projections of the multiple virtual objects in the target area are all incomplete, obtain the projected area of each virtual object in the target area, and use the virtual object with the largest projected area as the target virtual object; when the second recognition result indicates that the projections of the first number of virtual objects among the multiple virtual objects are complete and the projections of the second number of virtual objects are incomplete, determine the target virtual object based on the first number of virtual objects.
[0030] In the above solution, the object recognition module is further configured to, when the first number is 1, use the virtual object with a complete projection as the target virtual object; when the second number is greater than 1, obtain the distance between each virtual object in the first number of virtual objects and the virtual camera, and use the virtual object with the smallest distance as the target virtual object.
[0031] In the above solution, before displaying at least one recommended virtual object, the device further includes: a construction configuration module, configured to display an object configuration interface of the virtual building, and display a part setting control, a style setting control, and a style association control in the object configuration interface; in response to a part setting operation triggered based on the part setting control, set the part to which at least one virtual object in the virtual building belongs; in response to a style setting operation triggered based on the style setting control, set the construction style corresponding to the virtual building or at least one virtual object in the virtual building; in response to a style association operation triggered based on the style association control, set the association degree between different construction styles to obtain an associated style corresponding to the architectural style; determine a recommended label of the virtual object based on at least one of the part, the construction style, and the associated style.
[0032] An embodiment of the present application provides an electronic device, including:
[0033] A memory, configured to store computer-executable instructions or a computer program;
[0034] A processor, configured to implement the method for processing virtual objects provided by the embodiments of the present application when executing the computer-executable instructions or the computer program stored in the memory.
[0035] An embodiment of the present application provides a computer-readable storage medium, storing computer-executable instructions or a computer program, configured to implement the method for processing virtual objects provided by the embodiments of the present application when being executed by a processor.
[0036] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, a method for processing virtual objects provided by the embodiment of the present application is implemented.
[0037] The embodiment of the present application has the following beneficial effects:
[0038] When applying the embodiment of the present application, during the construction process of a virtual building, if a player wants to replace or re-place a virtual object in the virtual building and triggers the target virtual object in the virtual building, one or more recommended virtual objects available for selection will be displayed in the construction interface. The player can select a target recommended object from them to place the target recommended object in the virtual building to replace the target virtual object in the virtual building or create a new target recommended object in the virtual building. In this way, the player can conveniently select the required target recommended object from the recommended virtual objects without gradual screening, greatly shortening the operation path for replacing or newly placing virtual objects compared with the prior art, simplifying the operation steps, and improving the operation efficiency. At the same time, since the recommended virtual objects correspond to the recommended labels of the target virtual objects, that is, the recommended virtual objects are recommended according to the recommended labels of the target virtual objects, the pertinence and accuracy of virtual object recommendation can be improved, facilitating the player to select a satisfactory target recommended object from them to build the virtual building, thereby improving the construction efficiency of the virtual building. Description of the Drawings
[0039] Figure 1 is a schematic diagram of the architecture of the virtual object processing system 100 provided by the embodiment of the present application;
[0040] Figure 2 is a schematic diagram of the structure of the electronic device 500 provided by the embodiment of the present application;
[0041] Figure 3 is a schematic diagram of the process of the method for processing an object-recognized virtual object provided by the embodiment of the present application;
[0042] Figure 4 is a schematic diagram of the display of recommended virtual objects provided by the embodiment of the present application;
[0043] Figure 5 is a schematic diagram of the placement of virtual objects provided by the embodiment of the present application;
[0044] Figure 6 is a schematic diagram of the placement of virtual objects provided by the embodiment of the present application;
[0045] Figure 7 is a schematic diagram of the details of virtual objects provided by the embodiment of the present application;
[0046] Figure 8It is a schematic configuration diagram of a virtual object provided by an embodiment of the present application;
[0047] Figure 9 It is a schematic flowchart of a method for processing a virtual object provided by an embodiment of the present application;
[0048] Figure 10 It is a schematic flowchart of a method for identifying a virtual object provided by an embodiment of the present application;
[0049] Figures 11A-11B It is a schematic display diagram of a triggering method provided by an embodiment of the present application;
[0050] Figures 12A-12B It is a schematic identification diagram of a virtual object provided by an embodiment of the present application. Detailed implementation manners
[0051] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0052] It can be understood that in the embodiments of the present application, data related to user information, etc. (such as a user's triggering operation, recommended tags, or the user's configuration data, etc.) are involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.
[0053] In the following description, "some embodiments" are involved, which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and they can be combined with each other without conflict.
[0054] In the following description, the terms "first / second..." only distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second..." can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0056] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.
[0057] 1) Client: An application program running on a terminal for providing various services, such as a video playback client, a game client, etc.
[0058] 2) In response to: Used to represent the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or can have a set delay; without special instructions, there is no limit on the execution order of the multiple executed operations.
[0059] 3) Virtual scene: A virtual scene displayed (or provided) when an application program runs on a terminal. This virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5D virtual scene, or a three-dimensional virtual scene. The embodiments of the present application do not limit the dimension of the virtual scene. For example, the virtual scene can include the sky, land, ocean, etc. The land can include environmental elements such as deserts and cities. Users can control virtual objects to move in this virtual scene.
[0060] 4) Virtual construction: A construction built by a player in a virtual scene, such as virtual constructions of buildings like houses, walls, gardens, etc., or virtual constructions of transportation such as bridges, roads, ships, airplanes, etc. Of course, it can also be other types of constructions. The virtual construction can have its own shape and volume in the virtual scene, occupying a part of the space in the virtual scene. Players can build or assemble the virtual construction through individual virtual objects or virtual components, that is, each virtual construction includes multiple virtual objects.
[0061] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for processing virtual objects, which can improve the construction efficiency of virtual constructions. The following describes the exemplary applications of the electronic devices provided in the embodiments of the present application. The electronic devices provided in the embodiments of the present application can be implemented as various types of user terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable game devices), smartphones, smart speakers, smart watches, smart TVs, in-vehicle terminals, etc., or can also be implemented as servers. The following will describe the exemplary applications when the device is implemented as a terminal.
[0062] See Figure 1 , Figure 1It is a schematic architecture diagram of a virtual object processing system 100 provided by an embodiment of the present application. To support an exemplary application, terminals (exemplarily shown as terminal 400-1 and terminal 400-2) are connected to a server 200 through a network 300. The network 300 can be a wide area network, a local area network, or a combination of both.
[0063] In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto. A client with a live broadcast function is set on the terminal, such as a video playback client, an instant messaging client, a game client, a live broadcast client, etc. The server 200 is a background server corresponding to the client, and can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and there is no limitation in the embodiments of the present application.
[0064] In practical applications, the terminal displays virtual buildings in a virtual scene construction interface, where the virtual buildings include at least one virtual object; in response to a trigger operation on a target virtual object, a recommendation request is generated and sent to the server 200; the server 200 obtains at least one recommended virtual object corresponding to the recommendation label of the target virtual object based on the recommendation request, and returns the obtained at least one recommended virtual object to the terminal; the terminal displays at least one recommended virtual object; in response to a selection operation on a target recommended object, the target recommended object is placed in the virtual building.
[0065] See Figure 2 , Figure 2 It is a schematic structural diagram of an electronic device 500 provided by an embodiment of the present application. Taking the terminal in Figure 1 as an example, Figure 2 the electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. Each component in the electronic device 500 is coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 540.
[0066] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0067] The memory 550 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), and the volatile memory can be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory. Optionally, the memory 550 includes one or more storage devices that are physically located far from the processor 510.
[0068] In some embodiments, the memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, which will be exemplarily described below.
[0069] The operating system 551 includes system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, the core library layer, the driver layer, etc., for implementing various basic services and processing hardware-based tasks; the network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, Wi-Fi (Wireless Fidelity), and USB (Universal Serial Bus), etc.
[0070] In some embodiments, the virtual object processing device provided in the embodiments of the present application can be implemented in software. The virtual object processing device provided in the embodiments of the present application can be provided as various software embodiments, including various forms such as application programs, software, software modules, scripts, or code. Figure 2 The virtual object processing device 555 stored in the memory 550 is shown. It can be software in the form of programs and plugins, etc., and includes a series of modules, including a first display module 5551, a second display module 5552, and an object placement module 5553. These modules are logical, so they can be arbitrarily combined or further split according to the functions to be implemented. The functions of each module will be described below.
[0071] In some other embodiments, the device provided by the embodiments of the present application can be implemented in a hardware manner. As an example, the device provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the method for processing virtual objects provided by the embodiments of the present application. For example, a processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0072] In some embodiments, the terminal or the server can implement the method for processing virtual objects provided by the embodiments of the present application by running various computer-executable instructions or computer programs. For example, the computer-executable instructions can be commands at the microprogram level, machine instructions, or software instructions. The computer program can be a native program or a software module in the operating system; it can be a local application (APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP or a live broadcast APP; it can also be a small program that can be embedded in any APP, that is, a program that only needs to be downloaded to the browser environment to run. In short, the above computer-executable instructions can be instructions in any form, and the above computer programs can be application programs, modules, or plugins in any form.
[0073] As described above, the method for processing virtual objects provided by the embodiments of the present application can be implemented by various types of electronic devices. For example, it can be Figure 1 executed independently by any one of the terminals and the server 200 in Figure 1 or can be executed collaboratively by the terminals and the server 200 in Figure 1 Next, taking the execution of the method for processing virtual objects provided by the embodiments of the present application by the terminal in Figure 3 as an example for illustration. Refer to Figure 3 , Figure 3 is a schematic flowchart of the method for processing virtual objects for object recognition provided by the embodiments of the present application, and will be described in conjunction with the steps shown in
[0074] Step 101: The terminal displays a virtual building in the construction interface of the virtual scene, where the virtual building includes at least one virtual object.
[0075] In practical applications, a client supporting a virtual scenario is installed on a terminal (for example, when the virtual scenario is a game, the corresponding client can be a construction game APP). When the user opens the client installed on the terminal and the terminal runs the client, a construction interface in which a target account (i.e., the account corresponding to the current terminal) performs construction in the virtual scenario can be displayed in the client, and virtual buildings are displayed in the construction interface. Among them, the virtual building includes at least one virtual object. Taking the virtual building as a house as an example, the virtual objects can be components such as windows, doors, walls, roofs, floors, and furniture inside the house (such as tables, chairs, table lamps, beds, sofas, etc.). These virtual objects are used to build the virtual building of the house and are components of the virtual building.
[0076] Step 102: In response to a trigger operation on a target virtual object, display at least one recommended virtual object, where the recommended virtual object corresponds to the recommended label of the target virtual object.
[0077] In practical applications, when a player needs to replace or edit a certain virtual object in a virtual building or needs to newly place a virtual object, it can be achieved by triggering an existing virtual object in the virtual building. For example, when the player triggers a target virtual object, the terminal responds to the trigger operation and displays at least one recommended virtual object corresponding to the recommended label of the target virtual object for the player to select the required recommended virtual object from and place the selected recommended virtual object in the virtual building.
[0078] In some embodiments, before the terminal displays at least one recommended virtual object, the trigger operation on the target virtual object can be received in the following manner: In response to a trigger operation on a target area in the virtual building, perform object recognition processing on the object projection carried by the target area to obtain a first recognition result; when the first recognition result indicates that the object projection carried by the target area is the projection of a virtual object, use the virtual object corresponding to the object projection as the target virtual object; when the first recognition result indicates that the object projection carried by the target area is the projections of multiple virtual objects, recognize the projection integrity of the multiple virtual objects in the target area to obtain a second recognition result, and determine the target virtual object based on the second recognition result; use the trigger operation on the target area as the trigger operation on the target virtual object.
[0079] Among them, the triggering operation can be an operation in the form of a click operation, a long - press operation, a circling operation, etc. Of course, it can also be an operation in other forms. The embodiments of the present application do not limit the form of the triggering operation. Taking the player triggering the above - mentioned triggering operation with a finger as an example, the target area is the contact area of the finger on the virtual building when the player triggers the above - mentioned triggering operation on the virtual building (for example, when the triggering operation is a long - press operation, the target area is the long - press area of the finger) or the circled area (for example, when the triggering operation is a circling operation, the target area is the circled area of the finger).
[0080] When the terminal receives the triggering operation of the player for the target area, it performs object recognition processing on the object projection carried by the target area to determine the corresponding virtual object in the target area. For example, when the first recognition result indicates that the object projection carried by the target area is the projection of a virtual object (that is, the object projection is the projection of a virtual object in the target area), the virtual object in the target area can be determined as the virtual object corresponding to the projection, and this virtual object is used as the target virtual object; when the first recognition result indicates that the object projection carried by the target area is the projection of multiple (two or more) virtual objects, the integrity of the projections of the multiple virtual objects in the target area is further recognized, and the target virtual object is determined based on the obtained second recognition result.
[0081] In some embodiments, the terminal can determine the target virtual object based on the second recognition result in the following way: when the second recognition result indicates that the projections of multiple virtual objects in the target area are all incomplete, obtain the projection area of each virtual object in the target area, and use the virtual object with the largest projection area as the target virtual object; when the second recognition result indicates that the projections of the first number of virtual objects among the multiple virtual objects are complete and the projections of the second number of virtual objects are incomplete, determine the target virtual object based on the first number of virtual objects.
[0082] Here, when the second recognition result indicates that the projections of multiple virtual objects in the target area are all incomplete, the target virtual object is determined according to the size of the projection area of each virtual object in the target area. For example, when the first recognition result indicates that multiple virtual objects such as virtual object 1, virtual object 2, and virtual object 3 have projections in the target area, the integrity of the projections of virtual object 1, virtual object 2, and virtual object 3 in the target area is further recognized. When the second recognition result indicates that the projections of virtual object 1, virtual object 2, and virtual object 3 in the target area are all incomplete, obtain the projection area of virtual object 1, virtual object 2, and virtual object 3 in the target area, and select the virtual object with the largest projection area as the target virtual object. For example, if the projection area of virtual object 1 is larger than the projection area of virtual object 2, and the projection area of virtual object 2 is larger than the projection area of virtual object 3, then virtual object 1 can be used as the target virtual object.
[0083] When the second recognition result indicates that multiple virtual objects are all projected completely in the target area, or some virtual objects (such as the first number of virtual objects) are projected completely and some virtual objects (such as the second number of virtual objects) are not projected completely, the target virtual object is further determined based on the virtual objects that are projected completely.
[0084] In some embodiments, the terminal can determine the target virtual object based on the first number of virtual objects in the following manner: when the first number is 1, the virtual object that is projected completely is used as the target virtual object; when the second number is greater than 1, the distance between each of the first number of virtual objects and the virtual camera is obtained, and the virtual object with the smallest distance is used as the target virtual object.
[0085] Here, when the second recognition result indicates that multiple virtual objects are all projected completely in the target area, or some virtual objects are projected completely, the target virtual object is further determined based on the virtual objects that are projected completely. When there is 1 virtual object that is projected completely, this virtual object that is projected completely can be used as the target virtual object; when there are multiple (greater than or equal to 2) virtual objects that are projected completely, the distance between each virtual object that is projected completely and the virtual camera (used to obtain the current construction interface) is further obtained. For example, when the virtual objects that are projected completely include virtual object 1, virtual object 2, and virtual object 3, the distances between virtual object 1, virtual object 2, and virtual object 3 and the virtual camera are obtained respectively, and the virtual object with the smallest distance is used as the target virtual object. For example, if the distance between virtual object 1 and the virtual camera is less than the distance between virtual object 2 and the virtual camera, and the distance between virtual object 2 and the virtual camera is less than the distance between virtual object 3 and the virtual camera, then virtual object 1 is used as the target virtual object.
[0086] After determining the target virtual object corresponding to the target area, the trigger operation for the target area can be considered as the trigger operation for the target virtual object. In response to this trigger operation, the terminal can display at least one recommended virtual object corresponding to the recommended label of the target virtual object for the player to select.
[0087] In some embodiments, the terminal can display at least one recommended virtual object in the following manner: display at least two recommended labels for selection; in response to the label selection operation, display at least one recommended virtual object corresponding to the selected recommended label.
[0088] Here, in response to the trigger operation for the target virtual object, the terminal displays multiple recommended labels for selection, such as recommended similar parts and recommended similar styles. After the player selects a recommended label from them, the terminal, in response to this selection operation, displays the recommended virtual object corresponding to the selected recommended label for the player to select and use.
[0089] In some embodiments, the terminal may display at least one recommended virtual object corresponding to the selected recommended tag in the following manner: when the selected recommended tag indicates a recommendation for a virtual object corresponding to the part to which the target virtual object belongs, display at least one recommended virtual object corresponding to this part; when the selected recommended tag indicates a recommendation for a virtual object corresponding to the construction style of the target virtual object, display at least one recommended virtual object corresponding to the target style.
[0090] Here, when the selected recommended tag indicates a recommendation for a virtual object corresponding to the part to which the target virtual object belongs, display at least one recommended virtual object corresponding to this part. For example, when the part to which the target virtual object belongs is a window, display multiple selectable windows as recommended virtual objects. Also, for example, when the part to which the target virtual object belongs is a roof, display multiple selectable roofs as recommended virtual objects; when the selected recommended tag indicates a recommendation for a virtual object corresponding to the construction style of the target virtual object, then display the recommended virtual object corresponding to the target style, where the target style includes at least one of the construction style corresponding to the target virtual object or the associated style associated with the construction style corresponding to the target virtual object. For example, if the construction style of the target virtual object is a pastoral style, and the associated styles associated with the pastoral style can be a fresh style, a minimalist style, etc., then the target style can be at least one of the pastoral style, the fresh style, and the minimalist style, that is, display at least one recommended virtual object corresponding to at least one of the pastoral style, the fresh style, and the minimalist style.
[0091] See Figure 4 , Figure 4 is a schematic diagram of the display of the recommended virtual object provided by the embodiment of the present application. In response to a trigger operation on the target virtual object 401 in (1) (the part to which the target virtual object belongs is a window), the terminal, in (2), displays two selectable recommended tags, including a part tag (such as finding similar parts) 402 and a style tag (such as finding similar styles) 403. Among them, the part tag 402 is used to indicate finding or recommending a recommended virtual object corresponding to the part to which the target virtual object 401 belongs (that is, a window), and the style tag 403 is used to indicate finding or recommending a recommended virtual object corresponding to the construction style of the target virtual object (such as a pastoral style). When the player selects the part tag 402, the terminal, in response to this selection operation, displays the recommended virtual object 404 corresponding to the part of "window" in (3); when the player selects the style tag 403, the terminal, in response to this selection operation, displays the recommended virtual object 405 (such as a roof, a wall, a chair, etc.) corresponding to the same or similar style (such as a European style) as the construction style of "palace style" in (4).
[0092] In some embodiments, the terminal may display at least one recommended virtual object corresponding to a target style in the following manner: when there are multiple types of target styles, determine the degree of association between each type of target style and the construction style; and display at least one recommended virtual object corresponding to the corresponding target style in order from highest to lowest degree of association.
[0093] Here, when there are multiple target styles, the degree of association between the target style and the construction style corresponding to the target virtual object can be determined. Generally, the closer the target style is to the construction style corresponding to the target virtual object, the stronger the degree of association between them. Suppose the construction style corresponding to the target virtual object is a pastoral style, and the target styles include pastoral style, fresh style, and minimalist style. Then when the target style is the pastoral style, the degree of association between it and the construction style corresponding to the target virtual object is 100 (assuming the highest degree of association is 100). When the target style is the fresh style, the degree of association between it and the construction style corresponding to the target virtual object is 90. When the target style is the minimalist style, the degree of association between it and the construction style corresponding to the target virtual object is 80. Then, display at least one recommended virtual object corresponding to the corresponding target style in order from highest to lowest degree of association, that is, the recommended virtual object corresponding to the "pastoral style" is displayed before the recommended virtual object corresponding to the "fresh style", and the recommended virtual object corresponding to the "fresh style" is displayed before the recommended virtual object corresponding to the "minimalist style"; in this way, it is convenient for players to quickly select the recommended virtual object whose style is closest to that of the target virtual object.
[0094] In some embodiments, before displaying at least one recommended virtual object, the terminal may determine the recommended label for each virtual object in the virtual building in the following manner: display the object configuration interface of the virtual building, and display the part setting control, style setting control, and style association control in the object configuration interface; in response to the part setting operation triggered by the part setting control, set the part to which at least one virtual object in the virtual building belongs; in response to the style setting operation triggered by the style setting control, set the construction style corresponding to the virtual building or at least one virtual object in the virtual building; in response to the style association operation triggered by the style association control, set the degree of association between different construction styles to obtain the associated style corresponding to the architectural style; and determine the recommended label of the virtual object based on at least one of the set part, construction style, and associated style.
[0095] In practical applications, developers of virtual scenarios can pre-set the parts (or types) to which virtual objects that make up virtual buildings belong, construction styles, associated styles, etc. For example, when setting a target virtual object, the part to which the target virtual object belongs can be set through a part setting control, the construction style corresponding to the target virtual object can be set through a style setting control, and the associated style associated with the construction style of the target virtual object can be set through a style association control. For example, the degree of association between the construction style of the target virtual object and other construction styles can be set. Generally, the greater the degree of association, the more similar the construction styles. For example, if the construction style corresponding to the target virtual object is a pastoral style, and other construction styles include a fresh style and a retro style, the degree of association between the pastoral style and the fresh style can be set to 90, and the degree of association between the pastoral style and the retro style can be set to 20. Other construction styles with a degree of association exceeding the association threshold (which can be set according to actual needs, such as set to 80) can be used as the associated styles of the construction style of the target virtual object. For example, the fresh style can be used as the associated style of the pastoral style, while the retro style does not belong to the associated style of the pastoral style.
[0096] After setting the part, construction style, and associated style of the target virtual object, at least one of the above-mentioned part, construction style, and associated style can be used to set the recommended label of the target virtual object. For example, the recommended label can include a part label and a style label. When the player selects a part label (indicating the recommendation of virtual objects corresponding to the part to which the target virtual object belongs), at least one recommended virtual object corresponding to the part to which the target virtual object belongs is displayed; when the player selects a style label (indicating the recommendation of virtual objects corresponding to the construction style of the target virtual object), at least one recommended virtual object corresponding to the construction style or associated style of the target virtual object is displayed.
[0097] In some embodiments, the terminal can display at least one recommended virtual object in the following manner: when the number of recommended virtual objects is at least two, the first number of recommended virtual objects among the at least two recommended virtual objects is displayed using a first display style, and the second number of recommended virtual objects is displayed using a second display style; wherein, the first display style is different from the second display style, and the first display style is used to indicate that the first number of recommended virtual objects is in a selectable state, and the second display style is used to indicate that the second number of recommended virtual objects is in a non-selectable state.
[0098] Here, when the number of recommended virtual objects is multiple, different display styles (such as different display orders, different display colors, different display brightnesses, different display fonts, etc.) can be adopted according to the different states of each recommended virtual object (such as whether it is selectable or locked). For example, when there are multiple recommended virtual objects, the recommended virtual objects in the selectable state (that is, the recommended virtual objects are in the unlocked state and can be selected and placed in the virtual building) are highlighted (i.e., the first display style), and the recommended virtual objects in the non-selectable state (that is, the recommended virtual objects are in the locked state and cannot be selected and placed in the virtual building before unlocking) are displayed in gray scale (i.e., the second display style); in this way, the recommended virtual objects in different states are distinguished, which is convenient for players to select the selectable recommended virtual objects to place in the virtual building, and is beneficial to improving the screening efficiency of virtual objects and the construction efficiency of virtual buildings.
[0099] In some embodiments, the terminal can display at least one recommended virtual object in the following manner: when the number of recommended virtual objects is at least two, obtain the influence parameters for influencing each recommended virtual object; wherein, the influence parameters include at least one of the following: the part to which the recommended virtual object belongs, the degree of association between the recommended virtual object and the construction style corresponding to the target virtual object; based on the influence parameters, determine the selection priority of each recommended virtual object, and adopt a display method corresponding to the selection priority to display each recommended virtual object.
[0100] Here, when the number of recommended virtual objects is multiple, the selection priorities corresponding to different recommended virtual objects can be different. According to the selection priorities corresponding to the recommended virtual objects, corresponding display styles can be adopted to display each recommended virtual object. For example, the recommended virtual objects with higher selection priorities are highlighted. For example, if there are 3 selectable recommended virtual objects, namely recommended virtual object 1, recommended virtual object 2, and recommended virtual object 3, and the selection priorities of these three recommended virtual objects decrease in turn, recommended virtual object 1 can be displayed in red font, recommended virtual object 2 can be displayed in yellow font, and recommended virtual object 3 can be displayed in gray font, which is convenient for users to select the required recommended virtual objects and is beneficial to improving the screening efficiency of virtual objects and the construction efficiency of virtual buildings.
[0101] When determining the selection priority corresponding to each recommended virtual object, the selection priority of the recommended virtual object can be determined based on whether the part to which the recommended virtual object belongs is the same as the part to which the target virtual object belongs, or the selection priority of the recommended virtual object can be determined according to the degree of association between the recommended virtual object and the construction style corresponding to the target virtual object. Generally, the more consistent the part to which the recommended virtual object belongs is with the part to which the target virtual object belongs (such as the greater the similarity value between the parts), the greater the selection priority corresponding to the recommended virtual object, and the greater the degree of association between the recommended virtual object and the construction style corresponding to the target virtual object, the greater the selection priority corresponding to the recommended virtual object. After obtaining the influence parameters used to affect each recommended virtual object, the influence parameters can be processed by a trained neural network model for prediction to obtain the selection priority of the recommended virtual object, which can make the prediction more accurate.
[0102] Before applying the neural network model, it is necessary to train the initial neural network model, and then put the trained neural network model into application to realize predicting the selection priority of the recommended virtual object through artificial intelligence technology in combination with the influence parameters. Among them, the neural network model is trained by the recommended virtual object samples, the influence parameters corresponding to the recommended virtual object samples, and the selection priorities annotated for the recommended virtual object samples. For example, based on the recommended virtual object samples, the parts to which the recommended virtual object samples belong, and the selection priorities annotated for the recommended virtual object samples, the initial neural network model is called for prediction processing to obtain the predicted selection priority. After determining the value of the loss function of the neural network model through the predicted selection priority and the annotated selection priority, it can be judged whether the value of the loss function exceeds the preset threshold. When the value of the loss function exceeds the preset threshold, the error signal of the neural network model is determined based on the loss function, and the error signal is backpropagated in the neural network model, and the model parameters of each layer are updated during the propagation process.
[0103] Among them, the embodiments of the present application do not limit the model structure of the neural network model. For example, the neural network model can be a convolutional neural network, a deep neural network, etc.; nor is it limited to the form of the loss function. For example, it can be a cross-entropy loss function, an L2 loss function, etc.
[0104] Here, the backpropagation is described as follows. The training sample data is input into the input layer of the neural network model, passes through the hidden layer, and finally reaches the output layer to output the result. This is the forward propagation process of the neural network model. Since there is an error between the output result of the neural network model and the actual result, the error between the output result and the actual value is calculated, and this error is propagated backward from the output layer to the hidden layer until it reaches the input layer. During the backpropagation process, the values of the model parameters are adjusted according to the error, that is, a loss function is constructed based on the error between the output result and the actual value, and the partial derivatives of the loss function with respect to the model parameters are calculated layer by layer to generate the gradients of the loss function with respect to the model parameters of each layer. Since the direction of the gradient indicates the direction in which the error expands, the gradient of the model parameters is taken as the opposite, and added to the original parameters of each layer of the model. The sum obtained is used as the updated model parameters of each layer, thereby reducing the error caused by the model parameters. The above process is continuously iterated until convergence.
[0105] In practical applications, when a player selects the style label corresponding to the target virtual object, and the terminal responds to this selection operation and displays the recommended virtual objects corresponding to the target style. If there are multiple types of target styles, the association degrees between various target styles and the construction style of the target virtual object are determined, and the recommended virtual objects corresponding to the target style are displayed in order from high to low according to the association degrees. If there are multiple recommended virtual objects for a certain target style, the display priorities of these multiple recommended virtual objects can be further determined from other dimensions, and the corresponding recommended virtual objects are displayed according to the display order corresponding to each display priority. For example, the display priority is determined according to the similarity between the part to which each recommended virtual object belongs and the part to which the target virtual object belongs. The greater the similarity, the greater the corresponding display priority. The greater the display priority, the more forward the display order of the corresponding recommended virtual object.
[0106] For example, if the part to which the target virtual object belongs is "window" and the corresponding construction style is "rustic style", when the player selects the style label of the target virtual object, and the terminal determines that the target styles include rustic style, fresh style, and minimalist style in response to this selection operation, since the correlation between rustic style and rustic style is greater than the correlation between rustic style and minimalist style, and the correlation between rustic style and fresh style is greater than the correlation between rustic style and minimalist style, then the recommended virtual objects corresponding to rustic style, fresh style, and minimalist style are displayed in order of decreasing correlation, that is, the recommended virtual object corresponding to "rustic style" is displayed before the recommended virtual object corresponding to "fresh style", and the recommended virtual object corresponding to "fresh style" is displayed before the recommended virtual object corresponding to "minimalist style"; when there are multiple recommended virtual objects corresponding to each target style, taking the recommended virtual objects corresponding to "rustic style" including recommended virtual object 1, recommended virtual object 2, and recommended virtual object 3 as an example, if the part corresponding to recommended virtual object 1 is a bed, the part corresponding to recommended virtual object 2 is a curtain, and the part corresponding to recommended virtual object 3 is a window, then when displaying the recommended virtual objects corresponding to "rustic style", recommended virtual object 3, recommended virtual object 2, and recommended virtual object 1 are displayed in sequence; thus, it is convenient for the player to quickly select the recommended virtual object that is closest to the style and part of the target virtual object, which is beneficial to improving the screening efficiency of virtual objects and the construction efficiency of virtual buildings.
[0107] It can be understood that in practical applications, when the player selects the part label corresponding to the target virtual object, and the terminal displays the recommended virtual objects corresponding to the part to which the target virtual object belongs, if there are multiple recommended virtual objects, the correlation between the construction style corresponding to each recommended virtual object and the construction style of the target virtual object can be further obtained, and the recommended virtual objects are displayed in order of decreasing correlation.
[0108] For example, if the part to which the target virtual object belongs is "window" and the corresponding construction style is "rustic style", when the player selects the part label of the target virtual object, the terminal, in response to this selection operation, determines multiple recommended virtual objects available for selection, such as Window 1, Window 2, and Window 3. When determining the display order, the terminal can further obtain the construction styles corresponding to each recommended virtual object. For example, the construction style corresponding to Window 1 is "fresh style", the construction style corresponding to Window 2 is "rustic style", and the construction style corresponding to Window 3 is "minimalist style". Then, the terminal determines the degree of association between the construction style of each recommended virtual object and the construction style of the target virtual object, and displays each recommended virtual object in descending order of the degree of association. For example, if the degree of association between the construction style of Window 2 and the construction style of the target virtual object is greater than the degree of association between the construction style of Window 1 and the construction style of the target virtual object, and the degree of association between the construction style of Window 1 and the construction style of the target virtual object is greater than the degree of association between the construction style of Window 3 and the construction style of the target virtual object, then Window 2, Window 1, and Window 3 are displayed in sequence. In this way, it is convenient for the player to quickly select the recommended virtual object that is closest to the part and style of the target virtual object, which is beneficial to improving the screening efficiency of virtual objects and the construction efficiency of virtual buildings.
[0109] Step 103: In response to the selection operation for the target recommended object, place the target recommended object in the virtual building.
[0110] In practical applications, when the player selects the target recommended object from at least one recommended virtual object, the terminal, in response to this selection operation, can directly place the target recommended object in the virtual building. For example, when the player selects the part label corresponding to the target virtual object, the recommended virtual object is the virtual object corresponding to the part that is the same as the part to which the target virtual object belongs. In this case, the target virtual object in the virtual building can be directly replaced with the selected target recommended object.
[0111] For another example, when the player selects the style label corresponding to the target virtual object, the recommended virtual object is the virtual object corresponding to the target style that is the same as or similar to the construction style corresponding to the target virtual object. It may or may not be in the same part as the target virtual object. When the target recommended object selected by the player is the virtual object corresponding to the part that is the same as the part to which the target virtual object belongs, the target virtual object in the virtual construction can be directly replaced with the selected target recommended object. When the target recommended object selected by the player is the virtual object corresponding to the part that is different from the part to which the target virtual object belongs, the target recommended object can be directly placed at the target position in the virtual construction. The target position is the position of the part to which the target recommended object belongs in the virtual construction. It can be understood that if there is already a virtual object at the target position before placing the target recommended object, placing the target recommended object at the target position in the virtual construction means replacing the original virtual object at the target position. If there is no virtual object at the target position before placing the target recommended object, placing the target recommended object at the target position in the virtual construction means newly placing the target recommended object at the target position in the virtual construction.
[0112] In some embodiments, the terminal can also respond to the selection operation for the target recommended object and place the target recommended object in the virtual construction in the following manner: in response to the selection operation for the target recommended object, display the replacement control and the placement control corresponding to the target recommended object; when receiving the trigger operation for the replacement control, place the target recommended object in the virtual construction to replace the original virtual object in the virtual construction; when receiving the trigger operation for the placement control, place the target recommended object at the target position in the virtual construction to create a new target recommended object at the target position.
[0113] See Figure 5 , Figure 5It is a schematic diagram of the placement of virtual objects provided by an embodiment of the present application. When a player selects a target recommended object 501 from at least one recommended virtual object, the terminal responds to this selection operation and can display a replacement control 502 and a placement control 503 corresponding to the target recommended object. Among them, the replacement control 502 is used to replace the original virtual object in the virtual building with the target recommended object 501, and the placement control 503 is used to newly place the target recommended object 501 in the virtual building. At the same time, a placement prompt message 504 can also be displayed (such as confirming to select this object to replace the original object? Or, confirming to select this object for a new placement?); based on the placement prompt message 504, when the player triggers the replacement control, the terminal responds to this trigger operation and places the target recommended object in the virtual building to replace the original virtual object in the virtual building; when the player triggers the placement control, the terminal responds to this trigger operation and places the target recommended object at the target position in the virtual building to newly place (i.e., newly place) the target recommended object at the target position, where the target position is in a placeable state, that is, there are no other placed virtual objects at the target position.
[0114] In some embodiments, the terminal can place the target recommended object in the virtual building in the following way to replace the original virtual object in the virtual building: when the target recommended object belongs to the same part as the target virtual object, place the target recommended object at the position of the target virtual object in the virtual building to replace the target virtual object; when the target recommended object does not belong to the same part as the target virtual object, place the target recommended object at the position of other virtual objects in the virtual building to replace other virtual objects, where the target recommended object belongs to the same part as the other virtual objects.
[0115] In practical applications, when the target virtual object triggered by the user belongs to the same part as the selected target recommended object, the target recommended object can be directly placed at the position of the target virtual object in the virtual building to replace the target virtual object. For example, when the player triggers the target virtual object (such as window 0) in the virtual building, the terminal responds to this trigger operation and displays at least one recommended virtual object for selection, such as window 1, window 2, and window 3. When the player selects the target recommended object (such as window 3), the terminal responds to this trigger operation and judges whether the part to which the target recommended object (i.e., window 3) belongs is the same as the part to which the target virtual object belongs. When it is determined that the part to which the target recommended object (i.e., window 3) belongs is the same as the part to which the target virtual object belongs (i.e., both belong to the window part), the target virtual object (i.e., window 0) in the virtual building is directly replaced with the target recommended object (i.e., window 3); in this way, during the construction process of the virtual building, the rapid replacement of virtual objects is realized, the replacement efficiency of virtual objects is improved, and thus the construction efficiency of the virtual building is improved.
[0116] In some embodiments, the terminal can place the target recommended object at the location of the target virtual object in the virtual building in the following manner to replace the target virtual object: When there are other virtual objects in the virtual building that belong to the same component as the target virtual object, place the target recommended object at the locations of the target virtual object and the other virtual objects in the virtual building to replace the target virtual object and the other virtual objects.
[0117] In practical applications, when there are also other virtual objects in the virtual building that belong to the same part as the target virtual object, the target recommended object can be placed at the locations of multiple virtual objects of the same part (such as the target virtual object and other virtual objects of the same part) in the virtual building with one key, realizing one-key replacement of multiple virtual objects of the same part. For example, when the player triggers the target virtual object (the part it belongs to is a window) in the virtual building, the terminal responds to this trigger operation and displays at least one recommended virtual object for selection, such as Window 1, Window 2, and Window 3. When the player selects the target recommended object (such as Window 3), the terminal responds to this trigger operation and judges whether the target recommended object (i.e., Window 3) is consistent with the part to which the target virtual object belongs. When it is determined that the target recommended object (i.e., Window 3) is consistent with the part to which the target virtual object belongs (i.e., both of them belong to the part of the window), further judge whether there are other virtual objects in the virtual building that belong to the same part as the target virtual object (i.e., judge whether there are other windows in the virtual building). When it is determined that there are other virtual objects in the virtual building that belong to the same part as the target virtual object (i.e., there are other windows), such as Virtual Object 1 and Virtual Object 2, replace the target virtual object, Virtual Object 1, and Virtual Object 2 in the virtual building with the target recommended object (i.e., Window 3) with one key; thus, rapid replacement of virtual objects is achieved, the replacement efficiency of virtual objects is improved, and further, the construction efficiency of the virtual building is facilitated.
[0118] In practical applications, when the part to which the target virtual object triggered by the user belongs is inconsistent with the part to which the selected target recommended object belongs, the target recommended object can be placed at the location of other virtual objects in the virtual building that belong to the same part as the target recommended object to replace the other virtual objects that belong to the same part as the target recommended object. When the number of other virtual objects that belong to the same part as the target recommended object is multiple, the multiple other virtual objects in the virtual building that belong to the same part as the target recommended object can be replaced with the target recommended object with one key.
[0119] For example, when a player triggers a target virtual object (such as a window) in a virtual building, in response to this trigger operation, the terminal displays at least one recommended virtual object for selection, such as lamp 1, chair 1, and chair 2. In this case, the recommended virtual object can be a virtual object corresponding to an associated style associated with the construction style of the target virtual object. When the user selects a target recommended object (such as lamp 1) from them, the terminal, in response to this trigger operation, determines whether the part to which the target recommended object (i.e., lamp 1) belongs is the same as the part to which the target virtual object (such as a window) belongs. When it is determined that the part to which the target recommended object (i.e., lamp 1) belongs is different from the part to which the target virtual object (such as a window) belongs (i.e., one part is a lamp and the other part is a window), the terminal determines whether a lamp has already been placed in the virtual building. When it is determined that a lamp has already been placed in the virtual building, the placed lamp is replaced with the target recommended object (i.e., lamp 1). When there are multiple placed lamps in the virtual building, the multiple placed lamps can be replaced with the target recommended object (i.e., lamp 1) with one key; thus, during the construction process of the virtual building, by triggering the target virtual object, the replacement of other virtual objects different from the target virtual object is realized, breaking through the space and object limitations, achieving cross-object replacement, and further fully expanding the replacement range of virtual objects in the virtual building. At the same time, the rapid replacement of virtual objects is also realized, improving the replacement efficiency of virtual objects, and thus being conducive to improving the construction efficiency of the virtual building.
[0120] In some embodiments, the terminal can place the target recommended object at the target position in the virtual building in the following manner: in response to a drag operation on the target recommended object, control the target recommended object to move in the virtual building, and during the movement of the target recommended object, display the position where the target recommended object is located in a first style; when the target recommended object moves to the target position and the display style of the target position is a second style, in response to a release instruction for the drag operation, place the target recommended object at the target position; wherein, the first style is different from the second style, the first style is used to indicate that the position where the target recommended object is located is in a non-placeable state, and the second style is used to indicate that the target position is in a placeable state.
[0121] In practical applications, after a player selects a target recommended object and selects the placement control, the player can drag the target virtual object to move it in the construction interface or in the virtual building. During the movement of the target recommended object, the position where the target recommended object is located (i.e., the real-time movement position) is displayed in the target style in real time to indicate the placement status of the position where the target recommended object is located (i.e., whether the target recommended object can be placed at the current position). Or, when the target recommended object moves to the position of the target part in the virtual building, the position of the target part is displayed in the target style (such as displaying the border of the target part in the target style) to indicate the placement status of the position of the target part (i.e., whether the target recommended object can be placed at the position of the target part). If the target recommended object cannot be placed at the position of the target part (i.e., the position of the target part is in a non-placeable state), the border of the target part can be displayed in the first style, such as a red border. If the target recommended object can be placed at the position of the target part (i.e., the position of the target part is in a placeable state), the border of the target part can be displayed in the second style, such as a green border. When the target recommended object moves to a target position in a placeable state, a release instruction for the target recommended object can be triggered (such as the player releasing the drag operation on the target recommended object). In response to this release instruction, the terminal places the target recommended object at the target position.
[0122] See Figure 6 , Figure 6 FIG. is a schematic diagram of the placement of a virtual object provided by an embodiment of the present application. In the application scenario where a player selects a placement control (i.e., when a new virtual object is placed in the virtual building instead of replacing the original virtual object), when the target recommended object moves to the position of part 1 (such as window 1), if the position of part 1 is in a non-placeable state (such as there is already another virtual object placed at the position of part 1), the border of part 1 can be displayed in the first style (such as a red border) to indicate that the target recommended object cannot be placed at the position of part 1. When the target recommended object moves to the position of part 2 (such as window 2), if the position of part 2 is in a placeable state (such as there is no other virtual object placed at the position of part 2), the border of part 2 can be displayed in the second style (such as a green border) to indicate that the target recommended object can be placed at the position of part 2. In this case, if the player releases the drag operation on the target recommended object 1101 or clicks the save button, and the terminal receives the release instruction, the target recommended object 1101 can be placed at the position of part 2.
[0123] Through the above method, as the drag operation on the target recommended object is performed, by changing the display style of the current movement position of the target recommended object, it is indicated where the target recommended object can be placed, which plays a guiding role in the placement of the target recommended object and can improve the accuracy and pertinence of the placement position of the virtual object.
[0124] In some embodiments, the terminal can place the target recommended object at the target position in the virtual building in the following manner: display guiding indication information corresponding to the target position in the virtual building, where the guiding prompt information is used to guide the dragging of the target recommended object to the target position in a placeable state; in response to a dragging operation on the target recommended object triggered based on the guiding indication information, control the target recommended object to move towards the target position; when the target recommended object moves to the target position, in response to a release instruction for the dragging operation, place the target recommended object at the target position.
[0125] In practical applications, during the movement of the target recommended object, guiding indication information corresponding to the target position in a placeable state can be displayed to guide the dragging of the target recommended object to the target position. Among them, the guiding indication information can be presented in the form of a text description. For example, the guiding indication information can be described as: "You can place the selected virtual object here", or the target position can be displayed using a target display style (such as highlighting, target color display, etc.) to highlight that the target position is in a non-placeable state, so as to distinguish it from other positions in a non-placeable state, and use the target position displayed in the target display style as the guiding indication information. In this case, under the guidance of the guiding indication information, the player can drag the target recommended object to the target position and then release the dragging operation on the target recommended object. When the terminal receives the release instruction, it can place the target recommended object at the target position.
[0126] It should be noted that when there are multiple target positions in a placeable state, guiding indication information for multiple target positions can be displayed simultaneously. Also, according to the different placement priorities of each target position, different display styles can be used to display the guiding indication information corresponding to each target position, and the guiding indication information corresponding to the target position with the highest placement priority can be prominently displayed, so as to specifically drag and place the target recommended object at the target position with the highest placement priority.
[0127] Through the above method, the player can quickly drag the target recommended object to the target position indicated by the guiding indication information in the virtual building to place the target recommended object at the target position, improving the efficiency of placing virtual objects while enhancing the accuracy and pertinence of the placement position of virtual objects.
[0128] In some embodiments, after the terminal places the target recommended object in the virtual building, it can also, in response to a configuration viewing operation on the virtual building, display a configuration details page of the virtual building; in the configuration details page, display a selection identifier for the target recommended object and a withdrawal control; where the withdrawal control is used to withdraw the target recommended object placed in the virtual building.
[0129] See Figure 7 , Figure 7 is a detailed schematic diagram of a virtual object provided by an embodiment of the present application. After placing a target recommended object in a virtual building, a player can trigger a configuration viewing operation for the virtual building by triggering a configuration viewing control (such as a search control or a filtering control). In response to the configuration viewing operation, the terminal displays a configuration details page of the virtual building, and displays all part categories and style categories configured by the system, as well as a selection identifier corresponding to the target recommended object placed in the virtual building on the configuration details page. For example, when the part corresponding to the target recommended object is a window and the style is a pastoral style, a selection identifier is displayed on the part category of the window and the style category of the pastoral style respectively; in addition, a withdrawal control can also be displayed on the configuration details page, and the virtual object placed in the virtual building can be withdrawn or deleted through the withdrawal control. For example, withdrawing or deleting the placed target recommended object returns the virtual building to the state before placement; in this way, the player can withdraw the placed virtual object according to actual needs and can place other virtual objects again, improving the flexibility of virtual object placement.
[0130] Next, an exemplary application of the embodiment of the present application in an actual application scenario will be described. Taking a construction game in a virtual scene as an example, before a player constructs a virtual building in a construction game, a developer of the construction game can configure part labels (or object types) and style labels of virtual objects involved in the virtual building. See Figure 8 , Figure 8 is a configuration schematic diagram of a virtual object provided by an embodiment of the present application. Among them, the object list shows multiple configured virtual objects, and each virtual object is configured with a corresponding object type (i.e., part label) and style label. In addition, the developer can also configure the association data (such as the degree of association) between each style label. Generally, the more similar two different style labels are, the greater the degree of association between them. For example, the degree of association between the fresh style and the pastoral style is 90, and the degree of association between the retro style and the pastoral style is 20; the developer can save the configuration data to the background server and can update the configuration data of all virtual objects stored in the background server in real time according to actual needs, such as part labels, style labels, and the degree of association between different style labels.
[0131] Next, the processing method of the virtual object provided by the embodiment of the present application will be further described. See Figure 9 , Figure 9 is a flowchart of the processing method of the virtual object provided by the embodiment of the present application. The method includes:
[0132] Step 201: The terminal displays a virtual building in the construction interface of the virtual scene, where the virtual building includes at least one virtual object.
[0133] Taking a virtual building as an example of a house, virtual objects can be components or assemblies such as windows, doors, walls, roofs, floors, and furniture inside the house (such as tables, chairs, table lamps, beds, sofas, etc.). These virtual objects are used to build the virtual building and are components of the virtual building.
[0134] Step 202: In response to a trigger operation on a target virtual object in the virtual building, display at least two recommended tags for selection.
[0135] In practical applications, the player actually performs a trigger operation on a target area in the virtual building. The terminal responds to this trigger operation, identifies the virtual objects in the target area, and uses the identified virtual objects as the target virtual objects. Furthermore, the trigger operation on the target area is regarded as the trigger operation on the target virtual object.
[0136] See Figure 10 , Figure 10 which is a schematic flowchart of the method for identifying virtual objects provided by an embodiment of this application. The method includes:
[0137] Step 301: In response to a trigger operation on a target area in the virtual building, perform object recognition processing on the object projection carried by the target area to obtain a first recognition result;
[0138] Among them, the trigger operation can be an operation in the form of a click operation, a long - press operation, a circle - out operation, etc. Of course, it can also be other trigger methods. The embodiment of this application does not limit the trigger operation method. See Figures 11A-11B , Figures 11A-11B which is a schematic display diagram of the trigger method provided by an embodiment of this application. Taking the example that the player triggers the above - mentioned trigger operation by touching the target area with a finger, Figure 11A in, the terminal judges the trigger duration of the player's finger on the target area, and regards the trigger operation with a trigger duration exceeding the target duration (such as 1 second) as a long - press operation; Figure 11B in, the terminal recognizes the circle - out operation and the corresponding circle - out area by the player's finger continuously drawing a stroke trajectory. When the trajectory is not closed, the system automatically links the starting point and the ending point of the player's gesture and uses the formed closed area as the circle - out area corresponding to the circle - out operation, as shown in (1); when there is a closed area in the trajectory, the system uses the closed area generated by the first intersection point in the trajectory as the circle - out area corresponding to the circle - out operation, as shown in (2).
[0139] It can be seen that the target area is the contact area of the player's finger on the virtual building when triggering the above - mentioned trigger operation on the virtual building (such as when the trigger operation is a long - press operation, the target area is the long - press area of the finger) or the circle - out area (such as when the trigger operation is a circle - out operation, the target area is the circle - out area of the finger).
[0140] Step 302: Determine whether the object projection is a projection of a virtual object.
[0141] Here, it is determined whether the object projection is a projection of a virtual object according to the first recognition result. When the first recognition result indicates that the object projection carried by the target area is a projection of a virtual object, step 303 is executed; otherwise, step 304 is executed.
[0142] Step 303: Use the virtual object corresponding to the object projection as the target virtual object.
[0143] Step 304: Identify the projection integrity of multiple virtual objects in the target area.
[0144] Here, when the first recognition result indicates that the object projection carried by the target area is a projection of multiple virtual objects, the projection integrity of multiple virtual objects in the target area is identified to obtain a second recognition result.
[0145] Step 305: Determine whether the projections of multiple virtual objects in the target area are all incomplete.
[0146] Here, based on the second recognition result, it is determined whether the projections of multiple virtual objects in the target area are all incomplete. When the second recognition result indicates that the projections of multiple virtual objects in the target area are all incomplete, step 306 is executed; when the second recognition result indicates that the projections of the first number of virtual objects among multiple virtual objects are complete and the projections of the second number of virtual objects are incomplete, step 307 is executed.
[0147] Step 306: Obtain the projection area of each virtual object in the target area, and use the virtual object with the largest projection area as the target virtual object.
[0148] Step 307: Determine whether the first number is greater than 1.
[0149] Here, the first number is a positive integer. When the first number is equal to 1, step 308 is executed; when the first number is greater than 1, step 309 is executed.
[0150] Step 308: Use the virtual object with a complete projection as the target virtual object.
[0151] Step 309: Obtain the distance between each of the first number of virtual objects and the virtual camera, and use the virtual object with the smallest distance as the target virtual object.
[0152] See Figures 12A-12B , Figures 12A-12B which is a schematic diagram of the recognition of virtual objects provided by the embodiments of the present application. Figure 12AIn this case, taking the long - press operation as an example of the trigger operation, the independent area of the virtual object A is area a, the independent area of the virtual object B is area c, and the overlapping area of the virtual object A and the virtual object B is area b. When the player's finger long - presses area a, the system identifies the target virtual object as the virtual object A; when the player's finger long - presses area c, the system identifies the target virtual object as the virtual object B; when the player's finger long - presses area b, the system identifies the front - to - back relationship between the virtual object A and the virtual object B relative to the player (i.e., the virtual camera), and takes the virtual object closer to the player as the target virtual object. Or, the system identifies the sizes of the trigger areas corresponding to the virtual object A and the virtual object B triggered by the player in area b, and takes the virtual object with the larger trigger area as the target virtual object.
[0153] Figure 12B In this case, taking the operation of drawing a circle as an example of the trigger operation, the system determines the target virtual object according to the projected size (excluding the occluded part) of the virtual objects contained in the area drawn in a circle (i.e., the target area) from this perspective. Among them, area a only contains the projection of the virtual object A, area b contains the projections of part of the virtual object A and part of the virtual object B, area c contains the projections of all of the virtual object B and part of the virtual object A, and area d contains the projections of all of the virtual object A and all of the virtual object B. When the player's finger draws a circle around area a, since area a only contains the projection of the virtual object A, the system identifies the target virtual object as the virtual object A; when the player's finger draws a circle around area b, since area b contains the projections of part of the virtual object A and part of the virtual object B, the system identifies the projected sizes (excluding the occluded part) of the exposed parts of the virtual object A and the virtual object B in area b from this perspective, and finally takes the virtual object with the larger projected area as the target virtual object; when the player's finger draws a circle around area c, since area c contains the projections of all of the virtual object B and part of the virtual object A, the system identifies the target virtual object as the virtual object B; when the player's finger draws a circle around area d, since area d contains the projections of all of the virtual object A and all of the virtual object B, finally, the virtual object closer to the player is identified as the target virtual object.
[0154] Through the above steps, the virtual objects in the target area are identified, and the identified virtual objects are taken as the target virtual objects, and then the trigger operation for the target area is taken as the trigger operation for the target virtual object.
[0155] Step 203: In response to the tag selection operation, display at least one recommended virtual object corresponding to the selected recommended tag.
[0156] Among them, the recommended tags are used to indicate the recommended dimensions for the target virtual object. For example, the recommended tags can be recommended similar parts, recommended similar styles, etc. Among them, the recommended similar parts are used to indicate recommending virtual objects corresponding to the parts to which the target virtual object belongs, and the recommended similar styles are used to indicate recommending virtual objects corresponding to the construction style of the target virtual object.
[0157] After the player selects a recommended tag from them, the terminal responds to this selection operation and displays the recommended virtual objects corresponding to the selected recommended tag for the player to select and use. For example, when the selected recommended tag indicates recommending virtual objects corresponding to the parts to which the target virtual object belongs, at least one recommended virtual object corresponding to this part is displayed. For example, when the part to which the target virtual object belongs is a window, multiple available windows are displayed as recommended virtual objects. Another example is that when the part to which the target virtual object belongs is a roof, multiple available roofs are displayed as recommended virtual objects; when the selected recommended tag indicates recommending virtual objects corresponding to the construction style of the target virtual object, the recommended virtual objects corresponding to the target style are displayed, where the target style includes at least one of the construction style corresponding to the target virtual object or the associated styles associated with the construction style corresponding to the target virtual object. For example, if the construction style of the target virtual object is a pastoral style, and the associated styles associated with the pastoral style can be a fresh style, a minimalist style, etc., then the target style includes: pastoral style, fresh style, minimalist style. That is, the recommended virtual objects corresponding to the corresponding styles can be displayed in order from high to low in terms of relevance.
[0158] Step 204: In response to the selection operation for the target recommended object, display the replacement control and the placement control corresponding to the target recommended object.
[0159] Among them, the replacement control is used to replace the original virtual object in the virtual building with the target recommended object, and the placement control is used to newly place the target recommended object in the virtual building. At the same time, placement prompt information (such as confirming to select this object to replace the original object? Or, confirming to select this object for a new placement?) can also be displayed to prompt the player to select the placement method of the target recommended object, that is, whether to replace the original virtual object in the virtual building or to create a new target recommended object in the virtual building.
[0160] Step 205: When receiving the trigger operation for the replacement control, place the target recommended object in the virtual building to replace the original virtual object in the virtual building.
[0161] Here, when the target virtual object triggered by the user and the target recommended object belong to the same part, the target recommended object can be directly placed at the position of the target virtual object in the virtual building to replace the target virtual object; in this way, the rapid replacement of the virtual object is realized, the replacement efficiency of the virtual object is improved, and thus the construction efficiency of the virtual building is improved.
[0162] When the target recommended object and the target virtual object do not belong to the same part, the target recommended object can be placed at the position of other virtual objects in the virtual building to replace other virtual objects, where the target recommended object and the other virtual objects belong to the same part, that is, the target recommended object is placed at the position of other virtual objects that belong to the same part as the target recommended object in the virtual building to replace other virtual objects that belong to the same part as the target recommended object; in this way, during the construction of the virtual building, by triggering the target virtual object, the replacement of other virtual objects different from the target virtual object is realized, breaking through the spatial and object limitations, realizing cross-object replacement, and thus fully expanding the replacement range of virtual objects in the virtual building. At the same time, the rapid replacement of virtual objects is also realized, the replacement efficiency of virtual objects is improved, and thus the construction efficiency of the virtual building is improved.
[0163] Step 206: When a trigger operation for the placement control is received, place the target recommended object at the target position in the virtual building to create a new target recommended object at the target position.
[0164] In practical applications, after the player selects the target recommended object and selects the placement control, the target virtual object can be dragged to move in the construction interface or in the virtual building. When the target recommended object moves to the position of the target part in the virtual building, the target style can be used to display the position of the target part (such as using the target style to display the border of the target part) to indicate the placement status of the position of the target part (that is, whether the target recommended object can be placed at the position of the target part). If the target recommended object cannot be placed at the position of the target part (that is, the position of the target part is in a non-placeable state, such as there are other virtual objects already placed), the border of the target part can be displayed in the first style, such as a red border. If the target recommended object can be placed at the position of the target part (that is, the position of the target part is in a placeable state, such as there are no other virtual objects placed), the border of the target part can be displayed in the second style, such as a green border; when the target recommended object moves to a target position in a placeable state, a release instruction for the target recommended object can be triggered (such as the player releases the drag operation for the target recommended object). The terminal responds to this release instruction and places the target recommended object at the target position to create (i.e., newly place) a target recommended object at the target position.
[0165] In the above manner, as the dragging operation on the target recommended object is performed, by changing the display style of the current moving position of the target recommended object, it is indicated where the target recommended object can be placed, which plays a guiding role in the placement of the target recommended object and can improve the accuracy and pertinence of the placement position of the virtual object.
[0166] So far, the processing method of the virtual object provided in the embodiments of the present application has been described in combination with the exemplary applications and implementations of the electronic device provided in the embodiments of the present application. Next, the cooperation of each module in the virtual object processing device 555 provided in the embodiments of the present application to implement the virtual object processing solution will be described.
[0167] A first display module 5551 is configured to display a virtual building in a construction interface of a virtual scene, where the virtual building includes at least one virtual object; a second display module 5552 is configured to display at least one recommended virtual object in response to a trigger operation on a target virtual object, where the recommended virtual object corresponds to a recommended label of the target virtual object; an object placement module 5553 is configured to place the target recommended object in the virtual building in response to a selection operation on the target recommended object.
[0168] In some embodiments, the second display module is further configured to display at least two recommended labels for selection; and display at least one recommended virtual object corresponding to the selected recommended label in response to a label selection operation.
[0169] In some embodiments, the second display module is further configured to display at least one recommended virtual object corresponding to the part when the selected recommended label indicates a recommendation of a virtual object corresponding to the part to which the target virtual object belongs; and display at least one recommended virtual object corresponding to the target style when the selected recommended label indicates a recommendation of a virtual object corresponding to the construction style of the target virtual object, where the target style includes at least one of the construction style or an associated style associated with the construction style.
[0170] In some embodiments, the second display module is further configured to determine the association degree between each type of the target style and the construction style when there are multiple types of the target style; and sequentially display at least one recommended virtual object corresponding to the corresponding target style in descending order of the association degree.
[0171] In some embodiments, the second display module is further configured to, when the number of the recommended virtual objects is at least two, display a first number of the recommended virtual objects among the at least two recommended virtual objects in a first display style and display a second number of the recommended virtual objects in a second display style; wherein, the first display style is different from the second display style, the first display style is used to indicate that the first number of the recommended virtual objects is in a selectable state, and the second display style is used to indicate that the second number of the recommended virtual objects is in a non-selectable state.
[0172] In some embodiments, the second display module is further configured to, when the number of the recommended virtual objects is at least two, obtain influence parameters for influencing each of the recommended virtual objects; wherein, the influence parameters include at least one of the following: the part to which the recommended virtual object belongs, the degree of association between the recommended virtual object and the construction style corresponding to the target virtual object; based on the influence parameters, determine the selection priority of each of the recommended virtual objects, and display each of the recommended virtual objects in a display manner corresponding to the selection priority.
[0173] In some embodiments, the object placement module is further configured to, in response to a selection operation on a target recommended object, display a replacement control and a placement control corresponding to the target recommended object; when a trigger operation on the replacement control is received, place the target recommended object in the virtual building to replace the original virtual object in the virtual building; when a trigger operation on the placement control is received, place the target recommended object at a target position in the virtual building to create the target recommended object at the target position.
[0174] In some embodiments, the object placement module is further configured to, when the target recommended object belongs to the same part as the target virtual object, place the target recommended object at the position where the target virtual object is located in the virtual building to replace the target virtual object; when the target recommended object does not belong to the same part as the target virtual object, place the target recommended object at the position where other virtual objects are located in the virtual building to replace the other virtual objects, wherein the target recommended object belongs to the same part as the other virtual objects.
[0175] In some embodiments, the object placement module is further configured to, when there are other virtual objects in the virtual building that belong to the same component as the target virtual object, place the target recommended object at the positions where the target virtual object and the other virtual objects are located in the virtual building to replace the target virtual object and the other virtual objects.
[0176] In some embodiments, the object placement module is further configured to, in response to a drag operation on the target recommended object, control the target recommended object to move in the virtual building, and during the movement of the target recommended object, display the position where the target recommended object is located in a first style; when the target recommended object moves to a target position and the display style of the target position is a second style, in response to a release instruction for the drag operation, place the target recommended object at the target position; wherein, the first style is different from the second style, the first style is used to indicate that the position where the target recommended object is located is in a non-placeable state, and the second style is used to indicate that the target position is in a placeable state.
[0177] In some embodiments, the object placement module is further configured to display guiding indication information corresponding to a target position in the virtual building, wherein the guiding prompt information is used to guide the dragging of the target recommended object to a target position in a placeable state; in response to a drag operation on the target recommended object triggered based on the guiding indication information, control the target recommended object to move towards the target position; when the target recommended object moves to the target position, in response to a release instruction for the drag operation, place the target recommended object at the target position.
[0178] In some embodiments, after the target recommended object is placed in the virtual building, the device further includes: a details viewing module, configured to, in response to a configuration viewing operation on the virtual building, display a configuration details page of the virtual building; in the configuration details page, display a selection identifier for the target recommended object and a withdrawal control; wherein, the withdrawal control is used to withdraw the target recommended object placed in the virtual building.
[0179] In some embodiments, before displaying at least one recommended virtual object, the device further includes: an object recognition module, configured to, in response to a trigger operation on a target area in the virtual building, perform object recognition processing on the object projection carried by the target area to obtain a first recognition result; when the first recognition result indicates that the object projection carried by the target area is a projection of a virtual object, use the virtual object corresponding to the object projection as the target virtual object; when the first recognition result indicates that the object projection carried by the target area is a projection of multiple virtual objects, recognize the projection integrity of the multiple virtual objects in the target area to obtain a second recognition result, and determine the target virtual object based on the second recognition result; use the trigger operation on the target area as the trigger operation on the target virtual object.
[0180] In some embodiments, the object recognition module is further configured to, when the second recognition result indicates that the projections of the multiple virtual objects in the target area are all incomplete, obtain the projected area of each virtual object in the target area, and use the virtual object with the largest projected area as the target virtual object; when the second recognition result indicates that the projections of the first number of virtual objects among the multiple virtual objects are complete and the projections of the second number of virtual objects are incomplete, determine the target virtual object based on the first number of virtual objects.
[0181] In some embodiments, the object recognition module is further configured to, when the first number is 1, use the virtual object with a complete projection as the target virtual object; when the second number is greater than 1, obtain the distance between each virtual object among the first number of virtual objects and the virtual camera, and use the virtual object with the smallest distance as the target virtual object.
[0182] In some embodiments, before displaying at least one recommended virtual object, the device further includes: a construction configuration module, configured to display an object configuration interface of the virtual building, and display a part setting control, a style setting control, and a style association control in the object configuration interface; in response to a part setting operation triggered based on the part setting control, set the part to which at least one virtual object in the virtual building belongs; in response to a style setting operation triggered based on the style setting control, set the construction style corresponding to the virtual building or at least one virtual object in the virtual building; in response to a style association operation triggered based on the style association control, set the association degree between different construction styles to obtain an associated style corresponding to the architectural style; and determine a recommended label of the virtual object based on at least one of the part, the construction style, and the associated style.
[0183] An embodiment of the present application provides a computer program product, which includes a computer program or computer executable instructions, and the computer program or computer executable instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer executable instructions from the computer-readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the method for processing virtual objects in the embodiments of the present application described above.
[0184] An embodiment of the present application provides a computer-readable storage medium storing computer executable instructions, where computer executable instructions or a computer program are stored, and when the computer executable instructions or the computer program are executed by a processor, the processor will be caused to execute the method for processing virtual objects provided in the embodiments of the present application. For example, Figure 3 the method for processing virtual objects shown.
[0185] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0186] In some embodiments, the computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0187] As an example, the computer-executable instructions may or may not correspond to a file in the file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or stored in multiple cooperating files (such as files that store one or more modules, subroutines, or portions of code).
[0188] As an example, the computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one location, or, on multiple electronic devices distributed at multiple locations and interconnected through a communication network.
[0189] As described above, the above are only embodiments of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are all included in the protection scope of the present application.
Claims
1. A method for processing virtual objects, characterized in that The method includes: displaying a virtual building in a construction interface of a virtual scene, the virtual building including at least one virtual object; in response to a trigger operation on a target virtual object among the at least one virtual object, displaying at least one recommended virtual object corresponding to a target style, the target style including at least one of a construction style of the target virtual object and an associated style associated with the construction style; in response to a selection operation on a target recommended object among the at least one recommended virtual object, placing the target recommended object in the virtual building.
2. The method according to claim 1, characterized in that, The displaying at least one recommended virtual object corresponding to a target style includes: displaying at least one selectable recommended label, the recommended label including a first recommended label indicating a recommended virtual object corresponding to the construction style of the target virtual object; in response to a selection operation on the first recommended label, displaying at least one recommended virtual object corresponding to a target style.
3. The method according to claim 2, wherein The recommended label further includes a second recommended label indicating a recommended virtual object corresponding to a part to which the target virtual object belongs; The in response to a selection operation on the first recommended label, displaying at least one recommended virtual object corresponding to a target style includes: in response to a selection operation on the second recommended label, displaying at least one first recommended virtual object corresponding to a component to which the target virtual object belongs; in response to a selection operation on the first recommended label, displaying at least one second recommended virtual object corresponding to a target style screened from the at least one first recommended virtual object, the at least one second recommended virtual object including at least the target recommended object.
4. The method according to claim 1, wherein The displaying at least one recommended virtual object corresponding to a target style includes: when there are multiple types of the target style, determining the degree of association between each type of the target style and the construction style; displaying at least one recommended virtual object corresponding to the corresponding target style in order from high to low according to the degree of association.
5. The method according to claim 1, characterized in that The displaying at least one recommended virtual object corresponding to a target style includes: when the number of the recommended virtual objects is at least two, displaying a first number of recommended virtual objects among the at least two recommended virtual objects in a first display style, and displaying a second number of recommended virtual objects in a second display style; wherein, the first display style is different from the second display style, the first display style is used to indicate that the first number of recommended virtual objects are in a selectable state, and the second display style is used to indicate that the second number of recommended virtual objects are in a non-selectable state.
6. The method according to claim 1, wherein The displaying at least one recommended virtual object corresponding to a target style includes: when the number of the recommended virtual objects corresponding to a target style is at least two, obtaining influence parameters for influencing each of the recommended virtual objects; wherein, the influence parameter includes at least one of the following: the part to which the recommended virtual object belongs, the degree of association between the construction style of the recommended virtual object and the construction style of the target virtual object; Based on the influence parameters, determine the selection priorities of the recommended virtual objects, and use a display method corresponding to the selection priorities to display the recommended virtual objects corresponding to the target style.
7. The method according to claim 1, wherein The placing the target recommended object in the virtual building in response to a selection operation on the target recommended object among the at least one recommended virtual objects includes: In response to a selection operation on the target recommended object among the at least one recommended virtual objects, display a replacement control and a placement control corresponding to the target recommended object; When a trigger operation on the replacement control is received, place the target recommended object in the virtual building to replace the original virtual object in the virtual building; When a trigger operation on the placement control is received, place the target recommended object at a target position in the virtual building to create the target recommended object at the target position.
8. The method according to claim 7, wherein The placing the target recommended object in the virtual building to replace the original virtual object in the virtual building includes: When the target recommended object belongs to the same part as the target virtual object, place the target recommended object at the position of the target virtual object in the virtual building to replace the target virtual object; When the target recommended object does not belong to the same part as the target virtual object, place the target recommended object at the position of other virtual objects in the virtual building to replace the other virtual objects, where the target recommended object belongs to the same part as the other virtual objects.
9. The method according to claim 8, wherein The placing the target recommended object at the position of the target virtual object in the virtual building to replace the target virtual object includes: When there are other virtual objects in the virtual building that belong to the same component as the target virtual object, place the target recommended object at the positions of the target virtual object and the other virtual objects in the virtual building to replace the target virtual object and the other virtual objects.
10. The method according to claim 7, wherein The placing the target recommended object at a target position in the virtual building includes: In response to a drag operation on the target recommended object, control the target recommended object to move in the virtual building, and during the movement of the target recommended object, display the position where the target recommended object is located in a first style; When the target recommended object moves to the target position and the display style of the target position is the second style, in response to a release instruction for the drag operation, place the target recommended object at the target position; Wherein, the first style is different from the second style, the first style is used to indicate that the position where the target recommended object is located is in a non-placeable state, and the second style is used to indicate that the target position is in a placeable state.
11. The method according to claim 7, wherein The placing the target recommended object at a target position in the virtual building includes: Display guiding indication information corresponding to a target position in the virtual construction, where the guiding prompt information is used to guide dragging the target recommended object to the target position in a placeable state; In response to a dragging operation on the target recommended object triggered based on the guiding indication information, control the target recommended object to move towards the target position; When the target recommended object moves to the target position, in response to a release instruction for the dragging operation, place the target recommended object at the target position.
12. The method according to claim 1, characterized in that, After placing the target recommended object in the virtual construction, the method further includes: In response to a configuration viewing operation on the virtual construction, display a configuration details page of the virtual construction; In the configuration details page, display a selection identifier for the target recommended object and a withdrawal control; Wherein, the withdrawal control is used to withdraw the target recommended object placed in the virtual construction.
13. The method according to claim 1, wherein Before displaying at least one recommended virtual object corresponding to a target style, the method further includes: In response to a triggering operation on a target area in the virtual construction, perform object recognition processing on the object projection carried by the target area to obtain a first recognition result; When the first recognition result indicates that the object projection carried by the target area is the projection of a virtual object, use the virtual object corresponding to the object projection as the target virtual object; When the first recognition result indicates that the object projection carried by the target area is the projection of multiple virtual objects, recognize the projection integrity of the multiple virtual objects in the target area to obtain a second recognition result, and determine the target virtual object based on the second recognition result; Use the triggering operation on the target area as the triggering operation on the target virtual object.
14. The method according to claim 13, wherein Determining the target virtual object based on the second recognition result includes: When the second recognition result indicates that the projections of the multiple virtual objects in the target area are all incomplete, obtain the projection area of each virtual object in the target area, and use the virtual object with the largest projection area as the target virtual object; When the second recognition result indicates that the projections of the first number of virtual objects among the multiple virtual objects are complete and the projections of the second number of virtual objects are incomplete, determine the target virtual object based on the first number of virtual objects.
15. The method according to claim 13, characterized in that, Determining the target virtual object based on the first number of virtual objects includes: When the first number is 1, use the virtual object with a complete projection as the target virtual object; When the second number is greater than 1, obtain the distance between each virtual object among the first number of virtual objects and the virtual camera, and use the virtual object with the smallest distance as the target virtual object.
16. The method according to claim 2, wherein Before displaying at least one recommended label for selection, the method further includes: Display an object configuration interface of the virtual construction, and display a part setting control, a style setting control, and a style association control in the object configuration interface; In response to a part setting operation triggered by a part setting control based on the part, set the part to which at least one virtual object in the virtual building belongs; In response to a style setting operation triggered by a style setting control, set the construction style corresponding to the virtual building or at least one virtual object in the virtual building; In response to a style association operation triggered by a style association control, set the degree of association between different construction styles to obtain an associated style corresponding to the architectural style; Based on at least one of the part, construction style, and associated style, determine a recommended label for the virtual object.
17. A processing device for virtual objects, characterized in that, The device includes: A first display module for displaying a virtual building in a construction interface of a virtual scene, the virtual building including at least one virtual object; A second display module for displaying at least one recommended virtual object corresponding to a target style in response to a trigger operation on a target virtual object among the at least one virtual object, the target style including at least one of the construction style of the target virtual object and the associated style associated with the construction style; An object placement module for placing the target recommended object in the virtual building in response to a selection operation on the target recommended object among the at least one recommended virtual object.
18. An electronic device, characterized in that, Includes: A memory for storing computer-executable instructions or a computer program; A processor for implementing the processing method of the virtual object according to any one of claims 1 to 16 when executing the computer-executable instructions or the computer program stored in the memory.
19. A computer-readable storage medium, characterized in that, Stored with computer-executable instructions or a computer program, the computer-executable instructions or the computer program, when executed by a processor, implement the processing method of the virtual object according to any one of claims 1 to 16.
20. A computer program product, comprising a computer program or computer-executable instructions, characterized in that, When the computer program or the computer-executable instructions are executed by a processor, the processing method of the virtual object according to any one of claims 1 to 16 is implemented.