Resource file submission method and device, electronic equipment and storage medium
By using a pre-built resource verification initiator to concurrently start multiple verification processes, resource files can be quickly obtained, verified, and submitted to the application resource repository. This solves the problems of slow resource file submission speed and long processing time, and achieves efficient resource file submission.
Patent Information
- Application Number
- CN202111651474.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing methods for submitting resource files are slow and time-consuming, mainly because the built-in verification technology of the application cannot effectively handle resources other than those specified, requiring the use of third-party tools, which results in slow startup speed and high memory consumption.
By using a pre-built resource verification initiator, two or more resource verification processes can be started concurrently to quickly acquire and verify the target submitted resources, and submit them to the target application's resource repository after passing the verification.
It enables fast and efficient submission of resource files, solving the problems of slow submission speed and long time consumption in existing technologies, and improving the submission efficiency of resource files.
Smart Images

Figure CN114385206B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a resource file submission method and device, an electronic device and a storage medium. BACKGROUND
[0002] In order to meet the needs of users, the resource files provided by the application program need to be updated continuously. At present, the submission of the resource files corresponding to the application program usually needs to be submitted through the submission technology provided by the application program. In order to ensure the submission quality, the resource files are usually checked.
[0003] In the related art, the submission technology provided by the application program is integrated in the application program, that is, the code segment corresponding to the submission technology is nested in the source code of the application program. The submission technology provided by the application program can only check the set resources, and the resources other than the set resources need to be checked by starting a third-party checking tool. However, starting the third-party checking tool not only has a slow starting speed, but also occupies a large amount of memory space, so that the resource file checking takes a long time, thereby causing the technical problems of slow speed and long time consumption in the submission of the resource files. SUMMARY
[0004] Embodiments of the present application provide a resource file submission method and device, an electronic device and a storage medium, to realize more rapid checking and submission processing of the resource files in the application program, thereby improving the submission efficiency of the resource files.
[0005] In a first aspect, the present application provides a resource file submission method, which comprises:
[0006] When receiving a resource submission request of a target application program, at least one target submission resource corresponding to the resource submission request is obtained based on a pre-constructed resource checking launcher;
[0007] At least one target resource checking process to be started in the resource checking launcher is determined, the at least one target submission resource is distributed to the target resource checking process, and the target submission resource distributed thereto is checked through the target resource checking process, wherein two or more resource checking processes can be started concurrently in the resource checking launcher;
[0008] If the target submission resource passes the checking, the target submission resource is submitted to the resource library of the target application program in response to the resource submission request.
[0009] In a second aspect, the present application further provides a resource file submission device, which comprises:
[0010] The target submission resource obtaining module is configured to, when receiving a resource submission request of a target application program, obtain at least one target submission resource corresponding to the resource submission request based on a pre-constructed resource verification initiator;
[0011] The target submission resource verification module is configured to determine at least one target resource verification process to be started in the resource verification initiator, distribute the at least one target submission resource to the target resource verification process, and verify the target submission resource distributed to the target resource verification process through the target resource verification process, wherein two or more resource verification processes can be started concurrently in the resource verification initiator;
[0012] The target submission resource submission module is configured to, if the target submission resource verification passes, submit the target submission resource to a resource library of the target application program in response to the resource submission request.
[0013] In a third aspect, an electronic device is provided, and the electronic device comprises:
[0014] One or more processors;
[0015] A storage device configured to store one or more programs;
[0016] When the program is executed by the processor, the processor implements the method for submitting a resource file as provided in any of the embodiments of the present application.
[0017] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, which, when executed by a processor, implements the method for submitting a resource file as provided in any of the embodiments of the present application.
[0018] The technical scheme of the embodiment of the present application can obtain at least one target submission resource corresponding to the resource submission request based on the pre-constructed resource verification initiator when the resource submission request of the target application program is received, can adapt to the personalized resource verification and submission requirements of the target application program, and can flexibly verify and submit the target submission resource. After the target submission resource is obtained, at least one target resource verification process to be started in the resource verification initiator can be determined, and the at least one target submission resource can be reasonably distributed to the target resource verification process to achieve the most reasonable resource allocation. Then, the target submission resource distributed by the target resource verification process can be verified. When multiple resource verification processes are required, two or more resource verification processes can be concurrently started in the resource verification initiator. The resource can be concurrently verified to shorten the verification time. After the target submission resource is verified, if the target submission resource passes the verification, the target submission resource can be submitted to the resource library of the target application program in response to the resource submission request, so as to ensure the effectiveness of the target submission resource. The technical problem of slow speed and long time consumption of the resource file submission method in the prior art is solved, the application program corresponding resource file is more quickly and effectively submitted, and the technical effect of improving the submission efficiency of the resource file is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical scheme of the exemplary embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced. Obviously, the drawings introduced are only a part of the drawings of the embodiments to be described by the present application, and not all the drawings. Those skilled in the art can obtain other drawings according to these drawings without creating labor.
[0020] Figure 1 is a resource file submission method flowchart provided by the first embodiment of the present application;
[0021] Figure 2 is a resource file submission method flowchart provided by the second embodiment of the present application;
[0022] Figure 3 is a structure diagram of a resource file submission device provided by the third embodiment of the present application;
[0023] Figure 4 is a structure diagram of an electronic device provided by the fourth embodiment of the present application. DETAILED DESCRIPTION
[0024] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are intended to be illustrative only and not limiting of the application. It is also to be understood that the terminology used herein is for the purpose of describing the specific embodiments only and is not intended to be limiting.
[0025] Embodiment one
[0026] Figure 1 is a resource file submission method flow diagram provided by the first embodiment of the application. The present embodiment can be applicable to the case of checking the submitted resources. The method can be executed by a resource file submission device. The resource file submission device can be realized by software and / or hardware and can be integrated into an electronic device such as a computer or a server.
[0027] As shown in Figure 1 , the method of the present embodiment comprises:
[0028] S110, when receiving a resource submission request of a target application program, obtaining at least one target submission resource corresponding to the resource submission request based on a pre-constructed resource check launcher.
[0029] Wherein, the target application program can be understood as an application program that needs to submit resources, such as a Unity application program. The number of target application programs can be one or more. The resource submission request can be understood as a request for submitting resources. The information that can be carried in the resource submission request can include but is not limited to the identification of the target application program and the identification of the target submission resource, etc. Wherein, the identification of the target application program can include but is not limited to the name and version number of the target application program, etc. The target submission resource can be understood as the resource that needs to be submitted. The target submission resource can include but is not limited to pictures, model meshes and materials, etc. The number of target submission resources can be one, two or more than two. In actual application, the number of target submission resources is often multiple and not fixed, which may be hundreds or thousands.
[0030] Wherein, the resource check launcher can be understood as an executable file with resource check function. For example, the resource check launcher can be an.exe file. Wherein, the executable file with resource check function can be obtained based on the program code with resource check function. Specifically, the program code with resource check function is compiled and processed, and after the compilation is completed, the executable file with resource check function can be generated. Wherein, the executable file with resource check function can decouple the program code with resource check function contained in the source code of the target application program and the program code other than the program code with resource check function. The resource check launcher can be used to obtain the target submission resource corresponding to the resource submission request.
[0031] Specifically, when receiving the resource submission request of the target application program, the resource submission request can be parsed. Further, the target submission resource corresponding to the resource submission request can be determined. After determining the target submission resource, the target submission resource corresponding to the resource submission request can be obtained by running the pre-constructed resource verification launcher. Specifically, the target submission resource corresponding to the resource submission request can be obtained by running the pre-constructed resource verification launcher, which can be that the storage address of the target submission resource corresponding to the resource submission request is determined by running the pre-constructed resource verification launcher, and then the target submission resource can be obtained from the corresponding storage address.
[0032] It should be noted that there are various ways to generate the resource submission request of the target application program, and the specific generation method is not limited herein, for example, the resource submission request of the target application program can be generated based on the resource submission trigger operation of the user for the target application program, or the resource submission request of the target application program can be received by the user.
[0033] In the embodiment of the application, in the case of submitting resources corresponding to a plurality of target application programs, when receiving the resource submission request of at least one target application program, the time when the resource submission request of each target application program is received can be determined, and the resource submission requests corresponding to each time can be parsed in the order of time. If the number of resource submission requests corresponding to the same time is two or more, one of the plurality of resource submission requests corresponding to the same time can be randomly selected for parsing. Further, the target submission resource corresponding to each resource request can be determined. After determining the target submission resource corresponding to each resource request, the target submission resource corresponding to each resource submission request can be obtained according to the pre-constructed resource verification.
[0034] Before obtaining the target submission resource corresponding to the resource submission request, or when obtaining the target submission resource corresponding to the resource submission request, the target submission resource can be processed in the following two ways:
[0035] As an optional embodiment of the embodiment of the application, the target submission resource is encrypted by calling a resource encryption algorithm. The resource encryption algorithm can be set according to actual needs, and the specific algorithm is not limited herein, for example, it can be RSA encryption algorithm, Blowfish encryption algorithm or AES encryption algorithm, etc. The target submission resource is encrypted, which can achieve the technical effect of improving the security of the resource.
[0036] As an optional implementation of the embodiment of the present application, when the number of target submission resources corresponding to the resource submission request is large, there is a technical problem that a long time is needed to obtain the target submission resources, and then the resource compression algorithm can be called to compress the target submission resources. The resource compression algorithm can also be set according to actual needs, which is not limited here, such as Lempel-Ziv (LZ) compression method and Huffman algorithm. The size of the target submission resources can be compressed by calling the resource compression algorithm to compress the target submission resources, so that the pre-constructed resource verification launcher can obtain the target resources more quickly.
[0037] S120, determine at least one target resource verification process to be started in the resource verification launcher, distribute at least one target submission resource to the target resource verification process, and verify the distributed target submission resource through the target resource verification process, wherein two or more resource verification processes can be concurrently started in the resource verification launcher.
[0038] The resource verification launcher can include, but is not limited to, a target resource verification process to be started and a target resource verification process to be reserved. The target resource verification process to be reserved can be understood as a target resource verification process that does not need to be started at the current time. The number of target resource verification processes to be started can be one, two or more. In actual application, in order to improve the efficiency of resource verification, two or more resource verification processes can be concurrently started in the resource verification launcher, and then the two or more resource verification processes can be used to concurrently verify the distributed target submission resources.
[0039] The resource verification launcher can concurrently start two or more resource verification processes, which can be understood as when one resource verification process is started in the resource verification launcher, another or more resource verification processes are also started in the resource verification launcher. Further, the two or more resource verification processes can be used to concurrently verify the distributed target submission resources, which can be understood as one resource verification process has not finished verifying the distributed target submission resources, and another resource verification process has started verifying the distributed target submission resources. It can be understood that each resource verification process only verifies the target submission resources distributed thereto. It should be noted that the number of target submission resources distributed to each resource verification process can be the same or different.
[0040] Exemplarily, when there are multiple target submission resources, the target submission resources are divided into three target submission resource groups, denoted as a resource group S1, a resource group S2 and a resource group S3 respectively, and each resource group includes at least one target submission resource. The resource verification initiator includes a target resource verification process T1, a target resource verification process T2, a target resource verification process T3 and a target resource verification process T4. Among them, the target resource verification processes to be started are the target resource verification process T1, the target resource verification process T2 and the target resource verification process T3. The resource group S1, the resource group S2 and the resource group S3 are respectively distributed to the target resource verification process T1, the target resource verification process T2 and the target resource verification process T3. At this time, two or more resource verification processes can be concurrently started in the resource verification initiator, which can be understood as that when the resource verification initiator starts the target resource verification process T1, the resource verification initiator also starts the target resource verification process T2 and / or the target resource verification process T3. Further, the target submission resources distributed thereto are verified by two or more resource verification processes concurrently, which can be understood as that when the target resource verification process T1 has not ended the verification of the target submission resources in the resource group S1, the target resource verification process T2 has started the verification of the target submission resources in the resource group S2 and / or the target resource verification process T3 has started the verification of the target submission resources in the resource group S3.
[0041] Specifically, after obtaining the target submission resources corresponding to the resource submission request, the target resource verification processes to be started in the resource verification initiator can be determined. Then the target submission resources can be distributed to the target resource verification processes. Two or more target resource verification processes can be concurrently started. Thus, the target submission resources distributed thereto can be verified by the concurrently started target resource verification processes. Optionally, in this embodiment, two or more target resource verification processes can also be concurrently started before the target submission resources are distributed to the target resource verification processes. It should be noted that after the resource verification initiator is started, that is, the executable file with the resource verification function is stored in the memory, the executable file with the resource verification function is run in the memory, and the executable file with the resource verification function in the running state is taken as the process of the resource verification initiator.
[0042] It should be noted that there can be multiple occasions for creating the target resource process, and the specific creation occasion of the target resource process is not limited herein. For example, the target resource process can be created when the resource verification initiator obtains the target submission resources, or the target resource process can be created in the resource verification initiator when the resource submission request of the target application program is received.
[0043] It also needs to be explained that the target submission file is checked in the embodiment of the application to improve the file quality of the target submission file. The abnormal phenomenon of the project caused by the file quality problem in the project is avoided.
[0044] Optionally, before determining the at least one target resource verification process to be started in the resource verification initiator, at least one resource verification process is created. The resource verification process can be a pre-set maximum number of concurrent resource verification processes, which can shorten the submission time of the target submission resource, or the target process number corresponding to the available memory space at the current time can be determined based on the memory space, and the resource verification process of the target process number is created to avoid the process jamming phenomenon due to limited memory space.
[0045] The following two ways are introduced to determine how to determine the at least one target resource verification process to be started in the resource verification initiator:
[0046] Method one, determine all resource verification processes that can be started in the resource verification initiator at the current time, and all the resource verification processes that can be started are regarded as target resource verification processes.
[0047] Specifically, after the resource verification initiator obtains the target submission resource corresponding to the resource submission request, it can determine whether the resource verification process can be started at the current time for each resource verification process in the resource verification initiator. If yes, the resource verification process that can be started is regarded as the target resource verification process. Then all the resource verification processes that can be started in the resource verification initiator at the current time can be started, so as to maximize the start of the resource verification initiator.
[0048] For example, all resource verification processes in the resource verification initiator include resource verification process T4, resource verification process T5, resource verification process T6 and resource verification process T7. At the current time, resource verification process T4 cannot be started, resource verification process T5, resource verification process T6 and resource verification process T7 can be started. Then, resource verification process T5, resource verification process T6 and resource verification process T7 can be regarded as target resource verification processes.
[0049] Method two, determine the resource size and / or resource quantity of the at least one target submission resource, determine the number of target resource verification processes to be started in the resource verification initiator according to the resource size and / or resource quantity, and start the target resource verification process.
[0050] The resource size of the target submission resource can be understood as the size of the space occupied by the target submission resource.
[0051] Specifically, after the resource verification initiator obtains the target submission resource, the resource size and / or the resource quantity of the target submission resource can be determined. Then, the quantity of the target resource verification processes to be started in the resource verification initiator can be determined based on the resource size and / or the resource quantity of the target submission resource. Then, the target resource verification processes can be started.
[0052] In one embodiment, a correspondence between the resource size of the target submission resource and the target resource verification process is preset, where the resource size of the target submission resource can be the resource size of each target submission resource corresponding to the target resource verification process, or can be the total resource size of all target submission resources that can be verified by the target resource verification process. The total file size of the target submission resources corresponding to different target resource verification processes can be the same or different. For example, the target resource verification process T5 corresponds to the resource size of a single target submission resource in the range of N1 to N2. For another example, the total resource size of all target submission resources that can be verified by the target resource verification process T5 is N3. After the resource verification initiator obtains the target submission resource, the resource size of the target submission resource can be determined. Then, based on the preset correspondence between the resource size of the target submission resource and the target resource verification process, the quantity of the target resource verification processes to be started in the resource verification initiator can be determined. Then, the target resource verification processes can be started.
[0053] In another embodiment, a correspondence between the resource quantity of the target submission resource and the quantity of the target resource verification process can be preset. After the resource verification initiator obtains the target submission resource, the resource quantity of the target submission resource can be determined. Then, based on the preset correspondence between the resource quantity of the target submission resource and the quantity of the target resource verification process, the quantity of the target resource verification processes to be started in the resource verification initiator can be determined. Then, the target resource verification processes can be started.
[0054] For example, the correspondence between the resource quantity of the target submission resource and the quantity of the target resource verification process is that 100 target submission resources correspond to 1 target resource verification process. When the resource quantity of the target submission resource is 1000, the quantity of the target resource verification processes to be started is 10.
[0055] In yet another embodiment, a correspondence between the resource size and the resource quantity of the target submission resource and the target resource verification process can be preset. For example, the target submission resource with the resource quantity between N3 and N4 and the resource size ranging from 512B to 1003B can correspond to the target resource verification process T7. After the resource verification initiator obtains the target submission resource, the resource size and the resource quantity of the target submission resource can be determined, and then the number of the target resource verification processes to be started in the resource verification initiator can be determined based on the preset correspondence between the resource size and the resource quantity of the target submission resource and the target resource verification process. Then, the target resource verification process can be started.
[0056] Optionally, the target submission resource distributed is verified by the target resource verification process in the following manner:
[0057] When the target resource verification process is two or more, the two or more target resource verification processes are concurrently started, and the target submission resource distributed is verified by each target resource verification process.
[0058] Specifically, after the target resource verification process is started, the number of the target resource verification processes can be determined. If the target resource verification process is two or more, the two or more target resource verification processes can be concurrently started. Then, the target submission resource corresponding to each target resource verification process can be verified by the concurrently started target resource verification process.
[0059] It should be noted that in the embodiments of the present application, the two or more target resource verification processes are concurrently started to verify the corresponding target submission resource, which can shorten the verification time of the target submission resource, thereby improving the verification efficiency.
[0060] Optionally, the verification parameter of the target submission resource is preset. Then, the target submission resource can be verified based on the preset verification parameter of the target submission resource. The verification parameter of the target submission resource can be set according to the actual needs of verification, and the verification parameter can include but is not limited to the resource identifier, the resource type, and the format corresponding to the resource type, etc.
[0061] S130, if the target submission resource is verified, the target submission resource is submitted to the resource library of the target application program in response to the resource submission request.
[0062] The resource submission request can carry information of a resource library of the target application program, where the information of the resource library of the target application program can include but is not limited to a name, a type, and path information of the resource library. The resource library can be understood as a library for storing the target submission resource. Optionally, the resource library can be a database or a resource storage warehouse. The type of the resource storage warehouse can be public or private. The number of the resource libraries of the target application program can be one or more. When the number of the target submission resources corresponding to the target application program is large, the target application program can include multiple resource libraries, where each resource library can store different types of target submission resources.
[0063] Specifically, if the target submission resource passes the verification, the resource submission request can be parsed. Then the resource library of the target application program can be determined. After the target resource library is determined, the target submission resource can be submitted to the resource library of the target application program, so as to centrally manage and use the target submission resource.
[0064] Optionally, the target submission resource is submitted to the resource library of the target application program in the following manner:
[0065] For each target submission resource, the target submission resource is converted into a corresponding binary stream, and the binary stream is submitted to the resource library of the target application program. The advantage of submitting the target submission resource in this way is that the resource library of the target application program can more quickly and effectively store the target submission resource.
[0066] It should be noted that after the target submission resource passes the verification, submitting the target submission resource to the resource library of the target application program not only guarantees the resource quality of the target submission resource stored in the resource library, but also avoids the technical problems of wasting storage space and low efficiency of searching for resources from the resource library corresponding to the target application program due to the existence of invalid resources.
[0067] On the basis of the above, if the target submission resource does not pass the verification, a verification failure report corresponding to the target submission resource is generated, and the verification failure report is sent to the target terminal based on a hypertext transfer protocol sending interface implemented in the resource verification initiator.
[0068] The check failure report can be a check failure report corresponding to the target submission resource generated when it is determined that the target submission resource fails the check. The target submission resource that fails the check can be recorded to facilitate verification and subsequent processing of the target submission resource that fails the check. The information in the check failure report can include, but is not limited to, the resource identifier, resource type, resource format, and check time of the target submission resource that fails the check. The check failure report can also carry the target submission resource. The number of check failure reports can be one or more. The target terminal can be a terminal of a supervisor to whom the target submission resource is submitted. The number of target terminals can be one or more.
[0069] Optionally, after the check failure report is sent to the target terminal, the resource file submission method further includes: displaying the check failure report on the target terminal. This facilitates relevant personnel to supervise and process the target submission resource of the target application program, thereby improving the resource quality of the target submission resource.
[0070] Optionally, if the target submission resource fails the check, the check failure report can be generated in the following manner:
[0071] Manner one, if the target submission resource fails the check, the target submission resource that fails the check can be determined. After all the target submission resources are checked, the check failure report can be generated based on all the target submission resources that fail the check. At this time, the number of check failure reports is one.
[0072] Manner two, if the number of target submission resources is large, in order to facilitate modification and processing of the target submission resources that fail the check, if the target submission resource fails the check, the number of check failures of the target submission resource that fails the check can be determined. If the number of check failures reaches a preset number threshold, the check failure report can be generated based on the target submission resources that fail the check with the number of check failures. At this time, the number of check failure reports can be one or more. The preset number threshold can be 20, 40, or 80, and the specific value is not limited herein.
[0073] The technical scheme of the embodiment of the present application can obtain at least one target submission resource corresponding to the resource submission request based on the pre-constructed resource verification launcher when receiving the resource submission request of the target application. The resource verification launcher can independently submit the target submission resource corresponding to the resource submission request of the target application, and can improve the flexibility of resource submission. After obtaining the target submission resource, at least one target resource verification process to be started in the resource verification launcher can be determined, and the at least one target submission resource can be distributed to the target resource verification process. Then, the target submission resource distributed can be verified by the target resource verification process. Two or more resource verification processes can be started in the resource verification launcher. In the embodiment of the present application, the resource verification processes are reasonably and effectively started to verify the resource, and the verification time can be shortened. After verifying the target submission resource, if the target submission resource passes the verification, the target submission resource can be submitted to the resource library of the target application in response to the resource submission request, thereby solving the technical problem of slow speed and long time consumption of the resource file submission method in the prior art, achieving more rapid and effective submission processing of the resource file corresponding to the application, and achieving the technical effect of improving the submission efficiency of the resource file.
[0074] Embodiment two
[0075] Figure 2 is a resource file submission method flowchart provided by the second embodiment of the present application, and on the basis of the foregoing embodiment, the at least one target submission resource can be distributed to the target resource verification process by the Jenkins job service implemented in the resource verification launcher.
[0076] Optionally, the resource verification launcher includes a resource management module corresponding to the target application, and the target submission resource distributed is verified by the target verification process and the resource management module corresponding to the target application.
[0077] Wherein, the same or corresponding technical terms as the above embodiments are not described herein.
[0078] As Figure 2 indicated, the method of the present embodiment can specifically include:
[0079] S210, when receiving the resource submission request of the target application, at least one target submission resource corresponding to the resource submission request is obtained based on the pre-constructed resource verification launcher.
[0080] S220, determine at least one target resource verification process to be started in the resource verification initiator, and distribute the target submission resource to the target resource verification process through the Jenkins job service implemented in the resource verification initiator.
[0081] The Jenkins job service can be used to distribute the target submission resource to the target resource verification process. Two or more resource verification processes can be started concurrently in the resource verification initiator.
[0082] Specifically, the target resource verification process to be started in the resource verification initiator is determined. Then, the target submission resource can be distributed to the target resource verification process at the distribution time of the target submission resource by calling the Jenkins job service implemented in the resource verification initiator.
[0083] In the embodiment of the application, the task of distributing the target submission resource can be monitored in the distribution process of distributing the target submission resource to the target resource verification process by the Jenkins job service implemented in the resource verification initiator. For example, if the target submission resource has a distribution time, the Jenkins job service implemented in the resource verification initiator can monitor the distribution task at the distribution time. In this embodiment, the advantage of monitoring the task of distributing the target submission resource is that if the target submission resource is lost in the distribution process, the target submission resource can be located more quickly by the Jenkins job service implemented in the resource verification initiator.
[0084] S230, verify the target submission resource distributed by the resource management module corresponding to the target application program pre-built in the target verification process.
[0085] The resource management module can be obtained by encapsulating the resource management information corresponding to the target submission resource. The resource management information can include at least one resource verification parameter and resource verification method of the resource. The resource verification parameter can include but is not limited to resource type, resource format corresponding to the resource type, resource size, resource name, resource size, etc. The resource verification parameters of different types of resources can be the same or different. The resource verification method can be a regular expression pre-defined for verifying the target submission resource. The resource verification methods of different types of resources can be the same or different. It should be noted that the resource management information can be flexibly configured according to the actual needs of resource verification. Optionally, the resource management information can be stored in the form of at least one file.
[0086] Specifically, after the target submission resource is distributed to the target resource verification process, the resource management module corresponding to the target application can be called by the target resource verification process. Then, the target submission resource can be verified by the resource management module. Specifically, for each type of target submission resource, the resource verification parameters and the resource verification method configured for each type of resource in the resource management module can be determined, and the resource format, resource size, resource size and other resource verification parameters of the corresponding target submission resource can be verified by calling the resource verification method of each type of resource.
[0087] Optionally, in actual application, there are many types of resources. In order to facilitate the management and maintenance of the resource management information in the resource management module, the common resource verification parameters of all types of resources can be stored separately, and the private verification parameters corresponding to each type of resource can be stored separately. The advantage of this processing is not only to reduce the occupation of memory space by the resource management module, but also to facilitate the subsequent maintenance of the resource verification parameters of each type of resource.
[0088] Illustratively, the resource types of the target submission resource include A type and B type, wherein the resource verification parameters of the target submission resource of A type include resource format, resource size and resource size; the resource verification parameters of the target submission resource of B type include resource format and resource size, then the resource format and resource size can be taken as common resource verification parameters, and the resource size can be taken as private resource verification parameters of the target submission resource of A type.
[0089] In the embodiment of the application, the advantage of pre-constructing the resource management module corresponding to the target application is that it is convenient to uniformly manage the resource management information corresponding to the target submission resource, facilitate the addition, modification or deletion of the resource management information, and better meet the resource submission requirements of the target application.
[0090] S240, if the target submission resource verification is passed, the target submission resource is submitted to the resource library of the target application in response to the resource submission request.
[0091] The technical scheme of the embodiment of the application distributes at least one target submission resource to the target resource verification process through the Jenkins job service implemented in the resource verification initiator. The Jenkins job service implemented in the resource verification initiator not only can distribute the target submission resource, but also can monitor the distributed target submission resource, so as to facilitate real-time understanding of the distribution of the target resource. The target submission resource distributed by the target verification process and the resource management module corresponding to the target application is verified, so as to achieve the effect of more convenient and rapid verification of the target submission resource.
[0092] Embodiment three
[0093] Figure 3 is a structural schematic diagram of a resource file submission device provided by embodiment three of the present application, and the present application provides a resource file submission device, which comprises a target submission resource acquisition module 310, a target submission resource verification module 320 and a target submission resource submission module 330.
[0094] The target submission resource acquisition module 310 is configured to acquire at least one target submission resource corresponding to a resource submission request of a target application based on a pre-constructed resource verification initiator when the resource submission request is received; the target submission resource verification module 320 is configured to determine at least one target resource verification process to be started in the resource verification initiator, distribute the at least one target submission resource to the target resource verification process, and verify the target submission resource distributed by the target resource verification process, wherein two or more resource verification processes can be started concurrently in the resource verification initiator; and the target submission resource submission module 330 is configured to submit the target submission resource to a resource library of the target application in response to the resource submission request if the target submission resource passes the verification.
[0095] The technical scheme of the embodiment of the present application can acquire at least one target submission resource corresponding to a resource submission request of a target application based on a pre-constructed resource verification initiator by the target submission resource acquisition module when the resource submission request is received. Then, the target submission resource verification module can determine at least one target resource verification process to be started in the resource verification initiator, and distribute the at least one target submission resource to the target resource verification process. After the target submission resource is distributed to the target resource verification process, the target resource verification process can verify the target submission resource distributed. Two or more resource verification processes can be started concurrently in the resource verification initiator. After the target submission resource is verified, the target submission resource submission module can submit the target submission resource to a resource library of the target application in response to the resource submission request if the target submission resource passes the verification, so as to ensure the effectiveness of the target submission resource, solve the technical problem of slow speed and long time consumption in the prior art, realize more rapid and effective submission processing of the resource file corresponding to the application, and thus achieve the technical effect of improving the submission efficiency of the resource file.
[0096] Optionally, the target submission resource verification module 320 is configured to determine all resource verification processes that can be started at the current time in the resource verification initiator, and take all the resource verification processes that can be started as target resource verification processes.
[0097] Optionally, the target submission resource verification module 320 is configured to determine the resource size and / or resource quantity of the at least one target submission resource, determine the number of target resource verification processes to be started in the resource verification initiator according to the resource size and / or resource quantity, and start the target resource verification processes.
[0098] Optionally, the target submission resource verification module 320 is configured to distribute the at least one target submission resource to the target resource verification processes through the Jenkins job service implemented in the resource verification initiator.
[0099] Optionally, the target submission resource verification module 320 is configured to concurrently start two or more target resource verification processes when the number of target resource verification processes is two or more, and perform verification on the target submission resources distributed to each target resource verification process through each target resource verification process.
[0100] Optionally, the resource verification initiator comprises a resource management module corresponding to the target application, and the target submission resource verification module 320 is configured to perform verification on the target submission resources distributed to the target resource verification processes through the resource management module corresponding to the target application.
[0101] Optionally, the device further comprises a verification failure report transmission module configured to generate a verification failure report corresponding to the target submission resource if the target submission resource fails to pass the verification, and transmit the verification failure report to a target terminal based on the hypertext transfer protocol transmission interface implemented in the resource verification initiator.
[0102] The device described above can perform the resource file submission method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for performing the resource file submission method.
[0103] It should be noted that each unit and module included in the resource file submission device described above is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be implemented; in addition, the specific names of each functional unit are only for the convenience of mutual differentiation, and are not used to limit the protection scope of the embodiments of the present application.
[0104] Embodiment Four
[0105] Figure 4 is a structural schematic diagram of an electronic device provided by Embodiment Four of the present application. Figure 4 A block diagram of an exemplary electronic device 12 suitable for use in implementing any of the embodiments of the present application is shown. Figure 4The electronic device 12 shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. Device 12 is typically an electronic device that processes configuration information.
[0106] like Figure 4 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, memory 28, and bus 18 connecting different components (including memory 28 and processing unit 16).
[0107] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0108] Electronic device 12 typically includes a variety of computer-readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0109] Memory 28 can include computer-readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 can further include other removable / non-removable, volatile / non-volatile computer storage media. By way of example only, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a "hard drive"). Although not shown, a magnetic disk drive can also be used for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive can be used for reading from or writing to a removable, non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, etc.). In such instances, each can be connected to bus 18 by one or more data media interfaces. Memory 28 can include at least one program product 40 having a set (e.g., at least one) of program modules 42 configured to carry out the functions of embodiments of the application. Program product 40, can be stored in memory 28 by way of example, and can include an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof, can include implementation of a networking environment. Program modules 42 generally carry out the functions and / or methodologies of embodiments of the application described herein.
[0110] Electronic device 12 can also communicate with one or more external devices 14 such as a keyboard, a mouse, a camera, etc. and a display, one or more devices that enable a user to interact with electronic device 12, and / or one or more devices that enable electronic device 12 to communicate with one or more other computing devices. Such communication can be facilitated by an input / output (I / O) interface 22. Still yet, electronic device 12 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through a network adapter 20. As depicted, network adapter 20 communicates with the other components of electronic device 12 via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with electronic device 12. Such as, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0111] The processing unit 16 performs various functional applications and data processing by running programs stored in the memory 28, such as implementing the resource file submission method provided by the above-mentioned embodiments of the present application, which comprises:
[0112] When receiving a resource submission request of a target application program, at least one target submission resource corresponding to the resource submission request is acquired based on a pre-constructed resource verification initiator; at least one target resource verification process to be started in the resource verification initiator is determined, the at least one target submission resource is distributed to the target resource verification process, and the target submission resource distributed is verified by the target resource verification process, wherein two or more resource verification processes can be started concurrently in the resource verification initiator; if the target submission resource passes the verification, the target submission resource is submitted to a resource library of the target application program in response to the resource submission request.
[0113] Of course, those skilled in the art can understand that the processor can also implement the technical solutions of the resource file submission method provided by any of the embodiments of the present application.
[0114] Embodiment five
[0115] The embodiment five of the present application also provides a computer readable storage medium, which stores a computer program, characterized in that the program is executed by a processor, such as the resource file submission method provided by the above-mentioned embodiments of the present application, which comprises:
[0116] When receiving a resource submission request of a target application program, at least one target submission resource corresponding to the resource submission request is acquired based on a pre-constructed resource verification initiator; at least one target resource verification process to be started in the resource verification initiator is determined, the at least one target submission resource is distributed to the target resource verification process, and the target submission resource distributed is verified by the target resource verification process, wherein two or more resource verification processes can be started concurrently in the resource verification initiator; if the target submission resource passes the verification, the target submission resource is submitted to a resource library of the target application program in response to the resource submission request.
[0117] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device.
[0118] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which computer readable program code is embodied. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a storage medium, that is capable of storing the program for use by or in connection with the instruction execution system, apparatus or device.
[0119] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the above.
[0120] The computer program code for carrying out operations of the embodiments of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0121] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope 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 can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for submitting resource files, characterized in that, include: When a resource submission request from a target application is received, at least one target submission resource corresponding to the resource submission request is obtained based on a pre-built resource verification initiator; wherein, the resource verification initiator is an executable file with resource verification functionality; the executable file with resource verification functionality is obtained based on program code with resource verification functionality; the program code with resource verification functionality is obtained by decoupling the program code with resource verification functionality contained in the source code of the target application from program code other than the program code with resource verification functionality. The resource verification initiator determines at least one target resource verification process to be started, distributes the at least one target submitted resource to the target resource verification process, and verifies the distributed target submitted resource through the target resource verification process. The resource verification initiator can concurrently start two or more resource verification processes. If the target resource submission verification passes, then in response to the resource submission request, the target resource submission is submitted to the resource library of the target application.
2. The method according to claim 1, characterized in that, The step of determining at least one target resource verification process to be started in the resource verification initiator includes: Determine all resource verification processes that can be started in the resource verification initiator at the current time, and take all the startable resource verification processes as the target resource verification process.
3. The method according to claim 1, characterized in that, The step of determining at least one target resource verification process to be started in the resource verification initiator includes: Determine the resource size and / or resource quantity of the at least one target submitted resource, determine the number of target resource verification processes to be started in the resource verification initiator based on the resource size and / or resource quantity, and start the target resource verification process.
4. The method according to claim 1, characterized in that, The step of distributing the at least one target submitted resource to the target resource verification process includes: The Jenkins job service implemented in the resource verification initiator distributes the at least one target submitted resource to the target resource verification process.
5. The method according to claim 1, characterized in that, The step of verifying the distributed target submitted resources through the target resource verification process includes: When there are two or more target resource verification processes, two or more target resource verification processes are activated concurrently, and each target resource verification process verifies the distributed target submitted resources.
6. The method according to claim 1, characterized in that, The step of verifying the distributed target submitted resources through the target resource verification process includes: The target submitted resources are verified through the target resource verification process and the resource management module corresponding to the pre-built target application.
7. The method according to claim 1, characterized in that, Also includes: If the target submitted resource fails the verification, a verification failure report corresponding to the target submitted resource is generated and sent to the target terminal based on the Hypertext Transfer Protocol sending interface implemented in the resource verification initiator.
8. A resource file submission device, characterized in that, include: The target submission resource acquisition module is used to acquire at least one target submission resource corresponding to the resource submission request based on a pre-built resource verification initiator when a resource submission request is received from a target application; wherein, the resource verification initiator is an executable file with resource verification function; the executable file with resource verification function is obtained based on program code with resource verification function; the program code with resource verification function is obtained by decoupling the program code with resource verification function contained in the source code of the target application from the program code other than the program code with resource verification function. The target submission resource verification module is used to determine at least one target resource verification process to be started in the resource verification initiator, distribute the at least one target submission resource to the target resource verification process, and verify the distributed target submission resource through the target resource verification process. The resource verification initiator can concurrently start two or more resource verification processes. The target resource submission module is used to submit the target resource to the resource library of the target application in response to the resource submission request if the target resource verification passes.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the program is executed by the processor, the processor implements the resource file submission method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the resource file submission method as described in any one of claims 1-7.
Citation Information
Patent Citations
Data loading method, device and equipment and storage medium
CN112287035A
Resource processing method and device, electronic equipment and computer readable medium
CN113778956A