Porting Method, Device, Equipment and Medium of Application Program

By engineering transformation and resource conversion in third-party development tools, the problem that games developed by third-party engines cannot run directly on the mini-game platform is solved, and the rapid porting of applications and the reuse of development results is achieved.

CN113760362BActive Publication Date: 2025-06-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010494866.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-03
Publication Date
2025-06-13
Estimated Expiration
2040-06-03

AI Technical Summary

Technical Problem

Games developed by third-party engines cannot run directly on the mini-game platform, resulting in the need to redevelop the same game content, wasting early development results and waste resources.

Method used

By engineering transformation in third-party development tools, the first application is transformed from the first project mechanism to the second project mechanism, and art resources and code resources are converted from the first resource format and programming language to the second resource format and programming language, and exported to the development tool of the child application for secondary development, obtaining the child application that relies on the running of the parent application.

Benefits of technology

It realizes that applications developed by third-party development tools can be ported to the mini-game platform without redevelopment, saving developers' workload and enabling a large number of existing applications to quickly port to the mini-camera platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760362B_ABST
    Figure CN113760362B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for porting an application program, relating to the field of virtual environments. The method includes: through engineering transformation in a third-party development tool, transforming the first application program from a first project mechanism to a second project mechanism; converting the art resources in the transformed first application program from a first resource format to a second resource format and exporting them to the development tool of the sub-application program; converting the code resources in the transformed first application program from a first programming language to a second programming language and exporting them to the development tool of the sub-application program; and performing secondary development on the art resources and the code resources in the development tool of the sub-application program to obtain the second application program. The present application can quickly port the first application program developed by a third-party development tool into the second application program in the form of a sub-application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of virtual environments, and particularly to a method, apparatus, device, and medium for transplanting an application program. Background Art

[0002] A sub-application program is a program that depends on a parent application program to run, also known as a mini-program. When the parent application program has been installed on an electronic device, the mini-program does not need to be manually downloaded and installed by the user in the electronic device. The user only needs to click on the icon in the parent application program to automatically download and install it. A small game is a category of mini-programs and has a convenient experience of playing immediately upon clicking.

[0003] Since many games are developed by third-party engines and cannot run directly on the mini-game platform. When a game developed by a third-party engine wants to run on the mini-game platform, developers need to re-develop the game on the mini-game platform.

[0004] Re-developing a game with the same game content on the mini-game platform will waste the development results achieved in the early stage and cause unnecessary resource waste. Summary of the Invention

[0005] The embodiments of the present application provide a method, apparatus, device, and medium for transplanting an application program, which can transplant a first application program developed by a third-party development tool into a second application program in the form of a sub-application program. The technical solution is as follows:

[0006] According to one aspect of the present application, there is provided a method for transplanting an application program for transplanting a first application program into a second application program, where the second application program is a sub-application program that depends on a parent application program to run. The method includes:

[0007] Through engineering transformation in a third-party development tool, transform the first application program from a first project mechanism to a second project mechanism;

[0008] Convert the art resources in the transformed first application program from a first resource format to a second resource format and export them to the development tool of the sub-application program;

[0009] Convert the code resources in the transformed first application program from a first programming language to a second programming language and export them to the development tool of the sub-application program;

[0010] Perform secondary development on the art resources and the code resources in the development tool of the sub-application program to obtain the second application program;

[0011] Among them, the first project mechanism, the first resource format, and the first programming language correspond to the third-party development tool, and the second project mechanism, the second resource format, and the second programming language correspond to the sub-application.

[0012] According to another aspect of the present application, there is provided a device for porting an application, which is used to port a first application into a second application, and the second application is a sub-application that depends on the parent application to run. The device includes:

[0013] An engineering transformation module, which is used to transform the first application from a first project mechanism to a second project mechanism through engineering transformation in a third-party development tool;

[0014] An art export module, which is used to convert the art resources in the transformed first application from a first resource format to a second resource format and export them to the development tool of the sub-application;

[0015] A code export module, which is used to convert the code resources in the transformed first application from a first programming language to a second programming language and export them to the development tool of the sub-application;

[0016] A secondary development module, which is used to perform secondary development on the art resources and the code resources in the development tool of the sub-application to obtain the second application;

[0017] Among them, the first project mechanism, the first resource format, and the first programming language correspond to the third-party development tool, and the second project mechanism, the second resource format, and the second programming language correspond to the sub-application.

[0018] In an optional design of the present application, the engineering transformation module is used to modify the first project structure of the first application into a second project structure through engineering transformation in the third-party development tool;

[0019] Among them, the first project structure is a project structure adapted to the third-party development tool, and the second project structure is a project structure adapted to the development tool of the sub-application.

[0020] In an optional design of the present application, the engineering transformation module is used to access the SDK for the first application in the third-party development tool, and the SDK provides code functions that are not supported by the third-party development tool but are supported by the development tool of the sub-application.

[0021] In an alternative design of the present application, the engineering transformation module is used to adapt the target function interface in the first application in the third-party development tool, and the target function interface is a function interface not supported in the development tool of the sub-application.

[0022] In an alternative design of the present application, the art export module is used to call the resource export plug-in to search for the art resources in the transformed first application, convert the searched art resources from the first resource format to the second resource format, and export the art resources in the second resource format to the development tool of the sub-application.

[0023] In an alternative design of the present application, the code export module is used to call the code export plug-in to convert the C# code in the transformed first application into JavaScript script code and export it to the development tool of the sub-application.

[0024] In an alternative design of the present application, a JS adapter plug-in is installed in the development tool of the sub-application, and the secondary development module is used to call the JS adapter plug-in to bridge the C# interface supported by the C# code to the same type of JS interface supported by the JavaScript script to obtain the second application.

[0025] In an alternative design of the present application, a JS adapter plug-in is installed in the development tool of the sub-application, and the secondary development module is used to call the performance tool to perform performance tuning on the JavaScript script code to obtain the second application.

[0026] According to another aspect of the present application, a computer device is provided. The computer device includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the application program transplantation method described in the above aspect.

[0027] According to another aspect of the present application, a computer-readable storage medium is provided. At least one instruction, at least one program, a code set or an instruction set is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the application program transplantation method described in the above aspect.

[0028] According to another aspect of the present application, there is provided a computer program product configured to cause a data processing system including a processor and a memory to execute the method of the above aspect when executed on the data processing system, and the computer program product may be provided on a tangible, non-transitory computer-readable medium.

[0029] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:

[0030] By first performing engineering transformation on the first application program in a third-party development tool, and then exporting the art resources and code resources in the transformed first application program to the development tool of the sub-application program, and performing secondary development on the art resources and code resources in the development tool of the sub-application program to obtain the second application program; it enables the development work of the first application program that has been completed in the third-party development tool to be reused, without having to start a development process with a lot of repetitive work again, which can not only save the workload of developers, but also enable a large number of existing application programs to be quickly ported to the mini-program platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings according to these drawings without creative efforts.

[0032] Figure 1 It is a block diagram of the structure of a computer system provided by an exemplary embodiment of the present application;

[0033] Figure 2 It is a schematic diagram of the structure of a first terminal provided by an exemplary embodiment of the present application;

[0034] Figure 3 It is a schematic diagram of the structure of a second terminal provided by an exemplary embodiment of the present application;

[0035] Figure 4 It is a flowchart of a method for transplanting an application program provided by an exemplary embodiment of the present application;

[0036] Figure 5 It is a schematic diagram of the principle of a method for transplanting an application program provided by an exemplary embodiment of the present application;

[0037] Figure 6 It is a flowchart of a method for transplanting an application program provided by another exemplary embodiment of the present application;

[0038] Figure 7It is a schematic diagram of the principle of the application porting method provided by an exemplary embodiment of the present application;

[0039] Figure 8 It is a schematic diagram of three kinds of plugins and SDK provided by an exemplary embodiment of the present application;

[0040] Figure 9 It is a schematic diagram of the principle of the application porting method provided by an exemplary embodiment of the present application;

[0041] Figure 10 It is a block diagram of the application porting device provided by another exemplary embodiment of the present application;

[0042] Figure 11 It is a block diagram of a computer device provided by another exemplary embodiment of the present application. Detailed implementation manners

[0043] To make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] Refer to Figure 1 , which shows a block diagram of a computer system 100 provided by an exemplary embodiment of the present application. The computer system 100 includes: one or more first terminals 120, a server cluster 140, and one or more second terminals 160.

