CN112199093B - Resource checking method, device, equipment and computer readable storage medium - Google Patents
Resource checking method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN112199093B CN112199093B CN202011102183.XA CN202011102183A CN112199093B CN 112199093 B CN112199093 B CN 112199093B CN 202011102183 A CN202011102183 A CN 202011102183A CN 112199093 B CN112199093 B CN 112199093B
- Authority
- CN
- China
- Prior art keywords
- resource
- preset
- check
- checking
- inspection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 103
- 238000007689 inspection Methods 0.000 claims abstract description 198
- 238000013515 script Methods 0.000 claims description 39
- 230000000007 visual effect Effects 0.000 claims description 25
- 230000015654 memory Effects 0.000 claims description 23
- 239000000463 material Substances 0.000 claims description 20
- 230000008569 process Effects 0.000 claims description 19
- 230000006870 function Effects 0.000 claims description 17
- 230000002159 abnormal effect Effects 0.000 claims description 14
- 230000003068 static effect Effects 0.000 claims description 13
- 238000007906 compression Methods 0.000 claims description 12
- 230000006835 compression Effects 0.000 claims description 12
- 230000009191 jumping Effects 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 5
- 241001559542 Hippocampus hippocampus Species 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000004048 modification Effects 0.000 description 9
- 238000012986 modification Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 102100028630 Cytoskeleton-associated protein 2 Human genes 0.000 description 2
- 101000766848 Homo sapiens Cytoskeleton-associated protein 2 Proteins 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- WOERBKLLTSWFBY-UHFFFAOYSA-M dihydrogen phosphate;tetramethylazanium Chemical compound C[N+](C)(C)C.OP(O)([O-])=O WOERBKLLTSWFBY-UHFFFAOYSA-M 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a resource checking method, a device, equipment and a computer readable storage medium; the method comprises the following steps: receiving a resource checking instruction through a preset calling entrance; the preset calling entry is a function entry for starting resource inspection through a preset interface; acquiring description information of a to-be-inspected resource specified in a resource inspection instruction; the description information comprises at least two types of attribute information; matching the attribute information with at least two levels of preset corresponding relations of the checking rule set library based on the description information to determine a target checking rule set corresponding to the description information; the target check rule set comprises at least one preset check rule applicable to the resource to be checked; and checking the resources to be checked according to the target checking rule set to obtain a checking result. By the method and the device, the flexibility of resource inspection can be improved, and the diversity is realized.
Description
Technical Field
The present application relates to data processing technologies, and in particular, to a resource checking method, device, and apparatus, and a computer-readable storage medium.
Background
At present, a large number of resource files with various types are often available in a large-scale software development or resource development project, especially development projects such as games and industrial design. In order to avoid influencing the normal operation of the project development software due to resource file errors, the resource files in the project need to be periodically checked. At present, the resource file is inspected by manual inspection or by using an existing automatic inspection tool. However, for a huge amount of resource files, the efficiency of manual inspection is low, the period is long, while the current automatic inspection tool depends on a specific resource editing tool, and the inspection rule is single, so that the flexibility of resource inspection is reduced.
Disclosure of Invention
The embodiment of the application provides a resource checking method, a resource checking device and a computer readable storage medium, which can improve the flexibility and diversity of resource checking.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a resource checking method, which comprises the following steps:
receiving a resource checking instruction through a preset calling entrance; the preset calling entry is a function entry for starting resource inspection through a preset interface;
acquiring description information of the specified resource to be checked in the resource checking instruction; the description information comprises at least two types of attribute information;
matching in at least two levels of preset corresponding relations between attribute information and a check rule set library based on the description information, and determining a target check rule set corresponding to the description information; the target check rule set comprises at least one preset check rule applicable to the resource to be checked;
and checking the resource to be checked according to the target checking rule set to obtain a checking result.
An embodiment of the present application provides a resource inspection apparatus, including: .
The receiving module is used for receiving a resource checking instruction through a preset calling entrance, and the preset calling entrance is a function entrance for starting resource checking through a preset interface;
the acquisition module is used for acquiring the description information of the to-be-inspected resource specified in the resource inspection instruction; the description information comprises at least two types of attribute information;
the matching module is used for matching in at least two levels of preset corresponding relations between the attribute information and the checking rule set library based on the description information to determine a target checking rule set corresponding to the description information; the target check rule set comprises at least one check rule applicable to the resource to be checked;
and the checking module is used for checking the resource to be checked according to the target checking rule set to obtain a checking result.
An embodiment of the present application provides a resource check device, including:
a memory for storing executable instructions;
and the processor is used for realizing the resource checking method provided by the embodiment of the application when the executable instructions stored in the memory are executed.
The embodiment of the present application provides a computer-readable storage medium, which stores executable instructions for causing a processor to execute the method for checking resources provided by the embodiment of the present application.
The embodiment of the application has the following beneficial effects: the embodiment of the application provides a preset calling entry for different tool platforms and different starting modes of resource inspection, for example, the resource inspection method in the embodiment of the application can be called in a plug-in mode on an automatic script execution process or a visual resource editing interface, and an applicable inspection rule set can be matched from an inspection rule base for resource inspection through at least two types of attribute information of the resource to be inspected, so that the application range of the resource inspection rule can be accurate to the resource file defined by the at least two types of attribute information, and the flexibility of the resource inspection is improved, and the resource inspection has diversity.
Drawings
FIG. 1 is an alternative structural diagram of a resource checking system architecture provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative configuration of a resource checking apparatus according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an alternative resource checking method provided in the embodiment of the present application;
FIG. 4 is a schematic illustration of an inspection report provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of an alternative resource checking method provided in the embodiments of the present application;
FIG. 6 is a schematic flow chart of an alternative resource checking method provided in the embodiments of the present application;
FIG. 7 is a schematic diagram of a process of receiving a resource checking instruction through a preset control instruction on a visual graphical interface of a resource editor according to an embodiment of the present application;
FIG. 8 is a schematic flow chart of an alternative resource checking method provided in the embodiments of the present application;
FIG. 9 is a schematic flow chart of an alternative resource checking method provided in the embodiments of the present application;
FIG. 10 is a schematic flow chart of an alternative resource checking method provided by the embodiment of the present application;
FIG. 11 is a code structure diagram of a resource checking method provided in an embodiment of the present application;
FIG. 12 is a schematic flow chart of an alternative resource checking method according to an embodiment of the present application;
FIG. 13 is an alternative flow chart of a resource checking method according to an embodiment of the present application;
FIG. 14 is a diagram illustrating the effect of a resource check report provided by an embodiment of the present application;
FIG. 15 is a schematic flow chart of an alternative resource checking method according to an embodiment of the present application;
fig. 16 is an alternative flowchart of a resource checking method according to an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, so as to enable the embodiments of the application described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
The following describes an exemplary application of the resource checking device provided in the embodiments of the present application, and the resource checking device provided in the embodiments of the present application may be implemented as various types of user terminals such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, and a portable game device), and may also be implemented as a server. In the following, an exemplary application when the resource checking device is implemented as a terminal will be explained.
Referring to fig. 1, fig. 1 is an alternative architecture diagram of a resource checking system 100 provided in this embodiment of the present application, in order to implement supporting a resource checking application, a terminal 400 is connected to a server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two.
The terminal 400 is configured to receive a resource check instruction through a preset call entry; the preset calling entry is a function entry for starting resource inspection through a preset interface; acquiring description information of a specified resource to be checked in a resource checking instruction; the description information comprises at least two types of attribute information; matching the attribute information with at least two levels of preset corresponding relations of the checking rule set library based on the description information to determine a target checking rule set corresponding to the description information; the target check rule set comprises at least one preset check rule applicable to the resource to be checked; and checking the resource to be checked according to the target checking rule set to obtain a checking result, displaying the checking result on the graphical interface 410, and storing at least one resource to be checked by the server 200.
In some embodiments, the server 200 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. The terminal 400 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application is not limited.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a terminal 400 provided in an embodiment of the present application, where the terminal 400 shown in fig. 2 includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in fig. 2.
The Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 450 optionally includes one or more storage devices physically located remote from processor 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in this embodiment may be implemented in software, and fig. 2 illustrates a resource checking apparatus 455 stored in the memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: a receiving module 4551, an obtaining module 4552, a matching module 4553 and a checking module 4554, which are logical and thus may be arbitrarily combined or further split depending on the functions implemented.
The functions of the respective modules will be explained below.
In other embodiments, the apparatus provided in this embodiment of the present Application may be implemented in hardware, and as an example, the resource checking apparatus provided in this embodiment of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the resource checking method provided in this embodiment of the present Application, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
The resource checking method provided by the embodiment of the present application will be described in conjunction with exemplary applications and implementations of the terminal provided by the embodiment of the present application.
Referring to fig. 3, fig. 3 is an alternative flowchart of a resource checking method provided in an embodiment of the present application, and will be described with reference to the steps shown in fig. 3.
S101, receiving a resource check instruction through a preset call entrance; the preset calling entry is a function entry for starting resource check through a preset interface.
The method in the embodiment of the application is applicable to a scene of checking resource files in a software development project or a resource development project, for example, a scene of checking game resources on a platform of a Unreal Engine (UE) 4.20 and later versions.
In S101, the resource checking tool may enter a preset call entry to start a function of resource checking on a preset interface, and receive a resource checking instruction.
In S101, the preset call entry is a function entry for starting resource check through a preset interface, in some embodiments, the preset call entry may be a call statement in a preset format, and when called by the automation script, the resource check method in the embodiment of the present application may be called by the call statement in the preset format to receive a resource check instruction. In some embodiments, the resource checking method in the embodiments of the present application may be run in a graphical resource editing interface in the form of a plug-in, where the preset call entry may be a preset menu item of the graphical resource editing interface, and when a resource is selected in the graphical resource editing interface for resource checking, the preset menu item may be used as a function entry of the plug-in, and a resource checking instruction is received by entering the preset menu item.
S102, obtaining description information of the to-be-inspected resource appointed in the resource inspection instruction; the description information contains at least two types of attribute information.
In S102, upon receiving the resource check instruction, the description information of the resource to be checked specified by the resource check instruction may be acquired from the resource check instruction.
In S102, the description information is used to describe the attribute of the resource to be checked, and identify the resource to be checked in the resource file library or at least one resource to be checked. For the resources to be inspected with different attributes, corresponding inspection needs to be performed through different preset inspection rules, so that the resource inspection apparatus needs to obtain description information of the resources to be inspected so as to further determine the preset inspection rules applicable to the resources to be inspected.
In some embodiments, at least two types of attribute information in the description information may be path information, type information, name information, file tag information, and the like of the resource to be checked, which are specifically selected according to the actual situation, and the embodiment of the present application is not limited.
In some embodiments, when the description information contains a resource type of the resource to be inspected, the resource type may be at least one of a map resource, a reference resource, a static grid resource, a material resource, an animation resource, a blueprint resource.
S103, matching the attribute information with at least two levels of preset corresponding relations of the check rule set library based on the description information, and determining a target check rule set corresponding to the description information; the target check rule set comprises at least one preset check rule applicable to the resource to be checked.
In S103, the check rule set library includes a plurality of preset check rule sets, and the resource check device matches the attribute information with at least two levels of preset corresponding relationships in the check rule set library according to the obtained description information, so as to determine a target check rule set applicable to the resource to be checked.
In S103, since the description information includes at least two types of attribute information, the preset corresponding relationship between the attribute information and the check rule set library may include at least two levels of preset corresponding relationships. In some embodiments, the resource checking device may divide the checking rule set library in a recursive manner according to at least two types of preset attribute information in advance: and dividing the preset inspection rule set library into at least one group according to the first-class attribute information, wherein each group of groups also comprises sub-groups corresponding to other preset attribute information, and performing recursive corresponding division until each preset inspection rule set corresponding to the last-class preset attribute information is divided. Thus, the at least two levels of preset correspondence may include a preset correspondence between the first type of preset attribute information and at least one packet, a recursive correspondence between at least one type of other preset attribute information and a sub-packet, and a correspondence between the last type of preset attribute information and each preset check rule set. When the resource checking device uses the description information to match in the preset corresponding relation between the attribute information and the checking rule set library, the target checking rule set can be matched from the checking rule set library according to the preset corresponding relation of at least two levels of layer-by-layer recursion.
In some embodiments, the resource checking device may also pre-establish a corresponding relationship between preset description information defined by at least two types of preset attribute information and each preset checking rule set in the checking rule set library. In this way, when the resource check device uses the description information to match in the preset corresponding relationship between the attribute information and the check rule set library, at least two types of attribute information in the description information can be directly matched and simultaneously meet the target preset description information, and the preset check rule set corresponding to the target preset description information is used as the target check rule set.
In S103, at least one preset check rule in the target check rule set is set. At least one preset check rule is preset and is used for carrying out resource check on the resource to be checked containing the corresponding preset attribute information. Because the description information of the resource to be checked is matched with the attribute information in the preset corresponding relation, at least one preset check rule in the target check rule set is also suitable for checking the resource to be checked.
In some embodiments, when the resource type of the resource to be checked is a static grid resource, the at least one preset check rule includes at least one of a collision preset check, a horizontal/vertical channel number check, a horizontal/vertical resource out-of-bounds check, a number of level of detail check, a bounding box size check, and a simple collider number check. The resource check device may check configuration contents such as a level of Detail (LOD), a material, a collision, a LightMap parameter, and the like of the static grid resource through at least one preset check rule.
In some embodiments, when the resource type of the resource to be checked is a material resource, the at least one preset check rule includes at least one of a material type check, a compression mode check, a standard RGB (sRGB) check, and a reference map check.
In some embodiments, when the resource type of the resource to be checked is an animation resource, the at least one preset check rule includes at least one of support length check, compression mode check, root skeleton animation check and naming specification check.
In some embodiments, when the resource type of the resource to be checked is a blueprint resource, the at least one preset check rule includes support for at least one of a blueprint naming specification check, a logic method specification check, a parameter specification check, a comment specification check, and a reference object check. The resource checking device can check the content of the blueprint resource such as naming specification, logic method specification, parameter specification, annotation specification, reference object and the like through at least one preset checking rule.
In some embodiments, when the resource type of the resource to be checked is a reference resource, the resource checking apparatus may check whether the reference resource is valid by reading a reference list of the resource to determine whether the reference in the reference list is valid.
And S104, checking the resource to be checked according to the target checking rule set to obtain a checking result.
In S104, after the resource checking device determines the target checking rule set, the resource to be checked may be checked by using at least one preset checking rule in the target checking rule set, so as to obtain a checking result.
In some embodiments, the check result may include a normal result and an abnormal check result, and the abnormal check result may include an Error type check result and an alert type check result, where the Error (Error) type check result may be a check result generated after a strict preset check rule is violated, and the resource to be checked corresponding to the Error type check result may be corrected automatically or manually. The Warning (Warning) type check result may be a check result generated after a statistical or loose preset check rule is violated, the to-be-checked resource corresponding to the Warning type check result usually does not cause an operation error and may not be corrected, but when the number of the Warning type check results is increased, the performance or the overall quality of the corresponding software application, such as a game, may be affected to some extent.
In some embodiments, the resource checking apparatus may be configured to run in the UE editor in the form of a plug-in, invoke the plug-in through a preset menu item in a right-click menu, perform resource checking on the selected resource to be checked, and display a checking result in the form of a checking report in the UE editor after the checking is completed, as shown in fig. 4, where fig. 4 is a visual graphical interface in the resource editor, and fig. 4 shows a checking result corresponding to at least one resource to be checked included in a seahorse _ main scene, where the checking result includes 4 Error type checking results, which are respectively an Error type checking result found by performing collision preset checking (collision presets) on seahorse _ building _25-B to-be-checked resource, an Error type checking result found by performing illumination parameter checking (lightbooks) on seahorse _ building _12 to-be-checked resource, a checking result found by performing preset collision preset checking on seahorse _ building _12 to-be-checked resource, and a checking result found by performing preset collision preset collision checking on seahorse _ building _12 to-be-checked resource And performing corresponding preset check rules on reference resources, namely 5 Static grid (Static Mesh) resources in the seahorse _ main scene to find Error type check results. The seahorse _ building _25-B, Seashore _ building _12 and seahorse _ building _12 are resource files corresponding to images of buildings, the ground and the like contained in the seahorse _ main scene.
It should be noted that, in this embodiment of the present application, for a case that the resource check instruction specifies at least one resource to be checked, the resource check apparatus may perform the same resource check on each resource to be checked in the at least one resource to be checked by using the above method, so as to complete the resource check on the at least one resource to be checked.
It can be understood that, the embodiment of the present application provides a preset call entry for different tool platforms and different starting modes of resource check, for example, the resource check method in the embodiment of the present application may be called in the form of a plug-in on an automated script execution process or a visual resource editing interface, and an applicable check rule set may be matched from a check rule base for resource check through at least two types of attribute information of a resource to be checked, so that an applicable range of a resource check rule may be accurate to a resource file defined by the at least two types of attribute information, thereby improving flexibility of resource check and having diversity.
Referring to fig. 5, fig. 5 is an optional flowchart of the resource checking method provided in the embodiment of the present application, based on fig. 3, the preset interface is an automation script running interface, the preset call entry is a preset resource checking script call statement, and S101 shown in fig. 3 can be implemented by S201, which will be described with reference to each step.
S201, in the running process of the automation script, when a preset script calling statement is executed, calling a preset resource checking statement through the preset script calling statement, and taking the preset resource checking statement as a resource checking instruction; and the preset calling entry is a preset script calling statement.
In S201, the resource checking device may embed an automation script in the form of a plug-in, and the automation script calls a function through a calling method in a preset format, such as a preset script calling statement. When the automatic script on the terminal is executed to the preset script calling statement in the running process, the terminal can call the preset resource checking statement through the preset script calling statement, and the preset resource checking statement is used as a resource checking instruction and received by the resource checking device.
In S201, in the preset resource check statement, the number of resources to be checked may be at least one.
It can be understood that in the embodiment of the application, a preset script calling statement is used for receiving a resource checking instruction on an automation script running interface, so that a resource checking function can be embedded into a project construction and self-checking pipeline, and timed, quantitative and directional resource automation checking is realized.
Referring to fig. 6, fig. 6 is an optional schematic flow chart of the resource inspection method provided in the embodiment of the present application, in some embodiments, the preset interface is a visual graphical interface, and the visual graphical interface is used for displaying and managing the resource to be inspected, based on fig. 3, S101 shown in fig. 3 can be implemented through S301 to S302, and the description will be given with reference to the steps.
S301, when a preset control instruction acting on a preset interface is received, responding to the preset control instruction, popping up a preset window, and displaying a preset call entry in the preset window.
In S301, the preset interface may be a graphical visual interface of a resource editor or a software tool platform, the preset call entry may be a preset menu item in the resource editor interface, the preset window may be a pop-up right-click menu, and the preset call entry may be a resource check menu item in the right-click menu. When a preset control instruction is received on a preset interface, illustratively, after a right button is clicked after a resource to be checked is selected in a graphical visual interface of a resource editor or a software tool platform, the resource checking device displays a resource checking menu item in a popped right button menu as a preset call entry.
S302, generating a resource checking instruction through a preset trigger operation acting on a preset call entry.
In S302, when the preset call entry is displayed, the resource checking apparatus may generate a resource checking instruction through a preset trigger operation acting on the preset call entry.
In some embodiments, the process of receiving the resource checking instruction through the preset control instruction on the visual graphical interface of the resource editor may be as shown in fig. 7. On the content browsing interface 71 of the resource editor shown in fig. 7, the image resource 6 whose resource to be checked is in the selected state may be previously set in the selected state by means of frame selection, clicking, and the like; the preset key instruction can be a right click instruction, when the right click instruction is received, a right menu list 72 pops up on the current editor interface, and a resource check menu item 73 is displayed in the right menu list 72 and serves as a preset calling inlet; when a preset trigger instruction acting on the "resource check" menu item 73 is received, if a click instruction on the "resource check" menu item is received, the resource check instruction can be received, and then the resource check on the image resource 6 is started, and the progress of the resource check is displayed in the progress window 74. Of course, the resource inspection apparatus may also select a plurality of resource files as the resource files to be inspected in the interface shown in fig. 7, and then generate a resource inspection instruction by clicking a "resource inspection" menu item in the right-click menu list, thereby starting the resource inspection on the plurality of resource files to be inspected. The specific selection is performed according to actual conditions, and the embodiments of the present application are not limited.
It should be noted that, in this embodiment of the present application, S201 and S301 to S302 are two parallel method flows for implementing S101, and in practical applications, a corresponding method flow may be selected and executed according to the requirement of a project, and this embodiment of the present application is not limited.
In some embodiments, referring to fig. 8, fig. 8 is an optional flowchart of the resource checking method provided in the embodiment of the present application, where the description information includes: the resource path and the resource type, the at least two levels of preset corresponding relationships include a first preset corresponding relationship and a second preset corresponding relationship, S103 shown in fig. 3 can be implemented through S401 to S402, and the description will be given with reference to each step.
S401, determining a target check rule set group corresponding to the resource path by using a first preset corresponding relation; the first preset corresponding relation is the corresponding relation between a preset resource path and a preset check rule set group in the check rule set library.
In S401, the check rule set library includes at least one preset check rule set group, the first preset corresponding relationship is a corresponding relationship between a preset resource path and a preset check rule set group in the check rule set library, the resource check device matches the preset resource path and the preset check rule set group according to the resource path, and determines the preset check rule set group matched with the resource path as a target group check rule set.
In S401, at least one preset check rule set group may be obtained by dividing at least one preset resource check statement in advance by a root path in a resource path, where each preset check rule set group includes at least one preset check rule set. In some embodiments, the preset resource check statement may be a statement that defines a preset set of check rules to which the preset resource description applies. For example, the format of the preset resource check statement may be < resource description, preset check rule set >, where the resource description may be a regular expression of a combination of a resource path and a resource type, and each preset check rule set includes at least one preset check rule for checking different resource types.
In some embodiments, the at least one preset resource check statement may include: < regular expression 1 (path a + static grid resources), { collision preset check, bounding box size check } >, < regular expression 2 (path B + material resources), { material type check, compression mode check } >, < regular expression 3 (path a + blueprint resources), { blueprint naming convention check, parameter convention check } >, and < regular expression 4 (path B + animation resources), { support length check, root skeleton animation check } >. Wherein { collision preset check, bounding box size check } is a preset check rule set, and the collision preset check and the bounding box size check are preset check rules in the preset check rule set, and the rest are the same. The resource check device may classify at least one preset resource check statement according to a root path in the resource paths, so as to obtain a corresponding relationship shown in table 1. The resource checking device takes { collision preset check, bounding box size check } and { blueprint naming standard check, parameter standard check } corresponding to the path A as a preset check rule set A, and takes { material type check, compression mode check } and { material type check, compression mode check } corresponding to the path B as a preset check rule set B, so that the resource checking device can obtain the corresponding relation between the resource path and the preset check rule set, namely the first preset corresponding relation.
TABLE 1
S402, determining a target check rule set corresponding to the resource type from the target check rule set group by using a second preset corresponding relation; wherein, the second preset corresponding relationship is the corresponding relationship between the resource type and the check rule set.
In S402, the second preset corresponding relationship is a corresponding relationship between the resource type and the check rule set, and the resource check device matches the corresponding relationship between the resource type and the check rule set according to the resource type of the resource to be checked, so as to obtain a target check rule set corresponding to the resource type.
In some embodiments, the resource checking apparatus may classify the at least one group of preset checks in advance according to the resource types in the at least one preset resource check statement based on table 1, to obtain a preset check rule set corresponding to each resource type, as a second preset corresponding relationship, as shown in the corresponding relationship between the resource types and the preset check rule set in table 2.
TABLE 2
In some embodiments, for the resource to be checked whose description information is the type of the blueprint resource under the path a, the resource checking apparatus may perform step-by-step matching by the methods in S401 to S402, and obtain { blueprint naming specification check, parameter specification check } as the target checking rule set.
In some embodiments, referring to fig. 9, fig. 9 is an optional flowchart of the resource checking method provided in the embodiments of the present application, and based on fig. 8, after S401, S403 may also be executed, which will be described with reference to each step.
S403, determining a target check rule set corresponding to the combination of the resource type and the resource path from the target check rule set group by using a second preset corresponding relation; the second preset corresponding relation is the corresponding relation between the preset type path combination and the check rule set; the type path combination is a combination of a resource type and a resource path.
In S403, the second preset corresponding relationship is a corresponding relationship between the preset type path combination and the check rule set; the type path combination is a combination of a resource type and a resource path, and the resource checking device may determine, according to the resource path and the resource type in the description information, a target check rule set corresponding to the combination of the resource type and the resource path from the target check rule set group by using a second preset correspondence.
In some embodiments, S403 may be specifically implemented by S4031 to S4033, and will be described with reference to the following steps:
s4031, determining a target resource sub-path with the highest matching degree with the resource path from the preset resource sub-path set.
In S4031, the preset resource sub-path set is a set of preset sub-paths corresponding to at least one preset resource path, and the resource inspection apparatus matches the resource path with the preset resource sub-path set to determine a target resource sub-path with the highest matching degree with the resource path.
In some embodiments, the resource checking device may first use a preset resource sub-path including all resource paths as at least one initially allocated resource sub-path; and further matching at least one initial resource sub-path, and determining an initial resource sub-path with the highest matching degree with the minimum recursion sub-path contained in the resource path as a target resource sub-path.
In some embodiments, the resource path of the resource to be checked may be a resource directory a/B/C, and for the resource path, the resource checking apparatus matches the resource path in at least one preset resource sub-path, and may match a preset resource sub-path: A. the A/B and the A/B/C are used as at least one initial resource sub-path. Further, for the resource path a/B/C, the minimum recursive sub-path is the resource directory C, so the resource checking apparatus can determine the a/B/C as the target resource sub-path from the A, A/B and the initial resource sub-paths of the a/B/C.
S4032, combining the target resource sub-paths and the resource types to obtain a target type path combination.
In S4032, the resource inspection apparatus obtains a target type path combination by combining the target resource sub-path and the resource type in the description information, and uses the target type path combination together as index information in the next matching process.
And S4033, determining a target inspection rule set corresponding to the target type path combination by using a second preset corresponding relation.
In S4033, the resource inspection apparatus determines a target inspection rule set corresponding to the target type path combination from the correspondence between the preset type path combination and the inspection rule set, using the second preset correspondence.
In the embodiment of the present application, S401 to S402 shown in fig. 8 and S401 to S403 shown in fig. 9 are two parallel method flows for implementing S103, and in practical applications, a corresponding method flow may be selected and executed according to the needs of a project, and the embodiment of the present application is not limited.
It should be noted that, in this embodiment of the application, the preset resource path or the preset type path combination may be embodied in the preset resource check statement in the form of a regular expression such as js (javascript) regular expression, where the preset resource check statement may represent the first preset corresponding relationship and the second preset corresponding relationship through a preset statement format, such as a format of < (resource path regular expression + resource type), and a preset check rule set >, and the resource management device may match the resource path and the resource type in the description information with the preset resource check statement, so as to implement the process of matching by using the first preset corresponding relationship and the second preset corresponding relationship.
In some embodiments, the preset resource path or the preset type path combination may also be a character string in another preset format or preset syntax mode, and the like, which is specifically selected according to an actual situation, and the embodiment of the present application is not limited.
It can be understood that, in the embodiment of the present application, the resource checking device can perform resource checking of the custom rule on different resource types under different resource paths, so that flexibility of resource checking is improved, and the resource checking device has diversity.
Referring to fig. 10, fig. 10 is an optional flowchart of the resource checking method provided in this embodiment of the present application, and in some embodiments, based on fig. 8 or fig. 9, before S401, S001-S002 may be further performed, which will be described with reference to each step.
S001, obtaining at least one preset inspection standard, wherein each preset inspection standard comprises preset attribute information and at least one preset inspection content corresponding to the preset attribute information; the preset attribute information includes preset path information and preset type information.
In S001, the resource check device may obtain a check specification file or document recorded in a preset standard format, which is agreed in the project, and use different check contents, which are correspondingly defined for different types of resource files with different paths and included in the check specification file or document, as at least one preset check specification, so as to automatically convert the at least one preset check specification into an executable script statement through a script language.
In S001, each preset inspection specification includes preset attribute information and at least one preset inspection content corresponding to the preset attribute information; the preset attribute information includes preset path information and preset type information.
In some embodiments, the at least one predetermined inspection specification may include the following specifications: and performing collision preset check on the static grid resources contained in the resource catalog A, and performing material type check on the material resources contained in the resource target A/B.
S002, in at least one preset inspection specification, converting preset attribute information in each preset inspection specification into preset resource description statements through a scripting language, converting at least one preset inspection content in each preset inspection specification into a preset inspection rule set, and further generating preset resource inspection statements in a preset statement format corresponding to each preset inspection specification to obtain at least one preset resource inspection statement; the at least one preset resource check statement is used for representing a first preset corresponding relation based on the preset path information and the preset check rule set and representing a second preset corresponding relation based on the preset type information and the preset check rule set.
In S002, the resource check device converts at least one preset check specification into at least one preset resource description statement through the scripting language.
In S002, for each preset inspection rule in the at least one preset inspection rule, the resource inspection apparatus may convert the preset attribute information in each preset inspection rule into a preset resource description statement, and convert at least one preset inspection content in each preset inspection rule into the at least one preset inspection rule. The resource checking device takes at least one preset checking rule as a preset checking rule set, and generates a preset resource checking statement corresponding to the preset checking specification according to a preset resource description statement and the preset checking rule set. The resource checking device carries out the same process conversion on at least one preset checking specification, so that at least one preset resource checking statement corresponding to at least one preset checking specification is obtained.
In S002, the at least one preset resource check statement is configured to represent a first preset corresponding relationship based on the preset path information and the preset check rule set, and represent a second preset corresponding relationship based on the preset type information and the preset check rule set.
In some embodiments, the preset resource check statement may be in the form of < resource description, preset check rule set >, when at least one preset check specification comprises: performing collision preset check and bounding box size check on the static grid resource types contained in the resource catalog A; when material type inspection and compression mode inspection are carried out on material resources contained in the resource target A/B, the resource inspection device generates a regular expression 1(A + static grid resources), { collision preset inspection, and bounding box size inspection } >; and < regular expression 2(B + material resource), { material type check, compression mode check } > as at least one preset resource check statement corresponding to the at least one preset check specification.
In some embodiments, the preset resource check statement may be stored in the terminal in the form of a configuration file.
In some embodiments, the resource checking apparatus may generate a preset resource checking statement based on a code structure call as shown in fig. 11, where fig. 11 is a Unified Modeling Language (UML) class diagram of a code structure implementing the resource checking method in the embodiment of the present application. The automation system comprises an automation script platform, a Windows console, an automation report class and a resource automatic detection pipeline, wherein the automation class is used for realizing the function of starting the resource automatic detection pipeline on the automation script platform such as the Windows console, the automation class can realize the starting of the automatic script execution in specific automation application such as the Windows console by calling an automation application class method, and the automation report class can be called in the automation application class, wherein the automation report class is used for automatically detecting the input resource to be detected and storing the statistical information of the detection result; meanwhile, historical statistical information of the resource to be inspected is acquired and integrated, and the integrated information and the inspection result are displayed in a visual report. The resource checking method in the embodiment of the application can be realized in the automatic report type by calling the target checking rule set matching type and the target checking rule set matching type according to the information reported by the target checking rule set matching type and the target checking rule set matching type, and recording the checking result and generating the checking report.
In fig. 11, the target check rule set group matching class includes a first preset correspondence in the form of < resource path, check rule set group >, and information of all check rule sets included in the check rule set group. The target check rule set matching class is used for matching a target check rule set group by using a resource path of a resource to be checked, and the < resource path, check rule set group > so as to obtain a check rule set in the target check rule set group and report the check rule set to the automatic reporting class. The target check rule set matching class contains a second predetermined correspondence in the form of a < resource type, check rule set >, and a target check rule set, for matching out the target checking rule set by the resource type of the transmitted resource to be checked and using the < resource type, checking rule set > and reporting the target checking rule set to the automatic report class, wherein the target check rule set matching class may determine at least one preset check rule in the target check rule set by calling the check rule set class, wherein, different preset checking rules can be realized by different subclasses derived from the preset checking rule class or methods, as shown in fig. 11, the preset check rule class may derive sub-classes or methods such as detail level number check, compression check, and bounding box size check, which are used to perform corresponding checks on resource files of different resource types.
In fig. 11, for a scenario where a resource check is started on a resource editor, a graphical interface wizard may be called through a graphical interface class, a preset interface is displayed on a screen, and a graphical interface report class is called in the graphical interface wizard class to call a target check rule set matching class and a target check rule set matching class, where a subsequent calling process is consistent with the description of the calling process in the above-mentioned automated scenario, and is not described here again.
In some embodiments, the < resource path, check Rule set group > may be code implemented in a format of TMAP < AssetPath, RuleSet >, the < resource type, check Rule set > may be code implemented in code in a format of TMAP < AssetType, RuleList >, and the list of at least one preset check Rule may be code implemented in a format of TArray < Rule >.
In some embodiments, the graphical interface class is used to add a callback method to a preset key instruction, such as a right click resource or a directory instruction, on a preset interface, such as a content browser interface of a UE4 editor, check the clicked directory or resource when the callback method is called, and create a window in the editor to show the check result.
It can be understood that, in the embodiment of the present application, the resource inspection apparatus converts the preset inspection specification information through the scripting language, obtains the preset resource inspection statements of the preset correspondence and the preset inspection rules, and improves the degree of automation from formulating the resource specification to inspecting the resource, and defines the corresponding preset inspection rule set to different preset resource types under different preset resource paths, and defines the inspection rules of the resource files under different types and different directory structures, thereby improving the flexibility of resource customization, and having diversity.
In some embodiments, referring to fig. 12, fig. 12 is an optional flowchart of the resource checking method provided in the embodiments of the present application, and based on fig. 3, after S104, S105-S107 may also be executed, which will be described with reference to each step.
And S105, acquiring a historical inspection result of the resource to be inspected.
In S105, the resource check device stores the check result of each check process in advance, and after obtaining the check result of the current check process, the resource check device may further obtain the historical check result of the check resource.
In some embodiments, when the resource to be checked is a plurality of resource files under one directory, the resource checking apparatus may obtain, in units of directories, a history check result obtained by previously performing a resource check on the directory.
And S106, generating an inspection report according to the historical inspection result and the inspection result.
In S106, the resource inspection apparatus may generate a comparison inspection result based on the historical inspection result and the current inspection result, and use the comparison inspection result as an inspection report to indicate the historical resource status and the fault convergence status of the same resource file.
And S107, displaying a preset display window on the visual graphical interface, and displaying the inspection report through the preset display window.
In S107, the resource checking device may display a preset display window on the preset interface, and display the check report through the preset display window.
In some embodiments, before S107 shown in fig. 12, S501 may be further included, which will be described in conjunction with the steps.
S501, generating a link address of a resource to be checked; and the link address is used for jumping to a preset editing page of the resource to be checked.
In some embodiments, referring to fig. 13, fig. 13 is an optional flowchart of a resource checking method provided in the embodiments of the present application, and based on fig. 12 and S501, the check report includes: a visual chart; as shown in fig. 13, S107 can be realized by S1071 to S1073, and the description will be given with reference to each step.
S1071, generating the checking information according to the link address and the checking result.
S1072, adding the inspection information into the inspection report and displaying the inspection information and the inspection report in a preset window together.
In the embodiment of the application, after the resource inspection device inspects all the resources to be inspected, the HTML character string of the preset template can be read, the HTML character string comprises a chart template for displaying error information statistics and a template for displaying error information details, the occupied information in the chart and the template is replaced by the statistical information and the error information for resource inspection, the HTML character string of the template is written into a file, and the HTML character string is stored in the corresponding directory according to the inspected directory name. Meanwhile, when the directory or a scene is checked each time, the error numbers of different types are counted, the data and the checking time are stored in the CSV file, the historical records in the CSV file are read each time a new HTML report is made, and a histogram of the error number change trend is drawn in the HTML report.
In some embodiments, referring to fig. 14, fig. 14 is a schematic diagram illustrating the effect of an inspection report including inspection information and a comparison inspection result provided by an embodiment of the present application, in fig. 14, the resource inspection result is presented in the form of an HTML visualization report, which includes a rule violation statistics, a histogram showing a rule violation inverse transformation trend in the same directory, and details of the rule violation. The inspection report in the embodiment of the application can be displayed in a preset display window, and can also be sent to all developers who concern about the resources of the type in an email mode, so that the subsequent resource repair iteration is accelerated.
In some embodiments, as shown in fig. 14, the details of the rule violation include at least one abnormal inspection result corresponding to the connection address of the resource to be inspected and the connection address of the resource to be inspected, and different types of inspection results can be distinguished by different colors or patterns on the histogram of the inverse transformation trend of the rule violation.
It can be understood that, in the embodiment of the present application, the resource inspection apparatus generates the inspection report by obtaining the historical inspection result, and can implement correction and regression of resource errors of the same resource file for a long time. Therefore, the speed of project resource error correction iteration is increased, and high-quality resource output of the project is guaranteed. Moreover, the distribution of resource errors and the historical change trend of the similar resource inspection can be more intuitively reflected by displaying the historical version comparison graph, so that the usability of the inspection result is improved.
S1073, when a click instruction acting on the link address is received, responding to the click instruction, jumping to a preset editing page corresponding to the resource to be checked, and modifying the resource to be checked on the preset editing page.
In the embodiment of the application, when the link address of the resource to be checked in the check report is clicked, the resource checking device adjusts the page to the preset editing page corresponding to the resource to be checked, and receives a manual modification instruction of the resource to be checked on the preset editing page.
It should be noted that, in the embodiment of the present application, the link address is used as a link for jumping to a preset editing page corresponding to the resource to be checked, the resource to be checked may be modified according to the abnormal checking result through the link address, the resource to be checked of the normal result may also be modified through the link address, and the specific selection is performed according to the actual situation, which is not limited in the embodiment of the present application.
In some embodiments, referring to fig. 15, fig. 15 is an optional flowchart of the resource checking method provided in the embodiments of the present application, and based on fig. 12 and S107, S108 to S109 may also be executed, which will be described with reference to each step.
And S108, identifying an abnormal inspection result of the resource to be inspected from the inspection results.
And S109, correcting the abnormal detection result.
In the embodiment of the application, the resource inspection device can also automatically identify the abnormal inspection result in the inspection result, and when the abnormal inspection result is identified from the inspection result, the batch processing instruction is executed to correct the resource to be inspected through the link address.
It can be understood that, in the embodiment of the present application, the resource inspection apparatus may modify the resource to be inspected through the inspection result or the inspection report quickly through the modification entry provided on the inspection result or the inspection report, so as to improve the efficiency of the resource inspection and the resource modification.
Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described. Referring to fig. 16, fig. 16 is a flowchart illustrating the execution of the resource checking method in the embodiment of the present application, which will be described with reference to steps.
And S160_1, starting automatic resource detection through the console.
In S160_1, the console may be a resource editing tool platform of the graphical interface.
S160_2, selecting resources or paths for checking through an editor.
And S161, calling an inspection report module and starting a resource inspection process.
In S161, the inspection reporting module includes a graphical interface reporting module or an automated reporting module.
And S162, calling the resource registration module through the inspection report module to obtain at least one resource to be inspected.
In some embodiments, the resource registration Module may be an Asset Register Module.
S163, obtaining the corresponding description information of each resource to be checked in at least one resource to be checked
The description process of S162-S163 is identical to S101, and is not described herein again.
S164, checking each resource to be checked in at least one resource to be checked one by one; and matching the target detection rule set group by utilizing a first preset corresponding relation according to the resource path in the description information of each resource to be detected.
And S165, matching the target detection rule set by using a second preset corresponding relation in the target detection rule set according to the resource type in the description information of each resource to be detected.
S166, matching a target check rule set in the preset corresponding relation between the resource type and at least one preset check rule set according to the resource type in the description information of each resource to be checked.
The target check rule set shown in S166 is check rule set 3.
S166 and S164-S165 are implemented in parallel, and are specifically selected according to actual conditions.
And S167, acquiring at least one preset check rule in the target check rule set.
S168, checking the resource to be checked according to at least one checking rule to obtain a checking result.
S168, S166 and S164-S165 are implemented in parallel, and are specifically selected according to actual situations.
And S169, reporting the inspection result to an inspection report module.
S170, corresponding to the condition that the resource inspection is started in the console through the S160_1, obtaining the historical inspection result of the resource to be inspected, and generating an HTML report by using an HTML template or a CSV template according to the historical inspection result and the current inspection result.
S171, corresponding to the case where the resource check is started in the editor by S160_2, the check result is presented in the creation window of the editor.
Continuing with the exemplary structure of the resource checking device 455 provided by the embodiment of the present application implemented as software modules, in some embodiments, as shown in fig. 2, the software modules stored in the resource checking device 455 of the memory 450 may include:
a receiving module 4551, an obtaining module 4552, a matching module 4553 and a checking module 4554, wherein,
the receiving module 4551 is configured to receive a resource check instruction through a preset call entry, where the preset call entry is a function entry for starting resource check through a preset interface;
the obtaining module 4552 is configured to obtain description information of a resource to be checked specified in the resource check instruction; the description information comprises at least two types of attribute information;
the matching module 4553 is configured to perform matching in at least two preset corresponding relationships between the attribute information and the check rule set library based on the description information, and determine a target check rule set corresponding to the description information; the target check rule set comprises at least one check rule applicable to the resource to be checked;
the checking module 4554 is configured to check the resource to be checked according to the target checking rule set, so as to obtain a checking result.
In some embodiments, the description information comprises: resource path and resource type; the at least two levels of preset corresponding relations comprise: the first preset corresponding relation and the second preset corresponding relation; the matching module 4553 is further configured to determine, by using the first preset corresponding relationship, a target check rule set group corresponding to the resource path; the first preset corresponding relation is the corresponding relation between a preset resource path and a preset check rule set group in the check rule set library; determining the target checking rule set corresponding to the resource type from the target checking rule set group by using the second preset corresponding relation; wherein, the second preset corresponding relation is the corresponding relation between the resource type and the check rule set.
In some embodiments, the matching module 4553 is further configured to determine, after the target check rule set group corresponding to the resource path is determined by using the first preset correspondence, the target check rule set corresponding to the combination of the resource type and the resource path from the target check rule set group by using the second preset correspondence; the second preset corresponding relationship is a corresponding relationship between a preset type path combination and a check rule set; the type path combination is a combination of a resource type and a resource path.
In some embodiments, the matching module 4553 is further configured to determine, from a preset resource sub-path set, a target resource sub-path with a highest matching degree with the resource path; combining the target resource sub-path and the resource type to obtain a target type path combination; and determining the target check rule set corresponding to the target type path combination by using the second preset corresponding relation.
In some embodiments, the preset format of the preset resource path or the preset type path combination is a regular expression.
In some embodiments, the receiving module 4551 is further configured to, in the running process of the automation script, call a preset resource check statement through a preset script call statement when a preset script call statement is executed, and use the preset resource check statement as the resource check instruction; and the preset calling entry is the preset script calling statement.
In some embodiments, the preset interface is a visual graphical interface for displaying and managing the resource to be inspected; the receiving module 4551 is further configured to, when a preset control instruction acting on the visual graphical interface is received, pop up a preset window in response to the preset control instruction, and display the preset call entry in the preset window; and generating the resource checking instruction through a preset trigger operation acting on the preset call entrance.
In some embodiments, the resource checking apparatus 455 further includes a presentation module, where the presentation module is configured to, after checking the resource to be checked according to the target checking rule set, obtain a historical checking result of the resource to be checked; generating an inspection report according to the historical inspection result and the inspection result; displaying a preset display window on the visual graphical interface, and displaying the inspection report through the preset display window.
In some embodiments, the display module is further configured to display a preset display window on the visual graphical interface, and generate a link address of the resource to be checked before the inspection report is displayed through the preset display window; and the link address is used for jumping to a preset editing page of the resource to be checked.
In some embodiments, comparing the inspection results comprises: a visual chart; the resource checking device 455 further includes a modification module, and the presentation module is further configured to generate checking information according to the link address and the checking result; adding the inspection information into the inspection report, and displaying the inspection information and the inspection report in the preset window together; and the modification module is also used for responding to a click instruction when the click instruction acting on the link address is received, jumping to a preset editing page corresponding to the resource to be checked, and modifying the resource to be checked on the preset editing page.
In some embodiments, the inspection result includes an abnormal inspection result, and the modification module is further configured to display a preset display window on the visual graphical interface, and identify the abnormal inspection result of the resource to be inspected from the inspection result after the inspection report is displayed through the preset display window; and correcting the abnormal inspection result.
In some embodiments, the resource type includes at least one of a map resource, a reference resource, a static grid resource, a material resource, an animation resource, a blueprint resource; when the resource type of the resource to be checked is a static grid resource, the at least one preset check rule comprises at least one of collision preset check, horizontal/vertical channel number check, horizontal/vertical resource border crossing check, detail level number check, bounding box size check and simple collision volume number check; when the resource type of the resource to be checked is a material resource, at least one preset check rule comprises at least one of material type check, compression mode check, universal color standard check and reference chartlet check; when the resource type of the resource to be checked is animation resource, at least one preset check rule comprises at least one of length check support, compression mode check, root skeleton animation check and naming specification check; when the resource type of the resource to be checked is a blueprint resource, the at least one preset check rule comprises at least one of blueprint naming specification check support, logic method specification check support, parameter specification check support, annotation specification check support and reference object check support.
In some embodiments, the resource checking apparatus 455 further includes a generating module, where the generating module is configured to, before the target checking rule set group corresponding to the resource path is determined by using the first preset correspondence, obtain at least one preset checking specification, where each preset checking specification includes at least one preset checking content whose preset attribute information corresponds to the preset attribute information; the preset attribute information comprises preset path information and preset type information; in at least one preset inspection specification, converting preset attribute information in each preset inspection specification into a preset resource description statement through a scripting language, converting at least one preset inspection content in each preset inspection specification into a preset inspection rule set, and further generating a preset resource inspection statement in a preset statement format corresponding to each preset inspection specification so as to obtain at least one preset resource inspection statement; the at least one preset resource check statement is used for representing the first preset corresponding relation based on the dimension of the preset path information and the dimension of the preset check rule set, and representing the second preset corresponding relation based on the dimension of the preset type information and the dimension of the preset check rule set.
It should be noted that the above description of the embodiment of the apparatus, similar to the above description of the embodiment of the method, has similar beneficial effects as the embodiment of the method. For technical details not disclosed in the embodiments of the apparatus of the present invention, reference is made to the description of the embodiments of the method of the present application for understanding.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the resource checking method described in the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium having stored therein executable instructions that, when executed by a processor, cause the processor to perform a method provided by embodiments of the present application, for example, the method as illustrated in fig. 3, 5, 6, 8, 9, 10, 12, 13, 15, 16.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of a program, software module, script, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
To sum up, the embodiment of the present application provides a preset call entry for different tool platforms and different resource check starting modes, for example, the resource check method in the embodiment of the present application can be called in a plug-in mode on an automated script execution process or a visual resource editing interface, and an applicable check rule set can be matched from a check rule base for resource check through at least two types of attribute information of a resource to be checked, so that the application range of the resource check rule can be accurate to a resource file defined by the at least two types of attribute information, thereby improving the flexibility of the resource check and having diversity. The method comprises the steps that a preset script calling statement is used for receiving a resource checking instruction on an automatic script running interface, so that a resource checking function can be embedded into a project construction and self-checking assembly line, and the timed, quantitative and directional automatic checking of resources is realized; in addition, the method for converting the preset inspection standard information into the preset resource inspection statement through the scripting language in the embodiment of the application improves the automation degree from resource specification formulation to resource inspection; moreover, the resource inspection device can realize long-term tracking of correction and regression conditions of resource errors of the same resource file by acquiring historical inspection results to generate an inspection report. Therefore, the speed of project resource error correction iteration is increased, and high-quality resource output of the project is guaranteed. Moreover, the distribution of resource errors and the historical change trend of the similar resource inspection can be more intuitively reflected by displaying the historical version comparison graph, so that the usability of the inspection result is improved; in addition, the resource checking device can also quickly modify the resources to be checked through the checking result or the checking report through the modification inlet provided on the checking result or the checking report, thereby improving the efficiency of resource checking and resource modification.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims (15)
1. A resource checking method, comprising:
receiving a resource checking instruction through a preset calling entrance; the preset calling entry is a function entry for starting resource inspection through a preset interface;
acquiring description information of the specified resource to be checked in the resource checking instruction; the description information comprises at least two types of attribute information; the at least two types of attribute information comprise resource paths and resource types;
matching attribute information with at least two levels of preset corresponding relations of a checking rule set library based on the description information to determine a target checking rule set corresponding to the description information; the target check rule set comprises at least one preset check rule applicable to the resource to be checked; the at least two levels of preset corresponding relations comprise a corresponding relation between a preset resource path and a preset check rule set group in the check rule set library and a corresponding relation between a preset resource type and a check rule set;
checking the resource to be checked according to the target checking rule set to obtain a checking result;
generating checking information according to the link address and the checking result; the link address is generated according to the resource to be checked;
adding the inspection information into an inspection report, and displaying the inspection information and the inspection report in the preset window together; the inspection report is generated according to the inspection result and the historical inspection result;
when a click instruction acting on the link address is received, responding to the click instruction, jumping to a preset editing page corresponding to the resource to be detected, and modifying the resource to be detected on the preset editing page;
the preset calling entry is the preset script calling statement; the receiving of the resource checking instruction through the preset call entry includes:
in the running process of the automatic script, when a preset script calling statement is executed, calling a preset resource checking statement through the preset script calling statement, and taking the preset resource checking statement as the resource checking instruction.
2. The method according to claim 1, wherein the at least two levels of predetermined correspondences comprise: the first preset corresponding relation and the second preset corresponding relation; the matching is performed in at least two levels of preset corresponding relations between the attribute information and the check rule set library based on the description information, and the determination of the target check rule set corresponding to the description information includes:
determining a target check rule set group corresponding to the resource path by using the first preset corresponding relation; the first preset corresponding relation is the corresponding relation between a preset resource path and a preset check rule set group in the check rule set library;
determining the target checking rule set corresponding to the resource type from the target checking rule set group by using the second preset corresponding relation; wherein, the second preset corresponding relation is the corresponding relation between the resource type and the check rule set.
3. The method according to claim 2, wherein after determining the target set of inspection rules corresponding to the resource path by using the first predetermined correspondence, the method further comprises:
determining the target check rule set corresponding to the combination of the resource type and the resource path from the target check rule set group by using the second preset corresponding relation; the second preset corresponding relation is a corresponding relation between a preset type path combination and a check rule set; the type path combination is a combination of a resource type and a resource path.
4. The method according to claim 3, wherein the determining the target check rule set corresponding to the combination of the resource type and the resource path from the target check rule set group by using the second predetermined correspondence relationship comprises:
determining a target resource sub-path with the highest matching degree with the resource path from a preset resource sub-path set;
combining the target resource sub-path and the resource type to obtain a target type path combination;
and determining the target check rule set corresponding to the target type path combination by using the second preset corresponding relation.
5. The method according to any one of claims 2 to 4, wherein the preset format of the preset resource path or the preset type path combination is a regular expression.
6. The method according to any one of claims 1 to 4, characterized in that said preset interface is a visual graphical interface for the presentation and management of the resources to be inspected; the receiving of the resource checking instruction through the preset call entry includes:
when a preset control instruction acting on the visual graphical interface is received, responding to the preset control instruction, popping up a preset window, and displaying the preset calling inlet on the preset window;
and generating the resource checking instruction through a preset trigger operation acting on the preset call entrance.
7. The method of claim 6, wherein after the checking the resource to be checked according to the target checking rule set to obtain a checking result, the method further comprises:
acquiring a historical inspection result of the resource to be inspected;
generating an inspection report according to the historical inspection result and the inspection result;
displaying a preset display window on the visual graphical interface, and displaying the inspection report through the preset display window.
8. The method according to claim 7, wherein before displaying a preset display window on the visual graphical interface, the method further comprises:
generating a link address of the resource to be checked; and the link address is used for jumping to a preset editing page of the resource to be checked.
9. The method of claim 8, wherein the inspection report comprises: a chart is visualized.
10. The method according to claim 7, wherein the inspection result includes an abnormal inspection result, and the method further comprises displaying a preset display window on the visual graphical interface, and after displaying the inspection report through the preset display window:
identifying an abnormal inspection result of the resource to be inspected from the inspection results;
and correcting the abnormal inspection result.
11. The method of any of claims 1-4, or any of claims 7-10, wherein the resource types include at least one of map resources, reference resources, static grid resources, material resources, animation resources, and blueprint resources; wherein,
when the resource type of the resource to be checked is a static grid resource, the at least one preset check rule comprises at least one of collision preset check, horizontal/vertical channel number check, horizontal/vertical resource border crossing check, detail level number check, bounding box size check and simple collision volume number check;
when the resource type of the resource to be checked is a material resource, at least one preset check rule comprises at least one of material type check, compression mode check, universal color standard check and reference chartlet check;
when the resource type of the resource to be checked is animation resource, at least one preset check rule comprises at least one of length check support, compression mode check, root skeleton animation check and naming specification check;
when the resource type of the resource to be checked is a blueprint resource, the at least one preset check rule comprises at least one of blueprint naming specification check support, logic method specification check support, parameter specification check support, comment specification check support and reference object check support.
12. The method according to claim 2, wherein before determining the target set of inspection rules corresponding to the resource path using the first predetermined correspondence, the method further comprises:
acquiring at least one preset inspection standard, wherein each preset inspection standard comprises preset attribute information and at least one preset inspection content corresponding to the preset attribute information; the preset attribute information comprises preset path information and preset type information;
in at least one preset inspection specification, converting preset attribute information in each preset inspection specification into a preset resource description statement through a scripting language, converting at least one preset inspection content in each preset inspection specification into a preset inspection rule set, and further generating a preset resource inspection statement in a preset statement format corresponding to each preset inspection specification so as to obtain at least one preset resource inspection statement; the at least one preset resource check statement is used for representing the first preset corresponding relation based on the dimension of the preset path information and the dimension of the preset check rule set, and representing the second preset corresponding relation based on the dimension of the preset type information and the dimension of the preset check rule set.
13. A resource checking apparatus, comprising:
the system comprises a receiving module, a resource checking module and a processing module, wherein the receiving module is used for receiving a resource checking instruction through a preset calling inlet, and the preset calling inlet is a function inlet for starting resource checking through a preset interface;
the acquisition module is used for acquiring the description information of the to-be-inspected resource specified in the resource inspection instruction; the description information comprises at least two types of attribute information; the at least two types of attribute information comprise resource paths and resource types;
the matching module is used for matching in at least two levels of preset corresponding relations between the attribute information and the checking rule set library based on the description information to determine a target checking rule set corresponding to the description information; the target check rule set comprises at least one check rule applicable to the resource to be checked; the at least two levels of preset corresponding relations comprise a corresponding relation between a preset resource path and a preset check rule set group in the check rule set library and a corresponding relation between a preset resource type and a check rule set;
the checking module is used for checking the resource to be checked according to the target checking rule set to obtain a checking result;
the preset calling entry is the preset script calling statement; the receiving module is further configured to, in the running process of the automation script, call a preset resource check statement through a preset script call statement when the preset script call statement is executed, and use the preset resource check statement as the resource check instruction;
the checking module is also used for generating checking information according to the link address and the checking result; the link address is generated according to the resource to be checked; adding the inspection information into an inspection report, and displaying the inspection information and the inspection report in the preset window together; the inspection report is generated according to the inspection result and the historical inspection result; and when a click instruction acting on the link address is received, responding to the click instruction, jumping to a preset editing page corresponding to the resource to be checked, and modifying the resource to be checked on the preset editing page.
14. A resource checking device, characterized by comprising:
a memory for storing executable instructions;
a processor for implementing the method of any one of claims 1 to 12 when executing executable instructions stored in the memory.
15. A computer-readable storage medium having stored thereon executable instructions for, when executed by a processor, implementing the method of any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011102183.XA CN112199093B (en) | 2020-10-15 | 2020-10-15 | Resource checking method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011102183.XA CN112199093B (en) | 2020-10-15 | 2020-10-15 | Resource checking method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112199093A CN112199093A (en) | 2021-01-08 |
CN112199093B true CN112199093B (en) | 2022-06-07 |
Family
ID=74009047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011102183.XA Active CN112199093B (en) | 2020-10-15 | 2020-10-15 | Resource checking method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112199093B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112717416B (en) * | 2021-01-22 | 2023-04-21 | 腾讯科技(深圳)有限公司 | Resource processing method and device in virtual scene and electronic equipment |
CN112783660B (en) * | 2021-02-08 | 2024-05-07 | 腾讯科技(深圳)有限公司 | Resource processing method and device in virtual scene and electronic equipment |
CN113590224B (en) * | 2021-08-02 | 2024-05-31 | 上海米哈游璃月科技有限公司 | Method and device for detecting server, electronic equipment and storage medium |
CN113590226B (en) * | 2021-08-02 | 2024-05-31 | 上海米哈游璃月科技有限公司 | Method and device for starting engine editor, electronic equipment and storage medium |
CN114047981B (en) * | 2021-12-24 | 2024-06-21 | 珠海金山数字网络科技有限公司 | Project configuration method and device |
CN114676372B (en) * | 2022-04-13 | 2023-07-25 | 一点灵犀信息技术(广州)有限公司 | Data processing method and device for web game, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7185192B1 (en) * | 2000-07-07 | 2007-02-27 | Emc Corporation | Methods and apparatus for controlling access to a resource |
CN108089893A (en) * | 2017-12-14 | 2018-05-29 | 网易(杭州)网络有限公司 | Definite method, apparatus, terminal device and the storage medium of redundant resource |
CN111444181A (en) * | 2020-03-20 | 2020-07-24 | 腾讯科技(深圳)有限公司 | Knowledge graph updating method and device and electronic equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446874B (en) * | 2014-09-25 | 2019-03-15 | 北京畅游天下网络技术有限公司 | A kind of detection method and device of resource distribution file |
CN105808227B (en) * | 2014-12-31 | 2019-11-29 | 北京畅游天下网络技术有限公司 | A kind of fine arts resource file detection method and device |
CN109783137A (en) * | 2019-02-19 | 2019-05-21 | 网易(杭州)网络有限公司 | Inspection method, the device and system of fine arts resource |
-
2020
- 2020-10-15 CN CN202011102183.XA patent/CN112199093B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7185192B1 (en) * | 2000-07-07 | 2007-02-27 | Emc Corporation | Methods and apparatus for controlling access to a resource |
CN108089893A (en) * | 2017-12-14 | 2018-05-29 | 网易(杭州)网络有限公司 | Definite method, apparatus, terminal device and the storage medium of redundant resource |
CN111444181A (en) * | 2020-03-20 | 2020-07-24 | 腾讯科技(深圳)有限公司 | Knowledge graph updating method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112199093A (en) | 2021-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199093B (en) | Resource checking method, device, equipment and computer readable storage medium | |
CN107506300B (en) | User interface testing method, device, server and storage medium | |
US9524525B2 (en) | Method, system, and graphical user interface for presenting an interactive hierarchy and indicating entry of information therein | |
CN107480036A (en) | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions | |
US20220229769A1 (en) | Test automation systems and methods using logical identifiers | |
CN112214210A (en) | Logistics business rule engine and configuration method, device, equipment and storage medium thereof | |
CN114238134A (en) | Test result display method, device, equipment and storage medium | |
CN115437933A (en) | Automatic testing method and device, computer equipment and storage medium | |
CN110908899A (en) | Application program debugging method, mobile terminal and computer readable storage medium | |
CN114048415A (en) | Form generation method and device, electronic equipment and computer readable storage medium | |
CN111062039A (en) | Multi-standard security reference detection method and system, target host and server | |
CN108037914B (en) | Method and device for developing android native system by combining js | |
CN112948264B (en) | Method and device for executing test task, system, storage medium and electronic device | |
CN109948251B (en) | CAD-based data processing method, device, equipment and storage medium | |
JP2012033017A (en) | Rule inspection device, rule inspection method and rule inspection program | |
CN111444392A (en) | Method, device and equipment for accessing cave library | |
CN110597810A (en) | Data processing method, device, terminal and storage medium | |
CN111026466A (en) | File processing method and device, computer readable storage medium and electronic equipment | |
CN116383095B (en) | Smoking test method and system based on RPA robot and readable storage medium | |
CN113934644B (en) | Version difference comparison method and device, intelligent terminal and readable storage medium | |
CN112559311B (en) | Interface adaptation method and device for mobile terminal automatic test | |
CN113220596B (en) | Application testing method, device, equipment, storage medium and program product | |
CN109471764B (en) | Method, device, terminal and storage medium for quickly reading system information | |
CN116643755A (en) | Code generation method, code generation device, visualization platform and electronic equipment | |
CN116204424A (en) | Algorithm evaluation method, system, device, client and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |