Application program transplanting method, device, equipment and medium

文档序号:1936821 发布日期:2021-12-07 浏览:18次 中文

阅读说明:本技术 应用程序的移植方法、装置、设备及介质 (Application program transplanting method, device, equipment and medium ) 是由 雷丹雄 江炜洲 王召伟 卢强 于 2020-06-03 设计创作,主要内容包括:本申请公开了一种应用程序的移植方法、装置、设备及介质,涉及虚拟环境领域。该方法包括:在第三方开发工具中通过工程改造,将所述第一应用程序从第一项目机制改造为第二项目机制;将改造后的所述第一应用程序中的美术资源从第一资源格式转换为第二资源格式,导出至所述子应用程序的开发工具;将改造后的所述第一应用程序中的代码资源从第一编程语言转换为第二编程语言,导出至所述子应用程序的开发工具;在所述子应用程序的开发工具中对所述美术资源和所述代码资源进行二次开发,得到所述第二应用程序。本申请可以将第三方开发工具开发的第一应用程序,快速移植为子应用程序形式的第二应用程序。(The application discloses a method, a device, equipment and a medium for transplanting an application program, and relates to the field of virtual environments. The method comprises the following steps: transforming the first application program from a first project mechanism to a second project mechanism through engineering in a third party development tool; converting the modified art resources in the first application program from a first resource format to a second resource format, and exporting the converted art resources to a development tool of the sub-application program; converting the modified code resources in the first application program from a first programming language to a second programming language, and exporting the converted code resources to a development tool of the sub-application program; and carrying out secondary development on the art resources and the code resources in a development tool of the sub-application program to obtain the second application program. According to the method and the device, the first application program developed by the third-party development tool can be quickly transplanted to the second application program in the form of the sub-application program.)

1. A method for migrating an application program, which is used for migrating a first application program into a second application program, wherein the second application program is a sub-application program which is operated depending on a parent application program, the method comprising:

transforming the first application program from a first project mechanism to a second project mechanism through engineering in a third party development tool;

converting the modified art resources in the first application program from a first resource format to a second resource format, and exporting the converted art resources to a development tool of the sub-application program;

converting the modified code resources in the first application program from a first programming language to a second programming language, and exporting the converted code resources to a development tool of the sub-application program;

performing secondary development on the art resources and the code resources in a development tool of the sub-application program to obtain a 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.

2. The method of claim 1, wherein engineering the first application from a first project mechanism to a second project mechanism in a third party development tool comprises:

in the third-party development tool, modifying a first project structure of the first application program into a second project structure through engineering;

wherein the first project structure is a project structure adapted by the third-party development tool, and the second project structure is a project structure adapted by the development tool of the sub-application.

3. The method of claim 2, further comprising:

and in the third-party development tool, accessing the first application program into a Software Development Kit (SDK), wherein the SDK is provided with code functions which are not supported by the third-party development tool and are supported by the development tool of the sub-application program.

4. The method of claim 2, further comprising:

in the third-party development tool, an objective function interface in the first application program is adapted, and the objective function interface is a function interface which is not supported in the development tool of the sub-application program.

5. The method according to any one of claims 1 to 4, wherein a resource export plug-in is installed in the third-party development tool, and the development tool for converting the modified art resource in the first application from a first resource format to a second resource format and exporting the modified art resource to the sub-application comprises:

and calling the resource export plug-in to search the modified art resources in the first application program, converting the searched art resources from the first resource format into the second resource format, and exporting the art resources in the second resource format to a development tool of the sub-application program.

6. The method according to any one of claims 1 to 4, wherein a code export plug-in is installed in the third-party development tool, and the development tool for converting the modified code resources in the first application program from the first programming language to the second programming language and exporting the converted code resources to the sub-application program comprises:

and calling the code export plug-in to convert the C # code in the first application program after modification into a JavaScript code and exporting the JavaScript code to the development tool of the sub-application program.

7. The method of claim 6, wherein the JS adapter plug-in is installed in a development tool of the sub-application, and wherein performing secondary development on the art resource and the code resource in the development tool of the sub-application to obtain the second application comprises:

and calling the JS adapter plug-in to bridge the C # interface supported by the C # code to the JS interfaces of the same type supported by the JavaScript script to obtain the second application program.

8. The method of claim 7, wherein a performance tool is installed in the development tool of the sub-application, and the secondary development of the art resource and the code resource in the development tool of the sub-application to obtain the second application comprises:

and calling the performance tool to perform performance tuning on the JavaScript code to obtain the second application program.

9. An apparatus for migrating an application, which is used to migrate a first application to a second application, which is a child application running in dependence on a parent application, the apparatus comprising:

the engineering modification module is used for modifying the first application program from a first project mechanism to a second project mechanism through engineering modification in a third-party development tool;

the art export module is used for converting the art resources in the first application program after modification from a first resource format to a second resource format and exporting the art resources to the development tool of the sub-application program;

the code export module is used for converting the modified code resources in the first application program from a first programming language to a second programming language and exporting the converted code resources to the development tool of the sub-application program;

the secondary development module is used for carrying out secondary development on the art resources and the code resources in a development tool of the sub-application program to obtain a 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.

10. A computer device comprising a processor and a memory, said memory having stored therein at least one instruction, at least one program, set of codes or set of instructions, which is loaded and executed by said processor to implement a method of porting an application program according to any of claims 1 to 8.

11. A computer-readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a migration method of an application program according to any one of claims 1 to 8.

Technical Field

The embodiment of the application relates to the field of virtual environments, in particular to a method, a device, equipment and a medium for transplanting an application program.

Background

A child application is a program that runs in dependence on a parent application, also called an applet. Under the condition that the primary application program is installed on the electronic equipment, the small program does not need to be manually downloaded and installed in the electronic equipment by a user, and can be automatically downloaded and installed only after the user clicks an icon in the primary application program. A mini-game is a category of applets that have a light experience of playing on demand.

Many games are developed by third party engines and cannot be run directly on small game platforms. When a game developed by a third party engine is desired to run on a mini-game platform, the developer is required to redevelop the game on the mini-game platform.

The game with the same game content is re-developed once on the small game platform, which wastes the development results which are already carried out in the earlier stage and causes unnecessary resource waste.

Disclosure of Invention

The embodiment of the application provides a method, a device, equipment and a medium for transplanting an application program, and can be used for transplanting a first application program developed by a third-party development tool into a second application program in a sub-application program form. The technical scheme is as follows:

according to an aspect of the present application, there is provided an application migration method for migrating a first application to a second application, the second application being a child application running in dependence on a parent application, the method including:

transforming the first application program from a first project mechanism to a second project mechanism through engineering in a third party development tool;

converting the modified art resources in the first application program from a first resource format to a second resource format, and exporting the converted art resources to a development tool of the sub-application program;

converting the modified code resources in the first application program from a first programming language to a second programming language, and exporting the converted code resources to a development tool of the sub-application program;

performing secondary development on the art resources and the code resources in a development tool of the sub-application program to obtain a 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.

According to another aspect of the present application, there is provided an apparatus for migrating an application, the apparatus being configured to migrate a first application to a second application, the second application being a child application that runs in dependence on a parent application, the apparatus including:

the engineering modification module is used for modifying the first application program from a first project mechanism to a second project mechanism through engineering modification in a third-party development tool;

the art export module is used for converting the art resources in the first application program after modification from a first resource format to a second resource format and exporting the art resources to the development tool of the sub-application program;

the code export module is used for converting the modified code resources in the first application program from a first programming language to a second programming language and exporting the converted code resources to the development tool of the sub-application program;

the secondary development module is used for carrying out secondary development on the art resources and the code resources in a development tool of the sub-application program to obtain a 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.

In an optional design of the present application, the engineering module is configured to modify, in the third party development tool, a first project structure of the first application into a second project structure through engineering;

wherein the first project structure is a project structure adapted by the third-party development tool, and the second project structure is a project structure adapted by the development tool of the sub-application.

In an optional design of the present application, the engineering modification module is configured to access an SDK for the first application in the third-party development tool, where the SDK is provided with a code function that is not supported by the third-party development tool and is supported by a development tool of the sub-application.

In an optional design of the present application, the engineering module is configured to adapt, in the third-party development tool, an objective function interface in the first application, where the objective function interface is a function interface that is not supported in the development tool of the sub-application.

In an optional design of this application, the fine arts export module for call after the resources export plug-in search transformation fine arts resources among the first application will be searched fine arts resources follow first resource format converts into second resource format will the second resource format fine arts resources export extremely sub-application's development tool.

In an optional design of the present application, the code export module is configured to invoke the code export plug-in to convert a modified C # code in the first application program into a JavaScript script code, and export the JavaScript script code to the development tool of the sub-application program.

In an optional design of this application, install JS adapter plug-in the development tool of sub-application, the secondary development module is used for calling JS adapter plug-in will the C # interface that C # code supported, bridge extremely the JS interface of the same type that the JavaScript script supported obtains the second application.

In an optional design of the application, a JS adapter plug-in is installed in a development tool of the sub-application program, and the secondary development module is used for calling the performance tool to perform performance optimization on JavaScript codes to obtain the second application program.

According to another aspect of the present application, there is provided a computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method of porting an application program as described above.

According to another aspect of the present application, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the migration method of an application program as described above.

According to another aspect of the present application, there is provided a computer program product configured to cause: the computer program product, which when executed on a data processing system comprising a processor and a memory, causes the data processing system to perform the method of the above aspect, may be provided included on a tangible, non-transitory computer readable medium.

The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:

the method comprises the steps that a first application program is firstly engineered in a third-party development tool, and then art resources and code resources in the first application program after being engineered are exported to a development tool of a sub-application program, and the art resources and the code resources are developed for the second time in the development tool of the sub-application program to obtain a second application program; the development work of the first application program which is developed in the third-party development tool can be reused, the development process with more repetitive work is not needed to be restarted, the workload of developers can be saved, and a large number of existing application programs can be quickly transplanted to a small program platform.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a block diagram of a computer system provided in an exemplary embodiment of the present application;

fig. 2 is a schematic structural diagram of a first terminal according to an exemplary embodiment of the present application;

fig. 3 is a schematic structural diagram of a second terminal according to an exemplary embodiment of the present application;

FIG. 4 is a flowchart of a method for application migration according to an exemplary embodiment of the present application;

FIG. 5 is a schematic diagram illustrating a migration method of an application according to an exemplary embodiment of the present application;

FIG. 6 is a flowchart of a method for application migration according to another exemplary embodiment of the present application;

FIG. 7 is a schematic diagram illustrating a migration method of an application according to an exemplary embodiment of the present application;

FIG. 8 is a schematic diagram of three plug-ins and an SDK provided by an exemplary embodiment of the present application;

FIG. 9 is a schematic diagram illustrating a migration method of an application according to an exemplary embodiment of the present application;

fig. 10 is a block diagram of a migration apparatus of an application provided in another exemplary embodiment of the present application;

FIG. 11 is a block diagram of a computer device provided in another exemplary embodiment of the present application.

Detailed Description

To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

Referring to FIG. 1, a block diagram of a computer system 100 provided in an exemplary embodiment of the present application is shown. The computer system 100 includes: one or more first terminals 120, a server cluster 140, one or more second terminals 160.

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, mpeg compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4) player, a laptop computer, a desktop computer, and the like.

As can be seen from fig. 2, the third party development tool 122 and the development tool 124 of the sub application are installed in the operating system 131 of the first terminal 120. The third party development tools 142 are also referred to as third party development engines, and the third party development tools 142 include, but are not limited to: unity engine, Cocos engine, Laya engine, Unreal engine, etc. The third party is a third party except for the platform side of the sub-application program and the game developer, namely a development engine side. The development tool 124 for the sub-application is a development tool for developing the sub-application.

The first terminal 120 is connected to the server cluster 140 through a wired network or a wireless network.

The second terminal 160 may be an electronic device used by the player user. The second terminal 160 may be a mobile phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4) player, a laptop computer, a desktop computer, and the like. The operating system of the second terminal 160 may be a Windows system, an Android system, or an IOS system.

The second terminal 160 has a parent application and a child application installed and operated therein. The parent application program may be any one of an instant messaging program, a social program, a payment program, an electronic shopping program, a system management program, a security management program, a virus killing program, a network disk program, a file manager program, and a desktop optimization program. The second terminal 160 is exemplified as an instant messenger program. A child application is a program that runs in dependence on a parent application and may also be referred to as an "applet".

The server cluster 140 may be any of a plurality of servers, virtual cloud storage, or cloud computing centers. The server cluster 140 is used to provide background services for predetermined applications on the first terminal 120, parent applications and child applications on the second terminal 160. The server cluster 140 has data storage capabilities. Optionally, the server cluster 140 includes: parent application server 142, child application server 144, and third party server 146. Wherein:

the parent application server 142 is used to provide a background service for the parent application in the second terminal 160. Illustratively, when the parent application is an instant messenger, the parent application server 142 provides instant messenger service between the plurality of second terminals 160.

The sub-application server 144 is used to provide background services for the development tools of the sub-applications in the first terminal 120 and the sub-applications in the second terminal 160.

The third-party server 146 is used for providing background services for the third-party development tools in the first terminal 120.

In this embodiment, the server cluster 140 includes three servers for example, and the three servers may 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 a plurality of virtual machines on one server, or implemented by tens of servers, which is not limited in this embodiment.

As can be seen from fig. 3, the operating system 161 is a computer program for managing and controlling hardware and software resources in the second terminal 160, and is the most basic system software directly running on the bare computer of the second terminal 160, and the application program needs to run under the support of the operating system 161. The operating system 161 may be a desktop operating system such as a Windows (Windows) operating system, a Linux operating system, or a Mac OS (apple desktop operating system), or may be a mobile operating system such as an iOS (apple mobile terminal operating system) or an Android (Android) operating system.

The parent application 162 is an application that carries the child application 164, and provides an environment for the implementation of the child application 164. The parent application 162 is a native application. A native application is an application that may run directly on the operating system 161. The parent application 162 may be a social application, a dedicated application that specifically supports the child applications 162, a file management application, a mail application, or a game application, among others. The Social application program includes an instant messaging application, an SNS (Social Network Service) application, or a live application. The child application 164 is an application 164 that can run in the environment provided by the parent application. The sub-application 164 may specifically be a social application, a file management application, a mail application, or a game application, among others. The parent application 162 may specifically be a WeChat (WeChat) and the corresponding child application 164 may be referred to as an applet.

The sub-application logical layer unit 164b and the corresponding sub-application view layer unit 164a are used to implement a sub-application instance. A sub-application 164 may be implemented by a sub-application logical layer unit 164b and at least one sub-application view layer unit 164 a. The sub-application view layer element 164a and the sub-application page may be in a one-to-one correspondence.

The sub-application view layer unit 164a is used to organize and render views of sub-applications. 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 page. The units may specifically be processes or threads, the sub-application view layer unit 164a may be a sub-application view layer thread, and the sub-application logic layer unit 164b may be a sub-application logic layer thread. The sub-application logical layer unit 164b may run in a virtual machine. The child application view layer element 164a and the child application logical layer element 164b may communicate via a parent application native element 162a, the parent application native element 162a being an interface for the parent application 162 to communicate with the child application 164, and the parent application native element 162a may be a thread or process of the parent application 162 itself. The page logic codes belonging to the package of each sub-application page may be registered by the sub-application logic layer unit 164b at the time of startup, and the registered page logic codes may be executed when the page logic codes are required to process data.

Fig. 4 is a flowchart illustrating an application migration method according to an exemplary embodiment of the present application. The method may be applied in the first terminal 120 shown in fig. 1. The method is used for migrating a first application program into a second application program, wherein the second application program is a sub application program which runs by depending on a parent application program. The method comprises the following steps:

step 202, transforming a first application program from a first project mechanism to a second project mechanism through engineering transformation in a third-party development tool;

the first project mechanism is a project mechanism corresponding to a third party development tool, and the second project mechanism is a project mechanism corresponding to a sub-application. Optionally, the first application is an application developed by a third party development tool, relating to the virtual environment. For example, the first application is an educational application or a military simulation application. Optionally, the first application is provided with a virtual environment.

As can be appreciated in conjunction with fig. 5, a developer is engineering a first application 10 in a third party development tool 20. The first application 10 is modified from the project mechanism corresponding to the third party development tool 20 to the project mechanism corresponding to the sub-application.

Step 204, converting the art resources in the modified first application program from the first resource format to the second resource format, and exporting the converted art resources to a development tool of the sub-application program;

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

Step 206, converting the code resources in the modified first application program from the first programming language to the second programming language, and exporting the code resources to a development tool of the sub-application program;

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

And 208, performing secondary development on the art resources and the code resources in the development tool of the sub-application program to obtain a second application program.

As can be seen from fig. 3, the developer exports "art resources + code resources" from the third-party development tool 20, imports "art resources + code resources" into the development tool 30 of the sub-application,

in summary, in the method provided in this embodiment, a first application program is first engineered in a third-party development tool, and then the art resources and the code resources in the first application program after the engineering are derived into a development tool of a sub-application program, and the art resources and the code resources are secondarily developed in the development tool of the sub-application program, so as to obtain a second application program; the development work of the first application program which is developed in the third-party development tool can be reused, the development process with more repetitive work is not needed to be restarted, the workload of developers can be saved, and a large number of existing application programs can be quickly transplanted to a small program platform.

In the following embodiments, the third party development tool is a Unity engine, the child application is a mini-game, and the parent application is an instant messaging program (such as WeChat), but the specific types of the three are not limited.

Fig. 6 is a flowchart illustrating an application migration method according to an exemplary embodiment of the present application. The method may be applied in the computer device 100 shown in fig. 1. The method is used for migrating a first application program into a second application program, wherein the second application program is a sub application program which runs by depending on a parent application program. The method comprises the following steps:

601, in a third-party development tool, modifying a first project structure of a first application program into a second project structure through engineering modification;

and a developer reconfigures the first project structure of the first application program in the Unity engine through engineering transformation and modifies the first project structure into a second project structure corresponding to the small program.

Optionally, the project structure comprises a catalog configuration of the project. Project structures include, but are not limited to: at least one of a root directory, a resource folder, a library folder, a project setting folder, a temporary folder, a configuration folder, an editor storage folder, an external library file storage directory, an art resource storage folder, a material ball folder, a model folder, an animation file folder, a sound file folder, a mapping file folder, a user interface file folder, a third party package file folder, a scene file storage directory, and a script storage directory.

Taking the third-party development tool as a Unity engine as an example, the first application program developed by the Unity engine is usually a client-side game, and art resources and code resources required by the client-side game are both stored in the first terminal. The mini-game is usually an online network game, art resources and code resources required by the mini-game are stored in the sub-application server and are loaded and operated by the second terminal in real time, and project mechanisms of the two are greatly different. Therefore, the project structure in Unity needs to be adapted.

Optionally, the developer also installs three plug-ins in the third party development tool: a resource export plug-in, a code export plug-in, and an SDK (Software Development Kit). The resource export plug-in is used for exporting art resources, the code export plug-in is used for exporting code resources, and the SDK is used for providing code functions which are not supported by a third-party development tool but are supported by the sub-application program.

Step 602, in a third-party development tool, accessing the first application program to an SDK, wherein the SDK provides a code function which is not supported by the third-party development tool and is supported by a development tool of the sub-application program;

because of the difference between the third party development tools and the development tools of the sub-applications, there are some code functions that are not supported by the third party development tools, but the sub-applications are supported code functions. For the code functions specific to these sub-applications, the SDK is provided in a third party development tool.

And the developer adds a code function which is exclusively supported by the sub-application program into the first application program by using the SDK in the third-party development tool. Optionally, the SDK is written in a programming language supported by a third party development tool, such as a C # SDK.

Optionally, the SDK supported code functions include: and (4) resource asynchronous loading function. The asynchronous resource loading function is a function that enables an applet to dynamically load resources as a user uses it during operation.

Step 603, in a third-party development tool, adapting a target function interface in the first application program, wherein the target function interface is a function interface which is not supported in the development tool of the sub-application program;

due to the difference between the third-party development tools and the development tools of the sub-applications, there are also some functional interfaces that are supported by the third-party development tools, but not by the sub-applications. Adaptation is required for the objective function interfaces specific to these third party development tools.

In an adaptive mode, deleting codes related to a target function interface; in another adaptation mode, an adaptation function interface matched with the target function interface is newly developed in the sub-application program.

It should be noted that step 602 and step 603 are optional steps.

Step 604, calling a resource export plug-in to search the art resources in the modified first application program, converting the searched art resources from the first resource format into a second resource format, and exporting the art resources in the second resource format to a development tool of the sub-application program;

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 a development tool of the sub-application.

The resource export plug-in is used for searching and traversing the art resource in the first application program after modification. Art resources include: scene resources, model resources, material resources, serialization attribute resources, building resources, game role resources, animation resources. The scene resources include: at least one of terrain resources, lake resources, tree resources, vegetation resources, light source resources, shadow resources, and static scenery resources.

And after calling the resource export plug-in to search out all the art resources, performing format conversion on each art resource, packaging all the art resources subjected to format conversion into a mgepackage format which can be identified by the sub-application platform, and importing the mgepackage format into a development tool of the sub-application.

Step 605, calling a code export plug-in to convert the C # code in the modified first application program into a JavaScript code, and exporting the JavaScript code to a development tool of the sub-application program;

the code export plug-in is used for exporting the C # code in the first application program after modification, and importing the exported C # code into a development tool of the sub-application program after converting the exported C # code into a JavaScript code.

Optionally, for the C # code in the modified first application, the code export plug-in can directly export the C # code.

