CN115220696A - Resource compliance checking method, device, electronic equipment and storage medium - Google Patents
Resource compliance checking method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115220696A CN115220696A CN202210726312.5A CN202210726312A CN115220696A CN 115220696 A CN115220696 A CN 115220696A CN 202210726312 A CN202210726312 A CN 202210726312A CN 115220696 A CN115220696 A CN 115220696A
- Authority
- CN
- China
- Prior art keywords
- resource
- target
- preset rule
- error
- target resource
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/10—Requirements analysis; Specification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/37—Compiler construction; Parser generation
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 method and a device for checking resource compliance, electronic equipment and a storage medium, wherein the method comprises the steps of monitoring a storage event in an editor, and acquiring a target resource corresponding to the storage event when the storage event is monitored; and determining the resource type of the target resource, and performing compliance check on the target resource according to the resource type, so that when the target resource is stored, the target resource is subjected to the compliance check in time, so that wrong resources are found and modified in time, and meanwhile, the compliance check is changed from batch check to individual check on the stored resources, so that the time-consuming cost of the check is saved, and the check accuracy is improved.
Description
Technical Field
The present application relates to the field of resource inspection technologies, and in particular, to a method and an apparatus for inspecting resource compliance, an electronic device, and a storage medium.
Background
This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the process of game production or production of other software products, the types of related resources are multiple, the quantity of the resources is large, and the correct resources can improve the cooperative development efficiency of the software products while ensuring the quality of the software products. The resource compliance check can ensure that the software product resources meet the manufacturing requirements. The resource compliance inspection needs to meet the requirements of various inspection types, high running speed, accurate inspection result, timely error feedback and the like as far as possible. However, current resource compliance checks are not only time consuming and costly to check, but also have a lag in repair efficiency.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method and an apparatus for checking resource compliance, an electronic device, and a storage medium.
In view of the above, the present application provides a method for checking resource compliance, including:
monitoring a storage event in an editor;
responding to the monitoring of the storage event, and acquiring a target resource corresponding to the storage event;
and determining the resource type of the target resource, and performing compliance check on the target resource based on the resource type.
In some embodiments, performing compliance checking on the target resource based on the resource type specifically includes:
determining a target preset rule matched with the resource type from a preset rule set;
and performing compliance check on the target resource based on a target preset rule.
In some embodiments, the performing compliance check on the target resource based on the target preset rule specifically includes:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an active state, performing a compliance check on the target resource based on the target preset rule in the active state.
In some embodiments, before determining whether the target preset rule is in an activated state, performing compliance check on the target resource based on the target preset rule, specifically, the method further includes:
receiving an instruction for closing a specified preset rule;
and closing the specified preset rule from the preset rule set so as to enable the specified preset rule to be in an inactivated state.
In some embodiments, after performing the compliance check on the target resource based on the resource type, the method further comprises:
responding to the situation that the target resource has an error resource which does not pass the compliance check, acquiring the name of the error resource and a preset rule which does not pass the error resource, and sending prompt information comprising the name of the error resource and the preset rule which does not pass the error resource;
and storing the name of the error resource and the failed preset rule in the local or cloud.
In some embodiments, after saving the error resource name and the failed preset rule locally or in the cloud, the method further comprises:
in response to determining that the target resource is to be uploaded into a resource repository, obtaining a name of the errant resource from the cloud or the local, and determining whether the errant resource is included in the target resource based on the name of the errant resource;
in response to determining that the target resource includes the errant resource, re-performing a compliance check on the target resource.
In some embodiments, the performing the compliance check on the target resource again specifically includes:
acquiring a resource corresponding to the name of the error resource from the target resource;
and acquiring the failed preset rule from the cloud or the local, and performing compliance check on the resource corresponding to the name of the error resource based on the failed preset rule.
In some embodiments, after re-performing the compliance check on the target resource, the method further comprises:
in response to determining that the target resource fails the re-compliance check, denying uploading of the target resource into a resource repository.
Based on the same inventive concept, an exemplary embodiment of the present application further provides a device for checking resource compliance, including:
the monitoring module monitors a storage event in the editor;
the acquisition module is used for responding to the monitoring of the storage event and acquiring the target resource corresponding to the storage event;
and the checking module is used for determining the resource type of the target resource and carrying out compliance checking on the target resource based on the resource type.
In some embodiments, the inspection module is specifically configured to:
determining a target preset rule matched with the resource type from a preset rule set;
and performing compliance check on the target resource based on a target preset rule.
In some embodiments, the checking module is specifically configured to:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an activated state, performing a compliance check on the target resource based on the target preset rule in the activated state.
In some embodiments, the checking module is further specifically configured to:
receiving an instruction for closing a specified preset rule;
and closing the specified preset rule from the preset rule set so as to enable the specified preset rule to be in an inactivated state.
In some embodiments, the apparatus further comprises a prompting module configured to:
responding to the situation that the target resource has an error resource which does not pass the compliance check, acquiring the name of the error resource and a preset rule which does not pass the error resource, and sending prompt information comprising the name of the error resource and the preset rule which does not pass the error resource;
and storing the name of the error resource and the failed preset rule in the local or cloud.
In some embodiments, the apparatus further comprises a recheck module configured to:
in response to determining that the target resource is to be uploaded into a resource repository, obtaining a name of the errant resource from the cloud or the local, and determining whether the errant resource is included in the target resource based on the name of the errant resource;
in response to determining that the erroneous resource is included in the target resource, re-performing a compliance check on the target resource.
In some embodiments, the recheck module is specifically configured to:
acquiring a resource corresponding to the name of the error resource from the target resource;
and acquiring the failed preset rule from the cloud or the local, and performing compliance check on the resource corresponding to the name of the error resource based on the failed preset rule.
In some embodiments, the apparatus further comprises an audit module configured to:
in response to determining that the target resource fails the re-compliance check, denying uploading of the target resource into a resource repository.
Based on the same inventive concept, the exemplary embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable by the processor, and the processor implements the resource compliance checking method as described above when executing the program.
Based on the same inventive concept, the exemplary embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the resource compliance checking method as described above.
As can be seen from the above, the resource compliance checking method, device, electronic device and storage medium provided by the present application monitor a save event in an editor, and when the save event is monitored, obtain a target resource corresponding to the save event; and determining the resource type of the target resource, and performing compliance check on the target resource according to the resource type, so that when the target resource is stored, the target resource is subjected to the compliance check in time, so that wrong resources are found and modified in time, and meanwhile, the compliance check is changed from batch check to individual check on the stored resources, so that the time-consuming cost of the check is saved, and the check accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the related art, the drawings needed to be used in the description of the embodiments or the related art will be briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a resource compliance checking method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating another method for checking resource compliance according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a resource compliance checking apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a specific electronic device according to an embodiment of the present application.
Detailed Description
The principles and spirit of the present application will be described with reference to a number of exemplary embodiments. It should be understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the present application, and are not intended to limit the scope of the present application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
According to the embodiment of the application, a resource compliance checking method, a resource compliance checking device, an electronic device and a storage medium are provided.
In this document, it is to be understood that any number of elements in the figures are provided by way of illustration and not limitation, and any nomenclature is used for differentiation only and not in any limiting sense.
The principles and spirit of the present application are explained in detail below with reference to several representative embodiments of the present application.
Summary of The Invention
Currently, in the related art, the following two schemes are generally used to perform the resource compliance check:
1. on a machine with a resource inspection environment configured in a project group, pulling or updating a resource warehouse to the latest version, then scanning resources in the resource warehouse in batches, and after scanning is finished, reminding a specific resource submitter for each resource which does not accord with a rule.
2. When the resource is uploaded to the warehouse through version control software (such as SVN), specific check rules can be set, the rules are executed when the resource is about to be uploaded through a hook engine, and for the resource which does not meet the rules, the resource cannot be submitted to the warehouse and specific error information can be fed back to a resource uploader.
The following disadvantages exist in the above scheme 1:
1) The inspection time consumption and the inspection cost are high, a general software project group has a huge resource warehouse, the number of resources is large, and the inspection of all the resource files in the resource warehouse for one time is very time-consuming.
2) The background batch inspection is not high in operation frequency, the problem that the error resources enter the package cannot be avoided by the background resource inspection, and the package before the error resources are repaired can cause package failure, performance deterioration, game flash quit and other consequences.
3) The repair efficiency is lagged, the repair of an error resource needs to be carried out through resource check, the resource error is found, the error is fed back to a relevant responsible person, a specific error point is checked, the resource is repaired and the processes are uploaded again, and the whole resource repair process is long.
The following disadvantages exist in scheme 2 above:
1) The repair process is cumbersome, and resources may be submitted under two conditions: a. the method comprises the following steps that a manufacturer submits resources to a warehouse in batches, wherein part of the resources can be already manufactured, a resource error is prompted when the resources are submitted, and the manufacturer needs to open an editor again for repair; b. part of art resources are submitted by other writing departments such as planning and the like, and if a submission error occurs, the planning is needed to inform a specific resource producer of repairing. Both of the above cases lead to a lag in the repair efficiency.
2) It is not suitable to set more complicated inspection rules. Complex resource checks, whether performed on pre-hooks or post-hooks, can result in lengthy resource submission to the version control software repository. Especially, when the amount of resources for single submission is large, too high submission time will result in the work efficiency of the manufacturer being reduced.
In order to solve the above problem, the present application provides a method for checking resource compliance, which specifically includes:
monitoring a storage event in an editor, and acquiring a target resource corresponding to the storage event when the storage event is monitored; and determining the resource type of the target resource, and performing compliance check on the target resource according to the resource type, so that the target resource is subjected to the compliance check in time when the target resource is stored, error resources are found and modified in time, and meanwhile, the compliance check is changed from batch check to individual check on the stored resources, so that the time-consuming cost of the check is saved, and the check accuracy is improved.
Having described the basic principles of the present application, various non-limiting embodiments of the present application are described in detail below.
Application scene overview
In some specific application scenarios, the resource compliance checking method of the present application may be applied to various systems related to resource compliance checking, and optionally, the system may be a locally-operated system or a cloud-operated system, which is not limited herein.
The resource compliance checking method according to the exemplary embodiment of the present application is described below with reference to a specific application scenario. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
Exemplary method
Referring to fig. 1, a resource compliance checking method is provided for an embodiment of the present application, including the following steps:
s101, monitoring a storage event in an editor.
In particular implementations, the engine editor needs to broadcast the save event and make it available for listening. In this step, a save event in the editor is monitored first, and optionally, a function pointer, that is, a function that triggers execution after each save event, may be bound to the save event. After the function pointer binds to the saving event, the functions can monitor the saving event of the editor, and after the resources are saved, the functions are triggered to be executed.
S102, responding to the monitoring of the storage event, and acquiring the target resource corresponding to the storage event.
In specific implementation, after the storage event is monitored, the target resource corresponding to the storage event, that is, the currently stored target resource, is acquired. Optionally, the process of acquiring the target resource may be implemented by binding a resource check entry function to the storage event, where the resource check entry function is executed after each storage event, and can acquire a resource object that is stored each time, that is, the target resource.
S103, determining the resource type of the target resource, and performing compliance check on the target resource based on the resource type.
In specific implementation, after the target resource is obtained, the resource type of the target resource is determined, in a modern engine, different resources correspond to different object class names in an engine bottom layer code, and optionally, the type of the resource can be obtained by an object type judging method built in the engine or a programming language. After determining the resource type of the target resource, a compliance check may be performed on the target resource based on the resource type.
In some embodiments, performing compliance checking on the target resource based on the resource type specifically includes:
determining a target preset rule matched with the resource type from a preset rule set;
and performing compliance check on the target resource based on a target preset rule.
In specific implementation, the preset rule set includes a plurality of preset rules, the preset rules may be global check rules or check rules specific to a part of resource types, and the specific preset rules may be set as needed, which is not limited herein. Each resource type has a preset rule matched with the resource type, when compliance check is carried out, a target preset rule matched with the resource type of the target resource is determined, and then the compliance check is carried out according to the rules.
In some embodiments, the performing compliance check on the target resource based on the target preset rule specifically includes:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an active state, performing a compliance check on the target resource based on the target preset rule in the active state.
In some embodiments, the performing compliance check on the target resource based on the target preset rule specifically includes:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an inactive state, no longer performing a compliance check on the target resource based on the target preset rule in the inactive state.
In some embodiments, before determining whether the target preset rule is in an activated state, performing compliance check on the target resource based on the target preset rule, specifically, the method further includes:
receiving an instruction for closing a specified preset rule;
and closing the specified preset rule from the preset rule set so as to enable the specified preset rule to be in an inactivated state.
In particular, all the preset rules are initialized at the engine editor startup, for example, at the UE4 (an engine), all the preset check rules are loaded and initialized to the preset rule set during the engine initialization as part of the plug-in. In this embodiment, in the preset rule set, the on and off states may be set for any preset rule or all preset rules of a certain type of resource, that is, the corresponding preset rule is in an activated or inactivated state. When a user wants to close a certain preset rule, an instruction for closing the specified preset rule can be sent, and when the instruction for closing the specified preset rule is received, the specified preset rule is closed even if the specified preset rule is in an inactivated state. Therefore, when the user carries out compliance check on the target resource through the target preset rule, the user can voluntarily abandon the checking of some rules.
In some embodiments, after the target resource is checked for compliance based on the resource type, the method further comprises:
responding to the situation that the target resource has an error resource which does not pass the compliance check, acquiring the name of the error resource and a preset rule which does not pass the error resource, and sending prompt information comprising the name of the error resource and the preset rule which does not pass the error resource;
and storing the name of the error resource and the failed preset rule in the local or cloud.
In specific implementation, after the compliance check is performed, the target resource is found to have an error resource which does not pass the compliance check, the name of the error resource and the preset rule which does not pass the error resource are timely used as prompt information and sent to a user, and the name of the error resource and the preset rule which does not pass the error resource are stored locally or in a cloud backup, so that subsequent use is facilitated.
In some embodiments, after storing the error resource name and the failed preset rule locally or in the cloud, the method further includes:
in response to determining that the target resource is to be uploaded into a resource repository, obtaining a name of the error resource from the cloud or the local, and determining whether the error resource is included in the target resource based on the name of the error resource;
in response to determining that the target resource includes the errant resource, re-performing a compliance check on the target resource.
In specific implementation, in order to ensure the correctness of the resources in the resource repository, when the target resource is to be uploaded into the resource repository, it needs to be determined whether the target resource includes a wrong resource that has not been subjected to the compliance check before, and if the target resource includes a wrong resource that has not been subjected to the compliance check before, the compliance check needs to be performed again on the target resource to determine whether the wrong resource that has been subjected to the compliance check before is corrected.
In some embodiments, the performing the compliance check on the target resource again specifically includes:
acquiring a resource corresponding to the name of the error resource from the target resource;
and acquiring the failed preset rule from the cloud or the local, and performing compliance check on the resource corresponding to the name of the error resource based on the failed preset rule. '
In specific implementation, in order to improve the efficiency of performing compliance check on the target resource again, compliance check may be performed only on the resource corresponding to the name of the error resource according to the fail preset rule stored in advance.
In some embodiments, after re-performing the compliance check on the target resource, the method further comprises:
in response to determining that the target resource fails the re-compliance check, denying uploading of the target resource into a resource repository.
In specific implementation, when the target resource is determined not to pass the new compliance check, the target resource is refused to be uploaded to the resource warehouse, so that wrong resources in the resource warehouse are avoided.
Referring to fig. 2, which is a flowchart illustrating another method for checking resource compliance according to an embodiment of the present application, when a storage event is monitored, a resource type of a target resource is determined, and after it is determined that a current resource type is a mapping, a preset rule corresponding to the resource type is determined according to the resource type, and the preset rules corresponding to the resource type are executed to complete compliance checking, where the specific checking includes: 1) Global naming checking: chinese, space and special symbols cannot be included. 2) Examination of mapping naming: the map resource name must begin with T _ s. 3) Checking the size of a map: the size of the map cannot exceed a threshold (which may be set as desired). 4) Examination of mapping size in power: the width and height of the map must be a power of 2. After the 4 checks are completed, error information occurring in each check is recorded, and optionally, the error information includes the name of the error resource and a preset rule failing each time. After all the checks are finished, determining whether the target resource has errors, if not, finishing the check; and if the error exists, outputting error information to a notification box, and storing the error information to the local.
The resource compliance checking method includes monitoring a storage event in an editor, and acquiring a target resource corresponding to the storage event when the storage event is monitored; and determining the resource type of the target resource, and performing compliance check on the target resource according to the resource type, so that when the target resource is stored, the target resource is subjected to the compliance check in time, so that wrong resources are found and modified in time, and meanwhile, the compliance check is changed from batch check to individual check on the stored resources, so that the time-consuming cost of the check is saved, and the check accuracy is improved. In addition, the resource compliance checking method provided by the application also has the following advantages:
1) Check before. The resources are checked during the production of the editor, so that the consequences of package failure, package body flash back, performance deterioration and the like caused by package entering of wrong resources are avoided.
2) The repair cost is low. The resource problem is exposed when the resource is stored in the editor, the resource is not required to be distributed to corresponding responsible persons for investigation and repair when the resource is uploaded, the unified resource inspection or the abnormity caused by the resource in the system occurs, and a resource producer can trigger the resource inspection and the checking result in time by storing the resource when the resource is produced.
3) Convenient access and transplantation. The engine editor is usually accessed as a part of the engine editor, the core function does not need additional configuration, and the access is convenient and quick.
4) Cultivate the regulatory awareness of resource producers. The real-time resource error reminding can deepen the cognition of resource making personnel on the type of resource specification and improve the quality of the resource making.
Exemplary device
Based on the same inventive concept, the application also provides a device for checking the resource compliance, which corresponds to the method of any embodiment.
Referring to fig. 3, the resource compliance checking apparatus includes:
a monitoring module 201 for monitoring the storage event in the editor;
the obtaining module 202, configured to obtain, in response to monitoring the saving event, a target resource corresponding to the saving event;
and the checking module 203 determines the resource type of the target resource and performs compliance checking on the target resource based on the resource type.
In some embodiments, the inspection module is specifically configured to:
determining a target preset rule matched with the resource type from a preset rule set;
and performing compliance check on the target resource based on a target preset rule.
In some embodiments, the inspection module is specifically configured to:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an active state, performing a compliance check on the target resource based on the target preset rule in the active state.
In some embodiments, the checking module is further specifically configured to:
receiving an instruction for closing a specified preset rule;
and closing the specified preset rule from the preset rule set so as to enable the specified preset rule to be in an inactivated state.
In some embodiments, the apparatus further comprises a prompting module configured to:
responding to the situation that the target resource has an error resource which does not pass the compliance check, acquiring the name of the error resource and a preset rule which does not pass the error resource, and sending prompt information comprising the name of the error resource and the preset rule which does not pass the error resource;
and storing the name of the error resource and the failed preset rule in the local or cloud.
In some embodiments, the apparatus further comprises a recheck module configured to:
in response to determining that the target resource is to be uploaded into a resource repository, obtaining a name of the errant resource from the cloud or the local, and determining whether the errant resource is included in the target resource based on the name of the errant resource;
in response to determining that the target resource includes the errant resource, re-performing a compliance check on the target resource.
In some embodiments, the recheck module is specifically configured to:
acquiring a resource corresponding to the name of the error resource from the target resource;
and acquiring the failed preset rule from the cloud or the local, and performing compliance check on the resource corresponding to the name of the error resource based on the failed preset rule.
In some embodiments, the apparatus further comprises an audit module configured to:
in response to determining that the target resource fails the re-compliance check, denying uploading of the target resource into a resource repository.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
The apparatus in the foregoing embodiment is used to implement the corresponding method for checking resource compliance in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to the method of any embodiment described above, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for checking the resource compliance according to any embodiment described above is implemented.
Fig. 4 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
The bus 1050 includes a path to transfer information between various components of the device, such as the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device in the foregoing embodiment is used to implement the corresponding resource compliance checking method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described again here.
Exemplary program product
Based on the same inventive concept, corresponding to any of the above-described embodiment methods, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the resource compliance checking method according to any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the resource compliance checking method according to any embodiment, and have the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the context of the present application, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the application. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the application are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that the embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures, such as Dynamic RAM (DRAM), may use the discussed embodiments.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present application are intended to be included within the scope of the present application.
Claims (11)
1. A method for checking resource compliance, comprising:
monitoring a storage event in an editor;
responding to the monitoring of the storage event, and acquiring a target resource corresponding to the storage event;
and determining the resource type of the target resource, and performing compliance check on the target resource based on the resource type.
2. The method according to claim 1, wherein performing compliance checking on the target resource based on the resource type specifically comprises:
determining a target preset rule matched with the resource type from a preset rule set;
and performing compliance check on the target resource based on a target preset rule.
3. The method according to claim 2, wherein the compliance check of the target resource based on the target preset rule specifically comprises:
determining whether the target preset rule is in an activated state;
in response to determining that the target preset rule is in an active state, performing a compliance check on the target resource based on the target preset rule in the active state.
4. The method according to claim 3, wherein before determining whether the target preset rule is in an activated state, performing compliance check on the target resource based on the target preset rule, specifically further comprising:
receiving an instruction for closing a specified preset rule;
and closing the specified preset rule from the preset rule set so as to enable the specified preset rule to be in an inactivated state.
5. The method of claim 1, wherein after performing a compliance check on the target resource based on the resource type, the method further comprises:
responding to the situation that the target resource has an error resource which fails the compliance check, acquiring the name of the error resource and a preset rule which does not pass the error resource, and sending prompt information comprising the name of the error resource and the preset rule which does not pass the error resource;
and storing the name of the error resource and the failed preset rule in the local or cloud.
6. The method of claim 5, wherein after saving the error resource name and the failed preset rule locally or in a cloud, the method further comprises:
in response to determining that the target resource is to be uploaded into a resource repository, obtaining a name of the error resource from the cloud or the local, and determining whether the error resource is included in the target resource based on the name of the error resource;
in response to determining that the target resource includes the errant resource, re-performing a compliance check on the target resource.
7. The method according to claim 5, wherein the re-performing the compliance check on the target resource specifically comprises:
acquiring a resource corresponding to the name of the error resource from the target resource;
and acquiring the failed preset rule from the cloud or the local, and performing compliance check on the resource corresponding to the name of the error resource based on the failed preset rule.
8. The method of claim 6, wherein after re-checking the target resource for compliance, the method further comprises:
in response to determining that the target resource fails the re-compliance check, denying uploading of the target resource into a resource repository.
9. A resource compliance check device, comprising:
the monitoring module monitors a storage event in the editor;
the acquisition module is used for responding to the monitoring of the storage event and acquiring a target resource corresponding to the storage event;
and the checking module is used for determining the resource type of the target resource and carrying out compliance checking on the target resource based on the resource type.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, the processor implementing the method of any one of claims 1 to 8 when executing the program.
11. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210726312.5A CN115220696A (en) | 2022-06-23 | 2022-06-23 | Resource compliance checking method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210726312.5A CN115220696A (en) | 2022-06-23 | 2022-06-23 | Resource compliance checking method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115220696A true CN115220696A (en) | 2022-10-21 |
Family
ID=83610714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210726312.5A Pending CN115220696A (en) | 2022-06-23 | 2022-06-23 | Resource compliance checking method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115220696A (en) |
-
2022
- 2022-06-23 CN CN202210726312.5A patent/CN115220696A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8862940B2 (en) | Integrated fuzzing | |
US8984486B2 (en) | System, method, and computer program product for automated stability testing of device firmware | |
CN104932973A (en) | Version compatibility test method and apparatus | |
US10572371B2 (en) | Generating valid use cases from a parsed configuration file describing use case options | |
CN112506525A (en) | Continuous integration and continuous delivery method, device, electronic equipment and storage medium | |
CN107451058B (en) | Software development method and device | |
CN113608692B (en) | Storage system data consistency verification method, system, equipment and medium | |
CN108228443B (en) | Web application testing method and device | |
CN113384896A (en) | Unity-based resource packaging method, device, equipment and medium | |
CN110134598B (en) | Batch processing method, device and system | |
CN109284222B (en) | Software unit, project testing method, device and equipment in data processing system | |
CN113641592B (en) | Test sequence generation method and device | |
US9104356B2 (en) | Extendable system for preprocessing print document and method for the same | |
CN110968339B (en) | Method and device for front-end building tool and electronic equipment | |
CN115220696A (en) | Resource compliance checking method, device, electronic equipment and storage medium | |
CN112306995A (en) | Method and device for realizing database operation | |
CN117724983A (en) | Interface testing method and device, storage medium and electronic equipment | |
CN114330278B (en) | Method and equipment for judging consistency of returned data | |
US11604629B1 (en) | Automatic workflow generation based on annotated code statements | |
TWI510942B (en) | System and method for outputting measurement codes | |
CN116893960A (en) | Code quality detection method, apparatus, computer device and storage medium | |
US8359456B2 (en) | Generating random addresses for verification of distributed computerized devices | |
CN114443375A (en) | Test method and device, electronic device and computer readable storage medium | |
CN115858012B (en) | Program variable configuration method, device, electronic equipment and storage medium | |
CN116009948A (en) | Continuous integration method, device, equipment and storage medium based on single warehouse development |
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 |