CN112783660A - Resource processing method and device in virtual scene and electronic equipment - Google Patents

Resource processing method and device in virtual scene and electronic equipment Download PDF

Info

Publication number
CN112783660A
CN112783660A CN202110170979.7A CN202110170979A CN112783660A CN 112783660 A CN112783660 A CN 112783660A CN 202110170979 A CN202110170979 A CN 202110170979A CN 112783660 A CN112783660 A CN 112783660A
Authority
CN
China
Prior art keywords
resource
attribute
checked
virtual scene
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110170979.7A
Other languages
Chinese (zh)
Other versions
CN112783660B (en
Inventor
李凤兰
陈强
楚培林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110170979.7A priority Critical patent/CN112783660B/en
Publication of CN112783660A publication Critical patent/CN112783660A/en
Application granted granted Critical
Publication of CN112783660B publication Critical patent/CN112783660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a resource processing method, a resource processing device, electronic equipment and a computer-readable storage medium in a virtual scene; the method comprises the following steps: responding to the strategy setting operation received in the resource processing interface, and acquiring an inspection strategy set for the virtual scene; the checking strategy comprises the name of the attribute to be checked and an attribute value condition corresponding to the attribute to be checked; mapping the attribute to be checked of the resource in the virtual scene into an adjustable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by calling the adjustable object corresponding to the attribute to be checked; matching the attribute value of the attribute to be checked corresponding to the resource with the attribute value condition corresponding to the attribute to be checked, and determining abnormal resources in the virtual scene according to the obtained matching result; and updating the resource processing interface according to the abnormal resource. By the method and the device, the implementation cost of resource processing can be reduced, and meanwhile, the occupation of computing resources of the electronic equipment is reduced.

Description

Resource processing method and device in virtual scene and electronic equipment
Technical Field
The present application relates to computer technologies, and in particular, to a method and an apparatus for processing resources in a virtual scene, an electronic device, and a computer-readable storage medium.
Background
With the rapid development of computer technology, the sensing environment and the channel for acquiring information are expanded, and a virtual scene is a typical example. The virtual scene is a scene which is output by the electronic equipment and is different from the real world, and a user can simulate the real world to the virtual scene so as to realize interaction with the virtual scene.
Virtual scenes tend to include multiple resources, such as maps, animations, and the like. In the development and operation process of the virtual scene, the attribute values of some resources in the virtual scene may be abnormal due to incorrect setting of related personnel or version updating of the virtual scene. In the solutions provided by the related art, a set of codes is usually written separately for each attribute to be checked to determine whether the attribute value is abnormal. However, this solution is too costly for the maintenance of the code and can result in an excessive use of the computing resources of the electronic device.
Disclosure of Invention
The embodiment of the application provides a resource processing method and device in a virtual scene, an electronic device and a computer-readable storage medium, which can improve the universality of different attributes to be checked, reduce the implementation cost of resource processing and simultaneously reduce the occupation of computing resources of the electronic device.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a resource processing method in a virtual scene, which comprises the following steps:
responding to the strategy setting operation received in the resource processing interface, and acquiring an inspection strategy set for the virtual scene; the checking strategy comprises the name of an attribute to be checked and an attribute value condition corresponding to the attribute to be checked;
mapping the attribute to be checked of the resource in the virtual scene into an adjustable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by adjusting the adjustable object corresponding to the attribute to be checked;
matching the attribute value of the resource corresponding to the attribute to be detected with the attribute value condition corresponding to the attribute to be detected, and determining abnormal resources in the virtual scene according to the obtained matching result;
and updating the resource processing interface according to the abnormal resource.
An embodiment of the present application provides a resource processing apparatus in a virtual scene, including:
the acquisition module is used for responding to the strategy setting operation received in the resource processing interface and acquiring the inspection strategy set aiming at the virtual scene; the checking strategy comprises the name of an attribute to be checked and an attribute value condition corresponding to the attribute to be checked;
the mapping module is used for mapping the attribute to be checked of the resource in the virtual scene into an adjustable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by adjusting the adjustable object corresponding to the attribute to be checked;
the matching module is used for matching the attribute value of the resource corresponding to the attribute to be detected with the attribute value condition corresponding to the attribute to be detected and determining abnormal resources in the virtual scene according to the obtained matching result;
and the updating module is used for updating the resource processing interface according to the abnormal resource.
An embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the resource processing method in the virtual scene provided by the embodiment of the application when the executable instructions stored in the memory are executed.
The embodiment of the present application provides a computer-readable storage medium, which stores executable instructions for causing a processor to execute the method for processing resources in a virtual scene provided in the embodiment of the present application.
The embodiment of the application has the following beneficial effects:
the method comprises the steps of mapping an attribute to be checked of a resource into an adjustable object according to the name of the attribute to be checked in an obtained checking strategy, obtaining an attribute value of the attribute to be checked by calling the adjustable object, checking the attribute value according to an attribute value condition corresponding to the attribute to be checked in the checking strategy to determine abnormal resources in a virtual scene, and therefore, intelligent resource processing can be achieved only by setting the checking strategy, universality of different attributes to be checked can be improved, the implementation cost of resource processing can be reduced, and for electronic equipment, the occupation of computing resources in the resource processing process of the electronic equipment can be reduced.
Drawings
Fig. 1 is a schematic diagram of a resource processing scheme provided by the related art;
FIG. 2 is a schematic diagram of an architecture of a resource processing system in a virtual scene according to an embodiment of the present application;
fig. 3 is a schematic architecture diagram of a terminal device provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a virtual scene engine provided by an embodiment of the present application;
fig. 5A is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 5B is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 5C is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 5D is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a resource handling interface provided by an embodiment of the application;
FIG. 7 is a schematic diagram of a resource handling interface provided by an embodiment of the application;
FIG. 8A is a schematic diagram of a resource handling interface provided by an embodiment of the application;
FIG. 8B is a schematic diagram of a resource handling interface provided by an embodiment of the application;
FIG. 9 is a schematic diagram of a resource configuration provided by an embodiment of the present application;
FIG. 10 is a schematic diagram of resource processing provided by an embodiment of the application;
fig. 11 is a schematic diagram of attribute checking provided in an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first", "second", and the like are only used for distinguishing similar objects and do not denote a particular order or importance, but rather the terms "first", "second", and the like may be used interchangeably with the order of priority or the order in which they are expressed, where permissible, to enable embodiments of the present application described herein to be practiced otherwise than as specifically illustrated and described herein. In the following description, the term "plurality" referred to means at least two.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) Virtual scene: by utilizing scenes which are output by electronic equipment and are different from the real world, visual perception of a virtual scene can be formed through naked eyes or assistance of equipment, such as two-dimensional images output through a display screen, and three-dimensional images output through stereoscopic display technologies such as stereoscopic projection, virtual reality and augmented reality technologies; in addition, various real-world-simulated perceptions such as auditory perception, tactile perception, olfactory perception, motion perception and the like can be formed through various possible hardware. The virtual scene may be a simulation environment of a real world, a semi-simulation semi-fictional virtual environment, or a pure fictional virtual environment. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene, and the dimension of the virtual scene is not limited in the embodiment of the present application.
2) In response to: for indicating the condition or state on which the performed operation depends, when the condition or state on which the performed operation depends is satisfied, the performed operation or operations may be in real time or may have a set delay; there is no restriction on the order of execution of the operations performed unless otherwise specified.
3) Resource: the items of the virtual scene can comprise two parts, namely a virtual scene engine (such as a game engine) and resources, wherein the virtual scene engine is a code (instruction) set which is designed for an electronic device outputting the virtual scene and can be recognized by the electronic device, and is used for controlling how the resources in the virtual scene are output; and the resource is the content that needs to be output. The virtual scene often includes a plurality of resources, and the resource types in the virtual scene are not limited in the embodiments of the present application, for example, the resource types include but are not limited to a map (image), an animation, and a sound. In addition, the virtual scene can comprise a plurality of modules, each module comprises a plurality of resources, and the modules can be divided according to the actual application scene, for example, in the game virtual scene, a plurality of modules such as characters, weapons and monsters can be divided.
It should be noted that the resources in the virtual scene generally refer to static resources, and the computing resources of the electronic device generally include Central Processing Unit (CPU) resources, memory resources, hard disk resources, and the like.
4) The attributes are as follows: refers to the essential characteristics that a resource has for describing the resource. A resource often has multiple attributes, and can be configured by self-definition according to an actual application scenario, for example, for a resource whose resource type is a map, the attributes may include a resource path, a resource name, an occupied memory, a height, and the like. In the embodiment of the present application, resources with different resource types may correspond to the same attribute, or may correspond to different attributes.
5) Resource processing interface: the method is used for receiving the relevant strategies set for the virtual scene and can also be used for presenting abnormal resources to remind relevant personnel to repair. The resource processing interface can comprise two types, wherein one type exists independently of the virtual scene, such as an independent Web interface; another type is an engine interface provided by a virtual scene engine, such as a user interface provided by an Editor component in the virtual scene engine. In the embodiments of the present application, these two types of interfaces may be used either singly or in combination.
6) Strategy: the electronic device may analyze the policy according to a set logic and perform a corresponding operation to implement a corresponding function, for example, the electronic device may perform an operation of determining an abnormal resource in the virtual scene according to the check policy. The policy may be set manually by a relevant person or automatically by Artificial Intelligence (AI).
7) Reflection (Reflection): in the running state of the program, various components such as attributes, methods and parent classes in a class (such as a Java class) can be mapped into corresponding objects, and the attributes and methods of the mapped objects are supported for calling, and the functions of dynamically acquiring program information and dynamically calling the objects are reflection mechanisms which are the keys of dynamic languages. In the embodiment of the application, reflection can be performed based on the name of the attribute to be inspected, so that the attribute value of the attribute to be inspected is obtained.
It should be noted that the Object (Object) is an abstraction of an objective thing, and the Class (Class) is an abstraction of an Object and is an abstract data type. From another perspective, an object is an instance of a class, which is a template of the object. In this embodiment of the present application, a class may refer to a class to which a resource in a virtual scene belongs, and for example, corresponding classes may be defined for different resource types respectively.
In the scheme provided by the related art, if an attribute to be checked needs to be newly added in a virtual scene, four-step operation needs to be executed. As shown in fig. 1, the first step is to write the acquisition code of the attribute to be checked by human, and the acquisition code is used to acquire the attribute value of the attribute to be checked when being executed; secondly, manually setting attribute value conditions; the third step is to artificially write a reading code for the attribute value condition, the reading code being used to read the attribute value condition when executed; the fourth step is to artificially write check code for the attribute value condition, which is used to check whether the attribute value of the attribute to be checked is abnormal when being executed. Similarly, if the attribute value condition of a certain added attribute to be checked needs to be updated, a similar four-step operation is also performed.
The solutions provided by the related art have at least the following problems: the connection among the four steps of operation is tight, the coupling degree among the codes (such as the coupling degree among the code acquisition, the code reading and the code checking) is high, the problem is easy to occur when the codes need to be updated every time, and the maintenance cost of the codes is high; for each attribute to be checked, a corresponding set of codes (such as an acquisition code, a reading code and a checking code) needs to be written separately, so that the universality of different attributes to be checked and different virtual scenes is poor, meanwhile, more labor cost needs to be consumed for code writing, and electronic equipment also consumes more computing resources to store a large amount of related codes.
Embodiments of the present application provide a resource processing method, an apparatus, an electronic device, and a computer-readable storage medium in a virtual scene, which can simplify the operation of resource processing, that is, without executing the operation of the dashed frame part in fig. 1 (the third step to the fourth step), when an attribute to be checked is newly added, only a method for obtaining an attribute value (for example, adding the name of the attribute to be checked) needs to be added to a code, so that a dependency relationship between codes can be removed, and a code maintenance cost when an attribute to be checked is newly added or an attribute value condition is updated can be reduced. An exemplary application of the electronic device provided in the embodiment of the present application is described below, and the electronic device provided in the embodiment of the present application may be implemented as various types of terminal devices, and may also be implemented as a server.
Referring to fig. 2, fig. 2 is a schematic diagram of an architecture of the resource processing system 100 in a virtual scenario provided in the embodiment of the present application, a terminal device 400 is connected to a server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two.
In some embodiments, taking an electronic device as a terminal device as an example, the resource processing method in a virtual scene provided in the embodiments of the present application may be implemented by the terminal device, and is suitable for some practical application scenes in which the computing of related data and the resource processing of the virtual scene can be completed by completely depending on the local computing capability of the terminal device 400, for example, a game in a standalone/offline mode completes the output of the virtual scene through the terminal device 400.
As an example, as shown in fig. 2, the terminal device 400 runs the client 410, and the client 410 presents the resource handling interface 500 during running. The client 410 obtains an inspection policy set for the virtual scene in response to the policy setting operation received in the resource processing interface 500, where the inspection policy may be manually set by a relevant person (i.e., a user), or may be automatically set by invoking AI when the client 410 receives the policy setting operation.
The checking policy includes a name of the attribute to be checked and an attribute value condition corresponding to the attribute to be checked, the client 410 may map the attribute to be checked of the resource in the virtual scene into an invokable object according to the name of the attribute to be checked, and obtain an attribute value corresponding to the attribute to be checked of the resource by invoking the invokable object corresponding to the attribute to be checked, where the process corresponds to the above reflection mechanism. Then, the client 410 matches the attribute value of the attribute to be checked corresponding to the resource with the attribute value condition corresponding to the attribute to be checked, and determines the abnormal resource in the virtual scene according to the obtained matching result. Finally, the client 410 updates the resource handling interface 500 according to the exception resource, and as shown in fig. 2, the resource handling result including exception resources 1, 2, and 3 is exemplarily shown in the resource handling interface 500.
The relevant personnel may perform manual repair on the abnormal resource shown in the resource processing interface 500, or the client 410 may perform automatic repair on the abnormal resource. After the abnormal resources in the virtual scene are repaired, the effective rate of the resources in the virtual scene can be improved, so that when the virtual scene is output, the abnormal resources (i.e., useless resources) can be prevented from being output, and the actual utilization rate of the computing resources consumed by the electronic device (such as the terminal device 400) is improved.
When the visual perception of the virtual scene needs to be formed, the terminal device 400 calculates and displays required data through the graphic calculation hardware, completes the loading, analysis and rendering of display data (such as various resources in the virtual scene), and outputs a video frame capable of forming the visual perception of the virtual scene on the graphic output hardware, for example, a two-dimensional video frame is displayed on a display screen of a smart phone, or a video frame realizing a three-dimensional display effect is projected on a lens of augmented reality/virtual reality glasses; furthermore, to enrich the perception effect, the terminal device 400 may also form one or more of auditory perception (e.g., via a microphone), tactile perception (e.g., via a vibrator), motion perception, and taste perception via different hardware. It should be noted that the client for outputting the virtual scene in the terminal device 400 may be the client 410, or may be another client.
In some embodiments, taking an electronic device as a server as an example, the resource processing method in the virtual scene provided in the embodiments of the present application may be cooperatively implemented by the server and the terminal device, and is suitable for completing the calculation of the related data and the resource processing of the virtual scene depending on the calculation capability of the server 200, and outputting the abnormal resource and the actual application scene of the virtual scene at the terminal device 400.
The terminal device 400 may run the client 410, and the client 410 presents the resource handling interface 500 during the running process. The client 410 acquires an inspection policy set for the virtual scene in response to the policy setting operation received in the resource processing interface 500. Then, the client 410 sends the check policy to the server 200, so that the server 200 performs resource processing on the virtual scene according to the obtained check policy to determine an abnormal resource in the plurality of resources included in the virtual scene. The server 200 may send the determined abnormal resource (e.g., the name of the abnormal resource) to the client 410 to update the resource handling interface 500 of the client 410. Similarly, for the abnormal resource, the server 200 may repair the abnormal resource in the virtual scene according to the repair instruction received by the client 410, that is, the server 200 is manually controlled by the relevant person to repair the abnormal resource; alternatively, the server 200 may automatically repair the abnormal resource.
And after the abnormal resources in the virtual scene are repaired, the virtual scene can be output. Taking the visual perception of forming the virtual scene as an example, the server 200 performs calculation of display data (such as various resources in the virtual scene) related to the virtual scene and sends the calculation to the terminal device 400, the terminal device 400 relies on graphics computing hardware to complete loading, parsing and rendering of the calculation display data, and relies on graphics output hardware to output the virtual scene to form the visual perception.
In some embodiments, the terminal device 400 may implement the resource processing method in the virtual scenario provided in the embodiments of the present application by running a computer program, for example, the computer program may be a native program or a software module in an operating system; can be a local (Native) Application program (APP), i.e. a program that needs to be installed in an operating system to run; or may be an applet, i.e. a program that can be run only by downloading it to the browser environment; but also an applet that can be embedded into any APP. In summary, the computer program may be any form of application, module or plug-in, for example, a plug-in embedded in a virtual scene engine. In addition, the virtual scene in the embodiment of the present application may be a game virtual scene, where the game may be a military simulation game, a Multiplayer Online Battle Arena (MOBA) game, a Multiplayer gunfight live game, or the like, which is not limited to this, and this does not constitute a limitation on the virtual scene.
In some embodiments, the server 200 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, for example, the cloud service may be a resource processing service that is called by the terminal device 400 to determine an abnormal resource from a plurality of resources included in the virtual scene. The Cloud Technology (Cloud Technology) is a hosting Technology for unifying series resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The terminal device 400 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart television, and the like. The terminal device 400 and the server 200 may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application is not limited thereto.
Taking the electronic device provided in the embodiment of the present application as an example for illustration, it can be understood that, for the case where the electronic device is a server, parts (such as the user interface, the presentation module, and the input processing module) in the structure shown in fig. 3 may be default. Referring to fig. 3, fig. 3 is a schematic structural diagram of a terminal device 400 provided in an embodiment of the present application, where the terminal device 400 shown in fig. 3 includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal device 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in FIG. 3.
The Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 450 optionally includes one or more storage devices physically located remote from processor 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software, and fig. 3 illustrates a resource processing apparatus 455 stored in a virtual scene in a memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: an obtaining module 4551, a mapping module 4552, a matching module 4553 and an updating module 4554, which are logical and thus may be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be explained below.
Referring to fig. 4, fig. 4 is a schematic diagram of a virtual scene engine provided in an embodiment of the present application, where the virtual scene is a game virtual scene, the virtual scene engine may be a game engine. For the convenience of understanding, the game engine is taken as an example, and refers to a core component of some edited computer game system or some interactive real-time image application program, and these systems provide game designers with various tools required for writing games, and the purpose of the system is to enable game designers to easily and quickly make game programs without starting from zero, and at the same time, the game engine is also an engine of the game and is used for controlling the operation of the game, namely controlling the output of a game virtual scene. The game engine includes, but is not limited to, editors, rendering engines (i.e., "renderers," including two-dimensional and three-dimensional image engines), physics engines, special effects, sound effects, scripting engines, skeletal animations, models, user interfaces (engine interfaces), underlying algorithms, web engines, and scene management. At the bottom level, the game engine is a set of codes (instructions) that can be recognized by the electronic device. The items (such as game application programs) of a game virtual scene can comprise two parts, namely a game engine and game resources, wherein the game resources comprise maps, sounds, animations and the like, and the game engine calls (loads) the game resources in order according to the requirements of game design (namely according to designed program codes).
The resource processing method in the virtual scene provided in the embodiment of the present application may be implemented by each module in the resource processing apparatus 455 in the virtual scene shown in fig. 3 calling the relevant component of the game engine shown in fig. 4, and is exemplified below.
For example, the obtaining module 4551 is configured to invoke a user interface component in the game engine to obtain an inspection policy set for a virtual scene in a user interface (resource processing interface), where the resource processing interface may be provided by an editor component or other components in the game engine; the mapping module 4552 is configured to invoke a bottom-layer algorithm component and an editor component in the game engine, so as to map an attribute to be checked of a resource in the virtual scene into an object that can be invoked, thereby obtaining an attribute value of the resource corresponding to the attribute to be checked; the matching module 4553 is configured to invoke a bottom-layer algorithm component and an editor component in the game engine, to perform matching processing on an attribute value of the attribute to be checked corresponding to the resource and an attribute value condition corresponding to the attribute to be checked, and determine an abnormal resource in the virtual scene according to an obtained matching result; the update module 4554 is configured to invoke a user interface component to update the resource handling interface according to the exception resource.
Of course, the above examples do not constitute a limitation to the embodiments of the present application, and the calling relationship of each component included in the game engine and each module in the resource processing device 455 in the virtual scene to the component in the game engine may be adjusted according to the actual application scene.
The resource processing method in the virtual scene provided by the embodiment of the present application will be described with reference to exemplary applications and implementations of the electronic device provided by the embodiment of the present application.
Referring to fig. 5A, fig. 5A is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 5A.
In step 101, in response to a policy setting operation received in a resource processing interface, acquiring an inspection policy set for a virtual scene; the checking strategy comprises the name of the attribute to be checked and the attribute value condition corresponding to the attribute to be checked.
The virtual scene often includes a plurality of resources, where the virtual scene often includes abnormal resources whose attribute values do not meet requirements, and reasons for generating the abnormal resources are various, for example, related personnel (such as developers and artists) introduce wrong resources into the virtual scene, and for example, the attribute values of existing resources are not updated in time when versions of the virtual scene are iterated. If a virtual scene including abnormal resources is output, the computing resources consumed by the electronic equipment in the output process are wasted, and meanwhile, the abnormal resources also affect the human-computer interaction effect and reduce the user experience.
Therefore, in the embodiment of the present application, resource processing is performed on a virtual scene to determine abnormal resources in the virtual scene. Firstly, a resource processing interface is presented, and when a policy setting operation is received in the resource processing interface, an inspection policy set for a virtual scene is acquired. The resource processing interface can be an interface of a virtual scene engine independent of the virtual scene, such as an independent Web interface; or may be a user interface provided by the virtual scene engine, such as a user interface provided by an editor component of the virtual scene engine.
Here, the obtained inspection policy at least includes a name of the attribute to be inspected and an attribute value condition corresponding to the attribute to be inspected, and may also include other contents, which will be further described later, where the attribute value condition may be set according to an actual application scenario. An inspection policy may include multiple attribute value conditions for the attributes to be inspected, provided that these attribute value conditions cannot conflict with each other, e.g., an inspection policy includes both an attribute value condition of "greater than 50" and an attribute value condition of "less than 100". For one attribute to be checked, a plurality of checking strategies can be simultaneously corresponded.
It should be noted that the obtained inspection policy includes content resolvable by the electronic device, and the electronic device may execute the resource processing operation according to the inspection policy, thereby implementing the resource processing function. Therein, the related logic for resolving the inspection policy may be pre-deployed in the electronic device, for example, pre-storing a code (such as a script) for resolving the inspection policy. In some embodiments, the obtained checking policy may also be in a code form, and the electronic device may directly execute the obtained checking policy to implement a resource processing function.
In some embodiments, after step 101, further comprising: and responding to the strategy multiplexing operation aiming at any attribute in the virtual scene, replacing the name of the attribute to be checked in the checking strategy with the name of any attribute, and taking the attribute value condition corresponding to the attribute to be checked as the attribute value condition of any attribute to obtain a new checking strategy.
After the inspection strategy corresponding to the attribute to be inspected is obtained, the inspection strategy can be multiplexed to the attribute different from the attribute to be inspected. For example, the attribute to be checked corresponding to the acquired checking policy is a map height in the Android operating system (for convenience of description, named attribute a), and the attribute value condition in the checking policy is that the map height is less than 100 pixels. When a policy multiplexing operation for any attribute in a virtual scene (for convenience of explanation, the attribute is taken as a chartlet height example in an iOS operating system and is named as attribute B) is received, replacing the name of attribute a in the inspection policy with the name of attribute B, and using the attribute value condition in the inspection policy as the attribute value condition of attribute B to obtain the inspection policy corresponding to attribute B. As for the checking policy corresponding to the attribute a, the reservation can be continued.
In order to facilitate policy multiplexing, multiple attributes and policy multiplexing options respectively corresponding to each attribute may be presented in the resource processing interface, and a received trigger operation for a policy multiplexing option corresponding to any one attribute may be used as a policy multiplexing operation for the attribute. In addition, if multiple inspection policies are acquired, all the inspection policies may be presented in the resource processing interface when a policy multiplexing operation is received, and policy multiplexing may be performed according to a selected inspection policy when a selection operation for the presented multiple inspection policies is received. Through the mode, the workload of setting the inspection strategy can be reduced, and the labor cost is saved.
In step 102, mapping the attribute to be checked of the resource in the virtual scene into an invokable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by invoking the invokable object corresponding to the attribute to be checked.
After the inspection strategy is obtained, the attribute value of the resource in the virtual scene corresponding to the attribute to be inspected can be obtained according to the name of the attribute to be inspected in the inspection strategy. In the embodiment of the present application, the attribute value is mainly obtained based on a reflection mechanism, for example, the attribute to be checked of the resource in the virtual scene may be mapped to an adjustable object according to the name of the attribute to be checked, and the attribute value of the attribute to be checked of the resource is obtained by calling the adjustable object corresponding to the attribute to be checked, where calling the adjustable object corresponding to the attribute to be checked may refer to calling a value method (value function) in the adjustable object.
The mapping mode in the embodiment of the present application is not limited, for example, the attribute to be checked of the resource in the virtual scene may be mapped to the PropertyInfo object according to the PropertyInfo class, and the attribute value of the attribute to be checked corresponding to the resource is obtained by calling the GetValue method of the PropertyInfo object. Therefore, for different attributes to be inspected, only one set of codes for acquiring the attribute values according to the names needs to be configured, and independent configuration is not needed for different attributes to be inspected.
It should be noted that step 102 may be executed for each resource in the virtual scene, or the step 102 may be executed for each resource to be inspected after screening multiple resources in the virtual scene to obtain the resource to be inspected. For example, the resource having the attribute to be checked and set as the valid resource in the virtual scene may be used as the resource to be checked, and other resources may be ignored, where the attribute of the resource may be set according to the actual application scene. In the embodiment of the present application, the attribute may be configured to be valid, for example, a valid configuration option corresponding to the attribute may be presented in the resource processing interface. A resource may be considered to have no attribute when the attribute is configured to be not in effect.
It should be noted that in the embodiment of the present application, the attribute value may be obtained by the capability of the virtual scenario engine, or may be obtained according to a tool (e.g., a client tool) independent of the virtual scenario engine.
In some embodiments, before step 102, further comprising: in response to an attribute multiplexing operation for any resource type in the virtual scene, multiplexing the attribute of the parent resource into the child resource; the parent resource is a resource successfully matched with any one resource type in the virtual scene; the child resource is a resource different from the parent resource in the virtual scene.
Besides policy multiplexing, the embodiment of the present application may also support attribute multiplexing. For example, when an attribute multiplexing operation for any one resource type in a virtual scene is received, a resource that is successfully matched with the resource type (i.e., conforms to the resource type) is used as a parent resource, a resource different from the parent resource is used as a child resource, and an attribute of the parent resource is multiplexed into the child resource, that is, the child resource is made to have a multiplexed attribute. For example, a resource with a resource type as a basic type may be preset, and the attributes include a name, a path, and a memory, and when an attribute multiplexing operation for the basic type is received, all the attributes of the resource with the resource type as the basic type are multiplexed into a sub-resource, such as a sub-resource with a resource type of a map, a sub-resource with a resource type of a grid, and a sub-resource with a resource type of an animation. It is worth noting that the attributes of multiple resources that successfully match the same resource type are generally the same. In addition, after the parent resource is determined, a part of resources different from the parent resource can be used as child resources, for example, some resources can be artificially screened out to be used as child resources.
Of course, in the embodiment of the present application, customization of the attribute of the resource may be supported. For example, after a child resource inherits the attributes of a parent resource, the attributes of the child resource can be further updated, such as adding or deleting attributes. For example, for a child resource whose resource type is a map, the attributes of height, width, and readability may be further added; for the sub-resources with the resource type of grid, the number of grids, the number of vertexes, the readability of the sub-resources and other attributes can be further increased; for the child resources with the resource types of animation, attributes such as animation curves, key frames, import modes and the like can be further added. Through the mode, the workload of attribute setting can be reduced, the labor cost is saved, and quick and effective setting is realized.
In some embodiments, mapping the attributes to be inspected of the resources in the virtual scene to callable objects according to the names of the attributes to be inspected as described above may be implemented in such a way that: acquiring white list resources in a virtual scene; and mapping the attribute to be checked of the resource which is positioned in the virtual scene and is different from the white list resource into an adjustable object according to the name of the attribute to be checked.
Here, the white list resources in the virtual scene may be acquired, and the resources different from the white list resources are used as the resources to be checked to implement resource screening, that is, the white list resources are added to the screening condition. Then, according to the name of the attribute to be checked, the attribute to be checked of the resource to be checked is mapped into the callable object, and the white list resource is ignored, so that the workload of resource processing can be effectively reduced. The white list resource may be set according to an actual application scenario, for example, a resource whose update frequency of attribute values (which refer to attribute values corresponding to all attributes of the resource) in a virtual scenario is less than a frequency threshold is used as the white list resource.
In some embodiments, mapping the attributes to be inspected of the resources in the virtual scene to callable objects according to the names of the attributes to be inspected as described above may be implemented in such a way that: obtaining blacklist resources in a virtual scene; and mapping the attribute to be checked of the blacklist resource into the callable object according to the name of the attribute to be checked.
Here, the blacklist resource in the virtual scene may be used as the resource to be checked, and the resource different from the blacklist resource is ignored, that is, the blacklist resource is added to the screening condition. The blacklist resource may be set according to an actual application scenario, for example, a resource in which the attribute value update frequency in the virtual scenario is greater than or equal to a frequency threshold is used as the blacklist resource. By the method, the pertinence of resource processing can be improved.
In step 103, the attribute value of the attribute to be checked corresponding to the resource is matched with the attribute value condition corresponding to the attribute to be checked, and the abnormal resource in the virtual scene is determined according to the obtained matching result.
After the attribute value of the resource corresponding to the attribute to be inspected is obtained, the attribute value is matched with the attribute value condition corresponding to the attribute to be inspected, and whether the resource is an abnormal resource is judged according to the matching result, and the judgment mode is explained later.
In the embodiment of the present application, the type of the inspection policy may be set. For example, types include, but are not limited to, superscalar checks and reference loss checks, where for a check policy of type superscalar checks, the attribute value condition therein may be that the attribute value is less than a certain threshold or greater than a certain threshold; for the checking policy with the type of reference loss checking, the attribute to be checked in the checking policy may be a reference attribute, and the attribute value condition may be that the attribute value is not equal to zero, where if the attribute value of the reference attribute is zero, it indicates that reference loss occurs.
In step 104, the resource handling interface is updated based on the exception resource.
After the abnormal resource is determined, the resource processing interface may be updated according to the abnormal resource, for example, the abnormal resource may be presented in the resource processing interface, where presenting the abnormal resource may refer to presenting an attribute value of an attribute having an identification function corresponding to the abnormal resource, such as at least one of an attribute value of a name attribute and an attribute value of a path attribute. On the basis, the attribute value of the abnormal resource corresponding to the attribute to be checked can be presented to remind relevant personnel to update the attribute value, namely the abnormal resource is repaired; the resource type and the module of the abnormal resource can be presented, so that the related personnel can quickly locate the abnormal resource; the type of inspection policy used to determine the anomalous resource may also be presented to allow the associated personnel to locate the cause of the anomaly, such as an attribute value that is out of tolerance or a reference that is missing.
Besides updating the resource processing interface, in the embodiment of the present application, an alarm may be performed according to an abnormal resource, for example, an alarm may be performed in a short message or mail manner.
It is worth noting that, since the attribute values of the resources in the virtual scene may change continuously (for example, undergo version iteration), steps 102 to 104 may be performed periodically to perform real-time monitoring on the abnormal resources in the virtual scene.
In some embodiments, the number of inspection strategies includes a plurality, and each inspection strategy corresponds to a risk level; after step 101, the method further comprises: traversing a plurality of inspection strategies; the traversed checking strategy is used for determining abnormal resources in the virtual scene; the above-mentioned updating of the resource handling interface according to the exception resource can be implemented in such a way that: presenting a plurality of abnormal resources in a resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different; and the risk level corresponding to the abnormal resource is the risk level corresponding to the checking strategy for determining the abnormal resource.
In this embodiment of the present application, the number of the obtained inspection policies may include a plurality of inspection policies, and for this case, the plurality of inspection policies may be traversed, and the abnormal resource in the virtual scene is determined according to the traversed inspection policies. On this basis, if each inspection strategy corresponds to one risk level, the risk level corresponding to the traversed inspection strategy can be used as the risk level corresponding to the abnormal resource determined according to the traversed inspection strategy. Wherein, the risk levels corresponding to different inspection strategies may be the same or different. The risk level can include high and low, and can be set according to the actual application scenario.
When the traversal is completed, all the determined abnormal resources can be presented in the resource processing interface, and the presentation modes of the abnormal resources corresponding to different risk levels are different, so that the related personnel can distinguish the abnormal resources. Wherein, the different presentation manners may refer to different at least one of presentation contents, presentation fonts, presentation sizes, and presentation colors. As an example, an exemplary view of the resource processing interface shown in fig. 6 is provided in the embodiment of the present application, in fig. 6, abnormal resources 1 to 5 are presented in a list form, where risk levels of the abnormal resources 1 to 3 are all high, and risk levels of the abnormal resources 4 to 5 are all low, so that presentation sizes corresponding to the abnormal resources 1 to 3 are larger than presentation sizes corresponding to the abnormal resources 4 to 5. Through the mode, the discrimination degree between the abnormal resources corresponding to different risk levels can be improved, and related personnel can be reminded of repairing the abnormal resources with higher risk levels preferentially.
In some embodiments, updating the resource handling interface based on the exception resource as described above may be implemented in a manner that: and presenting the abnormal resources and the resources which are different from the abnormal resources in the virtual scene in the resource processing interface, wherein the presenting mode of the abnormal resources is different from that of the resources which are different from the abnormal resources.
Here, only the abnormal resource may be presented in the resource processing interface, or the abnormal resource and a resource different from the abnormal resource in the virtual scene (named as a normal resource for convenience of distinction) may be presented at the same time, and the presentation manner of the abnormal resource is different from that of the normal resource. Similarly, the different presentation manners may also mean that at least one of the presentation content, the presentation font, the presentation size, and the presentation color is different. As an example, the present embodiment provides a schematic diagram of a resource processing interface as shown in fig. 7, abnormal resources 1 to 3 are presented in a larger presentation size, and normal resources 4 to 5 are presented in a smaller presentation size. By the method, the comprehensiveness of the content presented in the resource processing interface can be improved, the difference between the abnormal resource and the normal resource is enhanced, and the related personnel can repair the abnormal resource conveniently, for example, the attribute value of the attribute to be inspected corresponding to the abnormal resource is updated according to the attribute value of the attribute to be inspected corresponding to the normal resource.
As shown in fig. 5A, in the embodiment of the present application, automated resource processing is performed according to an inspection policy configured in a resource processing interface, so that implementation cost of resource processing can be reduced, and meanwhile, occupation of computing resources of an electronic device in a resource processing process is effectively reduced.
In some embodiments, referring to fig. 5B, fig. 5B is a schematic flowchart of a resource processing method in a virtual scene provided in this embodiment, step 101 shown in fig. 5A may be updated to step 201, and in step 201, in response to a policy setting operation received in a resource processing interface, an inspection policy set for the virtual scene is obtained; the checking strategy comprises the name of the attribute to be checked, the attribute value condition corresponding to the attribute to be checked, the name of the attribute to be screened and the attribute value condition corresponding to the attribute to be screened.
The obtained inspection strategy may further include a name of the attribute to be screened and an attribute value condition corresponding to the attribute to be screened, in addition to the name of the attribute to be inspected and the attribute value condition corresponding to the attribute to be inspected, where the name of the attribute to be screened and the attribute value condition corresponding to the attribute to be screened are used to screen the resource to be inspected from the multiple resources included in the virtual scene, that is, as the screening condition.
In fig. 5B, based on fig. 5A, after step 201, in step 202, according to the name of the attribute to be filtered, the attribute to be filtered of the resource in the virtual scene may be mapped to an invokable object, and the attribute value of the attribute to be filtered corresponding to the resource is obtained by invoking the invokable object corresponding to the attribute to be filtered.
Here, for each resource in the virtual scene, the attribute value corresponding to the attribute to be filtered is obtained based on the reflection mechanism as well. For example, according to the name of the attribute to be filtered, the attribute to be filtered of the resource in the virtual scene is mapped to an adjustable object, and the attribute value of the resource corresponding to the attribute to be filtered is obtained by calling the adjustable object.
In step 203, the attribute value of the attribute to be screened corresponding to the resource is matched with the attribute value condition corresponding to the attribute to be screened, and the resource to be inspected in the virtual scene is determined according to the obtained matching result.
After obtaining the attribute value of the attribute to be screened corresponding to the resource, matching the attribute value with the attribute value condition corresponding to the attribute to be screened, and determining whether the resource is the resource to be checked according to the obtained matching result.
It should be noted that if other screening conditions exist, the resource screening may be performed before step 202, and step 202 and step 203 are performed for each screened resource; the resulting resource to be inspected may also be further screened after step 203.
In some embodiments, the number of inspection policies comprises a plurality; after step 201, the method further includes: traversing a plurality of inspection strategies; the traversed inspection strategy is used for determining to-be-inspected resources in the virtual scene; after step 203, the method further comprises: and when the number of the resources to be checked, which is determined according to the traversed checking strategy, is zero, continuing traversing the next checking strategy.
Here, when the number of the acquired inspection policies includes a plurality of inspection policies, the plurality of inspection policies may be traversed, and the resource to be inspected in the virtual scene may be determined according to the traversed inspection policies. When the number of the resources to be checked, which are determined according to the traversed checking strategy, is zero, the next checking strategy is directly traversed, so that the efficiency of resource processing is improved, and invalid processing is avoided.
In some embodiments, the above-mentioned determination of resources to be inspected in a virtual scene from the obtained matching results may be implemented in such a way that: the following processing is performed for each resource in the virtual scene: when the matching result of the resource corresponding to the attribute to be screened is successful, taking the resource as the resource to be checked; and when the matching result of the resource corresponding to the attribute to be screened is matching failure, ignoring the resource.
Here, for each resource in the virtual scene, when the matching result of the resource corresponding to the attribute to be screened is successful, the resource is taken as the resource to be checked; and when the matching result of the resource corresponding to the attribute to be screened is matching failure, ignoring the resource. For example, the attribute to be screened in the inspection strategy is a material, and the attribute value condition corresponding to the attribute to be screened is "the material is a metal", and then the determined attribute values corresponding to the material attribute of the resource to be inspected are all metals. Through the method, the effectiveness of resource screening according to the inspection strategy can be improved.
Of course, this does not constitute a limitation to the embodiment of the present application, and for example, the resource may also be ignored when the matching result of the attribute to be filtered corresponding to the resource is a successful matching; and when the matching result of the resource corresponding to the attribute to be screened is matching failure, taking the resource as the resource to be checked.
In fig. 5B, step 102 shown in fig. 5A may be updated to step 204, in step 204, the attribute to be checked of the resource to be checked in the virtual scene is mapped to the callable object according to the name of the attribute to be checked, and the attribute value of the attribute to be checked corresponding to the resource to be checked is obtained by calling the callable object corresponding to the attribute to be checked.
After the resource to be inspected is obtained, the subsequent treatment can be carried out on the resource to be inspected only. For example, for each resource to be checked, the attribute to be checked of the resource to be checked is mapped into an adjustable object according to the name of the attribute to be checked, and the attribute value of the resource to be checked corresponding to the attribute to be checked is obtained by adjusting the adjustable object
In fig. 5B, step 103 shown in fig. 5A may be updated to step 205, and in step 205, the attribute value of the to-be-inspected attribute corresponding to the to-be-inspected resource is matched with the attribute value condition corresponding to the to-be-inspected attribute, and the abnormal resource in the virtual scene is determined according to the obtained matching result.
And for each resource to be inspected, obtaining a matching result corresponding to the attribute to be inspected, so that abnormal resources can be determined in all the resources to be inspected to update the resource processing interface.
As shown in fig. 5B, in the embodiment of the present application, to-be-inspected resources are first screened from all resources included in a virtual scene, and then abnormal resources are screened from all to-be-inspected resources, so that workload of resource processing can be effectively reduced, and resource processing efficiency is improved.
In some embodiments, referring to fig. 5C, fig. 5C is a schematic flowchart of a resource processing method in a virtual scene provided in this application, and step 101 shown in fig. 5A may be implemented through step 301 to step 303, which will be described with reference to each step.
In step 301, a plurality of attributes are presented in a resource handling interface.
In the embodiment of the application, the checking policy set for the virtual scene may be acquired based on the selection operation and the condition setting operation. First, a plurality of attributes are presented in the resource processing interface, for example, all the attributes in the virtual scene may be presented, or the screened attributes may be presented.
In step 302, in response to the selection operation for the plurality of attributes, the name of the selected attribute is taken as the name of the attribute to be checked.
Here, when a selection operation (e.g., a click operation or a long press operation) for a plurality of attributes is received, the selected attribute is set as an attribute to be checked, that is, the name of the selected attribute is set as the name of the attribute to be checked.
In step 303, in response to the condition setting operation for the attribute to be inspected, an attribute value condition set for the attribute to be inspected is acquired.
For example, a condition setting interface corresponding to the attribute to be checked may be presented, and the attribute value condition set for the attribute to be checked may be acquired in response to a condition setting operation for the attribute to be checked received in the condition setting interface. The condition setting interface can exist independently from the resource processing interface, and can also be presented in the form of a window in the resource processing interface.
It should be noted that, in response to the condition setting operation for the attribute to be filtered received in the condition setting interface, the attribute value condition set for the attribute to be filtered may be obtained, and at the same time, the name of the attribute to be filtered may also be obtained.
In some embodiments, the above-described presentation of multiple attributes in a resource handling interface may be implemented in such a way that: presenting a plurality of screening conditions in a resource processing interface; wherein, the screening condition comprises at least one of a resource type and a module to which the resource belongs; the virtual scene comprises a plurality of modules, and each module comprises a plurality of resources; and responding to the selection operation aiming at the various screening conditions, and presenting various attributes of the resources successfully matched with the selected screening conditions.
Here, a plurality of filtering conditions may be presented in the resource processing interface, each of the filtering conditions including at least one of a resource type and a module to which the resource belongs. For example, all resource types in the virtual scene and/or all modules in the virtual scene may be presented in a resource handling interface.
The virtual scene comprises a plurality of modules, each module comprises a plurality of resources, for example, in the game virtual scene, a plurality of modules such as characters (virtual characters), weapons and monsters can be divided, wherein the character modules comprise a plurality of resources corresponding to the characters, such as a plurality of map resources for constructing character images, and the weapons module is similar to the monsters module.
When the selection operation aiming at the presented multiple screening conditions is received, the resource which is successfully matched with the selected screening conditions is used as the resource to be checked, and multiple attributes of the resource to be checked are presented in the resource processing interface, so that related personnel can determine the attribute to be checked from the multiple attributes. For example, if the screening condition includes a map type, all the resources in the virtual scene whose resource type is the map type may be used as the resources to be checked. In the above manner, the selected screening condition is the screening condition meeting the user requirements, and by presenting multiple attributes of the resource to be inspected, the types of the attributes to be presented can be reduced, the computing resource of the electronic device is saved, and meanwhile, the related personnel can conveniently and quickly determine the attribute to be inspected.
In some embodiments, mapping the attributes to be checked of the resources in the virtual scene to the callable objects according to the names of the attributes to be checked as described above can be implemented by: and mapping the attribute to be checked of the resource which is positioned in the virtual scene and successfully matched with the selected screening condition into an adjustable object according to the name of the attribute to be checked.
Here, the resource successfully matched with the selected screening condition may be used as the resource to be checked, and only the attribute value of the resource to be checked corresponding to the attribute to be checked is obtained, and other resources are ignored, so as to reduce the workload of resource processing.
On this basis, if the inspection policy includes the name of the attribute to be screened and the attribute value condition corresponding to the attribute to be screened, the resource successfully matched with the selected screening condition can be further screened according to the name of the attribute to be screened and the attribute value condition corresponding to the attribute to be screened, so as to obtain the resource to be inspected. Of course, a plurality of resources in the virtual scene may be first screened according to the name of the attribute to be screened and the attribute value condition corresponding to the attribute to be screened, and then the screened resources are further screened according to the selected screening condition, so as to obtain the resources to be inspected. By the method, the workload of resource processing can be reduced, and the efficiency is improved.
As shown in fig. 5C, in the embodiment of the present application, the policy setting operation is split into the selection operation and the condition setting operation, so that human-computer interaction experience can be enhanced, and the accuracy of the set inspection policy is improved.
In some embodiments, referring to fig. 5D, fig. 5D is a flowchart of a resource processing method in a virtual scene provided in this application embodiment, and step 103 shown in fig. 5A may be implemented through steps 401 to 403, which will be described with reference to each step.
In step 401, the attribute value of the attribute to be checked corresponding to the resource is matched with the attribute value condition corresponding to the attribute to be checked.
And after the attribute value of the attribute to be detected corresponding to the resource is obtained, matching the attribute value with the attribute value condition corresponding to the attribute to be detected.
In step 402, when the matching result of the resource corresponding to the attribute to be checked is successful, the resource is ignored.
In step 403, when the matching result of the resource corresponding to the attribute to be checked is a matching failure, the resource is taken as an abnormal resource.
The embodiment of the application provides an example for determining abnormal resources, and when the matching result of the attribute to be checked corresponding to a certain resource is successful, the resource is ignored; and when the matching result of the attribute to be checked corresponding to a certain resource is matching failure, taking the resource as an abnormal resource. For ease of understanding, the following description is made in terms of this example.
Of course, this does not constitute a limitation to the embodiment of the present application, and for example, when a matching result of a certain resource corresponding to an attribute to be checked is successful, the resource may be taken as an abnormal resource; and when the matching result of the attribute to be checked corresponding to a certain resource is matching failure, ignoring the resource.
In fig. 5D, step 104 shown in fig. 5A can be implemented by steps 404 to 405, and will be described with reference to each step.
In step 404, the exception resource, and an exception repair option for the exception resource, are presented in a resource handling interface.
In the embodiment of the application, besides a mode that related personnel carry out manual repair on abnormal resources, an automatic repair function is provided. For example, for each exception resource presented, a corresponding exception repair option may also be presented.
In step 405, in response to the trigger operation for the exception recovery option, the attribute value of the attribute to be checked corresponding to the exception resource is updated, so that the updated attribute value is matched with the attribute value condition corresponding to the attribute to be checked successfully.
Here, when a trigger operation (such as a click operation or a long press operation) for an exception recovery option is received, the attribute value of the attribute to be checked corresponding to the exception resource is updated, so that the updated attribute value is successfully matched with the attribute value condition corresponding to the attribute to be checked. Therefore, automatic repair of abnormal resources can be realized.
For example, if the attribute value condition includes a single attribute value, the attribute value of the attribute to be checked corresponding to the abnormal resource may be updated to the attribute value in the attribute value condition; if the attribute value condition includes an attribute value range (e.g., 50 to 100), the attribute value of the attribute to be checked corresponding to the abnormal resource may be updated to any value (e.g., a minimum value or a maximum value) in the attribute value range.
In some embodiments, updating the resource handling interface based on the exception resource as described above may be implemented in a manner that: determining the difference degree between the attribute value of the attribute to be checked corresponding to the abnormal resource and the attribute value condition corresponding to the attribute to be checked; determining a risk level corresponding to the abnormal resource according to the difference degree; and presenting a plurality of abnormal resources in the resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different.
In the embodiment of the application, for each abnormal resource, the difference degree between the attribute value of the attribute to be checked corresponding to the abnormal resource and the attribute value condition corresponding to the attribute to be checked can be determined. For example, if the attribute value condition includes a single attribute value, the absolute value of the difference between the attribute value of the attribute to be checked corresponding to the abnormal resource and the attribute value in the attribute value condition may be used as the difference degree corresponding to the abnormal resource; if the attribute value condition includes an attribute value range, an absolute value of a difference between an attribute value of the attribute to be checked corresponding to the abnormal resource and any one attribute value (e.g., fixed to a minimum value or fixed to a maximum value) in the attribute value range may be used as a difference degree corresponding to the abnormal resource.
The larger the difference degree of the abnormal resource is, the more the abnormal resource is abnormal, and the higher the risk level corresponding to the abnormal resource is, that is, the risk level is positively correlated with the difference degree. In order to reflect the difference between the abnormal resources corresponding to different risk levels, a plurality of abnormal resources may be presented in the resource processing interface, and the abnormal resources corresponding to different risk levels are presented in different manners, as shown in fig. 6. Wherein, the different presentation manners may refer to different at least one of presentation contents, presentation fonts, presentation sizes, and presentation colors.
As shown in fig. 5D, according to the attribute value condition corresponding to the attribute to be checked, the attribute value corresponding to the attribute to be checked of the abnormal resource is automatically updated, so that the abnormal resource is automatically repaired.
In the following, an exemplary application of the embodiment of the present application in an actual application scenario will be described, and for convenience of understanding, a virtual scenario is taken as an example of a game virtual scenario developed by a game engine (such as a Unity game engine), which, of course, does not constitute a limitation to the virtual scenario engine and the virtual scenario.
The embodiment of the present application provides a schematic diagram of a resource processing interface as shown in fig. 8A, and in fig. 8A, a case where the resource processing interface 81 is a Web interface is taken as an example. In response to a trigger operation (e.g., a click operation or a long press operation) for the "resource attribute configuration" option in the resource processing interface 81, a plurality of attributes in the game virtual scene are presented in the resource processing interface 81. Here, a plurality of screening conditions may be presented first, and in response to a selection operation for the plurality of screening conditions, a plurality of attributes of the resource that is successfully matched with the selected screening conditions may be presented, where the screening conditions include at least one of a resource type, a module to which the resource belongs, and a validation result (i.e., whether the attribute is validated), and the check rule corresponds to the above check policy. In fig. 8A, taking the selected screening condition as the screening condition 82 as an example, the resource type in the screening condition 82 is a map, and the validation result in the screening condition 82 includes both validation and non-validation.
When presenting the attribute, the attribute name, the attribute description and the effective result of the attribute can be presented, and the resource type of the resource corresponding to the attribute can be presented, wherein the attribute description is used for the function of the related personnel to know the attribute. Taking the attribute 83 in fig. 8A as an example, it is shown that the resource type is a map, the attribute name is format iOS, the attribute is described in the format of map iOS, and the validation result is valid. In addition, a modification option 84 is provided in the resource handling interface 81, and is used for modifying the attribute when being triggered, such as modifying the validation result, so as to facilitate the customization of the attribute by the relevant personnel.
In response to a trigger operation for the "check rule configuration" option in the resource handling interface 81, the relevant content as shown in fig. 8B may be presented. In configuring the check rule, the filtering condition may include at least one of a rule classification and a rule level (corresponding to the above risk level), and of course, the filtering condition may be consistent with the filtering condition for configuring the resource attribute, where the rule classification is used to indicate a type of the check rule, and the type of the check rule includes, but is not limited to, an out-of-standard check and a reference loss check. In fig. 8B, taking the selected screening condition as the screening condition 85 as an example, the attributes corresponding to the check rules successfully matched with the screening condition 85 are shown, wherein the rules in the screening condition 85 are classified as all (i.e., all types of the check rules are included at the same time), and the rule levels in the screening condition 85 are all (i.e., all rule levels are included at the same time).
In response to the selection operation (e.g., a click operation or a long-press operation) of the multiple attributes shown in fig. 8B, the selected attribute is taken as an attribute to be checked, and a corresponding rule configuration interface (corresponding to the above condition setting interface) is presented to perform configuration of the check rule. In fig. 8B, a rule configuration interface 86 is shown by taking the attribute that the selected attribute is the name of the module to which the attribute belongs as the scene, the corresponding resource type as the animation, and the attribute name as the animation duration as an example. The rule configuration interface 86 supports modification of the rule classification and rule level of the check rule corresponding to the attribute, and may support modification of the inside of the check rule. In this embodiment of the application, the check rule may include a pre-rule and a scan rule, where the pre-rule (including the name of the above attribute to be screened and the attribute value condition corresponding to the attribute to be screened) is used to screen the resource to be checked, and the scan rule (including the name of the above attribute to be checked and the attribute value condition corresponding to the attribute to be checked) is used to determine whether the attribute value of the attribute to be checked corresponding to the resource to be checked meets the requirement. The pre-rule and the scanning rule each include two parts, namely a function (also called a method) and a parameter, wherein the function is used for representing the relationship between the attribute value and the parameter. As shown in fig. 8B, the pre-rule 87 is null, the attribute to be checked in the scanning rule 88 is animation time length (unit is second), the function is less than, and the parameter is 1000, then the scanning rule 88 means that the animation time length of a resource needs to be less than 1000 seconds, and if the animation time length of a certain resource is greater than or equal to 1000 seconds, the resource is taken as an abnormal resource (superscalar resource). For an attribute in a game virtual scene, a plurality of check rules may be configured, and each check rule may be configured with a plurality of pre-rules and a plurality of scanning rules, provided that the plurality of pre-rules in the same check rule cannot conflict with each other, and similarly, the plurality of scanning rules in the same check rule cannot conflict with each other, for example, a scanning rule of which "animation duration is greater than 1000 seconds" and a scanning rule of which "animation duration is less than or equal to 1000 seconds" cannot exist in the same check rule at the same time.
It is worth noting that in fig. 8A and 8B, a "white list configuration" option is also shown for configuring white list resources (i.e., resources that do not need to be checked) and/or white list attributes (i.e., attributes that do not need to be checked) in the virtual scene of the game when triggered; the module configuration option is also shown, and is used for configuring the modules in the game virtual scene and the resources included by the modules when being triggered, and the modules can be customized according to the actual scene by related personnel; and a resource type configuration option is also shown and is used for configuring the resource type corresponding to the resource in the game virtual scene when the option is triggered, such as modifying the resource type of a certain resource from a map to an animation.
For the configured check rule, the game engine or a specific client tool can perform resource processing according to the check rule to determine abnormal resources in the game virtual scene.
In the implementation of the bottom layer, the embodiment of the present application mainly includes two parts, namely, attribute configuration and check rule configuration, which are described below. In the attribute configuration, a resource corresponding to any one resource type may be used as a parent resource, and an attribute of the parent resource is multiplexed into a child resource, that is, attribute multiplexing (or attribute inheritance) is implemented, where the child resource is a resource different from the parent resource. As shown in fig. 9, the parent resource is a resource belonging to the singlerestata class, and its attributes include Identification (ID), Name (Name), path (AssetPath), and occupied memory (Memsize), and the child resources include a map resource (i.e., a resource belonging to the TextureDetail class), a grid resource (i.e., a resource belonging to the mesdetail class), and an animation resource (i.e., a resource belonging to the animation detail class). For a child resource, the attributes may include additionally defined attributes, such as Width (Width), Height (Height), and readability (Readable), in addition to the identifier, name, path, and occupied memory inherited from the parent resource; the attributes of the grid resources also include the number of grids (Triscount), the number of vertices (Vertexcount), and whether the grid resources are Readable (Readable), etc.; the attributes of animation resources also include animation curves (Totalcurves), Keyframes (Keyframes), animation import modes (e.g., Legacy mode), and the like. For resources, all fields are acquired in the form of attributes, and the above attribute configuration has at least the following technical effects: the attribute which is not effective can be ignored, only the effective attribute is processed (such as attribute value acquisition), and the computation amount increase caused by excessive attributes can be effectively avoided; the unified configuration scheme can be beneficial to uniformly processing the attributes, reduces the maintenance amount of the codes and improves the elegance of the codes.
In checking the rule configuration, the following configuration principles may be supported: 1) one attribute to be checked can be configured with a plurality of checking rules; 2) the check rule may include only the scan rule (i.e. the pre-rule is null), and may also include both the pre-rule and the scan rule; 3) the multiplexing of the checking rules is supported, namely the checking rules of a certain attribute to be checked can be multiplexed onto another attribute.
The resource processing can be performed based on the configured check rule, and the embodiment of the present application provides a schematic diagram of the resource processing as shown in fig. 10, and for a certain attribute to be checked, a check rule list corresponding to the attribute to be checked is first obtained, where the check rule list includes a plurality of check rules for example. And traversing the acquired check rule list, and performing attribute check according to a preposed rule in the traversed check rule, namely screening out the resources to be checked in the game virtual scene. When the quantity of the resources to be checked is larger than zero (namely, the preposed rule is hit), continuously performing attribute check according to the scanning rule in the traversed check rule, namely, judging whether the attribute value of the resources to be checked, which corresponds to the attributes to be checked, exceeds the standard or not; when the number of resources to be checked is equal to zero (i.e., the pre-rule misses), the next check rule in the list of check rules is traversed.
When the attribute value of the resource to be inspected corresponding to the attribute to be inspected exceeds the standard (namely, the scanning rule is hit) according to the scanning rule in the traversed inspection rule, the traversal can be finished, the resource to be inspected is taken as an abnormal resource (namely, a hit result), and the abnormal resource is presented in a resource processing interface, for example, the abnormal resource is presented in a BUG list form, so that related personnel can be reminded to repair the attribute value of the abnormal resource corresponding to the attribute to be inspected; and when the attribute values of the attributes to be checked corresponding to all the resources to be checked do not exceed the standard (namely, the scanning rule is not hit), continuously traversing the next checking rule in the checking rule list. And repeating the process until all the check rules in the check rule list are traversed, namely, performing attribute check according to all the check rules.
The embodiment of the present application provides a schematic diagram of attribute checking as shown in fig. 11, and for a certain attribute (for example, an attribute to be screened by a pre-rule or an attribute to be checked by a scan rule), an attribute value may be obtained based on a reflection mechanism, and whether the attribute value exceeds the standard is determined according to a function and a parameter in the check rule (specifically, the pre-rule or the scan rule). If the attribute value exceeds the standard, hit; if the attribute value is not out of the standard, there is a miss. It should be noted that, in the embodiment of the present application, the purpose of obtaining the attribute value based on the reflection mechanism is to improve the universality and universality of different attributes, that is, a set of codes for obtaining the attribute value need not to be written separately for different attributes.
The embodiment of the application has at least the following technical effects: by configuring the check rule on the Web interface and acquiring the attribute value through the reflection mechanism, whether the attribute value exceeds the standard or not is judged according to the check rule, the requirements of different game virtual scene items, different attributes and different check rules can be met, the code maintenance cost during the access of the game virtual scene items is reduced, the instant access and use are realized, and the occupation of computing resources (such as storage resources) of electronic equipment can be reduced.
Continuing with the exemplary structure of the resource processing device 455 in the virtual scenario provided in the embodiment of the present application implemented as a software module, in some embodiments, as shown in fig. 3, the software module in the resource processing device 455 in the virtual scenario stored in the memory 450 may include: an obtaining module 4551, configured to obtain, in response to a policy setting operation received in the resource processing interface, an inspection policy set for the virtual scene; the checking strategy comprises the name of the attribute to be checked and an attribute value condition corresponding to the attribute to be checked; the mapping module 4552 is configured to map the attribute to be checked of the resource in the virtual scene into an invokable object according to the name of the attribute to be checked, and obtain an attribute value of the resource corresponding to the attribute to be checked by invoking the invokable object corresponding to the attribute to be checked; a matching module 4553, configured to perform matching processing on an attribute value of the attribute to be checked corresponding to the resource and an attribute value condition corresponding to the attribute to be checked, and determine an abnormal resource in the virtual scene according to an obtained matching result; an updating module 4554, configured to update the resource handling interface according to the abnormal resource.
In some embodiments, the inspection policy further includes a name of the attribute to be screened and an attribute value condition corresponding to the attribute to be screened; the mapping module 4552 is further configured to map the attribute to be screened of the resource in the virtual scene into an callable object according to the name of the attribute to be screened, and obtain an attribute value of the attribute to be screened corresponding to the resource by calling the callable object corresponding to the attribute to be screened; the matching module 4553 is further configured to perform matching processing on the attribute value of the attribute to be screened corresponding to the resource and the attribute value condition corresponding to the attribute to be screened, and determine the resource to be checked in the virtual scene according to the obtained matching result; the plurality of resources to be checked are used for being checked whether the abnormal resources are included.
In some embodiments, the number of inspection policies comprises a plurality; the resource processing device 455 in the virtual scene further comprises a traversal module for: traversing a plurality of inspection strategies; the traversed inspection strategy is used for determining to-be-inspected resources in the virtual scene; and when the number of the resources to be checked, which is determined according to the traversed checking strategy, is zero, continuing traversing the next checking strategy.
In some embodiments, the matching module 4553 is further configured to: the following processing is performed for each resource in the virtual scene: when the matching result of the resource corresponding to the attribute to be screened is successful, taking the resource as the resource to be checked; and when the matching result of the resource corresponding to the attribute to be screened is matching failure, ignoring the resource.
In some embodiments, the policy setting operation includes a opt-in operation and a condition setting operation; the obtaining module 4551 is further configured to: presenting a plurality of attributes in a resource handling interface; responding to the selection operation aiming at the multiple attributes, and taking the name of the selected attribute as the name of the attribute to be checked; in response to the condition setting operation for the attribute to be inspected, an attribute value condition set for the attribute to be inspected is acquired.
In some embodiments, the obtaining module 4551 is further configured to: presenting a plurality of screening conditions in a resource processing interface; wherein, the screening condition comprises at least one of a resource type and a module to which the resource belongs; the virtual scene comprises a plurality of modules, and each module comprises a plurality of resources; and responding to the selection operation aiming at the various screening conditions, and presenting various attributes of the resources successfully matched with the selected screening conditions.
In some embodiments, the mapping module 4552 is further configured to: and mapping the attribute to be checked of the resource which is positioned in the virtual scene and successfully matched with the selected screening condition into an adjustable object according to the name of the attribute to be checked.
In some embodiments, the matching module 4553 is further configured to: the following processing is performed for each resource in the virtual scene: when the matching result of the resource corresponding to the attribute to be checked is successful, ignoring the resource; and when the matching result of the resource corresponding to the attribute to be checked is matching failure, taking the resource as an abnormal resource.
In some embodiments, the update module 4554 is further configured to: determining the difference degree between the attribute value of the attribute to be checked corresponding to the abnormal resource and the attribute value condition corresponding to the attribute to be checked; determining a risk level corresponding to the abnormal resource according to the difference degree; and presenting a plurality of abnormal resources in the resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different.
In some embodiments, the update module 4554 is further configured to: presenting abnormal resources and abnormal repair options of the abnormal resources in a resource processing interface; and responding to the trigger operation aiming at the abnormal repairing option, and updating the attribute value of the attribute to be detected corresponding to the abnormal resource so as to enable the updated attribute value to be successfully matched with the attribute value condition corresponding to the attribute to be detected.
In some embodiments, the number of inspection strategies includes a plurality, and each inspection strategy corresponds to a risk level; the resource processing device 455 in the virtual scene further comprises a traversal module for: traversing a plurality of inspection strategies; the traversed checking strategy is used for determining abnormal resources in the virtual scene; an update module 4554, further configured to: presenting a plurality of abnormal resources in a resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different; and the risk level corresponding to the abnormal resource is the risk level corresponding to the checking strategy for determining the abnormal resource.
In some embodiments, the resource processing device 455 in the virtual scene further comprises an attribute multiplexing module for: in response to an attribute multiplexing operation for any resource type in the virtual scene, multiplexing the attribute of the parent resource into the child resource; the parent resource is a resource successfully matched with any one resource type in the virtual scene; the child resource is a resource different from the parent resource in the virtual scene.
In some embodiments, the resource handling device 455 in the virtual scenario further comprises a policy multiplexing module for: and responding to the strategy multiplexing operation aiming at any attribute in the virtual scene, replacing the name of the attribute to be checked in the checking strategy with the name of any attribute, and taking the attribute value condition corresponding to the attribute to be checked as the attribute value condition of any attribute to obtain a new checking strategy.
In some embodiments, the mapping module 4552 is further configured to: acquiring white list resources in a virtual scene; and mapping the attribute to be checked of the resource which is positioned in the virtual scene and is different from the white list resource into an adjustable object according to the name of the attribute to be checked.
In some embodiments, the update module 4554 is further configured to: and presenting the abnormal resources and the resources which are different from the abnormal resources in the virtual scene in the resource processing interface, wherein the presenting mode of the abnormal resources is different from that of the resources which are different from the abnormal resources.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the resource processing method in the virtual scenario described in this embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions, which when executed by a processor, will cause the processor to perform the method provided by embodiments of the present application, for example, the resource processing method in a virtual scene as shown in fig. 5A, 5B, 5C, and 5D.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (18)

1. A method for processing resources in a virtual scene, the method comprising:
responding to the strategy setting operation received in the resource processing interface, and acquiring an inspection strategy set for the virtual scene; the checking strategy comprises the name of an attribute to be checked and an attribute value condition corresponding to the attribute to be checked;
mapping the attribute to be checked of the resource in the virtual scene into an adjustable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by adjusting the adjustable object corresponding to the attribute to be checked;
matching the attribute value of the resource corresponding to the attribute to be detected with the attribute value condition corresponding to the attribute to be detected, and determining abnormal resources in the virtual scene according to the obtained matching result;
and updating the resource processing interface according to the abnormal resource.
2. The method according to claim 1, wherein the inspection policy further includes a name of the attribute to be screened and an attribute value condition corresponding to the attribute to be screened;
before mapping the attribute to be checked of the resource in the virtual scene to the object that can be called according to the name of the attribute to be checked, the method further includes:
mapping the attribute to be screened of the resource in the virtual scene into an invokable object according to the name of the attribute to be screened, and obtaining an attribute value of the resource corresponding to the attribute to be screened by calling the invokable object corresponding to the attribute to be screened;
matching the attribute value of the resource corresponding to the attribute to be screened with the attribute value condition corresponding to the attribute to be screened, and determining the resource to be checked in the virtual scene according to the obtained matching result;
wherein, a plurality of the resources to be checked are used for being checked whether the resources to be checked comprise abnormal resources.
3. The method of claim 2, wherein the number of inspection strategies comprises a plurality; after the obtaining of the inspection policy set for the virtual scene, the method further includes:
traversing a plurality of the inspection strategies; the traversed inspection strategy is used for determining to-be-inspected resources in the virtual scene;
after determining the resource to be inspected in the virtual scene according to the obtained matching result, the method further comprises:
and when the quantity of the resources to be checked, which is determined according to the traversed checking strategy, is zero, continuing traversing the next checking strategy.
4. The method of claim 2, wherein determining the resource to be inspected in the virtual scene according to the obtained matching result comprises:
performing the following for each resource in the virtual scene:
when the matching result of the resource corresponding to the attribute to be screened is successful, taking the resource as the resource to be checked;
and when the matching result of the resource corresponding to the attribute to be screened is matching failure, ignoring the resource.
5. The method of claim 1, wherein the policy setting operation comprises a opt-in operation and a condition setting operation;
the acquiring an inspection policy set for a virtual scene in response to a policy setting operation received in a resource processing interface includes:
presenting a plurality of attributes in the resource handling interface;
responding to the selection operation aiming at the multiple attributes, and taking the name of the selected attribute as the name of the attribute to be checked;
and responding to the condition setting operation aiming at the attribute to be checked, and acquiring the attribute value condition set aiming at the attribute to be checked.
6. The method of claim 5, wherein presenting a plurality of attributes in the resource handling interface comprises:
presenting a plurality of screening conditions in the resource processing interface;
wherein, the screening condition comprises at least one of a resource type and a module to which the resource belongs; the virtual scene comprises a plurality of modules, and each module comprises a plurality of resources;
and responding to the selected operation aiming at the various screening conditions, and presenting various attributes of the resources successfully matched with the selected screening conditions.
7. The method according to claim 6, wherein said mapping said attribute to be checked of said resource in said virtual scene to a callable object according to the name of said attribute to be checked comprises:
and mapping the attribute to be checked of the resource which is positioned in the virtual scene and successfully matched with the selected screening condition into an adjustable object according to the name of the attribute to be checked.
8. The method according to any one of claims 1 to 7, wherein the determining the abnormal resource in the virtual scene according to the obtained matching result comprises:
performing the following for each resource in the virtual scene:
when the matching result of the resource corresponding to the attribute to be checked is successful, ignoring the resource;
and when the matching result of the resource corresponding to the attribute to be checked is matching failure, taking the resource as abnormal resource.
9. The method of claim 8, wherein said updating the resource handling interface based on the exception resource comprises:
determining the difference degree between the attribute value of the abnormal resource corresponding to the attribute to be detected and the attribute value condition corresponding to the attribute to be detected;
determining a risk level corresponding to the abnormal resource according to the difference degree;
and presenting a plurality of abnormal resources in the resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different.
10. The method of claim 8, wherein said updating the resource handling interface based on the exception resource comprises:
presenting the abnormal resource and an abnormal repair option of the abnormal resource in the resource processing interface;
and responding to the trigger operation aiming at the exception recovery option, and updating the attribute value of the exception resource corresponding to the attribute to be detected so as to enable the updated attribute value to be successfully matched with the attribute value condition corresponding to the attribute to be detected.
11. The method according to any one of claims 1 to 7, wherein the number of said inspection strategies includes a plurality, and each of said inspection strategies corresponds to a risk level;
after the obtaining of the inspection policy set for the virtual scene, the method further includes:
traversing a plurality of the inspection strategies; wherein the traversed checking strategy is used for determining abnormal resources in the virtual scene;
the updating the resource processing interface according to the abnormal resource comprises:
presenting a plurality of abnormal resources in the resource processing interface, wherein the presenting modes of the abnormal resources corresponding to different risk levels are different;
and the risk level corresponding to the abnormal resource is a risk level corresponding to an inspection strategy for determining the abnormal resource.
12. The method according to any one of claims 1 to 7, wherein before mapping the attribute to be checked of the resource in the virtual scene to a callable object according to the name of the attribute to be checked, the method further comprises:
in response to an attribute multiplexing operation aiming at any resource type in the virtual scene, multiplexing the attribute of the parent resource into the child resource;
the parent resource is a resource successfully matched with the any one resource type in the virtual scene; the child resource is a resource different from the parent resource in the virtual scene.
13. The method according to any one of claims 1 to 7, wherein after acquiring the inspection policy set for the virtual scene, the method further comprises:
in response to the policy multiplexing operation aiming at any attribute in the virtual scene, replacing the name of the attribute to be checked in the checking policy with the name of the any attribute, and
and taking the attribute value condition corresponding to the attribute to be inspected as the attribute value condition of any one attribute to obtain a new inspection strategy.
14. The method according to any one of claims 1 to 7, wherein said mapping said attribute to be checked of said resource in said virtual scene to a callable object according to the name of said attribute to be checked comprises:
acquiring white list resources in the virtual scene;
and mapping the attribute to be checked of the resources which are positioned in the virtual scene and are different from the white list resources into an object which can be called according to the name of the attribute to be checked.
15. The method of any of claims 1 to 7, wherein said updating said resource handling interface in accordance with said exception resource comprises:
and presenting the abnormal resources and the resources which are different from the abnormal resources in the virtual scene in the resource processing interface, wherein the presenting mode of the abnormal resources is different from that of the resources which are different from the abnormal resources.
16. An apparatus for processing resources in a virtual scene, the apparatus comprising:
the acquisition module is used for responding to the strategy setting operation received in the resource processing interface and acquiring the inspection strategy set aiming at the virtual scene; the checking strategy comprises the name of an attribute to be checked and an attribute value condition corresponding to the attribute to be checked;
the mapping module is used for mapping the attribute to be checked of the resource in the virtual scene into an adjustable object according to the name of the attribute to be checked, and obtaining an attribute value of the resource corresponding to the attribute to be checked by adjusting the adjustable object corresponding to the attribute to be checked;
the matching module is used for matching the attribute value of the resource corresponding to the attribute to be detected with the attribute value condition corresponding to the attribute to be detected and determining abnormal resources in the virtual scene according to the obtained matching result;
and the updating module is used for updating the resource processing interface according to the abnormal resource.
17. An electronic device, comprising:
a memory for storing executable instructions;
a processor, configured to implement the resource processing method in the virtual scenario of any one of claims 1 to 15 when executing the executable instructions stored in the memory.
18. A computer-readable storage medium storing executable instructions for implementing the method of processing resources in a virtual scenario according to any one of claims 1 to 15 when executed by a processor.
CN202110170979.7A 2021-02-08 2021-02-08 Resource processing method and device in virtual scene and electronic equipment Active CN112783660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110170979.7A CN112783660B (en) 2021-02-08 2021-02-08 Resource processing method and device in virtual scene and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110170979.7A CN112783660B (en) 2021-02-08 2021-02-08 Resource processing method and device in virtual scene and electronic equipment

Publications (2)

Publication Number Publication Date
CN112783660A true CN112783660A (en) 2021-05-11
CN112783660B CN112783660B (en) 2024-05-07

Family

ID=75761251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110170979.7A Active CN112783660B (en) 2021-02-08 2021-02-08 Resource processing method and device in virtual scene and electronic equipment

Country Status (1)

Country Link
CN (1) CN112783660B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113191124A (en) * 2021-05-20 2021-07-30 上海曼恒数字技术股份有限公司 Runtime editing method and system based on 3D engine
CN114356712A (en) * 2022-01-04 2022-04-15 腾讯科技(成都)有限公司 Data processing method, device, equipment, readable storage medium and program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572450A (en) * 2014-12-25 2015-04-29 广东欧珀移动通信有限公司 Method and device for detecting resource allocation
CN104572454A (en) * 2014-12-25 2015-04-29 广东欧珀移动通信有限公司 Method and device for positioning resource
US20180189568A1 (en) * 2016-12-29 2018-07-05 Magic Leap, Inc. Automatic control of wearable display device based on external conditions
CN109544267A (en) * 2018-10-19 2019-03-29 中国平安人寿保险股份有限公司 Resource acquiring method, device, computer equipment and storage medium
CN110837420A (en) * 2019-11-12 2020-02-25 Oppo广东移动通信有限公司 Resource scheduling method, device, terminal and storage medium
CN112199093A (en) * 2020-10-15 2021-01-08 腾讯科技(深圳)有限公司 Resource checking method, device, equipment and computer readable storage medium
US20210019346A1 (en) * 2018-08-31 2021-01-21 Tencent Technology (Shenzhen) Company Limited Audio playing method and apparatus, and storage medium thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572450A (en) * 2014-12-25 2015-04-29 广东欧珀移动通信有限公司 Method and device for detecting resource allocation
CN104572454A (en) * 2014-12-25 2015-04-29 广东欧珀移动通信有限公司 Method and device for positioning resource
US20180189568A1 (en) * 2016-12-29 2018-07-05 Magic Leap, Inc. Automatic control of wearable display device based on external conditions
US20210019346A1 (en) * 2018-08-31 2021-01-21 Tencent Technology (Shenzhen) Company Limited Audio playing method and apparatus, and storage medium thereof
CN109544267A (en) * 2018-10-19 2019-03-29 中国平安人寿保险股份有限公司 Resource acquiring method, device, computer equipment and storage medium
CN110837420A (en) * 2019-11-12 2020-02-25 Oppo广东移动通信有限公司 Resource scheduling method, device, terminal and storage medium
CN112199093A (en) * 2020-10-15 2021-01-08 腾讯科技(深圳)有限公司 Resource checking method, device, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113191124A (en) * 2021-05-20 2021-07-30 上海曼恒数字技术股份有限公司 Runtime editing method and system based on 3D engine
CN114356712A (en) * 2022-01-04 2022-04-15 腾讯科技(成都)有限公司 Data processing method, device, equipment, readable storage medium and program product

Also Published As

Publication number Publication date
CN112783660B (en) 2024-05-07

Similar Documents

Publication Publication Date Title
CN105511873B (en) User interface control display method and device
CN101553771B (en) Rendering hypertext markup language content
CN112691381B (en) Rendering method, device and equipment of virtual scene and computer readable storage medium
CN112783660B (en) Resource processing method and device in virtual scene and electronic equipment
CN112068923B (en) Interface updating method and device
CN113868126A (en) Application debugging method, device and storage medium of equipment
CN114494024B (en) Image rendering method, device and equipment and storage medium
CN111857878B (en) Skeleton screen page generation method and device, electronic equipment and storage medium
CN113018870A (en) Data processing method and device and computer readable storage medium
CN112162672A (en) Information flow display processing method and device, electronic equipment and storage medium
CN111736884A (en) Componentization method and system
CN110069725A (en) Visualize embedded browser method and apparatus
CN112783494A (en) Automatic skeleton screen generation method and device and application page updating method and device
CN113971191A (en) Data import method and device and computer readable storage medium
CN112717416B (en) Resource processing method and device in virtual scene and electronic equipment
CN113192173B (en) Image processing method and device of three-dimensional scene and electronic equipment
CN114327709A (en) Control page generation method and device, intelligent device and storage medium
CN114065076A (en) Unity-based visualization method, system, device and storage medium
CN112068895A (en) Code configuration method and device, video playing equipment and storage medium
US20240033625A1 (en) Rendering method and apparatus for virtual scene, electronic device, computer-readable storage medium, and computer program product
CN112307378B (en) Network view display method
CN113157455B (en) Memory management method, memory management device, electronic equipment and computer readable storage medium
CN114327176B (en) Page element query method and device, electronic equipment and storage medium
CN114288666A (en) Game element detection method, device, equipment and storage medium
CN117075955A (en) Data processing method, apparatus, device, readable storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40043479

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant