Game resource file classification method and device, equipment and storage medium
By extracting multi-dimensional feature vectors of game resource files and projects, accurate classification of game resource files is achieved, solving the problem of low classification accuracy caused by confusing resource file naming in cross-team development and improving classification accuracy.
Patent Information
- Application Number
- CN202510721913.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-21
AI Technical Summary
In the existing technology, different naming rules are used during cross-team development, resulting in confusing naming of game resource files, making it impossible to accurately classify them into corresponding game projects, resulting in low classification accuracy.
By extracting the feature vectors of game resource files and game projects, the target project of the game resource files is determined according to the multi-dimensional matching degree, the first feature vector is used to represent the name, time, technology and content of the game resource files, and the second feature vector is used to represent the name, time, technology and content of the game project, so as to achieve accurate matching and storage.
Improves the classification accuracy of game resource files, solves the misclassification problem caused by a single file name, and ensures that resource files are accurately classified into the corresponding game projects.
Smart Images

Figure CN120821701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for classifying game resource files. Background Art
[0002] As game development scales and increases in complexity, the number of game resources (such as images, audio, video, text, and code) grows exponentially. A single game project may contain tens of thousands of resource files, covering a wide range of formats and uses. When companies develop multiple game projects simultaneously, game engineers face a massive amount of game resources. Searching for the resources corresponding to each game project within this vast trove of resources undoubtedly affects retrieval efficiency. Therefore, an efficient game resource classification and management system has become core infrastructure for ensuring project development efficiency and improving project quality.
[0003] In existing technology, game resource files can be identified based on their file names, allowing them to be stored in folders corresponding to those game projects. However, when developing game projects across multiple teams, different naming conventions are often used to name game resource files, leading to confusion and difficulty accurately classifying them into corresponding game projects. Consequently, misclassification is prone to occur when classifying projects based on a single file name, impacting the accuracy of game resource classification. Summary of the Invention
[0004] The present application provides a game resource file classification method, apparatus, device and storage medium, which determines the matching degree between the game resource file and each game project based on the feature vector of the game resource file and the feature vector of the game project, and classifies the game resource file into projects based on the matching degree, thereby solving the misclassification problem that is easy to occur when classifying projects based on a single file name in the prior art, and improving the classification accuracy of the game resource file.
[0005] In a first aspect, the present application provides a method for classifying game resource files, comprising: Obtaining a game resource file to be classified, and extracting a first feature vector of the game resource file; Scanning configuration files of various game projects in the project manager, and extracting a second feature vector of the game project according to the configuration files of the game project; Determining a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector; Determining a target game project corresponding to the game resource file based on a matching degree between the game resource file and each of the game projects; The game resource file is stored in a folder of the target game project through the project manager.
[0006] In a second aspect, the present application provides a game resource file classification device, comprising: A first feature extraction module is configured to obtain a game resource file to be classified and extract a first feature vector of the game resource file; A second feature extraction module is configured to scan the configuration files of each game project in the project manager and extract a second feature vector of the game project according to the configuration files of the game project; a matching degree determination module, configured to determine a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector; a target project determination module, configured to determine a target game project corresponding to the game resource file based on a matching degree between the game resource file and each of the game projects; The file storage module is configured to store the game resource file in the folder of the target game project through the project manager.
[0007] In a third aspect, the present application provides a game resource file classification device, comprising: one or more processors; The memory stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the game resource file classification method as described in the first aspect.
[0008] In a fourth aspect, the present application provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the game resource file classification method as described in the first aspect.
[0009] In the present application, by obtaining the game resource file to be classified, the first feature vector of the game resource file is extracted; the configuration file of each game project in the project manager is scanned, and the second feature vector of the game project is extracted according to the configuration file of the game project; the matching degree between the game resource file and the corresponding game project is determined according to the first feature vector and the second feature vector; based on the matching degree between the game resource file and each game project, the target game project corresponding to the game resource file is determined; and the game resource file is stored in the folder of the target game project through the project manager. Through the above technical means, the first feature vector is used to represent the multi-dimensional file information such as the name, time, technology and content of the game resource file, and the second feature vector is used to represent the multi-dimensional project information such as the name, time, technology and content of the game project, so as to accurately estimate the matching degree between the game resource file and the game project in multiple dimensions by using the first feature vector and the second feature vector, and the game resource file is classified and stored according to the matching degree between multiple dimensions, which solves the misclassification problem that is easy to occur when classifying projects based on a single file name in the prior art, and improves the classification accuracy of the game resource file. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a flowchart of a method for classifying game resource files provided by an embodiment of the present application; Figure 2 This is a schematic diagram of the resource upload application interface of the project manager provided in an embodiment of the present application; Figure 3 This is a flowchart of extracting the first eigenvector provided by an embodiment of the present application; Figure 4 This is a flowchart of extracting a first content feature vector provided by an embodiment of the present application; Figure 5 Schematic diagram of the project management directory of the project manager provided in an embodiment of the present application; Figure 6 This is a flowchart of extracting the second eigenvector provided by an embodiment of the present application; Figure 7 This is a flowchart of determining a target game item provided by an embodiment of the present application; Figure 8 This is a flowchart of determining a target game project based on a historical resource file provided by an embodiment of the present application; Figure 9 This is a structural diagram of a game resource file classification device provided by an embodiment of the present application; Figure 10 This is a structural diagram of a game resource file classification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0011] To further clarify the objectives, technical solutions, and advantages of this application, specific embodiments of the present application are described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are intended only to illustrate this application and are not intended to limit the present application. It should also be noted that, for ease of description, the drawings only illustrate portions relevant to this application, not all of them. Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict the various operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. A process may terminate upon completion of its operations, but may also have additional steps not shown in the accompanying drawings. A process may correspond to a method, function, procedure, subroutine, subprogram, and the like.
[0012] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0013] In the more common existing implementation methods, most game resource files are named according to the naming rules of the project name when they are created. When classifying game resource files into projects, the file name of the game resource file is matched with the project name of the game project, thereby dividing the game resource files into resource files of corresponding matching game projects. However, when developing game projects across teams, different naming rules are used to name game resource files, resulting in confusing naming of game resource files and inability to accurately classify them into corresponding game projects. Therefore, when classifying projects based on a single file name, misclassification problems are prone to occur, affecting the classification accuracy of game resources.
[0014] To solve the above problems, this embodiment provides a game resource file classification method to accurately estimate the matching degree between game resource files and game projects in multiple dimensions based on the feature vectors of game resource files and the feature vectors of game projects, and classify and store game resource files according to the matching degree between multiple dimensions, thereby improving the classification accuracy of game resource files.
[0015] The game resource file classification method provided in this embodiment can be executed by a game resource file classification device. The game resource file classification device can be implemented through software and / or hardware. The game resource file classification device can be composed of two or more physical entities, or a single physical entity. For example, the game resource file classification device can be a computer device used to test migration code.
[0016] The game resource file classification device is installed with at least one type of operating system, wherein the operating system includes but is not limited to the Android system, the Linux system and the Windows system. The game resource file classification device can install at least one application based on the operating system. The application can be an application that comes with the operating system or an application downloaded from a third-party device or server. In this embodiment, the game resource file classification device has at least an application that can execute the game resource file classification method. For example, the application that can execute the game resource file classification method can be a project manager, which is an application for managing project information such as the development process of various game projects, game resources and developer accounts.
[0017] For ease of understanding, this embodiment is described by taking a project manager as an example of the main body for executing the game resource file classification method.
[0018] Figure 1 A flowchart of a method for classifying game resource files provided by an embodiment of the present application is given. Figure 1 , the game resource file classification method specifically includes: S110: Obtain a game resource file to be classified, and extract a first feature vector of the game resource file.
[0019] The game resource files to be classified are the game resource files of the game project to be determined. Game resource files can be pictures, videos, texts, codes, audios, etc. The project manager provides a resource upload application interface for uploading game resource files to be classified. Users can upload game resource files to be classified through the resource upload application interface, so that the project manager can obtain the game resource files to be classified. For example, Figure 2 Schematic diagram of the resource upload application interface of the project manager provided in the embodiment of the present application. Figure 2As shown, the resource upload application interface 10 displays an upload window 11 for game resource files. The user can drag one or more game resource files into the upload window 11, and then click the confirmation control 14 below to trigger the file upload operation. The project manager obtains the game resource files to be classified in the upload window 11 in response to the file upload operation. Alternatively, the user can click the upload control 12 in the resource upload application interface 10, and the resource upload application interface 10 pops up a local file management window. The storage folder of the game resource files can be found through the local file management window, and one or more game resource files can be selected. After the game resource files are selected, the local file management window closes, and the selected game resource files are displayed in the upload window 11. The user clicks the confirmation control 14 below to trigger the file upload operation. The project manager obtains the game resource files to be classified in the upload window 11 in response to the file upload operation.
[0020] In this embodiment, the first feature vector is used to represent multi-dimensional information such as the name, time, technology, and / or content of the game resource file. The name and time of the game resource file can correspond to the name and time of the game project. The technology of the game resource file can be understood as the technology, rules, or tools used to process the game resource file. For example, some large-scale games use HDRP to render images, so for these games, the technical characteristics of their game image resources include HDRP. Games use different technologies, rules, or tools when processing game resource files of different file formats and different data volumes. The technology, rules, or tools used to process game resource files can be analyzed based on the file format and / or file size of the game resource file to determine the game project that the game resource file is compatible with. In other words, the file format and / or file size of the game resource file can be mapped to the technology, rules, or tools of the game project. The content of the game resource file is used in the game, which affects the style, theme, characters, and / or story of the game. In other words, the content of the game resource file can be mapped to the style, theme, characters, and / or story of the game project.
[0021] It is understood that feature information in at least two dimensions, namely, name, time, technology, and content, can be extracted to form a first feature vector. This first feature vector can then be matched with a second feature vector composed of feature information in corresponding dimensions for each game project to identify game projects that closely match the name, time, technology, and / or content of the game resource files, thereby achieving accurate classification of the game resource files. It should be noted that a game project can be a game development project or a dungeon or side quest development project within the game.
[0022] In order to improve the matching accuracy between game resource files and game projects, the feature information of game resource files can be fully extracted from the name, time, technology and content. Figure 3This is a flowchart of extracting the first feature vector provided by the embodiment of the present application. Figure 3 As shown, the step of extracting the first feature vector specifically includes S1101-S1103: S1101. Extract a first basic feature vector of the game resource file based on the name, creation time, and modification time of the game resource file.
[0023] For example, the name, creation time, and modification time of a game resource file can be obtained from its attribute information. The resource file name is segmented to obtain multiple words. Each word is mapped to its corresponding semantic space using a pre-trained Word2Vec model to obtain a feature vector for each word in the corresponding semantic space. The feature vectors corresponding to multiple nouns are concatenated to obtain a name feature vector. The creation time and modification time are converted to time values, which are used as time feature vectors. The name feature vector and the time feature vector are concatenated to obtain a first basic feature vector.
[0024] S1102: Extract a first technical feature vector of the game resource file based on the file format and file volume of the game resource file.
[0025] Among them, the file volume includes the file size and content parameters that affect the file size. For example, when the game resource file is a picture, the file volume also includes the resolution of the picture. When the game resource file is text, the file volume also includes the page number, number of words and number of lines of the text.
[0026] In this embodiment, the file format and file volume are obtained from the attribute information of the game resource file, the string of the file format is converted into a corresponding format feature vector, and the numerical value of the file volume is converted into a corresponding volume feature vector. The format feature vector and the volume feature vector are combined to obtain a first technical feature vector.
[0027] S1103: Determine a target feature extraction model for the game resource file according to the file type of the game resource file, and extract a first content feature vector of the game resource file using the target feature extraction model.
[0028] Exemplarily, the file types of game resource files include images, videos, audio, text, and code. A target feature extraction model for extracting content features of the game resource files can be selected based on the file type of the game resource files. The game resource files can then be input into the target feature extraction model to obtain a corresponding first content feature vector. For example, for images and audio, a two-dimensional convolutional neural network can be used as the corresponding content feature extraction model; for videos, a three-dimensional convolutional neural network can be used as the corresponding content feature extraction model; and for text and code, a BERT model can be used as the corresponding content feature extraction model.
[0029] Optionally, the target feature extraction model can be used to identify keywords of the content of the game resource file, determine the category of the game resource file based on the keywords, and convert the category and keywords into the first content feature vector of the game resource file. Specifically, Figure 4 This is a flowchart of extracting the first content feature vector provided by the embodiment of the present application. Figure 4 As shown, the step of extracting the first content feature vector specifically includes S13011-S13012: S13011. Input the game resource file into the corresponding target feature extraction model to obtain the style category and content label output by the target feature extraction model.
[0030] Exemplarily, the target feature extraction model includes a backbone network and a multi-task head, which includes a style classification head and a label recognition head. The style classification head is used to classify the game style of the game resource file. The game style can be divided from perspectives such as visuals and gameplay, and the style classification head can predict style categories from multiple perspectives. The label detection head is used to identify the content tags of the game resource file, such as the characters, scenes, and functions involved in the content, and other vocabulary that represents key information. For game resource files of different file types, the backbone network has different network structures. For example, images and audio use a two-dimensional convolutional neural network as the backbone network, videos use a three-dimensional convolutional neural network as the backbone network, and text and code use a BERT model as the backbone network. The style classification head can uniformly use an SVM vector machine or a fully connected layer, and the label recognition head can uniformly use a fully connected layer or a decoder (RNN or Transformer).
[0031] This embodiment uses the style classification head and label recognition head as a fully connected layer as an example. When the game resource file is an image, the image is preprocessed and then input into the backbone network. The backbone network extracts the image's features, which are then input into the style classification head and label recognition head. The style classification head outputs a first predicted probability for each style category, and the label recognition head outputs a second predicted probability for the content label. The style category with the highest first predicted probability is determined as the style category of the game resource file, and the content label with a second predicted probability exceeding a preset probability threshold is determined as the content label of the game resource file.
[0032] In this embodiment, the backbone network and multi-task head are trained on multiple samples before they are able to predict style categories and content labels. The training process for the backbone network and multi-task head for various file types is roughly the same. This embodiment uses the backbone network and multi-task head for training images as an example. Multiple game sample images are obtained, each labeled with a corresponding game style and content label. The game style of the game sample images is created based on a style library, and the content labels of the game sample images are created based on a label library. The game sample images are input into the backbone network to obtain sample features output by the backbone network. These sample features are input into the style classification head and the label recognition head to obtain sample prediction probabilities for various game styles output by the style classification head and sample prediction probabilities for various content labels output by the label recognition head. A first loss value is calculated based on the sample prediction probabilities for various game styles output by the style classification head and the game styles labeled by the game sample images. A second loss value is calculated based on the sample prediction probabilities for various content labels output by the label recognition head and the content labels labeled by the game sample images. The first and second loss values are summed to obtain a total loss value, which is used to reversely optimize the multi-task head and backbone network. It should be noted that since the joint optimization of the style classification head and the label recognition head belongs to a multi-task learning method, multi-task learning allows each task head to obtain feature constraints and global information from other task heads, thereby improving the detection accuracy, robustness and generalization ability of the model.
[0033] S13012: Generate a first content feature vector of the game resource file according to the style category and content label.
[0034] For example, the style category of a game resource file is converted into a corresponding style feature vector using the feature vectors corresponding to each style category in a preset style library. The content tags of the game resource file are converted into corresponding tag feature vectors using the feature vectors corresponding to each content tag in a preset tag library. The style feature vector and the tag feature vector are concatenated to obtain a first content feature vector for the game resource file.
[0035] This embodiment identifies the genre categories and content tags of game resource files, using them to represent the content of the game resource files, thereby improving the accuracy of content feature extraction for game resource files. Furthermore, this embodiment extracts feature vectors for game resource files in three dimensions: basic information, technical information, and content information. This allows for accurate matching of corresponding game projects based on these feature vectors, improving the accuracy of project classification for game resource files.
[0036] S120 , scanning configuration files of each game project in the project manager, and extracting a second feature vector of the game project according to the configuration files of the game project.
[0037] Exemplarily, a project manager manages multiple game projects, and the multiple game projects are displayed in a project management directory. Each game project in the project management directory can be scanned to obtain a corresponding configuration file.
[0038] Optionally, when a game project is a game development project, it belongs to the root directory in the project management directory. When a game project is a game copy, branch or version development project, it belongs to the subdirectory of the corresponding game development project in the project management directory, that is, the game copy development project can be regarded as a subproject of the game development project. When classifying game resource files, the game projects and subprojects that match the game resource files can be determined. For example, Figure 5 Schematic diagram of the project management directory of the project manager provided in the embodiment of the present application. Figure 5 As shown, Project A, Project B, and Project C are development projects for Game A, Game B, and Game C, respectively. Project A1 and Project A2 are subprojects of Project A, used to develop copies, side quests, or versions of Game A. Project B has no subprojects. Project C1 and Project C2 are subprojects of Game C, and Project C21 is a subproject of Project C2. Scanning the project management directory retrieves the configuration files for Project A, Project B, and Project C, as well as the configuration files for their corresponding subdirectories.
[0039] After obtaining the game project configuration file, the game project's project name, project time, game technology description, and game content description in the configuration file are parsed. The game technology description is a description of the technology, rules, or tools used to process game resources, and the game content description is a description of the game characters, background, story, style, gameplay, and other content. Feature information of at least two dimensions can be extracted from the project name, project time, game technology description, and game content description to form a second feature vector. This second feature vector is then matched against the second feature vector of the game resource file. The second feature vector is used to represent multi-dimensional information such as the game project's name, time, technology, and / or content.
[0040] In order to improve the matching accuracy between game resource files and game projects, the feature information of game projects can be fully extracted from the name, time, technology and content. Figure 6 This is a flowchart of extracting the second eigenvector provided by the embodiment of the present application. Figure 6 As shown, the step of extracting the second feature vector specifically includes S1201-S1204: S1201. Parse the configuration file of the game project to obtain the project name, project time, game technology description, and game content description of the game project.
[0041] For example, the configuration file has a corresponding template, and the project name, project time, game technology description, and game content description of the game project can be parsed in the configuration file according to the template.
[0042] S1202: Extract a second basic feature vector of the game project based on the project name and project time.
[0043] For example, the project name is segmented to obtain multiple words. Each word is mapped to the corresponding semantic space using a pre-trained Word2Vec model to obtain a feature vector for each word in the corresponding semantic space. The feature vectors corresponding to multiple nouns are concatenated to obtain a name feature vector. The project time is converted into a time value, which is used as a time feature vector. The name feature vector and the time feature vector are concatenated to obtain a second basic feature vector.
[0044] It should be noted that the Word2Vec model used to extract the name feature vector of the project name and the Word2Vec model used to extract the name feature vector of the file name can be the same model.
[0045] S1203. Extract a second technical feature vector of the game item based on the game technical description.
[0046] Exemplarily, a semantic analysis is performed on the descriptive text of the game technology description to determine the technology, algorithm or tool used by the game project to process various file types, and the technology, algorithm or tool that is compatible with the type of game resource file is determined. According to the compatible technology, algorithm or tool, the format type and volume range of the compatible file are queried in the technology library, the format type is converted into a format feature vector, the volume range is converted into a volume feature vector, and the format feature vector and the volume feature vector are concatenated to obtain a second technology feature vector. In the technology library, each technology, algorithm or tool is associated with the format type and volume range of the corresponding file that can be processed and saved.
[0047] S1204: Extract keywords and game styles from the game content description, and generate a second content feature vector of the game item based on the keywords and game style.
[0048] For example, a preset style library is used to extract the corresponding game style from the game content description text and convert the game style into a corresponding style vector. A preset tag library is used to extract keywords from the game content description text and convert the keywords into corresponding tag feature vectors. The style feature vector and the tag feature vector are concatenated to obtain the second content feature vector of the game project.
[0049] This embodiment extracts feature vectors of the game resource files in the three dimensions of basic information, technical information and content information through the name, time, technical description and content description of the game project, so as to accurately match the corresponding game resource files based on the feature vectors of these three dimensions and improve the accuracy of project classification of game resource files.
[0050] S130: Determine a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector.
[0051] Exemplarily, the cosine similarity between the first eigenvector and the second eigenvector is calculated, and the cosine similarity is determined as the matching degree between the game resource file and the game item.
[0052] Optionally, when the first feature vector and the second feature vector respectively include a basic feature vector, a technical feature vector, and a content feature vector, the similarities corresponding to the basic feature vector, the technical feature vector, and the content feature vector can be calculated to determine the matching degree between the game resource file and the game project. The specific implementation process is: determining the basic vector similarity between the first basic feature vector and the second basic feature vector; determining the technical vector similarity between the first technical feature vector and the second technical feature vector; determining the content vector similarity between the first content feature vector and the second content feature vector; and performing a weighted summation of the basic vector similarity, the technical vector similarity, and the content vector similarity to obtain the matching degree between the game resource file and the corresponding game project.
[0053] For example, the cosine similarity between the first and second basic feature vectors is calculated using the cosine similarity formula, and the calculated cosine similarity is used as the basic vector similarity. The cosine similarity between the first and second technical feature vectors is calculated using the cosine similarity formula, and the calculated cosine similarity is used as the technical vector similarity. The cosine similarity between the first and second content feature vectors is calculated using the cosine similarity formula, and the calculated cosine similarity is used as the content vector similarity. The basic vector similarity, technical vector similarity, and content vector similarity are multiplied by corresponding weight coefficients and then accumulated to obtain the matching degree between the game resource file and the game item. The weight coefficients for basic vector similarity, technical vector similarity, and content vector similarity can be set according to actual needs. This embodiment combines the basic, technical, and content similarities to determine the matching degree between the game resource file and the game item, so that game items with highly similar game resource file names, time periods, technologies, and content are identified as the game items corresponding to the game resource files, thereby improving the classification accuracy of game resource files.
[0054] S140: Determine a target game project corresponding to the game resource file based on the matching degree between the game resource file and each game project.
[0055] Exemplarily, the game item with the highest matching degree is determined as the target game item of the game resource file.
[0056] Optionally, identify the root project in each game project, such as Figure 5 Project A, Project B and Project C in the game resource file are extracted according to the configuration file of the root project. According to the second feature vector of each root project and the first feature vector of the game resource file, the matching degree between the game resource file and each root project is determined, and the root project with the highest matching degree is determined as the target root project of the game resource file. Then, the second feature vector of each sub-project of the target root project is extracted, and the matching degree between the game resource file and each sub-project is determined according to the second feature vector of each sub-project and the first feature vector of the game resource file, and the root project with the highest matching degree is determined as the target game project of the game resource file. This embodiment first locates the game development project to which the game resource file belongs, and then determines the sub-project corresponding to the game resource file from the game development project, so as to reduce the number of matches between the game resource file and the game project, improve the matching efficiency, and thus improve the classification efficiency of the game resource file.
[0057] In addition, the game resource file can be a shared resource of multiple game projects. When the game resource file is highly matched with multiple game projects, the game resource file may be a shared resource of multiple game projects, thereby determining multiple target game resources. Specifically, Figure 7 This is a flow chart of determining the target game project provided by the embodiment of the present application. Figure 7 As shown, the step of determining the target game item specifically includes S1401-S1403: S1401: When the matching degree between the game resource file and the multiple game items is greater than a preset matching threshold, determine a candidate game item with the highest matching degree among the multiple game items.
[0058] The preset matching threshold is the minimum matching degree between the game resource file and the game project to which it belongs. When the matching degree between a game resource file and multiple game projects is greater than the preset matching threshold, it indicates that the game resource file may be a shared resource of the multiple game projects. At this point, the candidate game project with the highest matching degree can be identified from the multiple game projects with matching degrees greater than the preset matching threshold. By querying whether the candidate game project has associated game projects, it can be determined whether the game resource file is a shared resource between the candidate game project and the associated game projects.
[0059] S1402: If there is an associated game project of the candidate game project among the multiple game projects, determine the candidate game project and the corresponding associated game project as the target game project corresponding to the game resource file.
[0060] For example, a project management directory is used to query multiple game projects with a matching degree greater than a preset matching threshold to determine whether there are associated game projects for the candidate game project. Parent-child game projects, sibling game projects, or projects with a reference relationship can all be considered as mutually associated game projects. If an associated game project for the candidate game project exists among multiple game projects with a matching degree greater than the preset matching threshold, it indicates that the game resource file is a shared resource between the candidate game project and the associated game project, and thus the candidate game project and the associated game project are determined as the target game projects corresponding to the game resource file.
[0061] S1403: If there is no associated game project of the candidate game project among the multiple game projects, determine the candidate game project as the target game project corresponding to the game resource file.
[0062] For example, if there is no associated game project of the candidate game project among multiple game projects with a matching degree greater than a preset matching threshold, it indicates that the game resource file does not belong to a shared resource, and the candidate game project is determined as the target game project corresponding to the game resource file.
[0063] This embodiment determines whether a game resource file is a shared resource by querying whether there is an associated project for a game project that highly matches the game resource file, so that when the game resource file is a shared resource, it is stored in the multiple game projects to which it belongs, thereby improving the classification accuracy of the game resource file.
[0064] It should be noted that if there are errors in the basic, technical, and / or content expression characteristics of the game resource file, the match degree between the game resource file and any game project may fall below the preset match degree threshold. In this case, the target game project corresponding to the game resource file can be determined based on the historical resource files stored for the game project.
[0065] Optional, Figure 8 This is a flow chart of determining a target game project based on a historical resource file provided by an embodiment of the present application. Figure 8 As shown, the step of determining the target game project based on the historical resource file specifically includes S1404-1407: S1404: When the matching degree between the game resource file and each game project is less than a preset matching threshold, parse the configuration file of the game project to obtain the file storage path of the game project.
[0066] Exemplarily, when the matching degree between the game resource file and each game project is less than a preset matching threshold, the configuration file of the game project is parsed to obtain the file storage path used by the game project to store the corresponding resource file.
[0067] S1405. Obtain the historical resource file corresponding to the game project according to the file storage path.
[0068] Among them, the historical resource files are resource files that have been stored in the game project, and a preset number of historical resource files are obtained according to the file storage path of the game project.
[0069] S1406: Determine the content correlation between the historical resource file and the game resource file based on the file content of the historical resource file and the file content of the game resource file.
[0070] Exemplarily, the historical resource file is input into the backbone network of the target feature extraction model. The backbone network extracts corresponding feature information, which is then input into the multi-task head of the target feature extraction model to obtain style categories and content labels. A third content feature vector for the historical resource file is generated based on the style categories and content labels. The cosine similarity between the first and third content feature vectors is calculated, and the cosine similarity is used as the content relevance.
[0071] It should be noted that if the historical resource file is a game resource file previously to be classified, then its third content feature vector has been determined during the classification, and the third content feature vector generated during the classification can be directly obtained.
[0072] S1407: Determine the game project corresponding to the historical resource file with the highest content relevance as the target game project of the game resource file.
[0073] Exemplarily, the average value of the content relevance between the historical resource files of the game project and the game resource files is calculated, and the game project with the highest average value of the content relevance is determined as the target game project of the game resource file.
[0074] This embodiment determines the content correlation between the files by comparing the historical resource files stored in the game project with the contents of the game resource files, thereby determining the game project with highly correlated content as the target game project to which the game resource file belongs, thereby improving the classification accuracy of the game resource files.
[0075] S150: Store the game resource file in a folder of the target game project through the project manager.
[0076] Exemplarily, the project manager stores the game resource files in a folder corresponding to the target game project according to the file storage path of the target game project, thereby achieving project classification of the game resource files.
[0077] In summary, the game resource file classification method provided by the embodiment of the present application obtains the game resource file to be classified, extracts the first feature vector of the game resource file; scans the configuration file of each game project in the project manager, and extracts the second feature vector of the game project according to the configuration file of the game project; determines the matching degree between the game resource file and the corresponding game project according to the first feature vector and the second feature vector; determines the target game project corresponding to the game resource file based on the matching degree between the game resource file and each game project; and stores the game resource file in the folder of the target game project through the project manager. Through the above technical means, the first feature vector is used to represent the multi-dimensional file information such as the name, time, technology and content of the game resource file, and the second feature vector is used to represent the multi-dimensional project information such as the name, time, technology and content of the game project, so as to accurately estimate the matching degree between the game resource file and the game project in multiple dimensions by using the first feature vector and the second feature vector, and classify and store the game resource files according to the matching degree between multiple dimensions, thereby solving the misclassification problem that is easy to occur when classifying projects based on a single file name in the prior art, and improving the classification accuracy of the game resource files.
[0078] Based on the above embodiments, Figure 9 This is a schematic diagram of the structure of a game resource file classification device provided by an embodiment of the present application. Figure 9 The game resource file classification device provided in this embodiment specifically includes: a first feature extraction module 21, a second feature extraction module 22, a matching degree determination module 23, a target item determination module 24 and a file storage module 25.
[0079] The first feature extraction module 21 is configured to obtain a game resource file to be classified and extract a first feature vector of the game resource file; A second feature extraction module 22 is configured to scan the configuration files of each game project in the project manager and extract a second feature vector of the game project according to the configuration files of the game project; A matching degree determination module 23 is configured to determine a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector; The target project determination module 24 is configured to determine the target game project corresponding to the game resource file based on the matching degree between the game resource file and each game project; The file storage module 25 is configured to store the game resource files into a folder of a target game project through the project manager.
[0080] Based on the above embodiment, the first feature extraction module 21 includes: a first basic feature extraction unit, configured to extract the first basic feature vector of the game resource file based on the name, creation time and modification time of the game resource file; a first technical feature extraction unit, configured to extract the first technical feature vector of the game resource file based on the file format, file volume and file source of the game resource file; a first content feature extraction unit, configured to determine the target feature extraction model of the game resource file according to the file type of the game resource file, and extract the first content feature vector of the game resource file through the target feature extraction model.
[0081] Based on the above embodiment, the first content feature extraction unit includes: a style label prediction subunit, which is configured to input the game resource file into the corresponding target feature extraction model to obtain the style category and content label output by the target feature extraction model; the first content feature extraction subunit is configured to generate a first content feature vector of the game resource file based on the style category and content label.
[0082] Based on the above embodiment, the second feature extraction module 22 includes: a configuration file parsing unit, configured to parse the configuration file of the game project to obtain the project name, project time, game technical description, and game content description of the game project; a second basic feature extraction unit, configured to extract the second basic feature vector of the game project based on the project name and project time; a second technical feature extraction unit, configured to extract the second technical feature vector of the game project based on the game technical description; and a second content feature extraction unit, configured to extract keywords and game styles in the game content description, and generate a second content feature vector of the game project based on the keywords and game style.
[0083] Based on the above embodiment, the matching degree determination module includes: a first similarity determination unit, configured to determine the basic vector similarity between the first basic feature vector and the second basic feature vector; a second similarity determination unit, configured to determine the technical vector similarity between the first technical feature vector and the second technical feature vector; a third similarity determination unit, configured to determine the content vector similarity between the first content feature vector and the second content feature vector; and a matching degree determination unit, configured to perform a weighted summation of the basic vector similarity, the technical vector similarity and the content vector similarity to obtain the matching degree between the game resource file and the corresponding game item.
[0084] Based on the above embodiment, the target project determination module includes: a candidate project determination unit, configured to determine the candidate game project with the highest matching degree among multiple game projects when the matching degree between the game resource file and multiple game projects is greater than a preset matching threshold; a first target project determination unit, configured to determine the candidate game project and the corresponding associated game project as the target game project corresponding to the game resource file if there is an associated game project of the candidate game project among the multiple game projects; and a second target project determination unit, configured to determine the candidate game project as the target game project corresponding to the game resource file if there is no associated game project of the candidate game project among the multiple game projects.
[0085] Based on the above embodiment, the target project determination module includes: a storage path determination unit, which is configured to parse the configuration file of the game project to obtain the file storage path of the game project when the matching degree between the game resource file and each game project is less than a preset matching threshold; a historical resource file acquisition unit, which is configured to acquire the historical resource file corresponding to the game project according to the file storage path; a correlation determination unit, which is configured to determine the content correlation between the historical resource file and the game resource file based on the file content of the historical resource file and the file content of the game resource file; a third target project determination unit, which is configured to determine the game project corresponding to the historical resource file with the highest content correlation as the target game project of the game resource file.
[0086] As mentioned above, the game resource file classification device provided by the embodiment of the present application obtains the game resource file to be classified, extracts the first feature vector of the game resource file; scans the configuration file of each game project in the project manager, and extracts the second feature vector of the game project according to the configuration file of the game project; determines the matching degree between the game resource file and the corresponding game project according to the first feature vector and the second feature vector; determines the target game project corresponding to the game resource file based on the matching degree between the game resource file and each game project; and stores the game resource file in the folder of the target game project through the project manager. Through the above technical means, the first feature vector is used to represent the multi-dimensional file information such as the name, time, technology and content of the game resource file, and the second feature vector is used to represent the multi-dimensional project information such as the name, time, technology and content of the game project, so as to accurately estimate the matching degree between the game resource file and the game project in multiple dimensions by using the first feature vector and the second feature vector, and classify and store the game resource files according to the matching degree between multiple dimensions, thereby solving the misclassification problem that is easy to occur when classifying projects based on a single file name in the prior art, and improving the classification accuracy of the game resource files.
[0087] The game resource file classification device provided in the embodiment of the present application can be used to execute the game resource file classification method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0088] Figure 10 This is a structural diagram of a game resource file classification device provided by an embodiment of the present application, with reference to Figure 10 The game resource file classification device includes: a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 in the game resource file classification device can be one or more, and the number of memories 32 in the game resource file classification device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the game resource file classification device can be connected via a bus or other means.
[0089] Memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs, and modules, such as the program instructions / modules corresponding to the game resource file classification method of any embodiment of the present application (e.g., the first feature extraction module 21, the second feature extraction module 22, the matching degree determination module 23, the target item determination module 24, and the file storage module 25 in the game resource file classification device). Memory 32 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on device usage. Furthermore, memory 32 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory may further include memory remotely located from the processor, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0090] The communication device 33 is used for data transmission.
[0091] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, implements the above-mentioned game resource file classification method.
[0092] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0093] The game resource file classification device provided above can be used to execute the game resource file classification method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0094] An embodiment of the present application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute a game resource file classification method. The game resource file classification method includes: obtaining a game resource file to be classified and extracting a first feature vector of the game resource file; scanning a configuration file of each game project in a project manager and extracting a second feature vector of the game project based on the configuration file of the game project; determining a matching degree between the game resource file and the corresponding game project based on the first feature vector and the second feature vector; determining a target game project corresponding to the game resource file based on the matching degree between the game resource file and each game project; and storing the game resource file in a folder of the target game project through the project manager.
[0095] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or it may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.
[0096] Of course, the storage medium containing computer-executable instructions provided in the embodiment of the present application is not limited to the above-mentioned game resource file classification method, and can also execute related operations in the game resource file classification method provided in any embodiment of the present application.
[0097] The game resource file classification device, storage medium and game resource file classification equipment provided in the above embodiments can execute the game resource file classification method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the game resource file classification method provided in any embodiment of the present application.
[0098] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and any obvious changes, readjustments, and substitutions that are apparent to those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the claims.
Claims
1. A method for classifying game resource files, characterized in that: include: Obtaining a game resource file to be classified, and extracting a first feature vector of the game resource file; Scanning configuration files of various game projects in the project manager, and extracting a second feature vector of the game project according to the configuration files of the game project; Determining a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector; Determining a target game project corresponding to the game resource file based on a matching degree between the game resource file and each of the game projects; The game resource file is stored in a folder of the target game project through the project manager.
2. The game resource file classification method according to claim 1, characterized in that: The extracting the first feature vector of the game resource file includes: Extracting a first basic feature vector of the game resource file based on the name, creation time, and modification time of the game resource file; Extracting a first technical feature vector of the game resource file based on a file format, a file volume, and a file source of the game resource file; A target feature extraction model for the game resource file is determined according to the file type of the game resource file, and a first content feature vector of the game resource file is extracted using the target feature extraction model.
3. The game resource file classification method according to claim 2, characterized in that: The extracting the first content feature vector of the game resource file by using the target feature extraction model includes: Inputting the game resource file into a corresponding target feature extraction model to obtain a style category and content label output by the target feature extraction model; A first content feature vector of the game resource file is generated according to the style category and the content tag.
4. The game resource file classification method according to claim 2, characterized in that: The extracting the second feature vector of the game project according to the configuration file of the game project includes: Parsing the configuration file of the game project to obtain the project name, project time, game technology description, and game content description of the game project; Extracting a second basic feature vector of the game item based on the item name and the item time; Extracting a second technical feature vector of the game item based on the game technical description; Keywords and game styles are extracted from the game content description, and a second content feature vector of the game item is generated according to the keywords and the game style.
5. The game resource file classification method according to claim 4, characterized in that: The determining, based on the first feature vector and the second feature vector, a degree of matching between the game resource file and the corresponding game item includes: determining a basis vector similarity between the first basic feature vector and the second basic feature vector; Determining a technical vector similarity between the first technical feature vector and the second technical feature vector; determining a content vector similarity between the first content feature vector and the second content feature vector; A weighted sum is performed on the basic vector similarity, the technical vector similarity, and the content vector similarity to obtain a matching degree between the game resource file and the corresponding game item.
6. The game resource file classification method according to claim 1, characterized in that: The determining, based on the matching degree between the game resource file and each of the game items, a target game item corresponding to the game resource file includes: In a case where the matching degree between the game resource file and the plurality of game items is greater than a preset matching threshold, determining a candidate game item with the highest matching degree among the plurality of game items; If there is a game project associated with the candidate game project among the multiple game projects, determining the candidate game project and the corresponding associated game project as the target game project corresponding to the game resource file; If there is no associated game project of the candidate game project among the multiple game projects, the candidate game project is determined as the target game project corresponding to the game resource file.
7. The game resource file classification method according to claim 1, characterized in that: The determining, based on the matching degree between the game resource file and each of the game items, a target game item corresponding to the game resource file includes: When the matching degree between the game resource file and each of the game items is less than a preset matching threshold, parsing the configuration file of the game item to obtain the file storage path of the game item; Acquire the historical resource file corresponding to the game project according to the file storage path; Determining a content correlation between the historical resource file and the game resource file based on the file content of the historical resource file and the file content of the game resource file; The game project corresponding to the historical resource file with the highest content correlation is determined as the target game project of the game resource file.
8. A game resource file classification device, characterized in that: include: A first feature extraction module is configured to obtain a game resource file to be classified and extract a first feature vector of the game resource file; A second feature extraction module is configured to scan the configuration files of each game project in the project manager and extract a second feature vector of the game project according to the configuration files of the game project; a matching degree determination module, configured to determine a matching degree between the game resource file and the corresponding game item based on the first feature vector and the second feature vector; a target project determination module, configured to determine a target game project corresponding to the game resource file based on a matching degree between the game resource file and each of the game projects; The file storage module is configured to store the game resource file in the folder of the target game project through the project manager.
9. A game resource file classification device, characterized in that: include: one or more processors; The memory stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the game resource file classification method as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to execute the game resource file classification method according to any one of claims 1 to 7.