CN112717416A - 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 PDFInfo
- Publication number
- CN112717416A CN112717416A CN202110086734.6A CN202110086734A CN112717416A CN 112717416 A CN112717416 A CN 112717416A CN 202110086734 A CN202110086734 A CN 202110086734A CN 112717416 A CN112717416 A CN 112717416A
- Authority
- CN
- China
- Prior art keywords
- resource
- resources
- virtual scene
- abnormal
- processing
- 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
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- General Business, Economics & Management (AREA)
- Debugging And Monitoring (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 a resource screening strategy, an attribute screening strategy and an exception analysis strategy which are set aiming at the virtual scene; screening out resources to be inspected from a plurality of resources included in the virtual scene according to a resource screening strategy, and screening out attributes to be inspected from a plurality of attributes of the resources to be inspected according to an attribute screening strategy; loading a resource to be inspected through a virtual scene engine of a virtual scene, and performing anomaly analysis processing on the attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis strategy so as to determine an anomaly resource in the resource to be inspected; and updating the resource processing interface according to the abnormal resource. By the method and the device, the resource efficiency of the virtual scene can be improved conveniently, and therefore the actual utilization rate of computing resources consumed by the electronic equipment in outputting the virtual scene is improved.
Description
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.
Often, a virtual scene includes multiple resources, for example, a game virtual scene includes image resources corresponding to characters, buildings, and plants, respectively. In the development and application process of the virtual scene, some resources included in the virtual scene may become abnormal resources due to reasons such as incorrect setting or untimely update of related personnel, that is, the efficiency of the resources in the virtual scene is low, and further, part of computing resources consumed by the electronic device when outputting the virtual scene is meaningfully wasted.
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 accurately and effectively determine abnormal resources in the virtual scene, and are convenient for improving the effective rate of resources in the virtual scene, so that the actual utilization rate of computing resources consumed by the electronic device in outputting the virtual scene is improved.
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 a resource screening strategy, an attribute screening strategy and an exception analysis strategy which are set aiming at the virtual scene;
screening out resources to be inspected from a plurality of resources included in the virtual scene according to the resource screening strategy, and screening out attributes to be inspected from a plurality of attributes of the resources to be inspected according to the attribute screening strategy;
loading the resource to be inspected through a virtual scene engine of the virtual scene, and performing anomaly analysis processing on the attribute to be inspected of the loaded resource to be inspected according to the anomaly analysis strategy so as to determine an abnormal resource in the resource to be inspected;
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 a resource screening strategy, an attribute screening strategy and an exception analysis strategy which are set aiming at the virtual scene;
the screening module is used for screening the resources to be inspected from the multiple resources in the virtual scene according to the resource screening strategy and screening the attributes to be inspected from the multiple attributes of the resources to be inspected according to the attribute screening strategy;
the anomaly analysis module is used for loading the resource to be detected through a virtual scene engine of the virtual scene and carrying out anomaly analysis processing on the attribute to be detected of the loaded resource to be detected according to the anomaly analysis strategy so as to determine the anomalous resource in the resource to be detected;
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:
and screening out the resources to be inspected in the virtual scene according to the resource screening strategy, and screening out the attributes to be inspected from the multiple attributes according to the attribute screening strategy. And then loading the resource to be inspected through a virtual scene engine, and performing anomaly analysis processing on the attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis strategy to obtain the anomaly resource in the resource to be inspected. Therefore, after the resource processing interface is updated according to the abnormal resources, relevant personnel can be reminded to repair the abnormal resources, the effective rate of the resources in the virtual scene is convenient to improve, and the actual utilization rate of the computing resources consumed by the electronic equipment when the virtual scene is output is further improved.
Drawings
Fig. 1 is a schematic architecture diagram of a resource processing system in a virtual scene according to an embodiment of the present disclosure;
fig. 2 is a schematic architecture diagram of a terminal device provided in an embodiment of the present application;
fig. 3 is a schematic architecture diagram of a virtual scene engine provided in an embodiment of the present application;
fig. 4A is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 4B is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 4C is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
fig. 4D is a schematic flowchart of a resource processing method in a virtual scene according to an embodiment of the present application;
FIG. 5 is a flow diagram of resource processing provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of an engine interface provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a Web interface provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of resource processing based on pipeline control principle according to an embodiment of the present application;
fig. 9 is a schematic architecture diagram of a resource processing system according to 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.
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.
In the embodiment of the present application, an item of a virtual scene may include two parts, namely, a virtual scene engine (such as a game engine) and a resource, where the virtual scene engine is a set of codes (instructions) designed for an electronic device outputting the virtual scene and capable of being recognized by the electronic device, and is used for controlling how (resources in) the virtual scene are output; the resource is content that needs to be output, the virtual scene often includes a plurality of resources, and the embodiment of the present application does not limit the type of the resource in the virtual scene, and may include at least one of an image, a sound, and a video, for example. It should be noted that the resources in the virtual scene generally refer to static resources, and the computing resources consumed by the electronic device when outputting the virtual scene generally include Central Processing Unit (CPU) resources, memory resources, hard disk resources, network resources, and the like.
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 processing interface: the system is used for receiving the related strategies set for the virtual scene and presenting abnormal resources to remind related 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 an interface provided by an Editor (Editor) in the virtual scene engine. In the embodiment of the present application, the two types of resource processing interfaces may be used either selectively or in combination.
4) The attributes are as follows: refers to the intrinsic property that a resource has for describing the resource, and a resource often has multiple attributes. The type of the attribute is not limited in the embodiment of the present application, for example, for an image resource, the attribute may include height, format, and the like.
5) Strategy: also called as a rule, the electronic device may analyze the policy according to the set logic and perform a corresponding operation to implement a corresponding function, for example, the electronic device may perform a resource screening operation according to the resource screening policy to implement a resource screening function. The policy may be set manually by a relevant person or automatically by Artificial Intelligence (AI). The embodiment of the present application does not limit the specific form of the policy, for example, the policy may be a code form directly recognized and executed by the electronic device, or may also be a text form easily set by a relevant person, for example, the resource screening policy may include names of a plurality of resources to be inspected, and the electronic device may screen out, from among a plurality of resources included in the virtual scene, a resource whose name is the same as the name in the resource screening policy, so as to serve as the resource to be inspected.
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 accurately and effectively determine abnormal resources in the virtual scene, and are convenient for improving the effective rate of resources in the virtual scene, so that the actual utilization rate of computing resources consumed by the electronic device in outputting the virtual scene is improved. 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. 1, fig. 1 is an architectural diagram of a resource processing system 100 in a virtual scenario provided in this embodiment, 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 both.
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. 1, the terminal device 400 runs the client 410, and the client 410 presents the resource handling interface 500 during running. The client 410 responds to the policy setting operation received in the resource processing interface 500 to obtain a resource screening policy, an attribute screening policy, and an exception analysis policy set for the virtual scene, where the policies may be manually set by related personnel (i.e., users), or may be automatically set by invoking AI when the client 410 receives the policy setting operation.
Then, the client 410 screens out the resource to be checked from the plurality of resources included in the virtual scene according to the resource screening policy, and screens out the attribute to be checked from the plurality of attributes of the resource to be checked according to the attribute screening policy. The client 410 loads the resource to be inspected through a virtual scene engine of the virtual scene, and performs anomaly analysis processing on the attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis strategy to determine an abnormal resource in the resource to be inspected. Finally, the client 410 updates the resource handling interface 500 according to the exception resource, and as shown in fig. 1, 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 also perform automatic repair on the abnormal resource according to the abnormal analysis policy. 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 obtains a resource screening policy, an attribute screening policy, and an anomaly analysis 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 resource screening policy, the attribute screening policy, and the exception analysis policy to the server 200, so that the server 200 performs related processing on the multiple resources in the virtual scene according to the obtained policies to determine the exception resources in the multiple resources. The server 200 may send the determined abnormal resource (e.g., the resource information of the abnormal resource) to the client 410 to update the resource processing 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; alternatively, the server 200 may automatically repair the abnormal resource according to the abnormal analysis policy.
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 service for resource processing, and 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. 2 may be default. Referring to fig. 2, fig. 2 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. 2 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. 2.
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. 2 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 acquisition module 4551, a screening module 4552, an anomaly analysis module 4553 and an update module 4554, which are logical and thus can be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be explained below.
Referring to fig. 3, fig. 3 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 images, 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. 2 calling the relevant component of the game engine shown in fig. 3, and is described as an example below.
For example, the obtaining module 4551 is configured to invoke a user interface component in the game engine to obtain a resource screening policy, an attribute screening policy, and an exception analysis policy set for a virtual scene in a user interface, where the user interface may be provided by an editor in the game engine; the screening module 4552 is configured to invoke a bottom-layer algorithm component in the game engine, to screen out a resource to be inspected according to a resource screening policy, and to screen out an attribute to be inspected according to an attribute screening policy; the anomaly analysis module 4553 is configured to invoke an editor component in the game engine to load a resource to be inspected, and perform anomaly analysis processing on an attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis policy; 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. 4A, fig. 4A 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. 4A.
In step 101, in response to a policy setting operation received in a resource processing interface, a resource screening policy, an attribute screening policy, and an exception analysis policy set for a virtual scene are acquired.
Often, a virtual scene includes a plurality of resources, for example, a game virtual scene includes a plurality of resources corresponding to virtual characters, virtual items, and special effects, respectively, wherein the types of the resources include, but are not limited to, images, audio, and video. Resources included in the virtual scene often include abnormal resources which do not meet requirements, and reasons for generating the abnormal resources are various, for example, related personnel (such as developers, artists, and the like) introduce wrong resources into the virtual scene, and for example, 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, a resource screening policy, an attribute screening policy and an exception analysis policy set for a virtual scene are 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 an engine interface of the virtual scene engine, such as an interface provided by an editor of the virtual scene engine.
It should be noted that the obtained policy includes content resolvable by the electronic device, and the electronic device may perform corresponding operations according to the policy, thereby implementing corresponding functions. Therein, the relevant logic for resolving the policy may be pre-deployed in the electronic device, for example, pre-storing the code (e.g., script) for resolving the policy. In some embodiments, the obtained policy may also be in a code form, and the electronic device may directly execute the obtained policy to implement a corresponding function.
In step 102, a resource to be inspected is screened from a plurality of resources included in the virtual scene according to the resource screening policy, and an attribute to be inspected is screened from a plurality of attributes of the resource to be inspected according to the attribute screening policy.
Here, the resource screening policy is used to screen the resource to be inspected from the multiple resources included in the virtual scene, for example, the resource screening policy may include setting names (or other setting resource information) of the multiple resources to be inspected, and the electronic device uses, as the resource to be inspected, the resource with the same name as the setting name in the resource screening policy from the multiple resources included in the virtual scene, so as to implement resource screening. Of course, the above is merely an example, and the manner of performing resource screening according to the resource screening policy is not limited thereto. In addition, the number of screened resources to be checked is not limited, and may be at least one, for example.
After the resource to be inspected is obtained, the attribute to be inspected is screened from the multiple attributes of the resource to be inspected according to an attribute screening strategy, for example, the attribute screening strategy may include setting names of a plurality of attributes to be inspected, and the electronic device uses, as the attribute to be inspected, the attribute having the same name as the setting name in the attribute screening strategy among the multiple attributes of each resource to be inspected, so as to implement attribute screening. The type of the attribute is not limited, for example, the attribute of the resource of the image type may include image size, file format, resolution, saturation, brightness, color channel, and the like; the attributes of the audio type resources may include duration, file format, sampling frequency, sound channel (e.g., mono or stereo), bit rate, etc.; the attributes of the resources of the video type may include duration, file format, frame rate, resolution, bitrate, and the like. The type of the selected attribute to be inspected is not limited, and may be at least one, for example.
It is worth to be noted that, for different determined resources to be inspected, the same attribute screening strategy can be applied to determine the attributes to be inspected, and different attribute screening strategies can be applied to perform differentiated attribute screening due to the difference of the attributes of the resources of different types. In other words, the resource screening policy and the attribute screening policy may be in a one-to-one relationship; the method can be a many-to-one relationship, namely, aiming at the resources to be inspected which are screened out by different resource screening strategies, the attributes to be inspected are screened out by a uniform attribute screening strategy; the method can also be a one-to-many relationship, namely, aiming at different resources to be detected screened by the same resource screening strategy, the attributes to be detected are screened by different attribute screening strategies. The relationship between the resource screening strategy and the attribute screening strategy can be specifically set according to the requirements in the actual application scene.
In step 103, a resource to be inspected is loaded through a virtual scene engine of the virtual scene, and an anomaly analysis processing is performed on the attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis strategy, so as to determine an anomaly resource in the resource to be inspected.
After determining the resource to be inspected and the attribute to be inspected, loading the resource to be inspected through a virtual scene engine, and further loading the attribute to be inspected of the resource to be inspected so as to obtain related information of the attribute to be inspected, such as an attribute value. When the resource to be checked is loaded, the resource to be checked may be loaded into the memory through an editor of the virtual scene engine, which of course does not constitute a limitation on the loading manner.
And then, performing exception analysis processing on the attribute to be checked of the loaded resource to be checked according to an exception analysis strategy, for example, performing exception analysis processing on an attribute value of the attribute to be checked to obtain a result of whether the resource to be checked is an exception resource. Therefore, the abnormal resources can be determined in all the resources to be checked. The content of the anomaly analysis policy is not limited in the embodiment of the present application, and may include, for example, a set value range for an attribute to be inspected, which will be further described later.
In some embodiments, before step 103, further comprising: performing at least one of: applying a loading strategy corresponding to an engine version of a virtual scene engine of a target virtual scene in loading strategies corresponding to the engine versions respectively; applying a loading strategy corresponding to a target virtual scene in loading strategies corresponding to the plurality of virtual scenes respectively; the target virtual scene is a virtual scene of abnormal resources to be determined; the loading strategy is used for loading at least one of the resource to be checked and the attribute to be checked.
Here, for the same resource to be checked, different loading manners of the resource to be checked in different engine versions may be inconsistent due to different characteristics of different engine versions of the virtual scene engine, for example, a function name called for loading the resource to be checked is inconsistent, and for example, code logic for loading the resource to be checked is inconsistent; even if the virtual scene engines of the same engine version are applied, related personnel of different virtual scenes may perform targeted optimization on the used virtual scene engines, so that loading modes of resources to be checked in different virtual scenes are inconsistent. The same applies to the attribute to be checked, that is, as the engine version of the virtual scene engine changes or the virtual scene changes, the loading mode of the attribute to be checked may change accordingly.
In view of this, in the embodiment of the present application, loading policies corresponding to a plurality of engine versions may be obtained, where a loading object of a loading policy includes at least one of a resource to be inspected and an attribute to be inspected; the loading policy may be in a code form or other forms, and the electronic device may perform a corresponding loading operation according to the loading policy. In order to facilitate the distinction, the virtual scene of the abnormal resource to be determined is named as a target virtual scene, and after the resource to be checked and the attribute to be checked are screened out, a loading strategy corresponding to the engine version of the virtual scene engine of the target virtual scene can be applied to load the loading object.
On the bottom implementation, the loading policies corresponding to the multiple engine versions may be stored in advance, for example, the loading policies are stored in the form of multiple macros, where each macro includes one loading policy, and different macros correspond to different engine versions, and the different loading policies are distinguished by macro isolation; the storage location may be a virtual scene engine of the target virtual scene, or may be local to the electronic device or a database. When a loading object in the target virtual scene needs to be loaded, the macro corresponding to the engine version of the virtual scene engine of the target virtual scene takes effect, and the purpose of applying the loading strategy corresponding to the engine version is achieved.
On the other hand, the loading policies corresponding to the plurality of virtual scenes may be acquired, and when a loading object in the target virtual scene needs to be loaded, the loading policy corresponding to the target virtual scene may be applied. On the underlying implementation, a plurality of macros may also be stored, where each macro includes a loading policy, and different macros correspond to different virtual scenes.
It should be noted that different engine versions may correspond to the same loading policy, for example, engine version 1 and engine version 2 correspond to the same loading policy, and engine version 3 corresponds to another loading policy, and similarly, different virtual scenes may also correspond to the same loading policy, depending on the actual situation. By the method, the compatibility of different engine versions and different virtual scenes can be improved, the success rate of loading the loaded object is improved, and effective resource processing is facilitated.
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 processing result presented in the resource processing interface may be the abnormal resource, where presenting the abnormal resource may refer to presenting identification information (i.e., information with identification), such as at least one of a name and a path, of the abnormal resource. Therefore, the updated resource processing interface can remind related personnel to repair abnormal resources, and resource waste caused by the fact that the electronic equipment outputs the virtual scene is avoided. In addition, the warning information including the processing result can be sent to the related personnel, for example, the warning information is sent in a short message or mail mode.
It should be noted that, since the resources in the virtual scene may change continuously (for example, undergo version iteration), steps 102 to 104 may be executed periodically, i.e., periodically, to perform real-time monitoring on the abnormal resources in the virtual scene.
In some embodiments, the number of the resource processing policies includes a plurality of, and different resource processing policies correspond to different resource processing functions; the resource processing strategy comprises a resource screening strategy, an attribute screening strategy and an anomaly analysis strategy; after step 101, the method further comprises: presenting a plurality of resource processing functions in a resource processing interface; and responding to a second selection operation aiming at the plurality of resource processing functions, and applying a resource processing strategy corresponding to the resource processing function selected by the second selection operation to determine abnormal resources in the virtual scene.
Here, the resource processing policy includes a resource screening policy, an attribute screening policy, and an exception analysis policy, in this embodiment of the application, multiple resource processing policies may exist at the same time, and different resource processing policies correspond to different resource processing functions, and may be specifically set according to actual situations. For example, the resource processing function may include an overproof check function, a full change function, and a reference loss function, wherein, in the resource processing policy corresponding to the overproof check function, the resource screening policy is used to screen out a part of resources in the virtual scene as resources to be checked, and the attribute screening policy is used to take all attributes of the resources to be checked as attributes to be checked; in the resource processing strategy corresponding to the full change function, the resource screening strategy is used for taking all resources in the virtual scene as the resources to be inspected, and the attribute screening strategy is used for taking all attributes of the resources to be inspected as the attributes to be inspected; in the resource processing strategy corresponding to the reference loss function, the resource screening strategy is used for screening out partial resources in the virtual scene to be used as resources to be checked, and the attribute screening strategy is used for taking the reference attribute of the resources to be checked as the attribute to be checked. The resource handling policies shown here are all examples and do not constitute a limitation to the embodiments of the present application.
For this case, a plurality of resource handling functions may be presented in the resource handling interface. When a selection operation (named as a second selection operation for convenience of distinguishing) for a plurality of resource processing functions is received, a resource processing strategy corresponding to the resource processing function selected by the second selection operation is applied to determine abnormal resources in the virtual scene. The selected resource processing function can be one or more, and when the selected resource processing function comprises a plurality of resource processing functions, the abnormal resource in the virtual scene is determined independently according to the resource processing strategies respectively corresponding to the selected resource processing functions. By the method, the flexibility of resource processing can be improved, and different requirements of related personnel can be met.
It should be noted that, in the embodiment of the present application, different resource processing functions may correspond to different forms of processing results. In step 104, a processing result corresponding to the selected resource processing function may be presented in the resource processing interface to update the resource processing interface, so that the pertinence to the selected resource processing function can be improved. The processing results corresponding to the different resource processing functions may all include the determined abnormal resource.
In some embodiments, updating the resource handling interface based on the exception resource as described above may be implemented in a manner that: determining overlapping abnormal resources between the abnormal resources in the latest version and the abnormal resources in the historical version of the virtual scene; and presenting the overlapped abnormal resources and the abnormal resources except the overlapped abnormal resources in the latest version in the resource processing interface, wherein the overlapped abnormal resources and the abnormal resources except the overlapped abnormal resources in the latest version are presented in different modes.
Here, an example of updating a resource handling interface is provided. Firstly, overlapping abnormal resources between abnormal resources in the latest version and abnormal resources in a historical version of the virtual scene are determined, wherein the historical version refers to any one of historical versions and can be selected by related personnel, and for example, the historical version can be the last version of the latest version. For example, if the latest version of the virtual scene includes exception resources 2, 3, and 5, and the historical version of the virtual scene includes exception resources 1, 2, and 4, then the overlapping exception resource is exception resource 2.
The processing result finally presented in the resource processing interface may include overlapping abnormal resources and abnormal resources in the latest version except the overlapping abnormal resources, and the overlapping abnormal resources are presented in a different manner from the abnormal resources in the latest version except the overlapping abnormal resources, where the different presentation manner may refer to different colors, different shapes, or different areas, which is not limited to this. The overlapped abnormal resources are abnormal resources left over by history, the abnormal resources except the overlapped abnormal resources in the latest version are abnormal resources newly generated in the latest version, and the two abnormal resources can be distinguished by presenting the abnormal resources in different presentation modes, so that related personnel can distinguish the abnormal resources conveniently, and for example, the related personnel can be guided to preferentially repair the overlapped abnormal resources. The example can be applied to a full change function to reflect different versions of abnormal resource change situations.
In some embodiments, when the property to be checked includes a reference property, the updating of the resource handling interface based on the exception resource described above may be implemented in such a way that: and presenting the abnormal resource and the resource referenced by the abnormal resource through the reference attribute in the resource processing interface to represent that the abnormal resource has reference loss for the referenced resource.
In the virtual scene, reference relations may exist among different resources, and in the case that the attribute to be checked includes a reference attribute, an example of updating the resource processing interface is provided, that is, a processing result presented in the resource processing interface includes an abnormal resource and a resource referenced by the abnormal resource through the reference attribute, so as to represent that the abnormal resource has reference loss for the referenced resource. In addition, the presented processing result may further include a reference attribute to characterize that the abnormal resource is reference lost through the reference attribute. The above example is applicable to the reference loss function, and can effectively reflect the relevant condition of reference loss, so that relevant personnel can repair the condition of reference loss, for example, re-reference the resource with abnormal resource reference loss.
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 except the abnormal resources in the resources to be detected in a resource processing interface, wherein the presenting mode of the abnormal resources is different from that of the resources except the abnormal resources in the resources to be detected.
Here, another example of updating the resource processing interface is provided, that is, the processing result presented in the resource processing interface includes an abnormal resource and a resource other than the abnormal resource in the resource to be checked, and the abnormal resource is presented in a different manner from the resource other than the abnormal resource in the resource to be checked, so that the abnormal resource condition and the normal resource condition in the virtual scene can be comprehensively represented. The above examples apply to both the superscalar check function and the full-scale-change function (as the processing results of different versions of a virtual scene are presented simultaneously so that the relevant personnel can clarify resource changes between different versions).
In some embodiments, after step 103, further comprising: and in the process of outputting the virtual scene, shielding abnormal resources in the virtual scene.
Here, after the abnormal resource is determined, the abnormal resource may be shielded, that is, only the resource except the abnormal resource in the virtual scene is output when the virtual scene is output, so that it is ensured that the computing resource consumed by the electronic device when the virtual scene is output is not wasted, and meanwhile, the adverse effect of the output abnormal resource on the human-computer interaction effect is also avoided. In addition, when the abnormal resources are repaired, the shielding of the abnormal resources can be removed, and the repaired abnormal resources can be sequentially output.
As shown in fig. 4A, in the embodiment of the application, in combination with the resource screening policy, the attribute screening policy, and the anomaly analysis policy, the abnormal resource in the virtual scene can be accurately and effectively determined, so that the resource efficiency of the virtual scene is conveniently improved, and the actual utilization rate of the computing resource consumed by the electronic device when outputting the virtual scene is improved.
In some embodiments, referring to fig. 4B, fig. 4B is a flowchart illustrating a resource processing method in a virtual scene according to an embodiment of the present application, and step 102 shown in fig. 4A may be implemented by steps 201 to 204, which will be described with reference to the steps.
In step 201, a plurality of resource modules are presented in a resource handling interface.
Here, the obtained resource screening policy includes resource matching policies respectively corresponding to a plurality of resource modules in the virtual scene, where each resource module includes a plurality of resources. For example, in a game virtual scene, a plurality of resource modules such as characters, weapons, monsters and the like can be divided, wherein the character resource module comprises a plurality of resources corresponding to characters, such as a plurality of image resources for constructing characters (virtual characters), and the weapon resource module is similar to the monster resource module. It is worth to be noted that a plurality of resource modules may be pre-divided in a virtual scene, or may be divided in a resource screening policy, which can improve the degree of freedom of resource processing.
In step 202, in response to the first selection operation on the plurality of resource modules, according to the resource matching policy corresponding to the resource module selected by the first selection operation, matching processing is performed on the plurality of resources included in the selected resource module, so as to obtain a matching processing result.
Here, when a selection operation (for convenience of distinguishing, named as a first selection operation) for a plurality of resource modules is received, a matching process result is obtained by performing a matching process on a plurality of resources included in the selected resource module according to a resource matching policy corresponding to the resource module selected by the first selection operation, where each resource included in the selected resource module corresponds to one matching process result. It is worth noting that the number of selected resource modules may be one or more.
In some embodiments, the matching process may be performed on a plurality of resources included in the selected resource module according to the resource matching policy corresponding to the resource module selected by the first selection operation, so as to obtain a matching process result: for each resource included in the selected resource module, performing the following processes: matching the resource information of the resource with the set resource information in the resource matching strategy corresponding to the selected resource module to obtain a matching result; the resource information comprises at least one of a path, a name and an attribute value of an attribute to be matched; the attribute to be matched is at least one of a plurality of attributes of the resource.
Here, an example of the matching process is provided. And aiming at each resource included in the selected resource module, matching the resource information of the resource with the set resource information in the resource matching strategy corresponding to the selected resource module to obtain a matching processing result. The resource information is information corresponding to the resource and used for performing the matching process, and may include at least one of a path, a name, and an attribute value of the attribute to be matched, for example, which will be described below.
1) Aiming at the condition that the resource information is a path, when the path of the resource comprises a set path in a resource matching strategy corresponding to the selected resource module, determining that the matching processing result is successful; otherwise, determining the matching processing result as matching failure. For example, the set path in the resource matching policy corresponding to the selected resource module is Assets/Models, the path of the resource is Assets/Models/roads, and the matching processing result of the resource is determined to be successful because the paths Assets/Models/roads include Assets/Models; also, if the path of the resource is Assets/Human, the matching processing result of the resource is determined to be a matching failure because the path Assets/Human does not include complete Assets/Models.
2) When the name of the resource is the same as the set name in the resource matching strategy corresponding to the selected resource module, determining that the matching processing result is successful; otherwise, determining the matching processing result as matching failure. It should be noted that the path and name can also be used as identification information of the resource.
3) When the attribute value of the attribute to be matched of the resource falls into a set value range of the attribute to be matched in the resource matching strategy corresponding to the selected resource module, determining that the matching processing result is successful; otherwise, determining the matching processing result as matching failure. In addition, the attribute to be matched in the resource matching strategy corresponding to the selected resource module may be a set value, and for the case, when the attribute value of the attribute to be matched of the resource is the same as the set value of the attribute to be matched in the resource matching strategy corresponding to the selected resource module, the matching processing result is determined to be successful; otherwise, determining the matching processing result as matching failure. The attribute to be matched is at least one of multiple attributes of the resource, and can be set according to actual conditions.
It should be noted that, for the case that the resource information includes at least two kinds, when the matching processing results corresponding to the resource on all kinds of resource information are both successfully matched, it is determined that the final matching processing result of the resource is successfully matched. For example, if the resource information includes both a path and a name, it is determined that the final matching result of the resource is successful only if the path of the resource includes a set path in the resource matching policy corresponding to the selected resource module and the name of the resource is the same as the set name in the resource matching policy corresponding to the selected resource module. By the method, the flexibility of matching processing can be improved, and the resource information to be matched can be adjusted according to actual conditions.
In some embodiments, before performing matching processing on a plurality of resources included in the selected resource module according to the resource matching policy corresponding to the resource module selected by the first selection operation, the method further includes: presenting a resource matching strategy corresponding to the selected resource module in a resource processing interface; and responding to the user-defined operation aiming at the resource matching strategy corresponding to the selected resource module, updating the resource matching strategy corresponding to the selected resource module according to the user-defined operation, and matching a plurality of resources included in the selected resource module according to the updated resource matching strategy.
After the resource matching policy corresponding to the selected resource module is obtained, the resource matching policy may also be presented in the resource processing interface, for example, the set resource information in the resource matching policy is presented. When a user-defined operation aiming at a resource matching strategy corresponding to a selected resource module is received, the resource matching strategy corresponding to the selected resource module is updated according to the user-defined operation, for example, set resource information in the resource matching strategy is updated, and then, a plurality of resources included in the selected resource module are matched according to the updated resource matching strategy. Similarly, the attribute screening strategy and the anomaly analysis strategy can be customized by presenting the strategy and receiving the customized operation, and in other cases, the resource screening strategy can be customized, so that the flexibility of resource processing can be improved, and the flexible adjustment can be realized at different stages of the resource processing.
In step 203, the resource whose matching processing result is successful is taken as the resource to be checked.
Here, each resource included in the selected resource module corresponds to one matching processing result, and the resource whose matching processing result is successful can be used as the resource to be checked, so that the resource screening is completed.
In step 204, the attributes to be inspected are screened from the multiple attributes of the resources to be inspected according to the attribute screening strategy.
As shown in fig. 4B, in the embodiment of the present application, a plurality of resource modules are presented first, and then resource screening is implemented in a manner of matching processing among a plurality of resources included in a selected resource module, so that accuracy of resource screening can be improved, and resource processing requirements of related personnel on different resource modules can be met.
In some embodiments, referring to fig. 4C, fig. 4C is a schematic flowchart of a resource processing method in a virtual scene provided in this application, and step 103 shown in fig. 4A may be implemented by steps 301 to 302, which will be described with reference to the steps.
In step 301, a resource to be inspected is loaded by a virtual scene engine of a virtual scene.
For example, the resource to be checked may be loaded into the memory through an editor of the virtual scene engine.
In step 302, for each loaded resource to be inspected, when the attribute value of the attribute to be inspected of the resource to be inspected fails to match the set value range, the resource to be inspected is taken as an abnormal resource.
For example, after the resource to be checked is successfully loaded into the memory, the attribute value of the attribute to be checked of the resource to be checked may be obtained. Here, the anomaly analysis policy includes a set value range (normal value range) for the attribute to be inspected, and when the acquired attribute value of the attribute to be inspected of the resource to be inspected falls within the set value range (i.e., matching is successful), the resource to be inspected is skipped; and when the attribute value of the attribute to be detected of the resource to be detected does not fall within the set value range (namely, matching fails), taking the resource to be detected as an abnormal resource.
For example, if the attribute to be checked is a reference attribute, the range of the set value for the reference attribute may be non-null. When the attribute value of the reference attribute of a certain resource to be checked is non-empty, skipping the resource to be checked, namely not carrying out subsequent processing on the resource to be checked; and when the attribute value of the reference attribute of a certain resource to be checked is null, the resource to be checked is proved to have reference loss, and the resource to be checked is taken as an abnormal resource.
In some embodiments, the anomaly analysis strategy includes a set value for the attribute to be inspected, for which case, when the attribute value of the attribute to be inspected of the resource to be inspected is the same as the set value (i.e., the matching is successful), the resource to be inspected is skipped; and when the attribute value of the attribute to be detected of the resource to be detected is different from the set value (namely, the matching fails), taking the resource to be detected as an abnormal resource.
In fig. 4C, step 104 shown in fig. 4A may be implemented by step 303, and/or by steps 304 to 305.
In step 303, presenting the abnormal resource and the abnormal repair option of the abnormal resource in the resource processing interface; and the abnormal recovery option is used for recovering the abnormal resource according to the set value range.
Here, an example of updating a resource handling interface is provided, namely presenting an exception resource in the resource handling interface, and an exception repair option for the exception resource. The abnormal repair option can be used for reminding relevant personnel to manually repair the abnormal resource or providing a function of automatically repairing the abnormal resource according to a set value range.
In some embodiments, after step 303, further comprising: and responding to the trigger operation aiming at the abnormal recovery option, and updating the attribute value of the attribute to be checked of the abnormal resource so as to successfully match the updated attribute value with the set value range.
Here, when a trigger operation for an exception recovery option is received, the attribute value of the attribute to be checked of the exception resource is updated, for example, the attribute value is updated to any value in the set value range, so that the updated attribute value is successfully matched with the set value range, and the recovery purpose is achieved. For the condition that the abnormal analysis strategy comprises a set value aiming at the attribute to be detected, the attribute value of the attribute to be detected of the abnormal resource can be directly updated to the set value. By the method, automatic repair can be realized, labor cost is saved, and the method is suitable for the condition that the attribute value of the attribute to be inspected supports automatic update (for example, the attribute to be inspected is the image size).
In step 304, determining the repair priority of the abnormal resource according to the difference degree between the attribute value of the attribute to be inspected of the abnormal resource and the set value range; wherein the repair priority is positively correlated with the degree of gap.
Here, another example of updating a resource handling interface is also provided. First, a difference degree between the attribute value of the attribute to be inspected of the abnormal resource and the set value range is determined, for example, the difference degree may be represented by an absolute value of a difference between the attribute value of the attribute to be inspected of the abnormal resource and a certain value (e.g., a minimum value or a maximum value) in the set value range. For the case that the abnormal analysis strategy comprises a set value aiming at the attribute to be detected, the difference degree can be directly expressed by the absolute value of the difference between the attribute value of the attribute to be detected of the abnormal resource and the set value.
And then, determining the repair priority of the abnormal resources according to the difference degree of the abnormal resources, wherein the repair priority is positively correlated with the difference degree, namely the larger the difference degree is, the higher the repair priority is.
In step 305, the exception resource, and the repair priority for the exception resource, are presented in a resource handling interface.
Here, the exception resource, and the repair priority for the exception resource, are presented in a resource handling interface. The higher the repair priority of the abnormal resource is, the more the abnormal resource is abnormal, so that related personnel can be reminded to pay more attention to the abnormal resource with the higher repair priority, for example, to perform preferential repair.
As shown in fig. 4C, the embodiment of the present application provides an example manner for determining an abnormal resource according to an abnormal analysis policy, so that the abnormal resource can be determined quickly and accurately; two example ways of updating the resource handling interface are also provided, which are applicable to two situations, automatic repair and manual repair, respectively.
In some embodiments, referring to fig. 4D, fig. 4D is a flowchart of a resource processing method in a virtual scene provided in this application, and step 103 shown in fig. 4A may be implemented through steps 401 to 402, which will be described with reference to the steps.
In step 401, a plurality of resource modules are traversed.
In this embodiment of the present application, when a plurality of resource modules of a virtual scene all include a resource to be checked, the resource modules may be used as units to sequentially load the resource to be checked in each resource module. First, a plurality of resource modules are traversed. Here, the order of the traversal processing is not limited, and may be set in advance, and in some cases, if the resource modules are selected by the first selection operation, the traversal processing may be performed on the resource modules according to the selected order of the resource modules.
In step 402, the to-be-inspected resource in the traversed resource module is loaded through the virtual scene engine, and the to-be-inspected attribute of the to-be-inspected resource in the loaded traversed resource module is subjected to exception analysis processing according to an exception analysis strategy to determine an exception resource.
For example, the to-be-inspected resource in the traversed resource module is loaded into the memory through an editor of the virtual scene engine, and the to-be-inspected attribute of the to-be-inspected resource is subjected to exception analysis processing according to an exception analysis strategy, so that the exception resource is determined in the to-be-inspected resource included in the traversed resource module.
In fig. 4D, after step 402, in step 403, for the traversed resource module, when the exception analysis processing is completed, the resource to be checked in the loaded traversed resource module is unloaded.
For example, when the analysis processing of the to-be-inspected attribute abnormality of the to-be-inspected resource loaded in step 402 is completed, in order to avoid that the memory occupation is too high due to too much resource loading, the to-be-inspected resource in the loaded traversed resource module is unloaded, and the next resource module is continuously traversed until the determination of the abnormal resource is completed for all the resource modules.
In some embodiments, the unloading of the resource to be checked in the loaded traversed resource module may be implemented in such a manner that: traversing a plurality of resources to be checked in the loaded traversed resource module, and executing the following processing aiming at the traversed resources to be checked: acquiring a traversed pointer of a resource to be checked; skipping the traversed resource to be checked when the pointer is empty; and when the pointer is not empty, unloading the traversed resource to be checked.
The embodiment of the application provides an example mode of unloading processing. Firstly, traversing processing is performed on a plurality of resources to be checked in a loaded traversed resource module, where the order of the traversing processing is not limited, and may be, for example, the order of the import time of the resources to be checked from early to late, where the import refers to adding to a virtual scene. And aiming at the traversed resource to be checked, acquiring a pointer of the traversed resource to be checked, wherein the pointer is an address of the traversed resource to be checked in the memory. When the pointer is empty, if the traversed resource to be inspected is unloaded, the virtual scene engine may be down, so that the traversed resource to be inspected is skipped, and the next resource to be inspected is continuously traversed; and when the pointer is not empty, unloading the traversed resource to be checked normally. By the method, the resources to be checked are judged and protected before unloading, and dangerous conditions such as downtime of the virtual scene engine are effectively avoided.
As shown in fig. 4D, in the embodiment of the present application, after the exception analysis processing is completed, the loaded resource to be checked is unloaded, so that the memory occupation can be effectively avoided from being too high, and the calculation burden of the electronic device is reduced.
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 case where the virtual scenario is a game virtual scenario and the virtual scenario engine is a game engine is exemplified. The game engine, such as a Unity game engine, where Unity is a cross-platform game engine, may be used to develop games running on Windows, MacOS, and Linux platforms, and may also be used to develop games running on iOS, Android, and other mobile platforms, and this, of course, does not constitute a limitation on the game engine.
The embodiment of the application can be accessed to a game developed by using a game engine, so that resources in a game virtual scene are processed. The processing result of the resource processing may be presented in an interface provided by an editor of the game engine or in a Web interface independent of the game engine. The embodiment of the present application provides a schematic diagram of resource processing as shown in fig. 5, and as shown in fig. 5, the resource processing functions include, but are not limited to, an out-of-compliance checking function, a full-volume change function, and a reference loss function, and the resource modules include, but are not limited to, scenes, roles, and weapons, and in addition, the Development and Operations (developers) platform in fig. 5 is used to provide a function of Daily Build (day Build), where Daily Build refers to timing Build (timing process). The resource processing flow can be divided into two flows according to different triggering methods, and the two flows are described below.
1) And (4) manually triggering. Relevant personnel (such as game developers or artists) can select a resource processing function in an editor of the game engine, and for the selected resource processing function, the game engine automatically acquires a module configuration item (corresponding to the resource screening policy) which is set in the Web interface and corresponds to the selected resource processing function, and further presents a plurality of resource modules defined by the module configuration item in the engine interface. The embodiment of the present application provides a schematic diagram of an engine interface as shown in fig. 6, and fig. 6 exemplarily shows that resource modules include an art level, a weapon 1P, a weapon 3P, a weapon UI, and a vehicle.
The game engine responds to the first selection operation aiming at the plurality of resource modules, and presents the check parameters (corresponding to the set resource information) corresponding to the resource module selected by the first selection operation in the engine interface. In fig. 6, the checking parameters are shown to include a checking module (i.e. the selected resource module), a search directory (i.e. the set path), a matching rule and a filtering rule, wherein the matching rule is a regular expression, and the search directory is also a matching rule for the directory in essence. In the process of screening the resources, the game engine firstly determines a plurality of resources successfully matched with the search directory, and then determines the resources successfully matched with the matching rule (namely, meeting the matching rule) from the resources to be used as the resources to be checked. In fig. 6, taking the matching rule as x 3P and prefab as an example, the successful matching of the resource and the matching rule means that the resource is the resource referenced by x 3P and prefab, wherein prefab is a resource type in the Unity game engine and is a reusable game object stored in the item view. FIG. 6 shows a filtering rule that is complementary to the matching rule and is used to further filter the resource that satisfies the matching rule, for example, for a resource that satisfies the matching rule, if the resource satisfies the filtering rule, the resource is filtered, i.e., the resource is not subsequently processed; and if the resource does not meet the filtering rule, taking the resource as the resource to be checked. In the case where the matching rule is sufficiently complete, the filtering rule may not be set.
In fig. 6, a custom option 61 and a custom option 62 are also shown, where the custom operation corresponding to the custom option 61 is used to further define the search directory to obtain the search subdirectory, and the custom operation corresponding to the custom option 62 is used to precisely define a certain resource or certain resources (i.e. the search subfile in fig. 6) as the resource to be checked.
When receiving a trigger operation (such as a click operation) for the trigger option 63, the game engine screens out a resource to be checked from a plurality of resources included in the game virtual scene, loads the resource to be checked, and performs exception analysis processing to determine an exception resource in the resource to be checked. After a series of processing is completed, the processing result is presented in the engine interface or sent to the Web platform to be presented in the Web interface of the Web platform. Fig. 6 shows the processing result presented in the engine interface, specifically including resources 1 to 17, and in order to facilitate the relevant personnel to know the relevant information of the resources, the names, paths, and attributes of the resources 1 to 17 are shown, where the attributes are such as number of faces, vertices, renderer, skeleton, and mesh.
FIG. 7 shows the processing results presented in the Web platform, including in particular the resources named Weapon _1, Weapon _2 … … Weapon _5, respectively, and for each resource, the attributes of the resource, including the map Ado format, the map iOS format, the map height, and whether or not there is an Alpha channel. The meaning of the module configuration items shown in fig. 7 is: the attribute value of the streamingTextureGroup attribute of a resource includes metallic, and the path of the resource includes Assets/Models/roads. The meaning of the rule configuration item (corresponding to the above anomaly analysis policy) is: the map height value for a resource is less than or equal to 256 pixels (or other units) and the map height value for a resource is equal to an exponent of 2. And if a certain resource meets the module configuration item, taking the resource as the resource to be checked. If a certain resource to be inspected does not meet the rule configuration item, determining that the attribute value of the resource to be inspected exceeds the standard, and taking the resource to be inspected as an abnormal resource (namely, the data exceeding the standard in fig. 7). It should be noted that, for different resources to be inspected, the same rule configuration item or different rule configuration items may be applied, and the setting may be performed according to the actual application scenario.
In fig. 7, a function of filtering the processing result by the resource module (i.e. only presenting the resource in the processing result that meets the specific resource module) and a function of filtering the processing result by the resource type (i.e. only presenting the resource in the processing result that meets the specific resource type) are shown, and a search function is also shown, which facilitates the relevant person to view a certain part of the processing result in a targeted manner, wherein the search function may be to search through the processing result by a path, a name or an attribute value. Besides, the processing results of different versions of the game virtual scene can be presented, so as to compare differences between different versions, for example, whether exception resources left in a historical version (such as the old version number 290754 in fig. 7) are still unresolved (repaired), whether new exception resources appear in a latest version (such as the new version number 291375 in fig. 7), and the like, wherein the different versions of the game virtual scene can be controlled by a version control system (Subversion).
It should be noted that the processing results shown in fig. 6 and 7 are merely examples, and do not limit the presentation manner of the processing results. For different resource processing functions, the finally presented processing results may be different, for example, the processing results of the superstandard check function include resources whose attribute values are superstandard, i.e., abnormal resources; the processing result of the full change function comprises full resources in different versions, namely all the resources to be checked; the processing result of the reference loss function includes the exception resource and the resource referenced by the exception resource.
In addition, the solution of resource processing provided by the embodiment of the present application may be implemented by an original game engine, or may be implemented by a plug-in added in the game engine, where the plug-in is a client tool shown in fig. 6.
2) And (4) automatic triggering. In the embodiment of the application, the calling authority for the relevant interface of the game engine can be deployed in the development operation and maintenance platform, so that in the running process of the development operation and maintenance platform, daily constructed resource processing can be realized by calling the game engine, namely, pipeline control is performed, and the development operation and maintenance platform sends the processing result to the Web platform. As an example, the embodiment of the present application provides a schematic diagram of pipeline control as shown in fig. 8, in step 1 of the pipeline, resource processing is triggered at regular time, for example, resource processing is performed every 1 day; in step 2 of the pipeline, the environment is built, the engineering code is updated (namely, the engineering code is updated to the latest version of the game virtual scene), the game engine code is updated, the resource processing is performed by the loss-of-reference function, the resource processing is performed by the superstandard check function, the log file is archived, and the processing result is archived, wherein "45: 51" and "04: 18" in fig. 8 refer to time-consuming time, for example, "45: 51" refers to 45 minutes and 51 seconds. Certainly, the development operation and maintenance platform can also support manual triggering, that is, when resource processing is required, the development operation and maintenance platform is manually started by related personnel, so that the development operation and maintenance platform calls the game engine to perform resource processing.
In a bottom implementation, the embodiment of the present application provides a schematic diagram of a resource processing system as shown in fig. 9, where the resource processing system may include two parts, namely a client tool and a Web platform, which are described below separately.
1) The Web platform comprises module configuration items, attribute configuration items (corresponding to the above attribute screening policies) and rule configuration items, and can be manually set in the Web platform by related personnel.
2) The client tool obtains a module configuration item, an attribute configuration item and a rule configuration item in the Web platform through an Application Programming Interface (API), wherein the client tool may be a plug-in a game engine. In the process of resource processing, the client tool firstly screens out the resource to be checked according to the module configuration item, screens out the attribute to be checked according to the attribute configuration item, loads the attribute to be checked in the resource to be checked by calling an interface of a game engine, determines the abnormal resource in the resource to be checked according to the rule configuration item, and obtains a processing result.
3) According to the different enabled (selected) resource processing functions, different processing results can be obtained, such as a superscalar check result, a full change result and a reference loss result. After the processing result is obtained, the client tool may directly present the processing result (i.e., present in the engine interface), or may send the processing result to the Web platform for presentation in the Web interface of the Web platform. The processing result can be presented in the form of a BUG list, so that the BUG list can be conveniently followed (tracked). In addition, data storage and transfer can be performed between the client tool and the Web platform based on a database and cache (such as Redis cache) mechanism.
4) The client tool can provide a command line interface of the game engine for the development operation and maintenance platform, so that the development operation and maintenance platform calls the game engine to realize daily constructed resource scanning.
In the process of resource processing, the following main points are mainly included:
1) since the items of different game virtual scenes may be participated in by different engine teams, the different engine teams may optimize the game engines differently according to the game characteristics, for example, the loading modes in different engine versions may be different for the same resource or the same attribute, and the loading modes in different items using the same engine version may also be different. Therefore, in the embodiment of the application, different engine versions and different game virtual scene items can be compatible, so that the success rate of resource processing is improved. Taking the Unity game engine as an example, the Unity game engine itself supports the property of macro compilation: # if (macro name) # endif. The code wrapped by the Macro (namely wrapped by the # if/# endif) can be compiled only when the Macro name is matched, namely the Macro is effective, and on the basis, the compatible coexistence of multiple engine versions and multiple projects can be realized in a Macro (Macro) isolation mode. For example, Unity game engines of versions 5 and 4 are represented by Unity _5 and Unity _4, respectively, and the same or different loading policies for loading at least one of the resource to be inspected and the attribute to be inspected may be added to macros corresponding to Unity _5 and Unity _4, respectively, according to actual conditions, so that the Unity game engines of versions 5 and 4 may be compatible. Similarly, macros corresponding to different projects can be customized according to the actual conditions of the projects of the game virtual scene.
2) In the process of resource processing, too many resources may be loaded in the memory, which may cause the memory occupation to be too high and the game engine to be down (Crash). For this, resources can be loaded and unloaded in time according to the amount of the resources. For example, the loading and unloading of the resource may be performed according to the resource module, the resource in one resource module is loaded each time, when the processing of the resource in a loaded resource module is completed, the unloading of the resource in the resource module is performed, and the resource in the next resource module is continuously loaded. The load function is, for example, assetdatabase, loadassesetaptpath (), and the unload function is, for example, editorutility, unloadunoudedassetts immediate (), but this does not constitute a limitation to the embodiments of the present application.
In addition, before unloading a certain resource, a pointer of the resource can be acquired, and whether the acquired pointer is empty or not can be judged. If the pointer is not null, the resource is unloaded normally; and if the pointer is empty, skipping the resource and acquiring the pointer of the next resource needing to be unloaded. Therefore, the judgment protection can be realized, and the game engine is prevented from being down from another angle.
3) Because the items of different game virtual scenes are made in different ways and the concerned attributes are different, if the full-scale attributes are obtained, the waste of computing resources is caused, meanwhile, the time consumption is long, and the efficiency of resource processing is low. Therefore, in the embodiment of the application, the attribute configuration items can be set according to actual conditions, namely, the self-defined attributes to be checked of different projects are supported, the resource processing efficiency can be effectively improved, and the computing resources and the time cost are saved.
By the embodiment of the application, multiple functions of universality of multiple game virtual scenes, full-process automatic monitoring, automatic BUG lifting and follow-up closed loop, automatic daily pushing (such as short message or mail pushing) monitoring and the like can be realized, and the functions of universality, display, monitoring and reporting are integrated. In addition, on the basis of meeting the universalization, the customized requirements of different game virtual scenes can be supported, and various requirements of resource processing are met in an all-around manner.
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. 2, 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 a resource screening policy, an attribute screening policy, and an exception analysis policy set for a virtual scene in response to a policy setting operation received in a resource processing interface; the screening module 4552 is configured to screen a resource to be inspected from a plurality of resources included in the virtual scene according to the resource screening policy, and screen an attribute to be inspected from a plurality of attributes of the resource to be inspected according to the attribute screening policy; an anomaly analysis module 4553, configured to load a resource to be inspected through a virtual scene engine of a virtual scene, and perform anomaly analysis processing on an attribute to be inspected of the loaded resource to be inspected according to an anomaly analysis policy, so as to determine an anomaly resource in the resource to be inspected; an updating module 4554, configured to update the resource handling interface according to the abnormal resource.
In some embodiments, the resource screening policies include resource matching policies corresponding to respective ones of the plurality of resource modules in the virtual scene; wherein each resource module comprises a plurality of resources; a screening module 4552, further configured to: presenting a plurality of resource modules in a resource handling interface; responding to a first selection operation aiming at a plurality of resource modules, and matching a plurality of resources included in the selected resource module according to a resource matching strategy corresponding to the resource module selected by the first selection operation to obtain a matching processing result; and taking the resource with the matching processing result of successful matching as the resource to be checked.
In some embodiments, the screening module 4552 is further configured to: for each resource included in the selected resource module, performing the following processes: matching the resource information of the resource with the set resource information in the resource matching strategy corresponding to the selected resource module to obtain a matching result; the resource information comprises at least one of a path, a name and an attribute value of an attribute to be matched; the attribute to be matched is at least one of a plurality of attributes of the resource.
In some embodiments, the screening module 4552 is further configured to: presenting a resource matching strategy corresponding to the selected resource module in a resource processing interface; and responding to the self-defining operation aiming at the resource matching strategy corresponding to the selected resource module, updating the resource matching strategy corresponding to the selected resource module according to the self-defining operation, and matching a plurality of resources included in the selected resource module according to the updated resource matching strategy.
In some embodiments, the anomaly analysis strategy includes a range of set values for the attribute to be inspected; the anomaly analysis module 4553 is further configured to: for each resource to be checked that is loaded, the following processing is performed: matching the attribute value of the attribute to be detected of the resource to be detected with a set value range; and when the attribute value of the attribute to be detected of the resource to be detected fails to be matched with the set value range, taking the resource to be detected as an abnormal resource.
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 recovery option, and updating the attribute value of the attribute to be checked of the abnormal resource so as to successfully match the updated attribute value with the set value range.
In some embodiments, the update module 4554 is further configured to: determining the repair priority of the abnormal resource according to the difference degree between the attribute value of the attribute to be inspected of the abnormal resource and the set value range; wherein the repair priority is positively correlated with the gap degree; and presenting the abnormal resources and the repair priority of the abnormal resources in the resource processing interface.
In some embodiments, the update module 4554 is further configured to: determining overlapping abnormal resources between the abnormal resources in the latest version and the abnormal resources in the historical version of the virtual scene; and presenting the overlapped abnormal resources and the abnormal resources except the overlapped abnormal resources in the latest version in the resource processing interface, wherein the overlapped abnormal resources and the abnormal resources except the overlapped abnormal resources in the latest version are presented in different modes.
In some embodiments, the update module 4554 is further configured to: when the attribute to be checked comprises the reference attribute, presenting the abnormal resource and the resource referenced by the abnormal resource through the reference attribute in the resource processing interface so as to represent that the reference loss of the abnormal resource for the referenced resource occurs.
In some embodiments, the update module 4554 is further configured to: and presenting the abnormal resources and the resources except the abnormal resources in the resources to be detected in a resource processing interface, wherein the presenting mode of the abnormal resources is different from that of the resources except the abnormal resources in the resources to be detected.
In some embodiments, the anomaly analysis module 4553 is further configured to: when a plurality of resource modules of the virtual scene comprise resources to be checked, traversing the plurality of resource modules, and loading the resources to be checked in the traversed resource modules through a virtual scene engine; and when the loaded resource module to be detected in the traversed resource module is analyzed and processed, unloading the loaded resource to be detected in the traversed resource module.
In some embodiments, the anomaly analysis module 4553 is further configured to: traversing a plurality of resources to be checked in the loaded traversed resource module, and executing the following processing aiming at the traversed resources to be checked: acquiring a traversed pointer of a resource to be checked; skipping the traversed resource to be checked when the pointer is empty; and when the pointer is not empty, unloading the traversed resource to be checked.
In some embodiments, a policy application module is loaded to perform at least one of: applying a loading strategy corresponding to an engine version of a virtual scene engine of a target virtual scene in loading strategies corresponding to the engine versions respectively; applying a loading strategy corresponding to a target virtual scene in loading strategies corresponding to the plurality of virtual scenes respectively; the target virtual scene is a virtual scene of abnormal resources to be determined; the loading strategy is used for loading at least one of the resource to be checked and the attribute to be checked.
In some embodiments, the number of the resource processing policies includes a plurality of, and different resource processing policies correspond to different resource processing functions; the resource processing strategy comprises a resource screening strategy, an attribute screening strategy and an anomaly analysis strategy; the resource processing strategy application module is used for presenting a plurality of resource processing functions in the resource processing interface; and responding to a second selection operation aiming at the plurality of resource processing functions, and applying a resource processing strategy corresponding to the resource processing function selected by the second selection operation to determine abnormal resources in the virtual scene.
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. 4A, 4B, 4C, and 4D.
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 (17)
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 a resource screening strategy, an attribute screening strategy and an exception analysis strategy which are set aiming at the virtual scene;
screening out resources to be inspected from a plurality of resources included in the virtual scene according to the resource screening strategy, and screening out attributes to be inspected from a plurality of attributes of the resources to be inspected according to the attribute screening strategy;
loading the resource to be inspected through a virtual scene engine of the virtual scene, and performing anomaly analysis processing on the attribute to be inspected of the loaded resource to be inspected according to the anomaly analysis strategy so as to determine an abnormal resource in the resource to be inspected;
and updating the resource processing interface according to the abnormal resource.
2. The method of claim 1, wherein the resource screening policies comprise resource matching policies corresponding to respective ones of the plurality of resource modules in the virtual scene; wherein each of the resource modules comprises a plurality of resources;
screening out the resources to be inspected from a plurality of resources included in the virtual scene according to the resource screening strategy, wherein the screening out comprises the following steps:
presenting the plurality of resource modules in the resource handling interface;
responding to a first selection operation aiming at the plurality of resource modules, and performing matching processing on a plurality of resources included in the selected resource module according to a resource matching strategy corresponding to the resource module selected by the first selection operation to obtain a matching processing result;
and taking the resource with the matching processing result of successful matching as the resource to be checked.
3. The method according to claim 2, wherein the matching the plurality of resources included in the selected resource module according to the resource matching policy corresponding to the resource module selected by the first selection operation to obtain a matching result includes:
for each resource included in the selected resource module, performing the following processes:
matching the resource information of the resource with the set resource information in the resource matching strategy corresponding to the selected resource module to obtain a matching result;
the resource information comprises at least one of a path, a name and an attribute value of an attribute to be matched; the attribute to be matched is at least one of a plurality of attributes of the resource.
4. The method according to claim 2, wherein before performing matching processing on the plurality of resources included in the selected resource module according to the resource matching policy corresponding to the resource module selected by the first selection operation, the method further includes:
presenting a resource matching strategy corresponding to the selected resource module in the resource processing interface;
responding to the self-defining operation aiming at the resource matching strategy corresponding to the selected resource module, updating the resource matching strategy corresponding to the selected resource module according to the self-defining operation, and matching a plurality of resources included in the selected resource module according to the updated resource matching strategy.
5. The method according to claim 1, characterized in that said anomaly analysis strategy comprises a range of set values of said property to be inspected;
the abnormal analysis processing is carried out on the loaded attribute to be checked of the resource to be checked according to the abnormal analysis strategy so as to determine the abnormal resource in the resource to be checked, and the method comprises the following steps:
for each of the loaded resources to be inspected, performing the following processing:
matching the attribute value of the attribute to be checked of the resource to be checked with the set value range;
and when the attribute value of the attribute to be checked of the resource to be checked fails to be matched with the set value range, taking the resource to be checked as an abnormal resource.
6. The method of claim 5, 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 abnormal recovery option, and updating the attribute value of the attribute to be checked of the abnormal resource so as to enable the updated attribute value to be successfully matched with the set value range.
7. The method of claim 5, further comprising:
determining the repair priority of the abnormal resource according to the difference degree between the attribute value of the attribute to be checked of the abnormal resource and the set value range;
wherein the repair priority is positively correlated with the gap degree;
the updating the resource processing interface according to the abnormal resource comprises:
and presenting the abnormal resource and the repair priority of the abnormal resource in the resource processing interface.
8. The method of claim 1, wherein said updating the resource handling interface in accordance with the exception resource comprises:
determining overlapping exception resources between exception resources in a latest version and exception resources in a historical version of the virtual scene;
and presenting the overlapped abnormal resource and the abnormal resource except the overlapped abnormal resource in the latest version in the resource processing interface, wherein the overlapped abnormal resource is presented in a different way from the abnormal resource except the overlapped abnormal resource in the latest version.
9. The method according to claim 1, wherein when the property to be checked includes a reference property, the updating the resource handling interface according to the exception resource includes:
and presenting the abnormal resource and the resource referenced by the abnormal resource through the reference attribute in the resource processing interface to represent that the abnormal resource has reference loss for the referenced resource.
10. The method of claim 1, wherein said updating the resource handling interface in accordance with the exception resource comprises:
and presenting the abnormal resources and the resources except the abnormal resources in the resources to be detected in the resource processing interface, wherein the presenting modes of the abnormal resources and the resources except the abnormal resources in the resources to be detected are different.
11. The method according to any one of claims 1 to 10, wherein when a plurality of resource modules of the virtual scene each include a resource to be inspected, said loading, by a virtual scene engine of the virtual scene, the resource to be inspected comprises:
traversing the plurality of resource modules, and loading the resources to be checked in the traversed resource modules through the virtual scene engine;
the method further comprises the following steps:
and when the loaded resource to be detected in the traversed resource module is analyzed and processed abnormally, unloading the loaded resource to be detected in the traversed resource module.
12. The method according to claim 11, wherein the unloading the resource to be checked in the loaded traversed resource module comprises:
traversing the loaded multiple resources to be checked in the traversed resource module, and executing the following processing aiming at the traversed resources to be checked:
acquiring the traversed pointer of the resource to be checked;
skipping the traversed resource to be checked when the pointer is empty;
and when the pointer is not empty, unloading the traversed resource to be checked.
13. The method according to any one of claims 1 to 10, further comprising:
performing at least one of:
applying a loading strategy corresponding to an engine version of a virtual scene engine of a target virtual scene in loading strategies corresponding to the engine versions respectively;
applying a loading strategy corresponding to the target virtual scene in loading strategies corresponding to a plurality of virtual scenes respectively;
the target virtual scene is a virtual scene of abnormal resources to be determined; the loading strategy is used for loading at least one of the resource to be checked and the attribute to be checked.
14. The method according to any one of claims 1 to 10, wherein the number of resource processing policies includes a plurality of resource processing policies, and different ones of the resource processing policies correspond to different resource processing functions; the resource processing strategy comprises a resource screening strategy, an attribute screening strategy and an anomaly analysis strategy;
the method further comprises the following steps:
presenting a plurality of the resource handling functions in the resource handling interface;
and responding to a second selection operation aiming at a plurality of resource processing functions, and applying a resource processing strategy corresponding to the resource processing function selected by the second selection operation to determine abnormal resources in the virtual scene.
15. 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 a resource screening strategy, an attribute screening strategy and an exception analysis strategy which are set aiming at the virtual scene;
the screening module is used for screening the resources to be inspected from the multiple resources in the virtual scene according to the resource screening strategy and screening the attributes to be inspected from the multiple attributes of the resources to be inspected according to the attribute screening strategy;
the anomaly analysis module is used for loading the resource to be detected through a virtual scene engine of the virtual scene and carrying out anomaly analysis processing on the attribute to be detected of the loaded resource to be detected according to the anomaly analysis strategy so as to determine the anomalous resource in the resource to be detected;
and the updating module is used for updating the resource processing interface according to the abnormal resource.
16. 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 14 when executing the executable instructions stored in the memory.
17. 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 14 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110086734.6A CN112717416B (en) | 2021-01-22 | 2021-01-22 | Resource processing method and device in virtual scene and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110086734.6A CN112717416B (en) | 2021-01-22 | 2021-01-22 | Resource processing method and device in virtual scene and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112717416A true CN112717416A (en) | 2021-04-30 |
CN112717416B CN112717416B (en) | 2023-04-21 |
Family
ID=75593507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110086734.6A Active CN112717416B (en) | 2021-01-22 | 2021-01-22 | Resource processing method and device in virtual scene and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112717416B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114676372A (en) * | 2022-04-13 | 2022-06-28 | 一点灵犀信息技术(广州)有限公司 | Data processing method and device for web game, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199093A (en) * | 2020-10-15 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Resource checking method, device, equipment and computer readable storage medium |
-
2021
- 2021-01-22 CN CN202110086734.6A patent/CN112717416B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199093A (en) * | 2020-10-15 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Resource checking method, device, equipment and computer readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114676372A (en) * | 2022-04-13 | 2022-06-28 | 一点灵犀信息技术(广州)有限公司 | Data processing method and device for web game, electronic equipment and storage medium |
CN114676372B (en) * | 2022-04-13 | 2023-07-25 | 一点灵犀信息技术(广州)有限公司 | Data processing method and device for web game, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112717416B (en) | 2023-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110020323B (en) | Page switching method and system for hybrid application, computer equipment and storage medium | |
CN107733985B (en) | Method and device for deploying functional components of cloud computing system | |
CN112256296B (en) | Weex-based express service APP updating method, weex-based express service APP updating device, weex-based express service APP updating equipment and storage medium | |
CN108287718B (en) | Special effect editing method and device based on game engine | |
CN111580926A (en) | Model publishing method, model deploying method, model publishing device, model deploying device, model publishing equipment and storage medium | |
CN112669194B (en) | Animation processing method, device, equipment and storage medium in virtual scene | |
CN112783660B (en) | Resource processing method and device in virtual scene and electronic equipment | |
CN108229182B (en) | Method and system for verifying picture configuration by using information isomorphism | |
CN114494024B (en) | Image rendering method, device and equipment and storage medium | |
CN113704110A (en) | Automatic testing method and device for user interface | |
CN112717416B (en) | Resource processing method and device in virtual scene and electronic equipment | |
CN111752841A (en) | Single test simulation method, device, equipment and computer readable storage medium | |
CN113535567B (en) | Software testing method, device, equipment and medium | |
CN107203471B (en) | Joint debugging method, service platform and computer storage medium | |
CN107193582B (en) | Publishing method and system | |
CN115129574A (en) | Code testing method and device | |
CN111625291B (en) | Automatic iteration method and device for data processing model and electronic equipment | |
KR101449201B1 (en) | Automatic software test system for steel processing | |
CN111506393A (en) | ARM-based virtualization device and use method thereof | |
CN114065076A (en) | Unity-based visualization method, system, device and storage medium | |
CN113192173B (en) | Image processing method and device of three-dimensional scene and electronic equipment | |
CN113537507B (en) | Machine learning system, method and electronic equipment | |
CN106802856B (en) | Performance testing method of game application program, server and game application client | |
CN106775639B (en) | Information processing method, information processing apparatus, and computer device | |
CN108345461B (en) | Application updating method and device and computer readable storage medium |
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: 40042494 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |