Resource normalization detection and optimization method, device, equipment and storage medium

文档序号:1278934 发布日期:2020-08-28 浏览:17次 中文

阅读说明:本技术 一种资源规范性检测及优化方法、装置、设备及存储介质 (Resource normalization detection and optimization method, device, equipment and storage medium ) 是由 宋大伟 邹黎盛 于 2020-05-20 设计创作,主要内容包括:本申请公开了一种资源规范性检测及优化方法、装置、设备及存储介质,所述方法包括:获取待检测资源;确定待检测资源的资源类型及适用场景;基于待检测资源的资源类型及适用场景从预设的资源规范文件中确定出待检测资源的检测规则;基于待检测资源的检测规则对待检测资源进行规范检测,得到待检测资源的规范检测结果;基于规范检测结果确定待检测资源中的待优化数据,对待优化数据进行资源优化。利用本申请提供的技术方案可以减少资源不符合规范要求的情况,改善玩家的游戏体验,且无需开发人员进行人为监管,提升了资源规范性检测的效率及可靠性,减轻开发人员的负担,提升资源开发的容错性,灵活方便。(The application discloses a method, a device, equipment and a storage medium for detecting and optimizing resource normativity, wherein the method comprises the following steps: acquiring a resource to be detected; determining the resource type and the applicable scene of the resource to be detected; determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected; carrying out standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected; and determining data to be optimized in the resources to be detected based on the standard detection result, and performing resource optimization on the data to be optimized. The technical scheme provided by the application can reduce the condition that the resources do not meet the standard requirements, improve the game experience of the player, and does not need developers to carry out artificial supervision, thereby improving the efficiency and reliability of the resource normative detection, lightening the burden of the developers, improving the fault tolerance of the resource development, and being flexible and convenient.)

1. A method for detecting and optimizing resource normativity is characterized by comprising the following steps:

acquiring a resource to be detected;

determining the resource type and the applicable scene of the resource to be detected;

determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected;

performing standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected;

and determining data to be optimized in the resources to be detected based on the standard detection result, and performing resource optimization on the data to be optimized.

2. The method according to claim 1, wherein the determining the detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scenario of the resource to be detected comprises:

determining all detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file;

determining a detection rule corresponding to the applicable scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected based on the applicable scene of the resource to be detected, and taking the detection rule corresponding to the applicable scene of the resource to be detected as the detection rule of the resource to be detected.

3. The method of claim 1, wherein the default resource specification file comprises a file generated by:

acquiring the standard configuration information of a plurality of sample resources;

generating a corresponding detection rule based on the specification configuration information of each sample resource;

determining the resource type and the applicable scene of each sample resource;

establishing a mapping relation among the resource type, the applicable scene and the corresponding detection rule of each sample resource;

and generating a preset resource specification file based on the resource type and the applicable scene of the sample resource with the mapping relation and the corresponding detection rule.

4. The method of claim 1, wherein the resource optimizing the data to be optimized comprises:

acquiring preset resource optimization configuration information;

matching a resource optimization rule corresponding to the data to be optimized based on the preset resource optimization configuration information;

and performing resource optimization on the data to be optimized based on the resource optimization rule corresponding to the data to be optimized.

5. The method of claim 1, further comprising:

determining data to be optimized in the resource to be detected based on the standard detection result, and determining data which cannot be automatically optimized in the standard detection result of the resource to be detected after resource optimization is performed on the data to be optimized;

and carrying out error marking on data which cannot be automatically optimized in the standard detection result of the resource to be detected.

6. The method of claim 1, further comprising:

and determining data to be optimized in the resources to be detected based on the standard detection result, and generating a resource detection and optimization report after performing resource optimization on the data to be optimized.

7. The method according to claim 1, wherein the acquiring the resource to be detected comprises:

when a resource uploading instruction is received, determining a resource to be detected based on the resource uploading instruction;

and/or;

and acquiring the resource to be detected at preset time intervals.

8. An apparatus for detecting and optimizing resource normalization, the apparatus comprising:

the resource file acquisition module is used for acquiring a resource file to be detected;

the resource information determining module is used for determining the resource type and the applicable scene of the resource to be detected;

the specification matching module is used for determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected;

the standard detection module is used for carrying out standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected;

and the resource optimization module is used for determining data to be optimized in the resources to be detected based on the standard detection result and optimizing the resources of the data to be optimized.

9. A resource specification detection and optimization apparatus, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource specification detection and optimization method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein at least one instruction or at least one program is stored, and loaded and executed by a processor to implement the method for detecting and optimizing the normalization of resources according to any one of claims 1 to 7.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for detecting and optimizing resource normativity, a computer device, and a storage medium.

Background

In recent years, people have become more accustomed to using electronic games as a relaxation mode, and with the rapid development of the game industry, the variety of games, such as round-based battle games, role-playing simulation games, massively multiplayer online, and the like, is increasing. Various resources in a game are critical to a game, e.g., art resources; whether the artistic manufacturing is exquisite greatly influences the game experience of players, a large number of different kinds of artistic resources are needed in the game development process, and the various artistic resources have different standard requirements.

In order to improve the game experience of a player and keep the vitality and freshness of a game, a game developer needs to update or optimize the game frequently, and in the process of game development, for example, when resource optimization or resource addition is carried out, the situation that art resources do not meet the standard requirements is inevitable, for example, the size of a chartlet has deviation, the attribute setting does not meet the requirements or the art resource model of a virtual character has a die-piercing phenomenon and the like; if the deviated art resources are loaded into the game, the problem of display errors can occur, and the game experience of the player is influenced.

Disclosure of Invention

In order to solve the problems in the prior art, the invention provides a method and a device for detecting and optimizing resource normative, a computer device and a storage medium. The technical scheme is as follows:

in one aspect, a method for detecting and optimizing resource normativity is provided, and the method includes:

acquiring a resource to be detected;

determining the resource type and the applicable scene of the resource to be detected;

determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected;

performing standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected;

and determining data to be optimized in the resources to be detected based on the standard detection result, and performing resource optimization on the data to be optimized.

In another aspect, an apparatus for detecting and optimizing resource normalization is provided, the apparatus including:

the resource file acquisition module is used for acquiring a resource file to be detected;

the resource information determining module is used for determining the resource type and the applicable scene of the resource to be detected;

the specification matching module is used for determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected;

the standard detection module is used for carrying out standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected;

and the resource optimization module is used for determining data to be optimized in the resources to be detected based on the standard detection result and optimizing the resources of the data to be optimized.

Another aspect provides an electronic device, which includes a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the method for detecting and optimizing resource normalization as described above.

Another aspect provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the resource normalization detection and optimization method as described above.

The invention provides a method, a device, equipment and a storage medium for detecting and optimizing resource normativity, which have the following technical effects:

the method comprises the steps of obtaining a resource to be detected; determining the resource type and the applicable scene of the resource to be detected; determining a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected, so that the requirements of different application scenes can be met, and the resource specification detection is more flexible; the resource to be detected is subjected to standard detection based on the detection rule of the resource to be detected, so that a standard detection result of the resource to be detected is obtained, developers are not required to perform manual supervision, and the efficiency and reliability of the resource standard detection are improved; the data to be optimized in the resources to be detected are determined based on the standard detection result, the problem that part of the data to be optimized is not in accordance with the standard can be automatically optimized by optimizing the resources, developers do not need to manually check and modify the data to be optimized, the fault tolerance of resource development is improved, the efficiency of resource optimization is improved, time and human resources are saved, secondary errors caused by negligence during manual repair can be avoided, and the reliability of resource optimization is improved.

Drawings

In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.

Fig. 1 is a schematic flowchart of a method for detecting and optimizing resource normativity according to an embodiment of the present disclosure;

FIG. 2 is a schematic flow chart of another method for detecting and optimizing resource normativity according to an embodiment of the present disclosure;

FIG. 3 is a schematic flowchart of another method for detecting and optimizing resource normativity according to an embodiment of the present disclosure;

FIG. 4 is a schematic flowchart of another method for detecting and optimizing resource normativity according to an embodiment of the present disclosure;

FIG. 5 is a flowchart illustrating another method for detecting and optimizing the regularity of a resource provided in an embodiment of the present application;

FIG. 6 is a schematic illustration of a report interface provided by an embodiment of the present application when the resource detection and optimization report includes information that meets the specification after the resource specification detection;

FIG. 7 is a schematic diagram of a report interface provided by an embodiment of the present application when the resource detection and optimization report includes information that is not compliant with a specification but is automatically optimized;

FIG. 8 is a schematic diagram of a report interface provided by an embodiment of the present application when the resource detection and optimization report includes information that is not compliant with the specification and cannot be automatically optimized for error labeling;

fig. 9 is a flowchart illustrating a method for generating a preset resource specification file according to an embodiment of the present application;

fig. 10 is a schematic structural diagram of an apparatus for detecting and optimizing resource normalization according to an embodiment of the present application;

fig. 11 is a block diagram of a hardware structure of a server according to a resource normalization detection and optimization method provided in an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

Fig. 1 is a schematic flow chart of a method for detecting and optimizing resource normalization according to an embodiment of the present invention. It is noted that the present specification provides the method steps as described in the examples or flowcharts, but may include more or less steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In actual system or product execution, sequential execution or parallel execution (e.g., parallel processor or multi-threaded environment) may be possible according to the embodiments or methods shown in the figures. Specifically, as shown in fig. 1, the method may include:

s101: and acquiring the resource to be detected.

In this embodiment of the present specification, the resource to be detected indicates a resource that needs to be subjected to a standardized detection, and specifically, the resource to be detected may include but is not limited to: art resources in games and art resources in web page design, etc., wherein the games may include, but are not limited to, 2d (two dimensional)/3d (three dimensional) type mobile games, computer games, virtual reality games, etc. The art resources in the game can include, but are not limited to, art resources of virtual characters in the game, art resources of interfaces in the game, art resources of scenes in the game and the like according to usage scenarios, and can include, but is not limited to, art resources and can also include map resources, material ball resources, animation resources, model resources and the like according to specific resource types.

Specifically, the acquiring the resource to be detected may include:

when a resource uploading instruction is received, determining a resource to be detected based on the resource uploading instruction;

and/or;

and acquiring the resource to be detected at preset time intervals.

Specifically, the resource upload instruction can indicate resource update or newly-increased information, and specifically, the resource upload instruction can include a resource update instruction or a resource newly-increased instruction, and in one embodiment, when fine arts producers of games have performed fine arts resource optimization or newly-increased fine arts resource, before submitting the games, the resource upload instruction can be sent based on the client, and the server determines to-be-detected resources based on the resource upload instruction, so that it can be ensured that the resources to be uploaded are subjected to standard detection before performing resource optimization or resource newly-increased by fine arts personnel at each time, thereby reducing standard errors and improving subsequent development efficiency.

In another embodiment, the resource to be detected may also be obtained at intervals of a preset time, specifically, the preset time may be set according to a requirement of an actual application, and in the actual application, the preset time may include: for example twelve hours or twenty-four hours. The resources to be detected are acquired at preset intervals for standard detection, the standardization of the resources in the game can be ensured, and the influence on player experience caused by loading of the deviated art resources into the game is avoided.

S102: and determining the resource type and the applicable scene of the resource to be detected.

In this embodiment of the present specification, the resource type of the resource to be detected may indicate format information of the resource to be detected; specifically, the resource types of the resource to be detected may include, but are not limited to, pictures, material balls, animations, and special effects. The applicable scene of the resource to be detected can indicate the use scene information corresponding to the resource to be detected; specifically, the applicable scenarios of the resource to be detected may include, but are not limited to: the method comprises the steps of presetting a virtual object, presetting a game special effect and presetting a game interface.

Wherein the preset virtual object may indicate a virtual character in a game, for example, the preset virtual object may include but is not limited to: cartoon figure images or cartoon animal images expressed based on two-dimensional animations or three-dimensional animations, simulated human figure images or simulated animal images expressed based on virtual reality technologies, and the like. It should be noted that the present invention is not limited thereto, and the preset virtual object may also indicate a virtual object in an animation or a movie work that can be controlled, and may also indicate a virtual object in a science and education product that can be controlled (for example, a product for early education of children using an animal cartoon image); the preset virtual object may also indicate a virtual item in the game, for example a movable item or an interactive item in the game, in particular in practical applications the virtual item may include, but is not limited to, a table, a chair, a fountain and a cup.

With reference to the above description, in practical applications, the determined resource type and applicable scenario of the resource to be detected may include, for example, a "red" clothes map resource of the virtual character; or; material ball resources of tables in a competition hall.

In this embodiment of the present specification, the determining the resource type of the resource to be detected may include determining the resource type of the resource to be detected based on the file information of the resource to be detected, and in practical applications, the determining the resource type of the resource to be detected may include determining the resource type of the resource to be detected based on a file suffix type of the resource to be detected; specifically, the determining the applicable scenario of the resource to be detected may include determining the applicable scenario of the resource to be detected based on a path of the resource to be detected.

S103: and determining the detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected.

