Virtual resource checking method and device, storage medium and electronic equipment
By displaying and selecting inspection conditions on the virtual resource inspection interface and automatically generating programming language code, the problem of low efficiency in virtual resource inspection is solved, simplifying operations and improving efficiency.
Patent Information
- Application Number
- CN202310304849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-20
AI Technical Summary
The existing technology is inefficient during the virtual resource inspection process. Especially when judging art resources with reference relationships or the combination of multiple attributes, the inspection conditions need to be manually configured, resulting in low page loading efficiency and complicated operations.
A virtual resource checking method is provided. By displaying a list of check conditions that are allowed to be selected on the resource check interface, and automatically coding to generate corresponding programming language code, it is used to check whether the virtual resource meets the selected conditions, thereby realizing an automated check process.
It reduces the time to configure the check conditions of multiple resource attributes, simplifies the operation steps, improves the efficiency of virtual resource check, and solves the problem of low efficiency.
Smart Images

Figure CN118672889A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for checking virtual resources, a storage medium, and an electronic device. Background Art
[0002] During the development and use of the target application, it is usually necessary to perform compliance checks on the virtual resources in the application project of the target application. For example, in a game application, rule checks are performed on art resources such as textures, audio and video, and character models according to preset inspection conditions.
[0003] In the related art, the method for checking art resources in game applications is: after the scanning requirement (resource inspection requirement) is proposed, first pull the relevant code required for scanning resources added to the application project; scan all attributes of all resources and store them in the background database; manually configure the resource attributes of each type of resource on the web page to determine the inspection conditions of each type of resource; according to the inspection conditions, scan the database to obtain the inspection results of the compliance check of the art resources.
[0004] However, it is difficult to check art resources using the above method because it is necessary to manually configure various resource attributes, and it is difficult to solve art resources with reference relationships or combination judgments of multiple attributes, which cannot meet the technical problem of low efficiency during page loading.
[0005] However, when using the above method to judge art resources with reference relationships or combinations of multiple attributes, it is necessary to manually configure the inspection conditions for each resource on the web page, which increases the complexity of interface operations and consumes a lot of time, thereby causing technical problems of low efficiency in the inspection process of virtual resources.
[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0007] The embodiments of the present application provide a method and device for checking virtual resources, a storage medium, and an electronic device, so as to at least solve the technical problem of low efficiency that occurs during the checking of virtual resources.
[0008] According to one aspect of an embodiment of the present application, a method for checking virtual resources is provided, comprising: displaying a first check condition list on a resource inspection interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments of a first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are decoupled from the engineering code of the application project; when M check conditions in the first check condition list are selected when the application project is running, running M code segments corresponding to the M check conditions to obtain a first inspection result, wherein the N check conditions include M check conditions, the N code segments include M code segments, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set satisfies the M check conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M check conditions; and displaying the first inspection result on the resource inspection interface.
[0009] Optionally, the above-mentioned running of M segments of code corresponding to M check conditions includes: searching for virtual resources corresponding to each of the M check conditions in the virtual resource set to obtain M groups of virtual resources, wherein the first group of virtual resources includes the M groups of virtual resources; checking whether each group of virtual resources in the M groups of virtual resources meets the corresponding check conditions in the M check conditions to obtain M check results, wherein each check result in the M check results is used to indicate whether a corresponding group of virtual resources in the M groups of virtual resources meets a corresponding one of the M check conditions, and the first check result includes the M inspection results.
[0010] Optionally, the above-mentioned searching for virtual resources corresponding to each of the M inspection conditions in the virtual resource set to obtain M groups of virtual resources includes: searching for virtual resources corresponding to the i-th inspection condition in the M inspection conditions in the virtual resource set through the following steps to obtain the i-th group of virtual resources, wherein i is a positive integer greater than or equal to 1 and less than or equal to M: obtaining the i-th group of inspection paths in the i-th inspection condition, obtaining the virtual resources on the i-th group of inspection paths in the virtual resource set, and obtaining the i-th group of virtual resources; or obtaining the i-th group of resource types in the i-th inspection condition, obtaining virtual resources of the i-th group of resource types in the virtual resource set, and obtaining the i-th group of virtual resources; or obtaining the i-th group of inspection paths and the i-th group of resource types in the i-th inspection condition, obtaining virtual resources of the i-th group of resource types on the i-th group of inspection paths in the virtual resource set, and obtaining the i-th group of virtual resources.
[0011] Optionally, the above-mentioned checking whether each group of virtual resources in the M groups of virtual resources satisfies the corresponding inspection conditions in the M inspection conditions to obtain M inspection results includes: checking whether the i-th group of virtual resources in the M groups of virtual resources satisfies the i-th inspection condition in the M inspection conditions through the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to M: obtaining the attribute information of the j-th virtual resource, and determining whether the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition, wherein j is a positive integer greater than or less than 1; when the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition, determining that the j-th virtual resource satisfies the i-th inspection condition.
[0012] Optionally, the above-mentioned obtaining the attribute information of the j-th virtual resource and determining whether the attribute information of the j-th virtual resource satisfies the checking logic in the i-th checking condition includes:
[0013] Determine whether the jth virtual resource has been loaded; if the jth virtual resource has not been loaded, load the jth virtual resource, and if the jth virtual resource is loaded, obtain the attribute information of the jth virtual resource, and determine whether the attribute information of the jth virtual resource satisfies the inspection logic in the ith inspection condition; if the jth virtual resource has been loaded, obtain the attribute information of the jth virtual resource, and determine whether the attribute information of the jth virtual resource satisfies the inspection logic in the ith inspection condition.
[0014] Optionally, the above-mentioned obtaining of the attribute information of the j-th virtual resource includes: calling the first function code through the first part of the code in the i-th code segment to obtain the attribute information of the j-th virtual resource, wherein the i-th code segment is the code corresponding to the i-th check condition in the N code segments, the first function code is a function code in a second programming language, the first function code is compiled together with the engineering code of the application project, and the first programming language is different from the second programming language; and / or the above-mentioned determination of whether the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition includes: calling the second function code through the second part of the code in the i-th code segment to determine whether the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition, wherein the second function code is a function code in a second programming language, and the second function code is compiled together with the engineering code of the application project.
[0015] Optionally, the above-mentioned display of the first inspection result on the resource inspection interface includes: when it is checked that there are virtual resources in the virtual resource collection that satisfy each of the R inspection conditions, the identification of the virtual resources that satisfy each of the R inspection conditions is displayed on the resource inspection interface, wherein the M inspection conditions include the R inspection conditions, and R is a positive integer greater than or equal to 1 and less than or equal to M; and / or when it is checked that there are no virtual resources in the virtual resource collection that satisfy each of the T inspection conditions, the inspection result corresponding to each of the T inspection conditions is displayed on the resource inspection interface, wherein the inspection result corresponding to each of the T inspection conditions is used to indicate that there are no virtual resources in the virtual resource collection that satisfy each of the above-mentioned T inspection conditions, and the M inspection conditions include T inspection conditions, and T is a positive integer greater than or equal to 1 and less than or equal to M.
[0016] Optionally, the above-mentioned displaying the identification of the virtual resources that meet each of the R inspection conditions on the resource inspection interface includes: displaying the access path of the virtual resources that meet each of the R inspection conditions on the resource inspection interface; the above-mentioned method also includes: when the access path of the target virtual resource is triggered, opening or displaying the target virtual resource, wherein the target virtual resource is a virtual resource that meets the target inspection condition among the R inspection conditions.
[0017] Optionally, after running M segments of code corresponding to M check conditions, the above method also includes: when P check conditions in the first check condition list are selected when the application project is running, running P segments of code corresponding to the P check conditions to obtain a second check result, wherein the P check conditions are completely different from or partially different from the M check conditions, the N check conditions include the P check conditions, the N segments of code include the P segments of code, P is a positive integer greater than or equal to 1 and less than or equal to N, and the second check result is used to indicate whether a second group of virtual resources in the virtual resource set meets the P check conditions, and the second group of virtual resources includes the virtual resources in the virtual resource set corresponding to the P check conditions; and displaying the second check result on the resource inspection interface.
[0018] Optionally, the above method also includes: in response to a check condition update instruction, displaying a second check condition list on the resource check interface, wherein the second check condition list includes Q check conditions allowed to be selected, the Q check conditions correspond to Q code segments in the first programming language, each code segment in the Q code segments is used to check whether the virtual resources in the virtual resource set in the application project of the target application meet the corresponding check conditions in the Q check conditions, Q is a positive integer greater than or equal to 1, the Q code segments are in a decoupled relationship with the engineering code of the application project, and the Q check conditions are completely different from or partially different from the N check conditions.
[0019] According to another aspect of an embodiment of the present application, a virtual resource inspection device is also provided, including: a first display unit, used to display a first inspection condition list on a resource inspection interface, wherein the first inspection condition list includes N inspection conditions that are allowed to be selected, the N inspection conditions correspond to N code segments of a first programming language, and each code segment in the N code segments is used to check whether the virtual resources in the virtual resource set in the application engineering of the target application meet the corresponding inspection conditions in the N inspection conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with the engineering code of the application engineering; a first processing unit, used to run M code segments corresponding to the M inspection conditions when M inspection conditions in the first inspection condition list are selected when the application engineering is running, to obtain a first inspection result, wherein the N inspection conditions include M inspection conditions, the N code segments include M code segments, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M inspection conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M inspection conditions; a second display unit, used to display the first inspection result on the resource inspection interface.
[0020] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned virtual resource checking method when running.
[0021] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0022] According to another aspect of an embodiment of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the virtual resource inspection method through the computer program.
[0023] Through the above-mentioned embodiments provided by the present application, during the operation of the application project, by selecting M inspection conditions from the N inspection conditions displayed on the resource inspection interface, and running the M code segments corresponding to the M conditions, the first inspection result is obtained, thereby displaying the first inspection result on the resource inspection interface. In other words, by selecting M inspection conditions from the first inspection condition list displayed on the resource inspection interface, and then automatically encoding to obtain M code segments in the first programming language, the inspection results for multiple attributes of the first group of virtual resources are obtained, which reduces the configuration time of the inspection conditions of multiple resource attributes, simplifies the operation steps, solves the technical problem of low efficiency in the inspection process of virtual resources in the related technology, and achieves the technical effect of improving the inspection efficiency of virtual resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 is a schematic diagram of an application scenario of an optional virtual resource inspection method according to an embodiment of the present application;
[0026] Figure 2 is a flow chart of an optional method for checking virtual resources according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of a startup interface of an optional resource inspection tool according to an embodiment of the present application;
[0028] Figure 4 is a flowchart of another optional virtual resource checking method according to an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of an optional operation interface of a resource inspection tool according to an embodiment of the present application;
[0030] Figure 6 is a schematic diagram of an inspection result display interface of a resource inspection tool according to an embodiment of the present application;
[0031] Figure 7 is a structural diagram of an optional UE resource management according to an embodiment of the present application;
[0032] Figure 8 is a schematic diagram of an implementation process of an optional resource inspection tool according to an embodiment of the present application;
[0033] Fig. 9It is a schematic diagram of the code structure and calling relationship of an optional resource inspection tool according to an embodiment of the present application;
[0034] Fig.10 is a schematic structural diagram of an optional virtual resource inspection device according to an embodiment of the present application;
[0035] Fig.11 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] The technical solutions in the embodiments of the present application will comply with legal provisions during implementation. When performing operations according to the technical solutions in the embodiments, the data used will not involve user privacy. While ensuring that the operation process is compliant and legal, the security of the data is guaranteed.
[0039] Glossary:
[0040] Art resources: specifically refers to digital content used in art production in digital content creation, such as textures, audio and video, object and character models, etc.
[0041] UE: The abbreviation of Unreal Engine, whose Chinese name is Unreal Engine, is a game production tool suite developed by Epic that can be used to build, test and publish various types of games.
[0042] According to one aspect of the embodiments of the present application, a method for checking virtual resources is provided. As an optional implementation, the method for checking virtual resources can be applied to, but is not limited to, Figure 1 The application scenario shown in Figure 1 In the application scenario shown, the terminal device 102 may, but is not limited to, communicate with the server 106 via the network 104, and the server 106 may, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The above-mentioned terminal device 102 may, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above-mentioned human-computer interaction screen may, but is not limited to, be used to display a resource inspection interface, a first inspection condition list, and a first inspection result on the terminal device 102. The above-mentioned processor may, but is not limited to, be used to respond to the above-mentioned human-computer interaction operation, perform corresponding operations, or generate corresponding instructions, and send the generated instructions to the server 106. The above-mentioned memory is used to store relevant processing data, such as N inspection conditions, N code segments, and the first inspection result.
[0043] As an optional method, the following steps in the virtual resource inspection method can be executed on the server 106: step S102, displaying a first inspection condition list on the resource inspection interface, wherein the first inspection condition list includes N inspection conditions that are allowed to be selected, the N inspection conditions correspond to N code segments in a first programming language, each of the N code segments is used to check whether the virtual resources in the virtual resource set in the application engineering of the target application meet the corresponding inspection conditions in the N inspection conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with the engineering code of the application engineering; step S104, when M check conditions in the first check condition list are selected when the application project is running, run M segments of code corresponding to the M check conditions to obtain a first check result, wherein the N check conditions include M check conditions, the N segments of code include M segments of code, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first check result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M check conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M check conditions; step S106, displaying the first check result on the resource inspection interface.
[0044] By adopting the above method, during the operation of the application project, M inspection conditions are selected from the N inspection conditions displayed on the resource inspection interface, and M code segments corresponding to the M conditions are run to obtain the first inspection result, thereby displaying the first inspection result on the resource inspection interface. In other words, by selecting M inspection conditions from the first inspection condition list displayed on the resource inspection interface, and then automatically encoding to obtain M code segments in the first programming language, the inspection results for multiple attributes of the first group of virtual resources are obtained, which reduces the configuration time of the inspection conditions of multiple resource attributes, simplifies the operation steps, solves the technical problem of low efficiency in the inspection process of virtual resources in the related technology, and achieves the technical effect of improving the inspection efficiency of virtual resources.
[0045] In order to solve the problem of low efficiency in the above-mentioned virtual resource inspection process, a virtual resource inspection method is proposed in an embodiment of the present application. Figure 2 : is a flowchart of a method for checking virtual resources according to an embodiment of the present application, the process includes the following steps:
[0046] Step S202, displaying a first check condition list on the resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in the first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with the engineering code of the application project;
[0047] Step S204, when M inspection conditions in the first inspection condition list are selected when the application project is running, M code segments corresponding to the M inspection conditions are run to obtain a first inspection result, wherein the N inspection conditions include the M inspection conditions, the N code segments include the M code segments, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M inspection conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M inspection conditions;
[0048] Step S206: display the first inspection result on the resource inspection interface.
[0049] Assume that the resource interface when the resource inspection tool is running is as follows Figure 3 As shown, it includes an inspection condition selection area, a function area and a result detail display area, wherein the inspection condition selection area includes N inspection conditions, for example, inspection condition 1 sets the Highest quality for the UI-transparent image, inspection condition 2 sets High for the UI-opaque image, and so on.
[0050] Each check condition corresponds to a code segment in the first programming language, and the engineering code of the application project is a code written in the second programming language. For example, a check condition corresponds to a code segment written in Python, and the engineering code is a code written in C++.
[0051] It should be noted that the above code written in Python is only an example and is not limited thereto. For example, the code for the inspection logic part may be implemented in programming languages such as JavaScript and Lua.
[0052] To facilitate understanding of the solution, it is assumed that the application engineering is the Unreal Engine in the game development process and the virtual resources are art resources as an example to describe the various embodiments in this application.
[0053] In this embodiment, an art resource compliance check tool based on engine plug-in and Python / C++ mixed programming is provided. The workflow of the resource compliance check tool is as follows: Figure 4 As shown, including:
[0054] S402, the user makes a scanning request;
[0055] S404, determining whether the application project of the game application is connected to the plug-in;
[0056] If the result of the judgment is that the plug-in has been connected, execute step S406; otherwise, execute step S408.
[0057] S406, determining whether the existing inspection conditions meet the inspection requirements;
[0058] For example, suppose the selected check condition is Figure 3 As shown, including inspection conditions 1 to 4 and inspection condition 6, then determine whether the inspection conditions that the art resources (for example, textures) that need to be inspected currently need to meet are inspection conditions 1 to 4 and inspection condition 6. If so, execute step S410; otherwise, execute step S412.
[0059] S408, accessing an engine plug-in for compliance checking of art resources;
[0060] S410, running multiple code segments corresponding to the existing inspection conditions to obtain inspection results;
[0061] S412: reconfigure the inspection conditions according to the resource attributes of the art resources currently to be inspected.
[0062] like Figure 3 As shown, the currently selected inspection conditions 1 to 4 and inspection condition 6 are modified to inspection conditions 1 to 4 and inspection condition 7.
[0063] Through the above steps S402 to S412, it can be known that the above art resource compliance check tool is connected to the Unreal Engine of the game application in the form of a plug-in. After the user makes a scan request, if the Unreal Engine is not connected to the art resource compliance check tool, it only needs to be connected once to perform compliance checks on the properties of different art resources or different combinations of art resources. It can be seen that the logic code of the resource compliance check is decoupled from the engineering code of the Unreal Engine, which improves the flexibility of installing and deploying the engine plug-in.
[0064] In addition, the first programming language used to write N segments of code is different from the second programming language used to write the engineering code of the application project, so that the logic code of the resource inspection tool and the maintenance of the UI interface are independent of the code body of the running engineering code. Therefore, after modifying the logic code of the resource inspection tool, there is no need to recompile the engineering code, and the logic code in the resource inspection tool can be directly run, which reduces the compilation time of the engineering code and improves the efficiency of resource inspection.
[0065] For example, suppose that a set of virtual resources that need to be checked currently includes textures and character models. The conditions for judging whether the textures and character models are compliant include: Figure 3 Check conditions 1 to 4 and check condition 6 shown in the figure. Select check conditions 1 to 4 and check condition 6 and click Start Check. During the check, the following Figure 5 The progress of the inspection can be determined by the changes in the "Current Task Progress Bar" shown in the figure. When the inspection is completed, the result details of each art resource in each group of virtual resources will be displayed in the result details display area. For details, please refer to Figure 6 .
[0066] By adopting the above method, during the operation of the application project, M inspection conditions are selected from the N inspection conditions displayed on the resource inspection interface, and M segments of code corresponding to the M inspection conditions are run to obtain the first inspection result, thereby displaying the first inspection result on the resource inspection interface. In other words, by selecting M inspection conditions from the first inspection condition list displayed on the resource inspection interface, and then automatically encoding to obtain M segments of code in the first programming language, the inspection results for multiple attributes of the first group of virtual resources are obtained, which reduces the configuration time of the inspection conditions of multiple resource attributes, simplifies the operation steps, solves the technical problem of low efficiency in the inspection process of virtual resources in the related technology, and achieves the technical effect of improving the inspection efficiency of virtual resources.
[0067] As an optional example, the M code segments corresponding to the M check conditions are run as follows:
[0068] Searching for virtual resources corresponding to each of the M inspection conditions in the virtual resource set to obtain M groups of virtual resources, wherein the first group of virtual resources includes the M groups of virtual resources;
[0069] Check whether each group of virtual resources in the M groups of virtual resources meets the corresponding inspection conditions in the M inspection conditions, and obtain M inspection results, wherein each inspection result in the M inspection results is used to indicate whether a corresponding group of virtual resources in the M groups of virtual resources meets a corresponding inspection condition in the M inspection conditions, and the first inspection result includes the M inspection results.
[0070] In the Unreal Engine of game applications, virtual resources (for example, art resources) include a virtual resource collection composed of multiple different types of art resources. The virtual resource collection includes textures, audio and video, character models, etc., so how to determine the virtual resources to be checked becomes a problem that needs to be considered.
[0071] In this embodiment, according to Figure 3 The inspection condition selected in the resource inspection interface shown in the figure searches for virtual resources corresponding to the M inspection conditions respectively from the virtual resource set, thereby obtaining M groups of virtual resources.
[0072] That is, according to a check condition, a group of virtual resources corresponding to it can be found from the virtual resource set, and then the attribute information of the group of virtual resources can be checked by using the check logic in the check condition.
[0073] For example, assuming that there are 10 virtual resources in the virtual resource collection, select 2 check conditions from the first check condition list, for example, check condition 1 is that the resource size cannot exceed 200K, and check condition 2 is that the compression format cannot be .rar. According to check condition 1, icons and character models are found from the 10 virtual resources; according to check condition 2, audio data and textures are found from the 10 virtual resources.
[0074] Check whether the storage space occupied by the icon and the character model exceeds 200k respectively. If so, determine that the attributes of the icon and the character model do not meet the check condition 1; similarly, check whether the compression format of the audio data and the texture is .rar respectively. If so, determine that the attributes of the audio data and the texture do not meet the check condition 2.
[0075] According to the above process, it is possible to check whether each group of resources in the M groups of virtual resources meets the corresponding inspection conditions in the M inspection conditions, and obtain M inspection results. The details of the inspection results can be referred to Figure 6 .
[0076] As an optional implementation, searching the virtual resource set for the virtual resource corresponding to each of the M inspection conditions to obtain M groups of virtual resources includes:
[0077] The virtual resource corresponding to the i-th check condition among the M check conditions is searched in the virtual resource set through the following steps to obtain the i-th group of virtual resources, where i is a positive integer greater than or equal to 1 and less than or equal to M:
[0078] Obtain the i-th group of inspection paths in the i-th inspection condition, obtain the virtual resources on the i-th group of inspection paths in the virtual resource set, and obtain the i-th group of virtual resources; or
[0079] Obtain the i-th group of resource types in the i-th check condition, obtain virtual resources of the i-th group of resource types in the virtual resource set, and obtain the i-th group of virtual resources; or
[0080] The i-th group of inspection paths and the i-th group of resource types in the i-th inspection condition are obtained, and the virtual resources of the i-th group of resource types on the i-th group of inspection paths are obtained in the virtual resource set to obtain the i-th group of virtual resources.
[0081] UE (Unreal Engine) resource objects are usually stored in a serialized form in the .uasset file on the disk. The AssetRegistry module is a subsystem of the UE editor, which is mainly responsible for collecting unloaded asset information when the editor is loaded. This information is stored in memory. Therefore, the UE editor can create a resource list, but it does not need to load these resources. Figure 7 Describe it in detail.
[0082] like Figure 7 As shown, the resource registration module can search for .uasset files and represent them with FAssetData abstractions, and load UObjects (resource objects) according to the path clues in FAssetData when necessary.
[0083] UE's resource attributes generally exist in FAssetData and resource objects (such as StaticMesh, Texture2D, etc.). The most direct way to obtain the attributes of a resource is to know its path and then open it. However, the resource inspection tool in the embodiment of the present application is to scan, and the premise is naturally that the specific resource path cannot be known. For this reason, the method provided by the UE's FARFilter (resource filter) class is used to set the search path, search category, recursive search, and other options of the resource filter object, and then the qualified resource data (which can also be understood as art resources) can be filtered out.
[0084] Therefore, through Figure 7 The resource filter and resource registration module shown can perform preliminary screening on the resources in the virtual resource collection.
[0085] Then, searching the i-th group of virtual resources corresponding to the i-th check condition from the preliminarily screened virtual resource subsets includes at least one of the following:
[0086] 1) Before each round of inspection, according to the i-th group of inspection paths included in the i-th inspection condition, select the i-th group of virtual resources whose storage paths are on the i-th group of inspection paths from the cache;
[0087] 2) Before each round of inspection, according to the i-th group of resource types included in the i-th inspection condition, select the i-th group of virtual resources whose resource types meet the requirements of the i-th group of resource types from the cache; for example, if the resource types are textures and equipment models, search for the i-th group of virtual resources whose types are textures and equipment models from the virtual resource subset;
[0088] 3) Before each round of inspection, according to the i-th inspection path and the i-th resource type included in the i-th inspection condition, select the i-th group of virtual resources from the cache whose resource category meets the i-th resource type requirement and whose resource path meets the i-th inspection path;
[0089] For example, if the i-th group of resource types is texture and equipment model, and the i-th group of check paths is path 1 and path 2, then the i-th group of virtual resources whose types are texture and equipment model and whose resource storage paths are on check path 1 and check path 2 are searched from the virtual resource subset.
[0090] Through the above method, M groups of virtual resources can be searched according to the inspection path and resource type in the i-th inspection condition respectively, and M groups of virtual resources can also be searched according to both the inspection path and resource type conditions, which improves the diversity of virtual resource search methods and the flexibility of resource inspection.
[0091] As an optional example, the above checking whether each group of virtual resources in the M groups of virtual resources meets the corresponding inspection condition in the M inspection conditions, and obtaining M inspection results, including:
[0092] Whether the i-th group of virtual resources in the M groups of virtual resources satisfies the i-th check condition in the M check conditions is checked by the following steps, where i is a positive integer greater than or equal to 1 and less than or equal to M:
[0093] Obtaining attribute information of the j-th virtual resource, and determining whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, where j is a positive integer greater than or less than 1;
[0094] In the case where the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, it is determined that the j-th virtual resource satisfies the i-th check condition.
[0095] For example, in the above embodiment, assuming that the check condition is that the compression format cannot be .rar, according to the check condition 1, the paste Figure 1 and character model 1; and get the inspection result by running the Python code segment corresponding to the inspection condition.
[0096] If the inspection result shows that Figure 1 The compression format is .rar, then confirm the paste Figure 1 If the compression format of the character model 1 is .zip, then it is determined that the compression format of the character model 1 meets the inspection logic in the above inspection conditions. Figure 1 does not satisfy the above inspection conditions, while character model 1 satisfies the above inspection conditions.
[0097] As an optional example, the above-mentioned obtaining the attribute information of the j-th virtual resource and determining whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition includes:
[0098] Determine whether the jth virtual resource has been loaded;
[0099] If the jth virtual resource is not loaded, load the jth virtual resource, and if the jth virtual resource is loaded, obtain the attribute information of the jth virtual resource, and determine whether the attribute information of the jth virtual resource satisfies the check logic in the i-th check condition;
[0100] In the case that the jth virtual resource has been loaded, the attribute information of the jth virtual resource is obtained, and it is determined whether the attribute information of the jth virtual resource satisfies the check logic in the i-th check condition.
[0101] Obviously, it is easy to understand that when searching for the i-th group of virtual resources according to the inspection conditions in the above embodiment, it may happen that the same virtual resource (for example, the j-th virtual resource) meets multiple inspection conditions. In order to avoid loading the j-th virtual resource multiple times, when checking whether the attribute information of the j-th virtual resource meets the inspection logic in each inspection condition according to each inspection condition, it is necessary to first determine whether the j-th virtual resource has been loaded.
[0102] For example, suppose that according to check condition 1 and check condition 2, both the posts are found. Figure 1 , then in the judgment post Figure 1 When the attribute information of the sticker meets the inspection condition 1, it is necessary to first determine whether the sticker Figure 1 Has it been loaded? If it has been loaded, get the paste Figure 1 Attribute information, and run the code 1 corresponding to the check condition 1 to determine the paste Figure 1 Whether the attribute information of the Figure 1 If not loaded, load the paste first Figure 1 Then do the check again.
[0103] After checking the post Figure 1 After checking whether the attribute information of Figure 1 Before checking whether the attribute information of the Figure 1 Has it been loaded? If it has been loaded, get the paste Figure 1 Attribute information, and run the code 2 corresponding to the check condition 2 to determine the paste Figure 1 Whether the attribute information satisfies the check logic in check condition 2.
[0104] Through the above method, when the same virtual resource is hit by multiple inspection conditions, multiple loading of the virtual resource can be effectively avoided, thereby reducing the loading time and improving the inspection efficiency.
[0105] As an optional example, the above-mentioned obtaining the attribute information of the j-th virtual resource includes: calling the first function code through the first part of the code in the i-th code segment to obtain the attribute information of the j-th virtual resource, wherein the i-th code segment is the code corresponding to the i-th check condition in the N code segments, the first function code is a function code in a second programming language, the first function code is compiled together with the engineering code of the application engineering, and the first programming language is different from the second programming language; and / or
[0106] Determine whether the attribute information of the j-th virtual resource satisfies the check logic in the ith check condition, including: calling the second function code through the second part of the code in the ith code segment to determine whether the attribute information of the j-th virtual resource satisfies the check logic in the ith check condition, wherein the second function code is a function code of a second programming language, and the second function code is compiled together with the engineering code of the application engineering.
[0107] In combination with the description of the above embodiments, it can be seen that the inspection code in the embodiments of the present application is a code written in Python, wherein Python code can easily operate other programs and can easily package and use libraries written in other languages.
[0108] Therefore, Python, as a "glue language", can be easily used in conjunction with the C++ language in engineering codes. Its dynamic language characteristics, combined with flexible weak-type syntax, can enable more efficient development and debugging.
[0109] In UE, plugins are collections of code and data that developers can enable or disable on a per-project basis in the editor. Plugins can add runtime gameplay features, modify built-in engine features (or add new features), create new file types, extend the functionality of the editor with new menus, toolbar commands, and sub-modes, and use plugins to extend many existing UE subsystems.
[0110] like Figure 8 As shown, the above resource inspection tool uses a Python engine plug-in. Like other plug-ins, the Python engine plug-in is loaded when the Unreal Engine is started, and a Python interpreter and its related libraries (Python Libs) are associated with it.
[0111] In addition, many extension libraries that can be directly called by Python have been written for the engine plug-in as a bridge for communication between Python and UE C++, so that various C++APIs provided by UE can be easily called through Python. For example, the above-mentioned AssetRegistry (resource registration module), after a layer of packaging, can easily query all assets of the current UE project from Python, and load and read as needed. Whether it is started in CommandLet mode or Python code is passed to the plug-in in the editor, it will be executed by the associated Python interpreter. The interpreter decides whether to call the plug-in extension library or other Python libraries based on whether the called function is an engine-related function call or a simple Python call.
[0112] like Figure 8 As shown, by loading the Python engine plug-in and using the first part of the code in the i-th code segment (the code in the Python engine plug-in), different C++APIs (the interface module of the Unreal Engine) are called to obtain the first function code, thereby running the first function code to obtain the attribute information of the j-th virtual resource.
[0113] It can be seen that the logic code in the resource inspection tool includes but is not limited to two parts. The first part of the code is the code in the Python engine plug-in connected to the interface module of the UE; the second part is the main logic Python code in the logic code, wherein the first part of the code is used to obtain the attribute information of the virtual resources, and the second part of the code is used to execute the inspection logic to determine whether the virtual resources meet the inspection logic in the inspection conditions.
[0114] For the second part of the code, the second function code is called according to the preset inspection strategy. The Python interpreter determines that it is a simple Python call based on the called second function code, thereby determining that the Python interpreter calls the Python library to obtain the inspection result.
[0115] That is to say, in order to realize different operations, different C++ function codes are called through different C++ APIs, which improves the flexibility of the interaction between the logic code of the inspection tool and the engineering code.
[0116] As an optional implementation, in order to check the virtual resources, in the embodiment of the present application, the Python script part is designed in combination with the inspection requirements of the virtual resources, wherein the inspection requirements include but are not limited to:
[0117] (1) Check the whitelist: used to ignore some resources that are determined not to be modified and take effect according to specific rules;
[0118] (2) Check condition configuration file: a dictionary that stores the name of the check condition, search path, search category, and the corresponding rule judgment function noun. It can be saved in json format or in a Python dict variable.
[0119] (3) A resource may be hit by multiple check conditions, so multiple loading needs to be avoided;
[0120] (4) A command line facilitates automated operation, and a UI interface facilitates local artist operation.
[0121] According to the above requirements, the virtual resource inspection process is divided into three modules:
[0122] i) ResourceCheck: The main class for resource checking, which is mainly responsible for generating the cache of AssetData, merging resource paths and whitelists, initializing Checker, triggering check conditions, UI and interaction;
[0123] ii) Checker: performs checks according to the rules (check conditions) set by Check_rules, including Strategy, Cache, check path and whitelist, etc. At the same time, before each round of checks, selects the AssetData that meets the requirements from the Cache according to the resource type, check path, whitelist, etc. and submits it to the specific check strategy;
[0124] iii) Check_rules: Check the strategy, input the AssetData that meets the requirements of the rules (check conditions), and choose whether to load the resource object as needed.
[0125] Among them, ResourceCheck determines the check conditions; Check_rules determines M groups of virtual resources corresponding to the check conditions according to the check conditions; Checker checks the attribute information of the M groups of virtual resources according to the check conditions set by Check_rules and obtains the check results.
[0126] The specific code structure is as follows Fig. 9 As shown, the code corresponding to _main_ is Figure 8 The main logic Python code shown calls the check conditions in Resource Check, searches for virtual resources corresponding to the check conditions from the virtual resource collection according to the check conditions, and obtains the attribute information of the virtual resources; then uses Checker to call the check logic in Check_rules (Python check code) corresponding to the check conditions, performs compliance check on the attribute information of the virtual resources, and obtains the check results.
[0127] As an optional example, the displaying of the first inspection result on the resource inspection interface includes:
[0128] In the case where it is detected that there are virtual resources in the virtual resource set that satisfy each of the R inspection conditions, the identifier of the virtual resource that satisfies each of the R inspection conditions is displayed on the resource inspection interface, wherein the M inspection conditions include the R inspection conditions, and R is a positive integer greater than or equal to 1 and less than or equal to M; and / or
[0129] When it is found that there are no virtual resources in the virtual resource collection that satisfy each of the T inspection conditions, the inspection results corresponding to each of the T inspection conditions are displayed on the resource inspection interface, wherein the inspection results corresponding to each of the T inspection conditions are used to indicate that there are no virtual resources in the virtual resource collection that satisfy each of the T inspection conditions, and the M inspection conditions include T inspection conditions, where T is a positive integer greater than or equal to 1 and less than or equal to M.
[0130] like Figure 6 As shown, it is assumed that it is checked that there are virtual resources in the virtual resource set that meet the inspection conditions 1 to 4 and each of the inspection conditions in inspection condition 6, including: (1) virtual resource 1 and virtual resource 2 that meet inspection condition 1 "UI-transparent image is set to Highest quality"; (2) virtual resource 3 and virtual resource 4 that meet inspection condition 2 "UI-opaque image is set to High".
[0131] Then, in Figure 6 The result details display area shown displays the identifiers of the virtual resources 1 to 4.
[0132] Assuming that it is checked that there are virtual resources in the virtual resource collection that do not meet the inspection conditions 1 to 4 and each of the inspection conditions in inspection condition 6, including: (1) virtual resources that do not meet inspection condition 3 "UI-opaque map is set to Highest", inspection condition 4 "UI is not compressed (B8G8R8A8)" and inspection condition 6 "UI map size exceeds 1488", the inspection results corresponding to each inspection condition are directly displayed in the result details display area (the resource identifier under the corresponding inspection condition is empty).
[0133] Exemplarily, the displaying of the identifier of the virtual resource satisfying each of the R inspection conditions on the resource inspection interface includes: displaying the access path of the virtual resource satisfying each of the R inspection conditions on the resource inspection interface;
[0134] The above method further includes: when a trigger operation is performed on an access path of a target virtual resource, opening or displaying the target virtual resource, wherein the target virtual resource is a virtual resource that satisfies a target inspection condition among the R inspection conditions.
[0135] like Figure 6 As shown, for virtual resources 1 to 4 that meet inspection condition 1 and inspection condition 2, the access path of each virtual resource in virtual resources 1 to 4 is displayed in the result details display area. For example, access path 1 of virtual resource 1 is " / Game / Assets / UI / HUD / T_Cross Hair Empty Hand T...", and access path 2 of virtual resource 2 is "Game / Assets / UI / HUD / ZD_icon_zhunxing...", etc.
[0136] By performing trigger operations on the displayed access path, for example, by double-clicking access path 1, the function of virtual resource 1 is opened; by double-clicking access path 2, the function of virtual resource 2 is opened, so that the user can further view and perform subsequent operations, such as modifying the attribute information of virtual resource 1.
[0137] Combined with the analysis of the above embodiments, it can be seen that the above resource inspection tool is aimed at the needs of re-sorting the usage scenarios of art resources. The inspection conditions of the project are limited, and the specific implementation of the inspection conditions is complex and diverse. Instead of making the setting of the inspection conditions into an interface that can be operated by keyboard and mouse, it is better to implement it with code.
[0138] At the same time, this application proposes a code body that uses Python instead of original C++ to implement the inspection conditions and running logic parts of the inspection tool, which greatly reduces the workload of developers; in addition, a more detailed inspection result display interface is designed during the inspection process and when the inspection is completed, including an inspection progress bar, a situation overview and details, and the problem resource can be directly opened in the result details, which improves the user experience of artists and project managers.
[0139] As an optional example, after running the M code segments corresponding to the M check conditions, the method further includes:
[0140] When the application project is running, in a case where P check conditions in the first check condition list are selected, P segments of code corresponding to the P check conditions are run to obtain a second check result, wherein the P check conditions are completely different from or partially different from the M check conditions, the N check conditions include the P check conditions, the N segments of code include the P segments of code, P is a positive integer greater than or equal to 1 and less than or equal to N, and the second check result is used to indicate whether a second group of virtual resources in the virtual resource set meets the P check conditions, and the second group of virtual resources includes virtual resources in the virtual resource set corresponding to the P check conditions;
[0141] The second inspection result is displayed on the resource inspection interface.
[0142] Since the resource inspection tool exists in the form of a plug-in, the Python code in the resource inspection tool is decoupled from the project code in the application project. During the operation of the application project, if the inspection conditions change, the changed Python code can be run directly without recompiling the project code of the application project. In other words, the project code of the application project only needs to be compiled once and then remains in operation without being recompiled as the inspection conditions change.
[0143] For example, after the inspection condition list on the resource inspection interface changes, the user can modify the currently selected inspection condition according to the changed inspection condition list.
[0144] In a specific embodiment, the user can modify the selected Figure 6For example, if the selected check conditions 1 to 4 and 6 are modified to check conditions 1 to 4, then the M group of virtual resources found according to check conditions 1 to 4 and 6 may be partially different from the P group of resources found according to check conditions 1 to 4.
[0145] As an optional implementation method, the method of checking whether the condition list has changed includes:
[0146] In response to the check condition update instruction, a second check condition list is displayed on the resource check interface, wherein the second check condition list includes Q check conditions that are allowed to be selected, the Q check conditions correspond to Q code segments in the first programming language, each code segment in the Q code segments is used to check whether the virtual resources in the virtual resource set in the application project of the target application meet the corresponding check conditions in the Q check conditions, Q is a positive integer greater than or equal to 1, the Q code segments are in a decoupled relationship with the engineering code of the application project, and the Q check conditions are completely different from or partially different from the N check conditions.
[0147] Through the above method, when the inspection conditions change, there is no need to recompile the engineering code of the application project, which reduces the code compilation time and improves the running efficiency of the Python code of the resource inspection tool.
[0148] Through the analysis of the above embodiments, it can be seen that the above virtual resource inspection method can achieve beneficial effects including at least one of the following:
[0149] (1) The resource inspection tool exists in the form of an engine plug-in, which is flexible and convenient to install, deploy and maintain;
[0150] (2) It is implemented through UE C++ / Python hybrid programming, C++ implements data reading and makes the maintenance and iteration of resource inspection tools more agile;
[0151] (3) The resource inspection tool in this application can clearly locate and display various art resources that do not meet the requirements of the rules, making it easier for art to modify and project managers to follow up.
[0152] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0153] According to another aspect of the embodiment of the present application, there is also provided Fig.10A virtual resource inspection device is shown, the device comprising:
[0154] The first display unit 1002 is used to display a first check condition list on the resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in the first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with the engineering code of the application project;
[0155] The first processing unit 1004 is used for, when M inspection conditions in the first inspection condition list are selected during the operation of the application project, running M code segments corresponding to the M inspection conditions to obtain a first inspection result, wherein the N inspection conditions include the M inspection conditions, the N code segments include the M code segments, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M inspection conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M inspection conditions;
[0156] The second display unit 1006 is used to display the first inspection result on the resource inspection interface.
[0157] Optionally, the first processing unit 1004 includes:
[0158] A first processing module is used to search the virtual resource set for the virtual resource corresponding to each of the M inspection conditions to obtain M groups of virtual resources, wherein the first group of virtual resources includes the M groups of virtual resources;
[0159] The first inspection module is used to check whether each group of virtual resources in M groups of virtual resources meets the corresponding inspection conditions in M inspection conditions, and obtain M inspection results, wherein each inspection result in the M inspection results is used to indicate whether a corresponding group of virtual resources in the M groups of virtual resources meets a corresponding inspection condition in the M inspection conditions, and the first inspection result includes M inspection results.
[0160] Optionally, the first processing module includes:
[0161] The first processing submodule is used to search the virtual resource set for the virtual resource corresponding to the i-th inspection condition among the M inspection conditions through the following steps to obtain the i-th group of virtual resources, where i is a positive integer greater than or equal to 1 and less than or equal to M:
[0162] Obtain the i-th group of inspection paths in the i-th inspection condition, obtain the virtual resources on the i-th group of inspection paths in the virtual resource set, and obtain the i-th group of virtual resources; or
[0163] Obtain the i-th group of resource types in the i-th check condition, obtain virtual resources of the i-th group of resource types in the virtual resource set, and obtain the i-th group of virtual resources; or
[0164] The i-th group of inspection paths and the i-th group of resource types in the i-th inspection condition are obtained, and the virtual resources of the i-th group of resource types on the i-th group of inspection paths are obtained in the virtual resource set to obtain the i-th group of virtual resources.
[0165] Optionally, the first inspection module includes:
[0166] The second processing submodule is configured to check whether the i-th group of virtual resources in the M groups of virtual resources satisfies the i-th check condition in the M check conditions by the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to M:
[0167] Obtaining attribute information of the j-th virtual resource, and determining whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, where j is a positive integer greater than or less than 1;
[0168] In the case where the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, it is determined that the j-th virtual resource satisfies the i-th check condition.
[0169] Optionally, the first inspection module includes:
[0170] The first judgment submodule is used to judge whether the jth virtual resource has been loaded;
[0171] A loading submodule, used for loading the jth virtual resource if the jth virtual resource has not been loaded, and obtaining the attribute information of the jth virtual resource if the jth virtual resource has been loaded, and determining whether the attribute information of the jth virtual resource satisfies the check logic in the i-th check condition;
[0172] The third processing submodule is used to obtain the attribute information of the jth virtual resource when the jth virtual resource has been loaded, and determine whether the attribute information of the jth virtual resource satisfies the checking logic in the ith checking condition.
[0173] Optionally, the first inspection module includes:
[0174] a fourth processing submodule, configured to call a first function code through a first portion of code in an i-th code segment to obtain attribute information of a j-th virtual resource, wherein the i-th code segment is a code corresponding to an i-th check condition in the N code segments, the first function code is a function code in a second programming language, the first function code is compiled together with an engineering code of an application engineering, and the first programming language is different from the second programming language; and / or
[0175] The above-mentioned determination of whether the attribute information of the j-th virtual resource satisfies the check logic in the ith check condition includes: calling the second function code through the second part of the code in the ith code segment to determine whether the attribute information of the j-th virtual resource satisfies the check logic in the ith check condition, wherein the second function code is a function code of a second programming language, and the second function code is compiled together with the engineering code of the application engineering.
[0176] Optionally, the second display unit 1006 includes:
[0177] a first display module, for displaying the identifier of each of the R inspection conditions on the resource inspection interface when it is detected that there are virtual resources satisfying each of the R inspection conditions in the virtual resource set, wherein the M inspection conditions include the R inspection conditions, and R is a positive integer greater than or equal to 1 and less than or equal to M; and / or
[0178] The second display module is used to display the inspection results corresponding to each of the T inspection conditions on the resource inspection interface when it is found that there are no virtual resources in the virtual resource collection that meet each of the T inspection conditions, wherein the inspection results corresponding to each of the T inspection conditions are used to indicate that there are no virtual resources in the virtual resource collection that meet each of the T inspection conditions, the M inspection conditions include T inspection conditions, and T is a positive integer greater than or equal to 1 and less than or equal to M.
[0179] Optionally, the first display module includes:
[0180] Displaying access paths of virtual resources that meet each of the R inspection conditions on the resource inspection interface;
[0181] The above-mentioned device also includes: a second processing unit, which is used to open or display the target virtual resource when the access path of the target virtual resource is triggered, wherein the target virtual resource is a virtual resource that satisfies the target inspection condition among the R inspection conditions.
[0182] Optionally, the above device further includes:
[0183] a third processing unit, configured to, after running M segments of code corresponding to the M check conditions, run P segments of code corresponding to the P check conditions when the P check conditions in the first check condition list are selected when the application project is running, to obtain a second check result, wherein the P check conditions are completely different from or partially different from the M check conditions, the N check conditions include the P check conditions, the N segments of code include the P segments of code, P is a positive integer greater than or equal to 1 and less than or equal to N, and the second check result is used to indicate whether a second group of virtual resources in the virtual resource set meets the P check conditions, and the second group of virtual resources includes virtual resources in the virtual resource set corresponding to the P check conditions;
[0184] The third display unit is used to display the second inspection result on the resource inspection interface.
[0185] Optionally, the above device further includes:
[0186] A fourth display unit is used to display a second check condition list on the resource check interface in response to a check condition update instruction, wherein the second check condition list includes Q check conditions that are allowed to be selected, the Q check conditions correspond to Q code segments in the first programming language, each code segment in the Q code segments is used to check whether the virtual resources in the virtual resource set in the application project of the target application meet the corresponding check conditions in the Q check conditions, Q is a positive integer greater than or equal to 1, the Q code segments are in a decoupled relationship with the engineering code of the application project, and the Q check conditions are completely different from or partially different from the N check conditions.
[0187] By applying the above device to the above method, during the operation of the application project, M inspection conditions are selected from the N inspection conditions displayed on the resource inspection interface, and M segments of code corresponding to the M conditions are run to obtain the first inspection result, thereby displaying the first inspection result on the resource inspection interface. In other words, by selecting M inspection conditions from the first inspection condition list displayed on the resource inspection interface, and then automatically encoding M segments of code in the first programming language, the inspection results for multiple attributes of the first group of virtual resources are obtained, which reduces the configuration time of the inspection conditions of multiple resource attributes, simplifies the operation steps, solves the technical problem of low efficiency in the inspection process of virtual resources in the related technology, and achieves the technical effect of improving the inspection efficiency of virtual resources.
[0188] It should be noted that the embodiments of the virtual resource inspection device here can refer to the embodiments of the virtual resource inspection method mentioned above, which will not be repeated here.
[0189] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned virtual resource inspection method is also provided. The electronic device may be Fig.11The terminal device shown in FIG. This embodiment is described by taking the electronic device as a background device as an example. Fig.11 As shown, the electronic device includes a memory 1102 and a processor 1104. The memory 1102 stores a computer program, and the processor 1104 is configured to execute the steps in any of the above method embodiments through the computer program.
[0190] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0191] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0192] S1, displaying a first check condition list on a resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in a first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with an engineering code of the application project;
[0193] S2, when M check conditions in the first check condition list are selected during the operation of the application project, M segments of code corresponding to the M check conditions are run to obtain a first check result, wherein the N check conditions include the M check conditions, the N segments of code include the M segments of code, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first check result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M check conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M check conditions;
[0194] S3, displaying the first inspection result on the resource inspection interface.
[0195] Alternatively, a person skilled in the art may understand that: Fig.11 The structure shown is for illustration only, and the electronic device may also be a target terminal such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (MID), a PAD, etc. Fig.11 The electronic device and the electronic equipment described above are not limited in structure. Fig.11 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.11 Different configurations are shown.
[0196] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the virtual resource inspection method and device in the embodiment of the present application. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the above-mentioned virtual resource inspection method. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely arranged relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1102 can be specifically but not limited to being used to store N inspection conditions, a set of virtual resources, and a first inspection result, etc. As an example, such as Fig.11 As shown, the memory 1102 may include, but is not limited to, the first display unit 1002, the first processing unit 1004, and the second display unit 1006 in the virtual resource inspection device. In addition, it may also include, but is not limited to, other module units in the virtual resource inspection device, which will not be repeated in this example.
[0197] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0198] In addition, the electronic device further includes: a display 1108 for displaying the direction prompt information of the target sound; and a connection bus 1110 for connecting various module components in the electronic device.
[0199] In other embodiments, the target terminal or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0200] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the virtual resource inspection method provided in various optional implementations of the above-mentioned server verification processing and other aspects, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.
[0201] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0202] S1, displaying a first check condition list on a resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in a first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with an engineering code of the application project;
[0203] S2, when M check conditions in the first check condition list are selected during the operation of the application project, M segments of code corresponding to the M check conditions are run to obtain a first check result, wherein the N check conditions include the M check conditions, the N segments of code include the M segments of code, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first check result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M check conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M check conditions;
[0204] S3, displaying the first inspection result on the resource inspection interface.
[0205] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the target terminal through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0206] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0207] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0208] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0209] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0210] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0211] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0212] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for checking virtual resources, characterized in that: include: Displaying a first check condition list on the resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in a first programming language, each of the N code segments is used to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with an engineering code of the application project; When the application project is running, in a case where M inspection conditions in the first inspection condition list are selected, M segments of code corresponding to the M inspection conditions are run to obtain a first inspection result, wherein the N inspection conditions include the M inspection conditions, the N segments of code include the M segments of code, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M inspection conditions, and the first group of virtual resources includes virtual resources in the virtual resource set that correspond to the M inspection conditions; The first inspection result is displayed on the resource inspection interface.
2. The method according to claim 1, characterized in that: The running of the M code segments corresponding to the M check conditions includes: Searching for a virtual resource corresponding to each of the M inspection conditions in the virtual resource set to obtain M groups of virtual resources, wherein the first group of virtual resources includes the M groups of virtual resources; Check whether each group of virtual resources in the M groups of virtual resources meets the corresponding inspection conditions in the M inspection conditions, and obtain M inspection results, wherein each inspection result in the M inspection results is used to indicate whether a corresponding group of virtual resources in the M groups of virtual resources meets a corresponding inspection condition in the M inspection conditions, and the first inspection result includes the M inspection results.
3. The method according to claim 2, characterized in that Searching the virtual resource set for a virtual resource corresponding to each of the M inspection conditions to obtain M groups of virtual resources includes: The virtual resource corresponding to the i-th inspection condition among the M inspection conditions is searched in the virtual resource set through the following steps to obtain the i-th group of virtual resources, where i is a positive integer greater than or equal to 1 and less than or equal to M: Obtaining an i-th group of inspection paths in the i-th inspection condition, obtaining virtual resources on the i-th group of inspection paths in the virtual resource set, and obtaining the i-th group of virtual resources; or Obtaining the i-th group of resource types in the i-th check condition, obtaining virtual resources of the i-th group of resource types in the virtual resource set, and obtaining the i-th group of virtual resources; or The i-th inspection path group and the i-th resource type group in the i-th inspection condition are obtained, and the virtual resources of the i-th resource type group on the i-th inspection path are obtained from the virtual resource set to obtain the i-th virtual resource group.
4. The method according to claim 2, characterized in that: The checking whether each group of virtual resources in the M groups of virtual resources satisfies a corresponding inspection condition in the M inspection conditions to obtain M inspection results includes: Checking whether the i-th group of virtual resources in the M groups of virtual resources satisfies the i-th check condition in the M check conditions is performed by the following steps, where i is a positive integer greater than or equal to 1 and less than or equal to M: Obtaining the attribute information of the j-th virtual resource, and determining whether the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition, where j is a positive integer greater than or less than 1; In a case where the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, it is determined that the j-th virtual resource satisfies the i-th check condition.
5. The method according to claim 4, characterized in that The acquiring the attribute information of the j-th virtual resource and determining whether the attribute information of the j-th virtual resource satisfies the inspection logic in the i-th inspection condition includes: Determine whether the j-th virtual resource has been loaded; If the j-th virtual resource is not loaded, load the j-th virtual resource, and if the j-th virtual resource is loaded, obtain attribute information of the j-th virtual resource, and determine whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition; In the case that the j-th virtual resource has been loaded, the attribute information of the j-th virtual resource is obtained, and it is determined whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition.
6. The method according to claim 4, characterized in that The obtaining the attribute information of the j-th virtual resource comprises: calling a first function code through a first part of code in an i-th code segment to obtain the attribute information of the j-th virtual resource, wherein the i-th code segment is a code corresponding to the i-th check condition in the N code segments, the first function code is a function code in a second programming language, the first function code is compiled together with the engineering code of the application engineering, and the first programming language is different from the second programming language; and / or The determining whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition comprises: calling a second function code through a second part of the code in the i-th code segment to determine whether the attribute information of the j-th virtual resource satisfies the check logic in the i-th check condition, wherein the second function code is a function code of the second programming language, and the second function code is compiled together with the engineering code of the application engineering.
7. The method according to claim 1, characterized in that The displaying the first inspection result on the resource inspection interface includes: In the case where it is detected that there are virtual resources in the virtual resource set that satisfy each of the R inspection conditions, the identifiers of the virtual resources that satisfy each of the R inspection conditions are displayed on the resource inspection interface, wherein the M inspection conditions include the R inspection conditions, and R is a positive integer greater than or equal to 1 and less than or equal to M; and / or When it is found that there are no virtual resources in the virtual resource set that satisfy each of the T inspection conditions, the inspection results corresponding to each of the T inspection conditions are displayed on the resource inspection interface, wherein the inspection results corresponding to each of the T inspection conditions are used to indicate that there are no virtual resources in the virtual resource set that satisfy each of the T inspection conditions, the M inspection conditions include the T inspection conditions, and T is a positive integer greater than or equal to 1 and less than or equal to M.
8. The method according to claim 7, characterized in that The displaying, on the resource inspection interface, the identifier of the virtual resource that satisfies each of the R inspection conditions, comprises: displaying, on the resource inspection interface, the access path of the virtual resource that satisfies each of the R inspection conditions; The method further includes: when a trigger operation is performed on an access path of a target virtual resource, opening or displaying the target virtual resource, wherein the target virtual resource is a virtual resource that satisfies a target inspection condition among the R inspection conditions.
9. The method according to any one of claims 1 to 8, characterized in that After running the M sections of code corresponding to the M check conditions, the method further includes: When the application project is running, in a case where P inspection conditions in the first inspection condition list are selected, P segments of code corresponding to the P inspection conditions are run to obtain a second inspection result, wherein the P inspection conditions are completely different from or partially different from the M inspection conditions, the N inspection conditions include the P inspection conditions, the N segments of code include the P segments of code, P is a positive integer greater than or equal to 1 and less than or equal to N, and the second inspection result is used to indicate whether a second group of virtual resources in the virtual resource set meets the P inspection conditions, and the second group of virtual resources includes virtual resources in the virtual resource set that correspond to the P inspection conditions; The second inspection result is displayed on the resource inspection interface.
10. The method according to any one of claims 1 to 8, characterized in that The method further comprises: In response to the check condition update instruction, a second check condition list is displayed on the resource check interface, wherein the second check condition list includes Q check conditions that are allowed to be selected, the Q check conditions correspond to Q code segments of the first programming language, and each code segment in the Q code segments is used to check whether the virtual resources in the virtual resource set in the application project of the target application meet the corresponding check conditions in the Q check conditions, Q is a positive integer greater than or equal to 1, the Q code segments are in a decoupled relationship with the engineering code of the application project, and the Q check conditions are completely different from or partially different from the N check conditions.
11. A virtual resource inspection device, characterized in that: include: a first display unit, configured to display a first check condition list on a resource check interface, wherein the first check condition list includes N check conditions that are allowed to be selected, the N check conditions correspond to N code segments in a first programming language, each of the N code segments is configured to check whether a virtual resource in a virtual resource set in an application project of a target application satisfies a corresponding check condition in the N check conditions, N is a positive integer greater than or equal to 1, and the N code segments are in a decoupled relationship with an engineering code of the application project; a first processing unit, configured to, when M inspection conditions in the first inspection condition list are selected when the application project is running, run M segments of code corresponding to the M inspection conditions to obtain a first inspection result, wherein the N inspection conditions include the M inspection conditions, the N segments of code include the M segments of code, M is a positive integer greater than or equal to 1 and less than or equal to N, and the first inspection result is used to indicate whether a first group of virtual resources in the virtual resource set meets the M inspection conditions, and the first group of virtual resources includes virtual resources in the virtual resource set corresponding to the M inspection conditions; The second display unit is used to display the first inspection result on the resource inspection interface.
12. The method according to claim 11, characterized in that The first processing unit comprises: A first processing module, configured to search the virtual resource set for a virtual resource corresponding to each of the M inspection conditions to obtain M groups of virtual resources, wherein the first group of virtual resources includes the M groups of virtual resources; The first inspection module is used to check whether each group of virtual resources in the M groups of virtual resources meets the corresponding inspection conditions in the M inspection conditions, and obtain M inspection results, wherein each inspection result in the M inspection results is used to indicate whether a corresponding group of virtual resources in the M groups of virtual resources meets a corresponding inspection condition in the M inspection conditions, and the first inspection result includes the M inspection results.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 10.
14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