Optionally, for a passive code plug-in (i.e. an external plug-in without C # code) in the modified first application, the code export plug-in generates stub code corresponding to the passive code plug-in. Stub code is Java script code that is used to replace a passive code plug-in.

606, performing secondary development on art resources and code resources in a development tool of the sub-application program to obtain a second application program;

optionally, a JS adapter plug-in is installed in the development tool of the sub-application. After the C # code is transplanted to the JavaScript code, the C # code cannot be completely run, and a bridge layer is needed. The JS adapter is the role of this bridging layer. JS adapters include, but are not limited to: bridging adaptation related to system capabilities, bridging adaptation related to performance tools, bridging adaptation related to math libraries.

The method comprises the following steps: and calling a JS adapter plug-in to bridge a C # interface supported by the C # code in the third-party development tool to a JS interface of the same type supported by the JavaScript script.

Optionally, a performance tool is installed in the development tool of the sub-application. The method also comprises the following steps: and calling a performance tool to perform performance optimization on the JavaScript code.

Step 607, the second application is tested.

And performing real machine test and stability test on the second application program, and submitting the second application program to a server of the sub-application program for auditing and releasing after the second application program passes the test.

In summary, in the method provided in this embodiment, a first application program is first engineered in a third-party development tool, and then the art resources and the code resources in the first application program after the engineering are derived into a development tool of a sub-application program, and the art resources and the code resources are secondarily developed in the development tool of the sub-application program, so as to obtain a second application program; the development work of the first application program which is developed in the third-party development tool can be reused, the development process with more repetitive work is not needed to be restarted, the workload of developers can be saved, and a large number of existing application programs can be quickly transplanted to a small program platform.

The method provided by the embodiment realizes the code functions which are not supported by the third-party development tool and are supported by the development tool of the sub-application program by providing the SDK, and can better adapt to the difference of the two development tools, so that the code functions which are supported by the development tool of the sub-application program are introduced on the original basis.

The method provided by the embodiment realizes the code function which is not supported by the third-party development tool and is supported by the development tool of the sub-application program through adaptation, and can better adapt to the difference of the two development tools, thereby deleting or modifying the function interface which is only supported by the third-party development tool.

The method provided by the embodiment can ensure the performance of the transplanted small program by introducing a performance tool of the small program in the secondary development process.

In one illustrative example, as shown in FIG. 7, the third party development tool 71 is Unit3D, and the developer integrates three Unity plugins in Unity 3D: a resource export plug-in 81, a code export plug-in 82 and a tool SDK 83, as shown in fig. 8. Step 72 is then performed to engineer the first application in Unity 3D. And the developer performs configuration and modification according to the guidance of the Unity plug-in. The modification process includes, but is not limited to, at least one of the following three:

1. configuring the project structure of Unity;

the Unity project structure is reconfigured according to the project structure of the applet.

2. Accessing a tool SDK;

the tool SDK is used to provide code functions unique to the applet.

3. The interface which can not be converted temporarily is adapted.

Such as adapting a passive plug-in, a third party SDK, partial system capabilities, etc.

Step 73, deriving art resources and code resources of the first application program;

if the art resources and the code resources cannot be completely exported, the adaptation is required to be continued.

Step 74, performing secondary development on the art resources and the code resources in a developer tool to obtain a second application program;

secondary developments include, but are not limited to: and the core playing method is adjusted and optimized, and at least one of development of related operation capacity and real machine preview development is carried out. The core play tuning comprises the following steps: and optimizing the running performance of the second application program by adopting the performance tool. The development of the relevant operational capabilities includes: and (4) developing capabilities of account login, ranking list calculation, friend recommendation and the like related to operation. The real machine preview development comprises the following steps: and running a second application program on the real electronic equipment for testing and tuning.

As shown in fig. 8, a JS adapter 84 may be optionally included in the developer tool. The JS adapter is used for realizing the adaptation of system capacity, rendering capacity and a database. The system capabilities can be provided by a JS Application Programming Interface (API) in the JS adapter 84, the rendering capabilities can be provided by a performance tool in the JS adapter 84, and the math library can be implemented by JS script code in the JS adapter 84.

Step 75, performing a true machine test on the second application program;

step 76, performing stability test on the second application program;

and 77, auditing and issuing the second application program.

In one illustrative example, reference may be made to FIG. 9 for a process for art asset export.

Step 91, exporting art resources;

artistic resources such as scenes, models and the like can be seamlessly exported; the two-dimensional/three-dimensional scenes are derived separately or combined.

Step 92, secondary development;

when the art resources and the code resources are developed for the second time, the development logic is used for development, and the TypeScript is a superset of JavaScript. Shaders (shaders) are written using the High Level Shader Language (HLSL). And a matched tool is provided in the mini-game development tool, and a scene can be previewed and edited to construct and obtain mini-game codes.

Step 93, uploading the project;

code engineering of the mini-game code is uploaded into a platform server of the mini-game. For example, the resource file and the configuration file are uploaded to a Content Delivery Network (CDN) in a platform server, and the code file is uploaded to the platform server of the mini game in the form of a mini game package.

Fig. 10 is a block diagram illustrating an application migration apparatus according to an exemplary embodiment of the present application. The device can be realized as computer equipment and can also be applied to the computer equipment. The device is used for transplanting the first application program into a second application program, wherein the second application program is a sub application program which runs by depending on the parent application program. The device includes:

an engineering module 1020, configured to transform, in a third-party development tool, the first application from a first project mechanism to a second project mechanism through engineering;

the art export module 1040 is configured to convert the art resources in the first application program after modification from a first resource format to a second resource format, and export the converted art resources to the development tool of the sub-application program;

a code export module 1060, configured to convert the modified code resources in the first application program from the first programming language to the second programming language, and export the converted code resources to the development tool of the sub-application program;

a secondary development module 1080, configured to perform secondary development on the art resource and the code resource in the development tool of the sub application program, so as 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.

In an optional design of the present application, the engineering module 1020 is configured to modify, in the third party development tool, a first project structure of the first application into a second project structure through engineering;

wherein the first project structure is a project structure adapted by the third-party development tool, and the second project structure is a project structure adapted by the development tool of the sub-application.

In an optional design of the present application, the engineering modification module 1020 is configured to access a software development kit SDK for the first application in the third party development tool, where the SDK provides a code function that is not supported by the third party development tool and is supported by the development tool of the sub-application.

In an optional design of the present application, the engineering module 1020 is configured to adapt, in the third party development tool, an objective function interface in the first application, where the objective function interface is a function interface that is not supported in the development tool of the sub-application.

In an optional design of this application, install the resources in the third party development instrument and derive the plug-in, fine arts export module 1040 for invoke after the resources are derived the plug-in search transformation fine arts resources in the first application will be searched fine arts resources follow first resource format converts into second resource format will the second resource format fine arts resources derive extremely sub-application's development instrument.

In an optional design of the present application, a code export plug-in is installed in the third-party development tool, and the code export module 1060 is configured to call the code export plug-in to convert a modified C # code in the first application program into a JavaScript script code, and export the JavaScript script code to the development tool of the sub-application program.

In an optional design of this application, install JS adapter plug-in the development tool of sub-application, secondary development module 1080, be used for calling JS adapter plug-in will the C # interface that C # code supported, bridge extremely the JS interface of the same type that the JavaScript script supported obtains the second application.

In an optional design of the present application, a performance tool is installed in the development tool of the sub application program, and the secondary development module 1080 is configured to call the performance tool to perform performance tuning on the JavaScript script code, so as to obtain the second application program.

It should be noted that: the migration apparatus of the application program provided in the above embodiment is only illustrated by the division of the above functional modules, and in practical applications, the above function distribution may be completed by 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 above described functions. In addition, the migration apparatus for an application program and the migration method for an application program provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and will not be described herein again.

The application also provides a computer device (terminal or server), which includes a processor and a memory, where the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the migration method of the application program provided by the above method embodiments. It should be noted that the computer device may be a computer device as provided in fig. 11 below.

Fig. 11 shows a block diagram of a computer device 1100 provided in an exemplary embodiment of the present application. The computer device 1100 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Computer device 1100 may also be referred to by other names such as user device, portable computer device, laptop computer device, desktop computer device, and so forth.

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

Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.

Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement a migration method for an application program provided by method embodiments of the present application.

In some embodiments, the computer device 1100 may also optionally include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, touch display screen 1105, camera 1106, audio circuitry 1107, positioning component 1108, and power supply 1109.

The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral 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 separate chips or circuit boards, which is not limited by this embodiment.

The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other computer devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1104 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.

The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 1105 may be one, providing the front panel of the computer device 1100; in other embodiments, the display screens 1105 may be at least two, each disposed on a different surface of the computer device 1100 or in a folded design; in still other embodiments, the display 1105 may be a flexible display disposed on a curved surface or on a folded surface of the computer device 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.

Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of a computer apparatus, and a rear camera is disposed on a rear surface of the computer apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.

The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. The microphones may be multiple and placed at different locations on the computer device 1100 for stereo sound acquisition or noise reduction purposes. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.

The Location component 1108 is used to locate the current geographic Location of the computer device 1100 for navigation or LBS (Location Based Service). The Positioning component 1108 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.

The power supply 1109 is used to provide power to the various components within the computer device 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.

In some embodiments, the computer device 1100 also includes one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.

The acceleration sensor 1111 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the computer apparatus 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the touch display screen 1105 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.

The gyro sensor 1112 may detect a body direction and a rotation angle of the computer device 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user on the computer device 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.

The pressure sensors 1113 may be disposed on the side bezel of the computer device 1100 and/or on the lower layer of the touch display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the computer device 1100, the holding signal of the user to the computer device 1100 can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the touch display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.

The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1114 may be disposed on the front, back, or side of the computer device 1100. When a physical key or vendor Logo is provided on the computer device 1100, the fingerprint sensor 1114 may be integrated with the physical key or vendor Logo.

Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the touch display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is turned down. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.

The proximity sensor 1116, also referred to as a distance sensor, is typically disposed on a front panel of the computer device 1100. The proximity sensor 1116 is used to capture the distance between the user and the front of the computer device 1100. In one embodiment, the touch display screen 1105 is controlled by the processor 1101 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the computer device 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the computer device 1100 becomes progressively larger, the touch display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a light-screen state.

Those skilled in the art will appreciate that the configuration illustrated in FIG. 11 does not constitute a limitation of the computer device 1100, and may include more or fewer components than those illustrated, or may combine certain components, or may employ a different arrangement of components.

The memory also includes one or more programs, which are stored in the memory, and the one or more programs include migration methods for performing the application programs provided by the embodiments of the present application.

The application provides a computer-readable storage medium, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by the processor to implement the migration method of the application program provided by the above method embodiments.

The present application also provides a computer program product, which when running on a computer, causes the computer to execute the migration method of the application program provided by the above method embodiments.

The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.

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

The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:PAD复用电路、MCU及控制方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!