Specifically, as shown in fig. 2, the determining, from a preset resource specification file, a detection rule of the resource to be detected based on the resource type and the applicable scenario of the resource to be detected may include:

s201: and determining all detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file.

In the embodiment of the present specification, the resource types of the resource to be detected may include one or more types, and since the specification of each applicable scenario in the actual application is different, even though the game role models are different, the resource specification requirements corresponding to different roles are also different, so that each resource type corresponds to one or more detection rules, and can adapt to the requirements of different application scenarios, so that the resource specification detection is more flexible.

S202: determining a detection rule corresponding to the applicable scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected based on the applicable scene of the resource to be detected, and taking the detection rule corresponding to the applicable scene of the resource to be detected as the detection rule of the resource to be detected.

In practical application, after determining all detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file, it is further required to determine, based on the applicable scene of the resource to be detected, a detection rule corresponding to the applicable scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected, in a specific embodiment, the folder of "game character" corresponds to all character models, each specific character corresponds to uniquely determined identification information (character ID), for example, the ID of the character "little red" may be "hong 100", when the specification detection needs to be performed on the chartlet resource of the character, "little red", the resource type of the resource to be detected is "chartlet", all detection rules corresponding to the resource type "chartlet" are determined first, that is, the detection rules of the chartlet resource under different applicable scenes are determined, determining a detection rule with a path of 'game role/hong 100/chartlet' in all detection rules corresponding to the resource type 'chartlet' according to an applicable scene (at the moment, the determination can be carried out according to the path); by determining all detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file, determining the detection rule corresponding to the application scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected based on the application scene of the resource to be detected, and using the detection rule corresponding to the application scene of the resource to be detected as the detection rule of the resource to be detected, the speed of adapting the detection rules can be increased, the efficiency of detecting the resource specification can be improved, the specification updating is convenient, and the burden of developers can be reduced.

S104: and carrying out standard detection on the resource to be detected based on the detection rule of the resource to be detected to obtain a standard detection result of the resource to be detected.

In this embodiment of the present specification, the performing the canonical detection on the resource to be detected based on the detection rule of the resource to be detected may include, but is not limited to: checking whether the size of the map meets a preset size specification (different applicable scenes, such as different character models, and different size requirements), checking whether the format of the map meets a preset format specification, checking whether the color channel of the map meets a preset specification, checking whether the attribute setting of the map meets a preset attribute specification, checking whether the resource file name meets a preset name specification, checking whether a necessary animation file exists (sometimes, artists can miss animation files which must exist), checking whether material balls meet a preset specification (for example, shaders (shaders) of some material balls are not available, artists can miss references to cause errors), and checking whether the animation meets a preset specification (for example, for standby animation of some character models, the animation is required to be circulated, and the animation is required to be opened for circulation), in some embodiments, the performing the specification detection on the resource to be detected based on the detection rule of the resource to be detected may further include checking data of a part of the animation source files (some animation source files are exported with a large data amount, and the checking of the data of the animation source files may be followed by optimizing the animation source files, for example, removing redundant data).

Through on the basis of treat the detection rule of treating the resource to detect the resource go on standardizing and detecting, can reduce the fine arts resource and be not conform to the condition that standardizes the requirement, improve player's gaming experience, and need not the developer and carry out artificial supervision, promoted the efficiency and the reliability of resource standardization detection, alleviate developer's burden, promote the fault tolerance of resource development, it is nimble convenient.

S105: and determining data to be optimized in the resources to be detected based on the standard detection result, and performing resource optimization on the data to be optimized.

Specifically, as shown in fig. 3, the resource optimization of the data to be optimized may include:

s301: and acquiring preset resource optimization configuration information.

Specifically, the preset resource optimization configuration information may be based on resource optimization configuration information set according to different resource types and matching of applicable scenes, and may provide resource optimization information for multiple non-normative situations in a normative detection result; in practical application, the preset resource optimization configuration information may be set according to practical application requirements.

S302: and matching a resource optimization rule corresponding to the data to be optimized based on the preset resource optimization configuration information.

Specifically, the matching of the resource optimization rule corresponding to the data to be optimized based on the preset resource optimization configuration information may include:

(1) determining the resource type and the applicable scene of the data to be optimized;

specifically, the specific process of determining the resource type and the applicable scenario of the data to be optimized is similar to S102, and specific reference may be made to the related description of S102, which is not repeated herein.

(2) And matching a resource optimization rule corresponding to the data to be optimized from the preset resource optimization configuration information based on the resource type and the applicable scene of the data to be optimized.

Specifically, the specific process of matching out the resource optimization rule corresponding to the data to be optimized from the preset resource optimization configuration information based on the resource type and the applicable scene of the data to be optimized is similar to S103, and reference may be specifically made to the related description of S103, which is not described herein again.

S303: and performing resource optimization on the data to be optimized based on the resource optimization rule corresponding to the data to be optimized.

In practical applications, the performing resource optimization on the data to be optimized based on the resource optimization rule corresponding to the data to be optimized may specifically include: for example, optimizing the map of the character 'small red' which does not meet the size specification to a preset size, opening the loop of the character standby animation which needs to open the loop but does not open the loop, removing redundant data of the animation source file and the like. By determining the data to be optimized in the resources to be detected based on the standard detection result and performing resource optimization on the data to be optimized, the problem that part of the data to be optimized is not in line with the standard can be automatically optimized, developers do not need to manually check and modify the data to be optimized, the fault tolerance of resource development is improved, the efficiency of resource optimization is greatly improved, time and human resources are saved, secondary errors caused by negligence during manual repair can be avoided, and the reliability of resource optimization is improved.

In this embodiment of this specification, as shown in fig. 4, after determining data to be optimized in the resource to be detected based on the specification detection result, and performing resource optimization on the data to be optimized, the method further includes:

s401: determining data which cannot be automatically optimized in the standard detection result of the resource to be detected;

in a specific embodiment, the data that cannot be automatically optimized in the specification detection result of the resource to be detected may include, for example, a model threading problem, an absence of a necessary animation file, and the like.

S402: and carrying out error marking on data which cannot be automatically optimized in the standard detection result of the resource to be detected.

In practical application, for example, when a model threading problem occurs, by performing error labeling on a place where the problem occurs, a developer can be prompted to perform manual optimization when a resource detection and optimization report is subsequently generated, for example, the model is rebuilt, the problem is not required to be found by a tester and then fed back to the developer for optimization when a game test is performed, and the efficiency of resource optimization is improved.

As shown in fig. 5, after determining data to be optimized in the resource to be detected based on the specification detection result, and performing resource optimization on the data to be optimized, the method further includes:

s501: and generating a resource detection and optimization report.

In the embodiment of the present specification, the generation of the resource detection and optimization report may also be performed after error labeling is performed on data that cannot be automatically optimized in a standard detection result of a resource to be detected, and specifically, the resource detection and optimization report may include information that meets a standard after resource normalization detection, information that does not meet the standard but is automatically optimized, and information that does not meet the standard and cannot be automatically optimized for error labeling; in practical application, three kinds of information can be marked by different colors and symbols so as to be convenient for developers to check and screen, in a specific embodiment, the information which meets the specification can be marked by white and circular marks, the information which does not meet the specification but is automatically optimized can be marked by yellow and star marks, the information which does not meet the specification and cannot be automatically optimized and wrongly marked can be marked by red and exclamation mark marks, and the developers can conveniently and quickly determine the required information.

In a specific embodiment, when the resource detection and optimization report includes the information that the resource meets the specification after the resource specification detection, the report interface can be seen in fig. 6; when the resource detection and optimization report includes information that is not in compliance with the specification but is automatically optimized, the report interface can be seen in FIG. 7; when the resource detection and optimization report includes information that does not meet the specifications and cannot be automatically optimized for error labeling, the report interface can be seen in fig. 8; the resource detection and optimization report can select to export all detection information or only error information when being exported, is convenient for developers to check and repair problems in a targeted manner, and is flexible.

In an embodiment of the present specification, the preset resource specification file may include resource types, applicable scenarios and corresponding detection rules of a plurality of sample resources having mapping relationships. Specifically, as shown in fig. 9, the preset resource specification file may be generated in the following manner:

s901: and acquiring the specification configuration information of a plurality of sample resources.

The specification configuration information of the sample resource indicates specification information that the sample resource needs to meet, and specifically, the specification configuration information of the sample resource may include, but is not limited to:

the preset size specification of the map (different for applicable scenes, such as different character models, the size specification may be different), the preset format specification of the map, the preset specification of the color channel of the map, the preset attribute specification of the map, the method includes the steps of naming a resource file in a preset mode, defining a necessary animation file (sometimes, artists may miss the animation file which must exist), defining a material ball in a preset mode (for example, shaders of some material balls cannot be quoted, and artists may misquote the material balls to cause errors), defining an animation in a preset mode (for example, standby animations of some character models require that the animation can be circulated and animation circulation needs to be opened), defining animation source file data (for example, a large amount of data of some animation source files are exported, and the animation source files can be optimized subsequently, and removing redundant data).

S902: and generating a corresponding detection rule based on the specification configuration information of each sample resource.

Specifically, the corresponding detection rule is generated based on the standard configuration information of each sample resource, so that the subsequent direct calling of the corresponding detection rule is facilitated to carry out resource normative detection, the dependence on manpower in the resource normative detection process is reduced, the resource normative detection efficiency is greatly improved, and the waste of time and manpower resources is reduced.

S903: the resource type and applicable scenario for each sample resource are determined.

Specifically, the specific process of determining the resource type and the applicable scenario of each sample resource is similar to S102, and reference may be specifically made to the related description of S102, which is not repeated herein.

S904: and establishing a mapping relation among the resource type, the applicable scene and the corresponding detection rule of each sample resource.

In the embodiment of the specification, the generated detection rules can be more targeted by establishing the mapping relationship among the resource types, the applicable scenes and the corresponding detection rules of each sample resource, and the resource normative detection can be performed by using the corresponding rules under different types and different applicable scenes, so that the reliability of the resource normative detection is higher; specifically, after the mapping relationship among the resource type, the applicable scenario and the corresponding detection rule of each sample resource is established, the detection rules are classified according to the resource type, so that it is beneficial to determine all the detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file during the resource normalization detection, then determine the detection rule corresponding to the applicable scenario of the resource to be detected from all the detection rules corresponding to the resource type of the resource to be detected based on the applicable scenario of the resource to be detected, use the detection rule corresponding to the applicable scenario of the resource to be detected as the detection rule of the resource to be detected, improve the speed of adapting the detection rules, improve the efficiency of the resource normalization detection, and have higher efficiency when the detection rule is updated, the method and the device are convenient for developers to maintain, optimize and newly add the existing detection rules, and save time and human resources.

S905: and generating a preset resource specification file based on the resource type and the applicable scene of the sample resource with the mapping relation and the corresponding detection rule.

Through generating predetermined resource specification file, be favorable to follow-up utilizing predetermined resource specification file to treat the resource that detects and carry out standard detection, need not the developer and carry out the manual investigation supervision, promoted the efficiency and the reliability that resource specification detected, promote the fault tolerance of resource development, it is nimble convenient, reduce in the resource specification testing process to artifical reliance, promote resource specification detection efficiency greatly, reduce the waste of time and manpower resources.

Corresponding to the resource normative detection and optimization methods provided in the foregoing embodiments, embodiments of the present invention further provide a device for detecting and optimizing resource normative, and since the device for detecting and optimizing resource normative provided in the embodiments of the present invention corresponds to the method for detecting and optimizing resource normative provided in the foregoing embodiments, the embodiments of the method for detecting and optimizing resource normative are also applicable to the device for detecting and optimizing resource normative provided in the embodiments, and are not described in detail in the embodiments.

Referring to fig. 10, a schematic structural diagram of an apparatus for detecting and optimizing resource normalization according to an embodiment of the present invention is shown, and as shown in fig. 10, the apparatus may include:

a resource file obtaining module 1010, configured to obtain a resource file to be detected;

a resource information determining module 1020, configured to determine a resource type and an applicable scenario of the resource to be detected;

the specification matching module 1030 is configured to determine a detection rule of the resource to be detected from a preset resource specification file based on the resource type and the applicable scene of the resource to be detected;

the specification detection module 1040 is configured to perform specification detection on the resource to be detected based on the detection rule of the resource to be detected, so as to obtain a specification detection result of the resource to be detected;

and the resource optimization module 1050 is configured to determine data to be optimized in the resource to be detected based on the specification detection result, and perform resource optimization on the data to be optimized.

In this embodiment of the present invention, the specification matching module 1030 may further include:

a first rule determining unit, configured to determine all detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file;

and a second rule determining unit, configured to determine, based on the applicable scene of the resource to be detected, a detection rule corresponding to the applicable scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected, and use the detection rule corresponding to the applicable scene of the resource to be detected as the detection rule of the resource to be detected.

In this embodiment of the present invention, the resource optimization module 1050 may further include:

the device comprises an optimized configuration information determining unit, a resource optimizing configuration information acquiring unit and a resource optimizing configuration information acquiring unit, wherein the optimized configuration information determining unit is used for acquiring preset resource optimizing configuration information;

the optimization rule matching unit is used for matching a resource optimization rule corresponding to the data to be optimized based on the preset resource optimization configuration information;

and the optimization unit is used for performing resource optimization on the data to be optimized based on the resource optimization rule corresponding to the data to be optimized.

In this embodiment of the present invention, the apparatus for detecting and optimizing the resource normalization further includes:

the difficult data determining module is used for determining data to be optimized in the resource to be detected based on the standard detection result, and determining data which cannot be automatically optimized in the standard detection result of the resource to be detected after resource optimization is carried out on the data to be optimized;

and the error marking module is used for carrying out error marking on the data which cannot be automatically optimized in the standard detection result of the resource to be detected.

In this embodiment of the present invention, the apparatus for detecting and optimizing the resource normalization further includes:

and the report generation module is used for determining the data to be optimized in the resources to be detected based on the standard detection result, and generating a resource detection and optimization report after performing resource optimization on the data to be optimized.

In an embodiment of the present invention, a device for generating a preset resource specification file is further provided, where the device may include:

the system comprises a specification configuration information acquisition module, a data acquisition module and a data processing module, wherein the specification configuration information acquisition module is used for acquiring specification configuration information of a plurality of sample resources;

the rule generating module is used for generating a corresponding detection rule based on the standard configuration information of each sample resource;

the resource information determining module is used for determining the resource type and the applicable scene of each sample resource;

the mapping relation establishing module is used for establishing the mapping relation among the resource type, the applicable scene and the corresponding detection rule of each sample resource;

and the standard file generation module is used for generating a preset resource standard file based on the resource type and the applicable scene of the sample resource with the mapping relation and the corresponding detection rule.

It should be noted that the device and method embodiments in the device embodiment are based on the same inventive concept.

The resource normalization detection and optimization device of the embodiment of the invention determines the resource type and the applicable scene of the resource to be detected by acquiring the resource to be detected, determines the detection rule of the resource to be detected from the preset resource specification file based on the resource type and the applicable scene of the resource to be detected, can perform the resource normalization detection more pertinently, can perform the resource normalization detection by using the corresponding rule under different types and different applicable scenes, and makes the reliability of the resource normalization detection stronger, and the determination of the detection rule of the resource to be detected from the preset resource specification file based on the resource type and the applicable scene of the resource to be detected can comprise the determination of all the detection rules corresponding to the resource type of the resource to be detected in the preset resource specification file, and the determination of the all the detection rules corresponding to the resource type of the resource to be detected from the application scene of the resource to be detected based on the applicable scene of the resource to be detected The detection rule corresponding to the applicable scene of the resource to be detected is matched in the part detection rule, the detection rule corresponding to the applicable scene of the resource to be detected is used as the detection rule of the resource to be detected, the speed of the adaptive detection rule can be increased, the efficiency of the resource normative detection is improved, the standard updating is convenient, and the burden of developers is reduced. The resource to be detected is subjected to standard detection based on the detection rule of the resource to be detected, so that a standard detection result of the resource to be detected is obtained, developers are not required to perform manual supervision, and the efficiency and reliability of the resource standard detection are improved; by determining the data to be optimized in the resources to be detected based on the standard detection result and performing resource optimization on the data to be optimized, the problem that part of the data to be optimized is not in line with the standard can be automatically optimized, developers do not need to manually check and modify the data, the fault tolerance of resource development is improved, the efficiency of resource optimization is improved, secondary errors caused by negligence during manual repair can be avoided, and the reliability of resource optimization is improved. By determining the data which cannot be automatically optimized in the standard detection result of the resource to be detected, the data which cannot be automatically optimized in the standard detection result of the resource to be detected is subjected to error marking, and a developer can be prompted to perform manual optimization when a resource detection and optimization report is subsequently generated, so that the problem found by the tester during game testing is not required to be fed back to the developer for optimization, and the efficiency of resource optimization is improved. By generating the resource detection and optimization report, the system is convenient for developers to check and repair problems in a targeted manner, and is flexible. Through generating the preset resource specification file, the method is favorable for carrying out specification detection on the resource to be detected by subsequently utilizing the preset resource specification file, does not need developers to carry out artificial investigation and supervision, improves the efficiency and reliability of the resource specification detection, improves the fault tolerance of resource development, and is flexible and convenient.

An embodiment of the present invention further provides a computer device, where the computer device includes: the system comprises a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to realize the resource normative detection and optimization method according to the embodiment of the invention.