[0045] The first terminal 120 may be an electronic device used by a developer. The first terminal 120 may be a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, and the like.

[0046] Combined with Figure 2 it can be known that a third-party development tool 122 and a development tool 124 for a sub-application are installed in the operating system 131 of the first terminal 120. The third-party development tool 142 is also called a third-party development engine. The third-party development tool 142 includes, but is not limited to: Unity engine, Cocos engine, Laya engine, Unreal engine, etc. Here, "third party" refers to a third party other than the platform side of the sub-application and the game developer, that is, the development engine side. The development tool 124 for the sub-application is a development tool for developing the sub-application.

[0047] The first terminal 120 is connected to the server cluster 140 via a wired network or a wireless network.

[0048] The second terminal 160 can be an electronic device used by a player user. The second terminal 160 can be a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, and so on. The operating system of the second terminal 160 can be a Windows system, an Android system, or an IOS system.

[0049] A mother application and a child application are installed and running in the second terminal 160. The mother application can be any one of an instant messaging program, a social program, a payment program, an e-shopping program, a system management program, a security management program, an antivirus program, a network disk program, a file manager program, a desktop optimization program. In this article, it is exemplified that the second terminal 160 is an instant messaging program. The child application is a program that depends on the mother application to run and can also be called a "mini program".

[0050] The server cluster 140 can be any one of multiple servers, virtual cloud storage, or a cloud computing center. The server cluster 140 is used to provide background services for a predetermined application program on the first terminal 120, the mother application program and the child application program on the second terminal 160. The server cluster 140 has data storage capabilities. Optionally, the server cluster 140 includes: a mother application server 142, a child application server 144, and a third-party server 146. Among them:

[0051] The mother application server 142 is used to provide background services for the mother application in the second terminal 160. Schematically, when the mother application is an instant messaging program, the mother application server 142 provides instant messaging services between multiple second terminals 160.

[0052] The child application server 144 is used to provide background services for the development tool of the child application in the first terminal 120 and the child application in the second terminal 160.

[0053] The third-party server 146 is used to provide background services for the third-party development tool in the first terminal 120.

[0054] In this embodiment, it is exemplified that the server cluster 140 includes three servers. The above three servers can also be deployed in the form of cloud servers. However, the number of servers included in the server cluster 140 may also be more or less than three. For example, the server cluster 140 is implemented by multiple virtual machines on one server, or by dozens of servers. This embodiment does not limit this.

[0055] Combined with Figure 3 As can be seen, the operating system 161 is a computer program that manages and controls the hardware and software resources in the second terminal 160. It is the most basic system software that runs directly on the bare machine of the second terminal 160. Application programs need to run with the support of the operating system 161. The operating system 161 can be a desktop operating system such as Windows operating system, Linux operating system, or Mac OS (Apple desktop operating system), or a mobile operating system such as iOS (Apple mobile terminal operating system) or Android operating system.

[0056] The mother application program 162 is an application program that hosts the child application program 164 and provides an environment for the implementation of the child application program 164. The mother application program 162 is a native application program. A native application program is an application program that can run directly on the operating system 161. The mother application program 162 can be a social application program, a dedicated application program that specifically supports the child application program 162, a file management application program, a mail application program, or a game application program, etc. Social application programs include instant messaging applications, SNS (Social Network Service) applications, or live broadcast applications, etc. The child application program 164 is an application program that can run in the environment provided by the mother application program. The child application program 164 can specifically be a social application program, a file management application program, a mail application program, or a game application program, etc. The mother application program 162 can specifically be the WeChat program, and the corresponding child application program 164 can be called a mini program.

[0057] The child application program logic layer unit 164b and the corresponding child application program view layer unit 164a are used to implement the child application program instance. A child application program 164 can be implemented by a child application program logic layer unit 164b and at least one child application program view layer unit 164a. There can be a one-to-one correspondence between the child application program view layer unit 164a and the child application program page.

[0058] The sub-application view layer unit 164a is used to organize the views of the sub-application and perform rendering. The sub-application logic layer unit 164b is used to process the data processing logic of the sub-application 164 and the corresponding sub-application pages. The unit can specifically be a process or a thread. The sub-application view layer unit 164a is, for example, a sub-application view layer thread, and the sub-application logic layer unit 164b is, for example, a sub-application logic layer thread. The sub-application logic layer unit 164b can run in a virtual machine. The sub-application view layer unit 164a and the sub-application logic layer unit 164b can communicate through the mediation of the native unit 162a of the parent application. The native unit 162a of the parent application is the interface for communication between the parent application 162 and the sub-application 164. The native unit 162a of the parent application can be a thread or a process of the parent application 162 itself. The page logic code of each sub-application page belonging to the program package can be registered by the sub-application logic layer unit 164b at startup and execute the registered page logic code when the page logic code is needed to process data.

[0059] Figure 4 The flowchart of the application program transplantation method according to an exemplary embodiment of the present application is shown. This method can be applied to Figure 1 the first terminal 120 shown. This method is used to transplant the first application program into a second application program, and the second application program is a sub-application that depends on the parent application to run. This method includes:

[0060] Step 202, through engineering transformation in a third-party development tool, transform the first application program from the first project mechanism to the second project mechanism;

[0061] The first project mechanism is the project mechanism corresponding to the third-party development tool, and the second project mechanism is the project mechanism corresponding to the sub-application. Optionally, the first application program is an application program related to the virtual environment developed by a third-party development tool. For example, the first application program is an educational application. Optionally, the first application program provides a virtual environment.

[0062] Combined with Figure 5 it can be seen that the developer performs engineering transformation on the first application program 10 in the third-party development tool 20. Transform the first application program 10 from the project mechanism corresponding to the third-party development tool 20 to the project mechanism corresponding to the sub-application.

[0063] Step 204, convert the art resources in the transformed first application program from the first resource format to the second resource format and export them to the development tool of the sub-application;

[0064] The first resource format is the resource format corresponding to the third-party development tool. The second resource format is the resource format corresponding to the development tool of the sub-application.

[0065] Step 206: Convert the code resources in the transformed first application from the first programming language to the second programming language, and export them to the development tool of the sub-application.

[0066] The first programming language is the programming language corresponding to the third-party development tool, such as the C# language. The second programming language is the programming language corresponding to the sub-application, such as the JavaScript scripting language.

[0067] Step 208: Perform secondary development on the art resources and code resources in the development tool of the sub-application to obtain the second application.

[0068] Combined Figure 3 It can be seen that the developer exports the "art resources + code resources" from the third-party development tool 20 and imports the "art resources + code resources" into the development tool 30 of the sub-application.

[0069] In summary, the method provided in this embodiment first performs engineering transformation on the first application in the third-party development tool, then exports the art resources and code resources in the transformed first application to the development tool of the sub-application, and performs secondary development on the art resources and code resources in the development tool of the sub-application to obtain the second application. This enables the reuse of the development work of the first application that has already been completed in the third-party development tool, eliminating the need to start a development process with a large amount of repetitive work. It not only saves the workload of developers but also enables a large number of existing applications to be quickly ported to the mini-program platform.

[0070] In the following embodiments, the third-party development tool is the Unity engine, the sub-application is a small game, and the parent application is an instant messaging application (such as WeChat) for illustration purposes, but the specific types of the three are not limited.

[0071] Figure 6 is a flowchart showing the method for porting an application according to an exemplary embodiment of the present application. This method can be applied to Figure 1 the computer device 100 shown. This method is used to port the first application to the second application, where the second application is a sub-application that depends on the parent application to run. The method includes:

[0072] Step 601: In the third-party development tool, modify the first project structure of the first application to the second project structure through engineering transformation.

[0073] The developer reconfigures the first project structure of the first application through engineering transformation in the Unity engine and modifies it to the second project structure corresponding to the mini-program.

[0074] Optionally, the project structure includes the directory configuration of the project engineering. The project structure includes, but is not limited to, at least one of the root directory, resource folder, library folder, project settings folder, temporary folder, configuration folder, editor class storage folder, external library file storage directory, art resource storage folder, material ball folder, model folder, animation file folder, sound folder, texture map folder, user interface folder, third-party package folder, scene file storage directory, and script storage directory.

[0075] Taking the third-party development tool as the Unity engine as an example, the first application developed by the Unity engine is usually a client game, and the art resources and code resources required by the client game are both stored in the first terminal. While the mini-game is usually an online network game, the art resources and code resources required by the mini-game are both stored on the sub-application server and are loaded and run in real time by the second terminal. There are significant differences in the project mechanisms between the two. Therefore, it is necessary to adaptively modify the project structure in Unity.

[0076] Optionally, the developer also installs three plugins in the third-party development tool: a resource export plugin, a code export plugin, and an SDK (Software Development Kit). Among them, the resource export plugin is a plugin for exporting art resources, the code export plugin is a plugin for exporting code resources, and the SDK is used to provide code functions that are not supported by the third-party development tool but are supported by the sub-application.

[0077] Step 602, in the third-party development tool, connect the SDK to the first application. The SDK provides code functions that are not supported by the third-party development tool and are supported by the development tool of the sub-application.

[0078] Due to the differences between the third-party development tool and the development tool of the sub-application, there are some code functions that are not supported by the third-party development tool but are supported by the sub-application. For these code functions unique to the sub-application, the SDK is used to provide them in the third-party development tool.

[0079] The developer uses the SDK in the third-party development tool to add the code functions uniquely supported by the sub-application to the first application. Optionally, the SDK is written in a programming language supported by the third-party development tool, such as a C# SDK.

[0080] Optionally, the code functions supported by the SDK include: the resource asynchronous loading function. The resource asynchronous loading function is a function that enables the mini-program to dynamically load resources as the user uses it during the running process.

[0081] Step 603: In the third-party development tool, adapt the target function interfaces in the first application. The target function interfaces are those not supported in the development tool of the sub-application.

[0082] Due to the differences between the third-party development tool and the development tool of the sub-application, there are also some function interfaces that are supported by the third-party development tool but not by the sub-application. For these target function interfaces unique to the third-party development tool, adaptation is required.

[0083] In one adaptation method, the code related to the target function interfaces is deleted; in another adaptation method, an adaptation function interface matching the target function interfaces is newly developed in the sub-application.

[0084] It should be noted that both Step 602 and Step 603 are optional steps.

[0085] Step 604: Invoke the resource export plugin to search for the art resources in the transformed first application, convert the searched art resources from the first resource format to the second resource format, and export the art resources in the second resource format to the development tool of the sub-application.

[0086] Optionally, the first resource format is a resource format supported in the Unity engine, and the second resource format is a resource format supported by the development tool of the sub-application.

[0087] The resource export plugin is used to search for and traverse the art resources in the transformed first application. The art resources include at least one of the following: scene resources, model resources, material resources, serialized property resources, building resources, game character resources, and animation resources. The scene resources include at least one of the following: terrain resources, lake resources, tree resources, vegetation resources, light source resources, shadow resources, and static scenery resources.

[0088] After invoking the resource export plugin to search out all the art resources, perform format conversion on each art resource, and package all the art resources after format conversion into the mgepackage format recognizable by the sub-application platform, and then import them into the development tool of the sub-application.

[0089] Step 605: Invoke the code export plugin to convert the C# code in the transformed first application into JavaScript script code and export it to the development tool of the sub-application.

[0090] The code export plugin is used to export the C# code in the transformed first application, and after converting the exported C# code into JavaScript script code, import it into the development tool of the sub-application.

[0091] Optionally, for the C# code in the retrofitted first application, the code export plugin can directly export the C# code.

[0092] Optionally, for the source-code-free plugin (i.e., an external plugin without C# code) in the retrofitted first application, the code export plugin generates stub code corresponding to the source-code-free plugin. The stub code is Java script code used to replace the source-code-free plugin.

[0093] Step 606: Perform secondary development on the art resources and code resources in the development tool of the sub-application to obtain the second application.

[0094] Optionally, a JS adapter plugin is installed in the development tool of the sub-application. After the C# code is ported to JavaScript script code, it cannot run completely and requires a bridging layer. The JS adapter serves this bridging layer function. The JS adapter includes, but is not limited to: bridging adaptation related to system capabilities, bridging adaptation related to performance tools, and bridging adaptation related to math libraries.

[0095] This step includes: calling the JS adapter plugin to bridge the C# interfaces supported by the C# code in the third-party development tool to the same type of JS interfaces supported by the JavaScript script.

[0096] Optionally, a performance tool is installed in the development tool of the sub-application. This step further includes: calling the performance tool to perform performance tuning on the JavaScript script code.

[0097] Step 607: Test the second application.

[0098] Perform real-device testing and stability testing on the second application. After passing the tests, submit it to the server of the sub-application for review and release.

[0099] In summary, the method provided in this embodiment first performs engineering transformation on the first application in a third-party development tool, then exports the art resources and code resources in the retrofitted first application to the development tool of the sub-application, and performs secondary development on the art resources and code resources in the development tool of the sub-application to obtain the second application; enabling the reuse of the development work of the first application that has been completed in the third-party development tool, eliminating the need to restart the development process with a large amount of repetitive work, not only saving the workload of developers, but also enabling a large number of existing applications to be quickly ported to the mini-program platform.

[0100] The method provided in this embodiment can better adapt to the differences between the two development tools by providing an SDK to implement the code functions that are not supported by the third-party development tool but supported by the development tool of the sub-application, so as to introduce the code functions supported by the development tool of the sub-application on the original basis.

[0101] The method provided in this embodiment can better adapt to the differences between the two development tools by adapting to implement the code functions that are not supported by the third-party development tool but supported by the development tool of the sub-application, so as to delete or modify the function interfaces supported only by the third-party development tool.

[0102] The method provided in this embodiment can also ensure the performance of the transplanted applet by introducing the performance tool of the applet during the secondary development process.

[0103] In a schematic example, as Figure 7 shown, the third-party development tool 71 is Unit3D, and the developer integrates three Unity plugins in Unity3D: the resource export plugin 81, the code export plugin 82, and the tool SDK 83, as Figure 8 shown. Then perform step 72 to transform the project of the first application in Unity3D. The developer configures and transforms according to the guidance of the Unity plugin. The transformation process includes at least one of the following three items:

[0104] 1. Configure the project structure of Unity;

[0105] Reconfigure the Unity project structure according to the project structure of the applet.

[0106] 2. Integrate the tool SDK;

[0107] This tool SDK is used to provide the code functions unique to the applet.

[0108] 3. Adapt the interfaces that cannot be converted temporarily.

[0109] For example, adapt the plug-ins without source code, third-party SDKs, some system capabilities, etc.

[0110] Step 73, export the art resources and code resources of the first application;

[0111] If not all art resources and code resources can be exported, further adaptation is required.

[0112] Step 74, perform secondary development on the art resources and code resources in the developer tool to obtain the second application;

[0113] Secondary development includes, but is not limited to, at least one of the following: core gameplay optimization, development of relevant operation capabilities, and real device preview development. Core gameplay optimization includes: using performance tools to optimize the running performance of the second application. Development of relevant operation capabilities includes: development of capabilities related to operation such as account login, leaderboard calculation, and friend recommendation. Real device preview development includes: running the second application on a real electronic device for testing and optimization.

[0114] As Figure 8 shown, the developer tool may optionally include a JS adapter 84. The JS adapter is used to implement the adaptation of system capabilities, rendering capabilities, and databases. System capabilities can be provided by the JS application programming interface (API) in the JS adapter 84, rendering capabilities can be provided by the performance tool in the JS adapter 84, and the math library can be implemented by the JS script code in the JS adapter 84.

[0115] Step 75, conduct real device testing on the second application;

[0116] Step 76, conduct stability testing on the second application;

[0117] Step 77, conduct review and release of the second application.

[0118] In an illustrative example, the process for exporting art resources can be referred to Figure 9 .

[0119] Step 91, export art resources;

[0120] Art resources such as scenes and models can be exported seamlessly; 2D / 3D scenes can be exported separately or merged.

[0121] Step 92, secondary development;

[0122] When conducting secondary development on art resources and code resources, use TypeScript development logic for development. TypeScript is a superset of JavaScript. Write shaders using the High Level Shader Language (HLSL). Provide supporting tools in the mini-game development tool to preview and edit scenes to build the mini-game code.

[0123] Step 93, project upload;

[0124] Upload the code project of the mini-game code to the platform server of the mini-game. For example, upload resource files and configuration files to the Content Delivery Network (CDN) in the platform server, and upload the code files to the platform server of the mini-game in the form of a mini-game package.

[0125] Figure 10 The block diagram of the porting device of the application program provided by an exemplary embodiment of the present application is shown. This device can be implemented as a computer device or can be applied in a computer device. This device is used to port a first application program into a second application program, and the second application program is a sub-application program that depends on the parent application program to run. This device includes:

[0126] The engineering transformation module 1020 is used to transform the first application program from a first project mechanism to a second project mechanism through engineering transformation in a third-party development tool;

[0127] The art export module 1040 is used to convert the art resources in the transformed first application program from a first resource format to a second resource format and export them to the development tool of the sub-application program;

[0128] The code export module 1060 is used to convert the code resources in the transformed first application program from a first programming language to a second programming language and export them to the development tool of the sub-application program;

[0129] The secondary development module 1080 is used to perform secondary development on the art resources and the code resources in the development tool of the sub-application program to obtain the second application program;

[0130] Among them, the first project mechanism, the first resource format, and the first programming language correspond to the third-party development tool, and the second project mechanism, the second resource format, and the second programming language correspond to the sub-application program.

[0131] In an alternative design of the present application, the engineering transformation module 1020 is used to modify the first project structure of the first application program to a second project structure through engineering transformation in the third-party development tool;

[0132] Among them, the first project structure is the project structure adapted to the third-party development tool, and the second project structure is the project structure adapted to the development tool of the sub-application program.

[0133] In an alternative design of the present application, the engineering transformation module 1020 is configured to access a software development kit (SDK) for the first application in the third-party development tool, and the SDK provides code functions that are not supported by the third-party development tool but are supported by the development tool of the sub-application.

[0134] In an alternative design of the present application, the engineering transformation module 1020 is configured to adapt a target function interface in the first application in the third-party development tool, and the target function interface is a function interface that is not supported by the development tool of the sub-application.

[0135] In an alternative design of the present application, a resource export plug-in is installed in the third-party development tool. The art export module 1040 is configured to call the resource export plug-in to search for art resources in the transformed first application, convert the searched art resources from the first resource format to the second resource format, and export the art resources in the second resource format to the development tool of the sub-application.

[0136] In an alternative design of the present application, a code export plug-in is installed in the third-party development tool. The code export module 1060 is configured to call the code export plug-in to convert the C# code in the transformed first application into JavaScript script code and export it to the development tool of the sub-application.

[0137] In an alternative design of the present application, a JS adapter plug-in is installed in the development tool of the sub-application. The secondary development module 1080 is configured to call the JS adapter plug-in to bridge the C# interfaces supported by the C# code to the same type of JS interfaces supported by the JavaScript script to obtain the second application.

[0138] In an alternative design of the present application, a performance tool is installed in the development tool of the sub-application. The secondary development module 1080 is configured to call the performance tool to perform performance tuning on the JavaScript script code to obtain the second application.

[0139] It should be noted that: for the application transplantation device provided in the above embodiments, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the application transplantation device provided in the above embodiments and the application transplantation method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments, which will not be elaborated here.

[0140] This application also provides a computer device (terminal or server), which includes a processor and a memory. At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the application transplantation method provided in each of the above method embodiments. It should be noted that the computer device may be as follows Figure 11 the provided computer device.

[0141] Figure 11 FIG. shows a structural block diagram of a computer device 1100 provided by an exemplary embodiment of this application. The computer device 1100 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The computer device 1100 may also be referred to by other names such as a user device, a portable computer device, a laptop computer device, a desktop computer device, etc.

[0142] Generally, the computer device 1100 includes: a processor 1101 and a memory 1102.

[0143] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.

[0144] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory, as well as non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1102 is used to store at least one instruction for being executed by the processor 1101 to implement the application program transplantation method provided in the method embodiments of the present application.

[0145] In some embodiments, the computer device 1100 may further optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102, and the peripheral device interface 1103 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1103 through a bus, signal lines, or a circuit board.

[0146] The peripheral device interface 1103 may be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 may be implemented on a separate chip or circuit board, and this embodiment does not limit this.

[0147] Those skilled in the art can understand that Figure 11 the structure shown in does not constitute a limitation on the computer device 1100, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component layout.

[0148] The memory further includes one or more programs, and the one or more programs are stored in the memory. The one or more programs include those for performing the application program transplantation method provided in the embodiments of the present application.

[0149] The present application provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the application program transplantation method provided in the above-mentioned method embodiments.

[0150] The present application further provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the application program transplantation method provided in the above-mentioned method embodiments.

[0151] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0152] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like.

[0153] The above are only alternative embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for porting an application, characterized in that, it is used to port a first application into a second application, and the second application is a sub-application that depends on a parent application to run. The method includes: Through engineering transformation in a third-party development tool, transforming the first application from a first project mechanism to a second project mechanism; Converting the art resources in the transformed first application from a first resource format to a second resource format, and exporting them to the development tool of the sub-application; Converting the code resources in the transformed first application from a first programming language to a second programming language, and exporting them to the development tool of the sub-application; Performing secondary development on the art resources and the code resources in the development tool of the sub-application to obtain the second application; Wherein, the first project mechanism, the first resource format, and the first programming language correspond to the third-party development tool, and the second project mechanism, the second resource format, and the second programming language correspond to the development tool of the sub-application.

2. The method according to claim 1, characterized in that, the step of transforming the first application from a first project mechanism to a second project mechanism through engineering transformation in a third-party development tool includes: In the third-party development tool, modifying the first project structure of the first application to a second project structure through engineering transformation; Wherein, the first project structure is a project structure adapted to the third-party development tool, and the second project structure is a project structure adapted to the development tool of the sub-application.

3. The method according to claim 2, characterized in that, the method further includes: In the third-party development tool, connecting a software development kit (SDK) to the first application, and the SDK provides code functions that are not supported by the third-party development tool but are supported by the development tool of the sub-application.

4. The method according to claim 2, characterized in that, the method further includes: In the third-party development tool, adapting the target function interface in the first application, and the target function interface is a function interface not supported by the development tool of the sub-application.

5. The method according to any one of claims 1 to 4, characterized in that, a resource export plug-in is installed in the third-party development tool, and the step of converting the art resources in the transformed first application from a first resource format to a second resource format and exporting them to the development tool of the sub-application includes: Invoking the resource export plug-in to search for the art resources in the transformed first application, converting the searched art resources from the first resource format to the second resource format, and exporting the art resources in the second resource format to the development tool of the sub-application.

6. The method according to any one of claims 1 to 4, characterized in that, A code export plug-in is installed in the third-party development tool. The development tool for converting the code resources in the transformed first application program from the first programming language to the second programming language and exporting them to the sub-application program includes: Invoking the code export plug-in to convert the C# code in the transformed first application program into JavaScript script code and exporting it to the development tool of the sub-application program.

7. The method according to claim 6, characterized in that, A JS adapter plug-in is installed in the development tool of the sub-application program. The secondary development of the art resources and the code resources in the development tool of the sub-application program to obtain the second application program includes: Invoking the JS adapter plug-in to bridge the C# interfaces supported by the C# code to the same type of JS interfaces supported by the JavaScript script to obtain the second application program.

8. The method according to claim 7, characterized in that, A performance tool is installed in the development tool of the sub-application program. The secondary development of the art resources and the code resources in the development tool of the sub-application program to obtain the second application program includes: Invoking the performance tool to perform performance tuning on the JavaScript script code to obtain the second application program.

9. A device for transplanting an application program, characterized in that, It is used to transplant a first application program into a second application program. The second application program is a sub-application program that depends on the parent application program to run. The device includes: An engineering transformation module for transforming the first application program from the first project mechanism to the second project mechanism through engineering transformation in a third-party development tool; An art export module for converting the art resources in the transformed first application program from the first resource format to the second resource format and exporting them to the development tool of the sub-application program; A code export module for converting the code resources in the transformed first application program from the first programming language to the second programming language and exporting them to the development tool of the sub-application program; A secondary development module for performing secondary development on the art resources and the code resources in the development tool of the sub-application program to obtain the second application program; wherein, the first project mechanism, the first resource format, and the first programming language correspond to the third-party development tool, and the second project mechanism, the second resource format, and the second programming language correspond to the sub-application program.

10. A computer device, characterized in that, The computer device includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the application program transplantation method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the application program transplantation method according to any one of claims 1 to 8.