The memory may be used to store software programs and modules, and the processor may execute various functional applications and page configurations by executing the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.

The method embodiments provided by the embodiments of the present invention may be executed in a mobile terminal, a computer terminal, a server, or a similar computing device, that is, the computer device may include a mobile terminal, a computer terminal, a server, or a similar computing device. Taking the example of running on a server, fig. 11 is a block diagram of a hardware structure of the server of the resource normalization detection and optimization method provided by the embodiment of the present invention. As shown in fig. 11, the server 1100 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1110 (the processors 1110 may include but are not limited to Processing devices such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing applications 1123 or data 1122. The memory 1130 and the storage medium 1120 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 1120 may include one or more modules, each of which may include a series of instruction operations for a server. Still further, the central processor 1110 may be configured to communicate with the storage medium 1120, and execute a series of instruction operations in the storage medium 1120 on the server 1100. The Server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input-output interfaces 1140, and/or one or more operating systems 1121, such as a Windows ServerTM,MacOS XTM,UnixTM,LinuxTM,FreeBSDTMAnd so on.

The input output interface 1140 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 1100. In one example, i/o Interface 1140 includes a Network adapter (NIC) that may be coupled to other Network devices via a base station to communicate with the internet. In one example, the input/output interface 1140 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.

It will be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 1100 may also include more or fewer components than shown in FIG. 11, or have a different configuration than shown in FIG. 11.

Embodiments of the present invention also provide a computer-readable storage medium, where the storage medium may be disposed in a server to store at least one instruction, at least one program, a code set, or a set of instructions related to implementing a method for detecting and optimizing resource normativity in method embodiments, and the at least one instruction, the at least one program, the code set, or the set of instructions are loaded and executed by the processor to implement the method for detecting and optimizing resource normativity provided by the method embodiments.

Alternatively, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

It can be seen from the above embodiments of the method, device, computer device, or storage medium for detecting and optimizing resource normalization, that the method, device, computer device, or storage medium for detecting and optimizing resource normalization can obtain a resource to be detected, determine the resource type and the applicable scenario of the resource to be detected, determine the detection rule of the resource to be detected from a preset resource normalization file based on the resource type and the applicable scenario of the resource to be detected, perform resource normalization detection on different types and different applicable scenarios by using the corresponding rule, so that the reliability of the resource normalization detection is higher, and determine the detection rule of the resource to be detected from the preset resource normalization file based on the resource type and the applicable scenario of the resource to be detected can include determining all detection rules corresponding to the resource type of the resource to be detected in the preset resource normalization file, and determining a detection rule corresponding to the application scene of the resource to be detected from all detection rules corresponding to the resource type of the resource to be detected based on the application scene of the resource to be detected, and taking the detection rule corresponding to the application scene of the resource to be detected as the detection rule of the resource to be detected, so that the speed of adapting the detection rule can be increased, the efficiency of detecting the resource normativity can be improved, the standard updating is convenient, and the burden of developers can be reduced. The resource to be detected is subjected to standard detection based on the detection rule of the resource to be detected, so that a standard detection result of the resource to be detected is obtained, developers are not required to perform manual supervision, and the efficiency and reliability of the resource standard detection are improved; by determining the data to be optimized in the resources to be detected based on the standard detection result and performing resource optimization on the data to be optimized, the problem that part of the data to be optimized is not in line with the standard can be automatically optimized, developers do not need to manually check and modify the data, the fault tolerance of resource development is improved, the efficiency of resource optimization is improved, secondary errors caused by negligence during manual repair can be avoided, and the reliability of resource optimization is improved. By determining the data which cannot be automatically optimized in the standard detection result of the resource to be detected, the data which cannot be automatically optimized in the standard detection result of the resource to be detected is subjected to error marking, and a developer can be prompted to perform manual optimization when a resource detection and optimization report is subsequently generated, so that the problem found by the tester during game testing is not required to be fed back to the developer for optimization, and the efficiency of resource optimization is improved. By generating the resource detection and optimization report, the system is convenient for developers to check and repair problems in a targeted manner, and is flexible. Through generating the preset resource specification file, the method is favorable for carrying out specification detection on the resource to be detected by subsequently utilizing the preset resource specification file, does not need developers to carry out artificial investigation and supervision, improves the efficiency and reliability of the resource specification detection, improves the fault tolerance of resource development, and is flexible and convenient.

It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种建筑物构件编辑方法、装置、存储介质和电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类