Engine processing method and device, medium and program product

By receiving access instructions from the target platform and deploying engine kernel and application modules, creating application components and initializing engine functions, the compatibility problem of existing engines on multiple platforms is solved, and stable operation and good platform compatibility is achieved.

CN119690461AActive Publication Date: 2025-03-25ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411797355.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-25
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The multi-platform compatibility of existing engines is limited, making it difficult to provide support for more platforms, especially newly released platforms, resulting in project development being greatly blocked.

Method used

By receiving access instructions sent by the target platform, the target engine's kernel module and target application module are deployed on the target platform, the application components are created, and the application components and engine functions are initialized to achieve access and startup of the target engine.

Benefits of technology

The multi-platform support of the target engine has been achieved, which reduces development and maintenance costs, ensures that the program can run stably on multiple platforms, and has good platform compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690461A_ABST
    Figure CN119690461A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an engine processing method and device, a medium and a program product, and the method comprises the steps that an access instruction sent by a target platform is received, a kernel module of a target engine and a target application module are deployed on the target platform, and the target application module is one of multiple application modules of the target engine and is used for deploying the kernel module of the target engine on the target platform; an application module corresponding to the target platform; creating at least one application component through a target application module deployed on a target platform; and initializing an application component and an engine function, and controlling the target platform to display an engine interface of the target engine. By deploying the kernel module and the target application module on the target platform, the engine can access the target platform, so that the engine can provide support for the target platform; by creating the application component and initializing the application component and the engine function, engine starting is completed, project development based on the target platform can be achieved in the operation environment of the target platform, and a product obtained through development can be compatible with the target platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of software development technology, and in particular to an engine processing method, device, medium, and program product. Background Art

[0002] With the continuous advancement of science and technology, electronic devices have developed rapidly and enriched people's lives. Due to the differences in core technologies such as operating systems used by different electronic devices, multiple isolated software ecosystems have emerged, mainly including Windows-based software ecosystems, IOS-based software ecosystems, Hongmeng OS-based software ecosystems, Android-based software ecosystems, and so on.

[0003] As a development tool for games, audio and video, the engine needs to be compatible with different operating systems and different application platforms in order to simplify the multi-platform development process, reduce development and maintenance costs, and ensure that the program can run stably on multiple platforms. Therefore, the multi-platform compatibility of the engine is particularly important. However, at present, the engine's compatibility is limited, and it is difficult to provide support for more platforms, especially newly released platforms, which has led to significant obstacles to project development. Summary of the invention

[0004] In view of this, an embodiment of this specification provides an engine processing method. One or more embodiments of this specification also relate to a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, an engine processing method is provided, including: Receive an access instruction sent by the target platform, and deploy the kernel module and the target application module of the target engine on the target platform, wherein the target application module is an application module corresponding to the target platform among multiple application modules of the target engine; Creating at least one application component by deploying a target application module on a target platform, wherein the application component is used to implement an engine function of a target engine on the target platform; Initialize application components and engine functions, and control the target platform to display the engine interface of the target engine.

[0006] According to a second aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above engine processing method are implemented.

[0007] According to a third aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned engine processing method are implemented.

[0008] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned engine processing method when executed by a processor.

[0009] An embodiment of the present specification implements receiving an access instruction sent by a target platform, deploying a kernel module and a target application module of a target engine on the target platform, wherein the target application module is an application module corresponding to the target platform among multiple application modules of the target engine; creating at least one application component by deploying the target application module on the target platform, wherein the application component is used to implement an engine function of the target engine on the target platform; initializing the application component and the engine function, and controlling the target platform to display an engine interface of the target engine.

[0010] In this way, by receiving the access instruction sent by the target platform and deploying the kernel module and the target application module of the target engine on the target platform, the target engine can be connected to the target platform, so that the engine can provide support for the target platform; by deploying the target application module on the target platform, at least one application component is created, and the target engine can be started after the access is completed; by initializing the application component and the engine function, the target platform is controlled to display the engine interface of the target engine, so that the engine can be initialized and the startup process of the target engine on the target platform can be completed, so that project development can be carried out based on the target engine in the development environment provided by the target platform, and the products obtained by development can also run stably on the target platform and have good platform compatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is an engine architecture diagram of a target engine provided by an embodiment of this specification; Figure 2 is a flow chart of an engine processing method provided by an embodiment of this specification; Figure 3 This is an engine architecture diagram of a self-developed engine provided by an embodiment of this specification; Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0012] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0013] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0014] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0016] In this specification, an engine processing method is provided. This specification also relates to a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0017] See also Figure 1 , Figure 1An engine architecture diagram of a target engine provided according to an embodiment of the present specification is shown. Specifically, the target engine includes two main components: an application side and an engine side. Among them, the application side includes a variety of different application modules, and each application module includes a corresponding application code and a debugger. The application module is encapsulated based on the corresponding application platform. The application code is written based on the system language supported by the application platform and is used to implement the relevant functions of the engine. The debugger is provided by the application platform corresponding to the application module. When the application platform runs the program, the debugger can perform performance diagnosis and data collection, thereby performing automated testing of multiple devices and operating systems, ensuring that the application can run stably on different devices and operating systems, and timely detecting performance bottlenecks and platform compatibility issues. The engine side includes the kernel module, which may include graphics rendering layer, input management layer, abstraction layer, engine resources, file system, thread scheduling module, engine editing tool, project management module, mixed reality module, resource production module and resource management module. The kernel module follows a unified coding specification, and the existing code and newly developed code in the kernel module are reconstructed or written based on the unified coding specification.

[0018] Each application module implements cross-language interaction with the kernel module through the corresponding cross-language interaction interface.

[0019] See also Figure 2 , Figure 2 A flow chart of an engine processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0020] Step 202: receiving an access instruction sent by the target platform, and deploying the kernel module and the target application module of the target engine on the target platform, wherein the target application module is an application module corresponding to the target platform among multiple application modules of the target engine.

[0021] Specifically, a platform can be understood as a basic framework and environment that can deploy and run computer programs and support the development and operation of application software. Different platforms may support different operating systems.

[0022] Exemplarily, the operating system may include HarmonyOS, HarmonyOS NEXT, Android, iOS, MacOS, Windows, and Linux, among others.

[0023] In actual applications, since the software ecosystems corresponding to different operating systems are often isolated from each other, the specific implementation methods of the same functions on different platforms, the management and configuration methods of resources, etc. are different. Therefore, how to connect the engine to different platforms so that the engine can provide support for various platforms, so that the engine can be started on different platforms for project development, and how to run the products developed based on the engine normally on different platforms so that the products developed based on the engine have good compatibility with various platforms are very critical for engine developers.

[0024] Specifically, the target platform can be understood as any platform, and the target platform has a corresponding operating system.

[0025] Optionally, the operating system of the target platform may be any one of the above operating systems.

[0026] It should be noted that HarmonyOS NEXT, as the first major version after HarmonyOS 1.0 to HarmonyOS 4.0, has excellent performance and innovative functions. Providing support and compatibility for the HarmonyOS NEXT operating system will help to stand at the forefront of game engine technology, promote the innovative development of the software industry, and provide users with a convenient and high-quality user experience.

[0027] Therefore, the following will take the target platform being the HarmonyOS NEXT platform as an example to further explain the embodiments of this specification.

[0028] Specifically, the access instruction can be understood as an instruction for instructing the target engine to access the target platform. The access instruction can specifically be an instruction in the HarmonyOS NEXT official integrated development environment DevEco Studio.

[0029] Specifically, an engine is a component or framework in a computer system that is used to perform computing tasks, process data, execute instructions, and manage resources. It can provide an underlying architecture or tool set to help developers quickly build, deploy, and manage applications. It can include multiple functions such as data processing, algorithm implementation, and user interface design.

[0030] The target engine can be understood as a game engine that can provide functions such as graphics rendering, physics simulation, and sound processing, and support game developers to quickly create games. Exemplarily, game engines can include Unity, UnrealEngine, Cocos2d-x, and the like.

[0031] In one or more embodiments of the present specification, the target engine may specifically refer to a self-developed engine independently developed by engine developers.

[0032] Optionally, the target engine mainly includes a kernel module and multiple application modules.

[0033] The kernel module can be understood as the module corresponding to the engine side, which mainly includes the engine's underlying code, engine resource files, various editors provided by the engine, etc. The kernel module is used to implement various functions of the engine.

[0034] Furthermore, the code in the kernel module is written based on the language specifications supported by the engine, and different developers use a unified language specification to ensure the maintainability and multi-platform compatibility of the code.

[0035] In an optional embodiment of the present specification, the kernel module is also called a C++ engine module, which is developed based on the C++ language standard specification.

[0036] Specifically, the application module can be understood as a module corresponding to different platforms, which is encapsulated based on the system language of each platform. The application module can contain specific implementation methods in the corresponding platform, resources and files configured for the platform, etc. The application module can also be understood as a platform layer in the engine that can correspond to each platform respectively.

[0037] Exemplarily, HarmonyOS NEXT corresponds to the ArkTS platform layer, Android corresponds to the Java platform layer, iOS and MacOS correspond to the Object-C platform layer, and Windows and Linux correspond to the C++ platform layer.

[0038] The target application module can be understood as the application module corresponding to the target platform. In an optional embodiment of this specification, the target application module is the application module corresponding to HarmonyOS NEXT, that is, the ArkTS platform layer, which can support the HarmonyOS NEXT official integrated development environment DevEco Studio and the HarmonyOS NEXT official NDK development solution Node-API. The target application module includes ArkTS platform layer code, resources, and files configured based on HarmonyOS NEXT.

[0039] In actual applications, through the target application module, not only can the target engine be accessed on any device that supports HarmonyOS NEXT and project development be carried out through the target engine, but the software products developed based on the target engine can also be compatible with any device that supports HarmonyOS NEXT.

[0040] In the actual implementation process, before the target engine is connected to the target platform, the engine developers are required to complete the development of the target engine.

[0041] According to one or more optional embodiments of the present specification, before receiving the access instruction sent by the target platform, the following steps may also be included: A kernel module is configured, and multiple application modules are configured, wherein the kernel module is configured based on a unified coding specification, and the kernel module is used to implement the general logic of the target engine.

[0042] Specifically, the kernel module can be understood as the module corresponding to the engine side of the target engine, which is obtained based on the native language encapsulation of the engine. The kernel module can mainly include the engine's underlying code, engine resources, various editors provided by the engine, project files, etc. The kernel module is used to implement various functions of the engine.

[0043] In an optional embodiment of the present specification, the kernel module is also referred to as a C++ engine module, which reconstructs the existing engine code and develops new content based on the C++ language standard specification.

[0044] Specifically, general logic can be understood as the logic that can be implemented by the engine itself, which may include the engine's C++ functions, interfaces provided by the engine, engine functions, editors, and the like.

[0045] Specifically, the application module can be understood as a module encapsulated based on the system language of each platform for different platforms. The application module can also be called a platform layer.

[0046] Optionally, according to different operating systems corresponding to the platform, corresponding application modules can be configured for platforms of different operating systems in the target engine. That is, the target engine can include multiple different application modules, and different application modules correspond to different platforms.

[0047] By applying this embodiment, by separately configuring the kernel module and multiple application modules, it is possible to implement separate encapsulation of different application modules, reduce the coupling between the application modules and the engine kernel, improve the engine's compatibility with different platforms and the engine's scalability, thereby realizing the development of a cross-platform self-developed engine, and by having the development team members follow a unified coding specification, the written code format can be made compatible with the standards of all target platforms, thereby increasing the maintainability of the code.

[0048] In an optional embodiment of the present specification, the kernel module includes a graphics rendering layer; configuring the kernel module may include the following steps: For multiple platforms, configure the corresponding graphics interface for each platform respectively; Encapsulate the graphics interface corresponding to each platform and obtain the target graphics interface corresponding to the graphics rendering layer.

[0049] Specifically, the graphics rendering layer can also be called the graphics rendering pipeline layer, which is one of the lowest-level architectures designed for the target engine. The graphics rendering layer is mainly used to provide graphics rendering functions and to achieve graphics presentation through the rendering pipeline.

[0050] The graphics interface corresponding to each platform can be understood as different platforms have different specific implementations of graphics rendering, so different platforms can correspond to different graphics interfaces.

[0051] Optionally, for multiple platforms, respectively configuring a graphics interface corresponding to each platform may include: Based on the underlying graphics API, configure the macros corresponding to each platform to obtain the graphics interface corresponding to each platform.

[0052] Specifically, the target graphics interface can be understood as a universal graphics interface encapsulated based on the graphics interfaces corresponding to each platform.

[0053] In the actual implementation process, each platform can call the universal graphics interface to achieve graphics rendering and presentation.

[0054] For example, the underlying graphics API may be Vulkan, which is a cross-platform 2D and 3D graphics application programming interface (API) with the advantages of cross-platform support, low-level access, high performance and low latency, and full functionality. It can run on multiple operating system platforms (such as PC, Android, iOS, and HarmonyOS NEXT, etc.), providing developers with a wide range of compatibility. In addition, Vulkan also provides support for virtual reality, and through its high performance and low latency features, it can provide users with a smoother VR and AR experience.

[0055] This embodiment is applied, by adopting the cross-platform rendering interface technology that is independent of the underlying graphics device interface, based on the underlying graphics API (such as Vulkan), the system API is encapsulated at the graphics rendering pipeline level to obtain a set of universal graphics interfaces, which realizes the independence of the underlying graphics device interface, so that products developed based on the engine can run on Windows, Android phones, iPhones, and mobile devices that support HarmonyOS NEXT, and support AR, VR display output and interaction. Not only can the engine run on a variety of devices and platforms, realizing the cross-platform design of the engine, but it can also be deployed on multiple platforms, and collaborate with the real-time debugging system, multi-platform performance diagnosis and data collection system to achieve the purpose of multi-platform compatibility and adaptation.

[0056] In an optional embodiment of the present specification, the kernel module includes an input management layer; configuring the kernel module may include the following steps: A target input interface corresponding to the input management layer is configured, wherein the target input interface is used to receive input signals of various types of devices, and based on the target device type of the input signal, convert the input signal into a target processing instruction corresponding to the target device type.

[0057] Specifically, the input management layer can be understood as a unified input management system designed for the target engine, which additionally supports input from external devices for mobile devices. For example, the external devices may include Bluetooth, keyboards, and controllers.

[0058] Specifically, the target input interface can be understood as a unified input interface that can receive input signals from different external devices, that is, can support different input methods. Exemplarily, different input methods can include keyboard, mouse, touch screen, handle input, etc. under the specifications of each platform.

[0059] Optionally, the target input interface receives input signals from various types of devices, and can determine the target device type corresponding to the input signal; based on the target device type, the input signal is converted into a target processing instruction corresponding to the target device type.

[0060] Specifically, the target processing instruction is an instruction that can be recognized and processed by the target engine.

[0061] By applying this embodiment, by defining a unified input interface, the target engine can select the appropriate input method according to the device type at runtime. Users can use wired, Bluetooth and other input methods even on mobile devices, and experience the engine product more immersively through external devices such as mouse, keyboard and controller.

[0062] In an optional embodiment of the present specification, configuring multiple application modules may include the following steps: Obtain platform-level code written in the system language corresponding to each platform and resources configured for each platform; The first platform layer code and the first resource are encapsulated into a first application module, wherein the first application module is an application module corresponding to the first platform, the first platform is any one of the platforms, the first platform layer code is a code written in a system language corresponding to the first platform, and the first resource is a resource configured for the first platform.

[0063] Specifically, the platform layer code can be understood as the code written for each platform based on the system language corresponding to each platform.

[0064] In actual applications, since the same functions are implemented differently on different platforms, and resource storage formats and file management methods are also different on different platforms, developers will develop corresponding platform-level codes for each platform and configure corresponding files and resources respectively.

[0065] For example, for the HarmonyOS NEXT platform, the ArkTS platform layer code will be developed based on the system language supported by HarmonyOS NEXT, and the files and resources supported by HarmonyOS NEXT will be configured.

[0066] In the actual implementation process, when the corresponding platform layer code is developed for each platform and resources are configured and obtained, the platform layer code and resources belonging to the same platform can be encapsulated into the application module corresponding to the platform, that is, the platform layer.

[0067] For example, the ArkTS platform layer code and the corresponding files and resources can be encapsulated into the ArkTS platform layer. The platform layer code corresponding to the Android platform can also be encapsulated into the Java platform layer; the platform layer code corresponding to the iOS and MacOS platforms can be encapsulated into the Object-C platform layer; the platform layer code corresponding to the Windows and Linux platforms can be encapsulated into the C++ platform layer.

[0068] By applying this embodiment, through module division, corresponding platform layers are accessed according to different system languages, so that different platform layers can be encapsulated separately, the coupling with the engine kernel can be reduced, and the engine performance can be improved; the engine can be developed according to the implementation method supported by the platform using the system language corresponding to the platform, so that the engine can be cross-platform compatible with various different platforms and achieve better compatibility.

[0069] In actual applications, on the basis of encapsulating each application module and the kernel module separately, in order to realize cross-language interaction between the application module and the kernel module, in an optional embodiment of this specification, after encapsulating the first platform layer code and the first resource into the first application module, the following steps may also be included: According to the operating system adapted by the first application module, a cross-language interaction interface corresponding to the first application module is configured, wherein the cross-language interaction interface is used to implement cross-language interaction between the first application module and the kernel module.

[0070] Specifically, the cross-language interaction interface can be understood as an interface defined in the first application module, which can realize the cross-language interaction between the first application module and the kernel module.

[0071] Exemplarily, when the first application module is the ArkTS platform layer, the cross-language interaction interface corresponding to the ArkTS platform layer is Node-API.

[0072] In actual applications, functions can be exported from the kernel module through the cross-language interaction interface, and some system functions of the first application module can be provided to the kernel module, thereby realizing cross-language interaction between the first application module and the kernel module.

[0073] Exemplarily, when the first application module is the ArkTS platform layer and the cross-language interaction interface is Node-API, the C++ functions exported from the C++ engine module can be obtained through the Node-API interface, and some ArkTS system functions can be provided to the C++ engine module to realize the cross-language interaction between the ArkTS platform layer and C++.

[0074] By applying this embodiment, by configuring the cross-language interaction interface corresponding to the application module according to the operating system adapted to the application module, cross-language interaction between the application module and the kernel module can be achieved, thereby realizing the cross-platform compatibility of the engine.

[0075] In an optional embodiment of the present specification, the kernel module includes an abstraction layer; configuring the kernel module may include the following steps: Configure multiple application interfaces corresponding to the application module, where different application interfaces are used to call platform layer codes in the application module for implementing different functions; Encapsulate multiple application interfaces to obtain an abstract layer and corresponding abstract interfaces.

[0076] Specifically, the application interface can be understood as an interface for calling the platform layer code in the application module.

[0077] In actual applications, since the specific implementation codes of many functions are in each application module, the kernel module does not need to be implemented specifically. Therefore, an abstract layer can be created to encapsulate platform-specific API calls to shield the differences between different platforms.

[0078] Exemplarily, modules such as file system, graphics rendering, input processing, and audio management can all be implemented through abstract interfaces.

[0079] By applying this embodiment, an abstract layer is created to encapsulate the platform API to obtain an abstract interface. For different platforms, the interface name can be the same, so that the differences between different platforms can be shielded. By accessing a small amount of platform layer code, the engine can seamlessly support the HarmonyOS NEXT platform while also maintaining a high degree of compatibility and stability on other platforms.

[0080] In actual applications, when a target engine is developed, a kernel module and multiple application modules of the target engine are obtained, the engine can be connected to different platforms.

[0081] According to one or more optional embodiments of the present specification, receiving an access instruction sent by a target platform and deploying a kernel module and a target application module of a target engine on the target platform may include the following steps: Receive an access instruction sent by the target platform, obtain a target application module corresponding to the target platform from multiple application modules of the target engine, and obtain a kernel module of the target engine; The kernel module and the target application module are packaged to obtain an application package, and the application package is deployed on the target platform.

[0082] Specifically, the target platform is the HarmonyOS NEXT platform, the access instruction is the DevEco Studio build instruction, the target application module is the ArkTS platform layer, and the kernel module is the C++ engine module.

[0083] In actual applications, based on the build instructions of DevEco Studio, the ArkTS platform layer corresponding to the HarmonyOS NEXT platform can be obtained from multiple platform layers; the ArkTS platform layer code and the engine library files in the C++ engine module are packaged together to generate an application package, and the application is deployed to each device that supports the HarmonyOS NEXT platform.

[0084] By applying this embodiment, the target application module corresponding to the target platform is obtained, and the kernel module of the target engine is obtained; the kernel module and the target application module are packaged to obtain the application package, and the application package is deployed on the target platform, so that the engine can be connected to the platform, which is convenient for subsequent use of the engine for project development on the platform.

[0085] In actual applications, after the engine access is completed, the engine startup process can be executed to start the target engine on the target platform.

[0086] According to one or more optional embodiments of the present specification, after the target engine is connected to the target platform, the application program can be started to load the UI component of the ArkTS application module.

[0087] Furthermore, the C++ functions exported from the C++ engine module are obtained through the Node-API interface, and some ArkTS system functions are provided to the C++ engine module to achieve cross-language interaction between the ArkTS platform layer and the C++ engine module.

[0088] Step 204: Create at least one application component through the target application module deployed on the target platform, wherein the application component is used to implement the engine function of the target engine on the target platform.

[0089] In actual applications, based on the cross-language interaction between the ArkTS platform layer and the C++ engine module through the Node-API interface, at least one application component can be created by deploying the target application module on the target platform.

[0090] Specifically, application components may include platform layer components such as rendering windows and file management.

[0091] According to one or more optional embodiments of the present specification, creating at least one application component by deploying a target application module on a target platform may include the following steps: By deploying the target application module on the target platform, based on the multiple engine functions of the target engine, application components corresponding to each engine function are created; The cross-language interaction interface is called to transfer the component instance of the application component to the kernel module.

[0092] Optionally, by deploying a target application module on a target platform, based on multiple engine functions of a target engine, application components corresponding to each engine function are created, which may include: Determine the various engine capabilities of the target engine; Determine the corresponding development tools and libraries based on the component type and engine function to be created; Based on development tools and libraries, write code to implement engine functions and define the corresponding interfaces of components.

[0093] In actual applications, when creating application components, you can first clarify the component type that the target engine needs to create and the engine function that the component is used to implement. Then, you can choose the appropriate development tools and libraries based on the type and function of the component. Furthermore, you can design and implement the interface and function of the component. You can also further integrate and debug the component, etc.

[0094] By applying this embodiment, by creating application components corresponding to each engine function, calling the cross-language interaction interface, and transferring the component instance of the application component to the kernel module, it is possible to achieve seamless access between the application platform and the kernel module, and to start the target engine on the target platform.

[0095] Step 206: Initialize application components and engine functions, and control the target platform to display the engine interface of the target engine.

[0096] In actual applications, application components corresponding to each engine function are created; on the basis of calling the cross-language interaction interface and transferring the component instance of the application component to the kernel module, the application component and the engine function can be initialized, and the target platform can be controlled to display the engine interface of the target engine.

[0097] Specifically, the engine interface can be understood as an interface provided by the engine side, which is different from the UI interface provided by the application module.

[0098] According to an optional embodiment of the present specification, initializing the application component and the engine function may include: Determine initialization resources, and initialize application components and engine functions based on the initialization resources.

[0099] Specifically, the initialization resources can be understood as the related files and resources that need to be prepared in advance for engine initialization, which can specifically include engine resource files and library files of the target platform.

[0100] In actual applications, the kernel module can include a file system. During the engine initialization process, the file system can be used to read and check the target platform runtime library installation status, set the platform resource path, and write the engine resource files and the missing library files of the target platform into the platform local environment, thereby realizing the preparation of initialization resources.

[0101] According to another optional embodiment of the present specification, initializing the application component and the engine function may further include: Create engine threads and operating system threads through the thread scheduling module; Manage the data interaction between the kernel module and the target application module, and synchronize the target platform runtime environment.

[0102] Optionally, the thread scheduling module is used to create and maintain engine threads and operating system threads during the engine initialization process.

[0103] In actual applications, the engine thread can be used to perform initialization operations when initialization resources are prepared.

[0104] According to another optional embodiment of the present specification, initializing the application component and the engine function may further include: Call the function method in the kernel module to initialize the application components and engine functions, wherein the function method is called through the cross-language interaction interface of the target application module.

[0105] Specifically, the function method in the kernel module can be understood as the C++ function in the C++ engine module, and can also be understood as the function interface exposed by the kernel module to each application module.

[0106] Optionally, when the application components and engine functions are initialized, the application program interface can be switched from the native UI interface, that is, the UI interface corresponding to the ArkTS platform layer, to the engine interface, and the engine drawing and rendering can be started to complete the engine startup process.

[0107] In the actual implementation process, when the engine startup process is completed, it is equivalent to successfully starting the target engine on the target platform. At this time, you can start project development on the target platform based on the target engine.

[0108] It should be noted that the product developed on the target platform based on the target engine can be directly compatible with the target platform, and the application program of the product can run on the target platform.

[0109] According to one or more optional embodiments of the present specification, the engine interface includes a project building control; after controlling the target platform to display the engine interface of the target engine, the following steps may also be included: In response to the triggering operation on the project building control, based on the building script in the kernel module, the building tool of the target platform is called, and the target project is built in the development environment corresponding to the target platform.

[0110] Specifically, the build script may be a CMake script, which may be used to manage project build processes on different platforms.

[0111] Optionally, developers can write different CMake scripts for different platforms, and then integrate the CMake scripts of all platforms into one project management file, which can be managed through macros, thereby managing the build process of different platforms based on one CMake script.

[0112] By applying this embodiment, project code management is performed through CMake scripts, and projects for corresponding platforms can be generated using different development environments and build tools. For the HarmonyOS NEXT platform, using the DevEco Studio-based project build process, developers only need the DevEco Studio development environment to quickly complete automated project builds. For developers, they can generate target projects based on project build controls with one click, so that they can devote more energy to the development of project functions, bringing convenience to developers and improving project development efficiency.

[0113] In an optional embodiment of the present specification, the application component includes a scene processing component; after controlling the target platform to display the engine interface of the target engine, the following steps may also be included: Receiving a real image captured by a target device for a real environment; Identify real objects in real images and add virtual scene information to real objects through scene processing components.

[0114] Specifically, the scene processing component can be understood as a component created based on the scene system or based on the OpenXR encapsulated API. The scene processing component can be used to implement AR or VR functions.

[0115] In an optional embodiment of the present specification, a unified specification is designed, including an API based on OpenXR encapsulation, cameras for various platforms, and scene systems, which is applicable to mixed reality systems based on AR and VR.

[0116] Specifically, OpenXR is a third-party library that provides a unified set of development interfaces, allowing application developers to more easily develop applications for different VR / AR devices. The OpenXR standard was developed by the Khronos Group to standardize the specifications between devices and applications on VR / AR platforms.

[0117] For example, many devices such as SteamVR, Oculus, HoloLens, Pico, etc. support this standard.

[0118] In actual applications, the mixed reality system can use cameras of different devices to capture images of the real environment, identify objects in the real environment from the images, and overlay virtual scene information on the images. With the help of virtual scenes, the engine can integrate virtual information into the real picture, including adding 3D models in the real environment, performing lighting calculations and generating virtual shadows, etc., thereby creating a mixed reality environment with strong realism and interactivity.

[0119] By applying this embodiment, through the mixed reality system, virtual scene information can be added to the image to realize the display output and interaction of AR and VR, and based on the OpenXR open standard, it can be compatible with the input control of different VR and AR device handles and controllers to meet different interaction methods. In addition to mainstream VR and AR devices such as Oculus and Hololens, it also supports more domestic virtual reality devices such as Pico, which is conducive to the development of domestic virtual reality equipment and software ecology.

[0120] In one or more optional embodiments of this specification, the developed engine supporting tools also include scene editors, model editors, video editors, planning editors and other tools. These editing tools are integrated into the kernel module and support multi-platform development, including but not limited to Windows, MacOS, HarmonyOS NEXT and other mainstream mobile platforms.

[0121] When developers use the engine's supporting tools, they can focus on content creation without paying attention to platform differences, and can easily and quickly produce realistic characters, scenes, animations and other content. The supporting tools can produce products on multiple platforms and multiple devices, thus enriching the diversity of output results. The editing tools support multi-platform development, and the products developed can quickly adapt to different operating environments and meet a wider range of market needs. Developers can complete product development in the same set of editing tools and then deploy them to multiple platforms without having to develop separately for each platform, greatly improving development efficiency and convenience.

[0122] Since the production of engine resources needs to take into account that the resources can be compatible with all target platforms of the engine, in one or more optional embodiments of the present specification, the engine resources can be set to a unified cross-platform format or the optimal format for each platform based on presentation and performance indicators.

[0123] Some high-precision model resources used in the engine cannot be used directly in mobile programs due to excessive load in the mobile operating environment. For these high-precision models that exceed the performance standard, automated tools can be used to generate or convert them into resources suitable for mobile devices, such as generating LOD resources from models, limiting map accuracy, simplifying materials, etc., to ensure that the model resources can perform well on mobile devices.

[0124] According to one or more optional embodiments of the present specification, the target application module includes a target debugger; the engine processing method may further include the following steps: Monitoring the data information generated by the target platform running the target product, wherein the target product is a product developed based on the target platform and through the target engine; Based on the target debugger, the target product is tested according to the data information.

[0125] Specifically, the target debugger can be understood as a debugger provided by the target application module, which is used to implement cross-platform debugging for the target platform.

[0126] In practical applications, testing can mainly include performance testing and compatibility testing.

[0127] The embodiments of this specification also establish a complete cross-platform debugging strategy, and develop a real-time debugging system and a multi-platform performance diagnosis and data collection system. In the real-time debugging system, different debuggers are selected for different platforms (for example, MSDB is used for Windows platform, and LLDB is used for Android and HarmonyOS NEXT platforms), and different debuggers are provided by the corresponding platform layer.

[0128] By applying this embodiment, through the use of a multi-platform performance diagnosis and data collection system, it is possible to cover a variety of hardware and operating system combinations and perform automated testing of multiple devices and operating systems; by collecting various performance data, it is ensured that the game application can run stably on different devices and operating systems, and performance bottlenecks and platform compatibility issues can be detected in a timely manner.

[0129] According to an optional embodiment of the present specification, the engine processing method may further include: Detect the target platform's operating system data, device hardware parameters, and target platform driver capabilities during runtime; Adaptively adjust engine settings based on detection results.

[0130] In actual applications, the target engine can detect the target platform's operating system data, device hardware parameters, and target platform driver capabilities during runtime, and adaptively adjust the engine settings based on the detection results.

[0131] By applying this embodiment, by detecting the operating system data, device hardware parameters and target platform driving capabilities of the target platform, the engine can automatically adjust the operating parameters on different target platforms according to the detection results at runtime, thereby enabling functions available on the target platform, or disabling functions not supported by the target platform, thereby further improving the engine performance.

[0132] According to an optional embodiment of the present specification, the engine processing method may further include: Registers system events and notification callbacks for the target platform.

[0133] Optionally, system events and notification callbacks of the target platform can be registered according to the differences in the life cycles of different platforms, so as to specifically adapt the system functions of the target platform.

[0134] Specifically, the system functions of the target platform may include system services such as input, graphics, and network.

[0135] By applying this embodiment, by registering the system events and notification callbacks of the target platform, the system functions of the target platform can be adapted in a targeted manner, further improving the engine's compatibility with different platforms, ensuring that the application can run smoothly on the target platform and realizing the various functions provided by the engine.

[0136] An embodiment of the present specification provides an engine processing method, which receives an access instruction sent by a target platform, deploys a kernel module and a target application module of a target engine on the target platform, wherein the target application module is an application module corresponding to the target platform among multiple application modules of the target engine; creates at least one application component by deploying the target application module on the target platform, wherein the application component is used to implement an engine function of the target engine on the target platform; initializes the application component and the engine function, and controls the target platform to display an engine interface of the target engine.

[0137] In this way, by receiving the access instruction sent by the target platform and deploying the kernel module and the target application module of the target engine on the target platform, the target engine can be connected to the target platform, so that the engine can provide support for the target platform; by deploying the target application module on the target platform, at least one application component is created, and the target engine can be started after the access is completed; by initializing the application component and the engine function, the target platform is controlled to display the engine interface of the target engine, so that the engine can be initialized and the startup process of the target engine on the target platform can be completed, so that project development can be carried out based on the target engine in the development environment provided by the target platform, and the products obtained by development can also run stably on the target platform and have good platform compatibility.

[0138] It should be noted that the engine processing method provided in the embodiments of this specification is the first to support adaptation to the HarmonyOS NEXT operating system, and has better compatibility with mobile devices from various manufacturers. In addition to mobile devices equipped with HarmonyOS NEXT, this method also sets targeted optimization and compatibility strategies for CPU and software version differences of different devices. This method is committed to using the specifications of various system platforms to achieve input support for various wired, Bluetooth keyboards and controllers, including most models of peripherals, increase user interaction methods, enrich game mechanisms, reduce the complexity of mobile device operations, and enhance the running experience of software products on the machine.

[0139] At the same time, based on the OpenXR open standard, it is compatible with the input control of different VR and AR device handles and controllers to meet different interaction methods. In addition to mainstream VR and AR devices such as Oculus and Hololens, it supports more domestic virtual reality devices such as Pico, which is conducive to the development of domestic virtual reality equipment and software ecology.

[0140] See also Figure 3 , Figure 3 An engine architecture diagram of a self-developed engine provided according to an embodiment of this specification is shown. Specifically, the self-developed engine includes two main components: the application side and the engine side. Among them, the application side includes a variety of different platform layers, and each platform layer includes corresponding platform layer code and a debugger. The engine side includes a C++ engine module, and the C++ engine module includes a graphics rendering layer, an input management layer, an abstraction layer, engine resources, a file system, a thread scheduling module, an engine editing tool, a project management module, a mixed reality module, a resource production module, and a resource management module. Each platform layer realizes cross-language interaction with the C++ engine module through the corresponding cross-language interaction interface.

[0141] The self-developed engine provided in this embodiment can access multiple platforms including HarmonyOS NEXT, realizing cross-platform engine access technology. It not only supports existing Windows, Android, iOS and other platforms, but also takes the lead in supporting the comprehensive support of engine products for the HarmonyOS NEXT platform. The self-developed engine has built platform corresponding projects and compilation and construction environments for the HarmonyOS NEXT platform, developed relevant automation tools, and reconstructed all platform-independent codes. By developing an abstract platform layer and a flexible rendering pipeline, products developed based on the engine can run on the HarmonyOS NEXT platform. By providing support for the emerging HarmonyOS NEXT platform, the self-developed engine can better meet the domestic users' needs for HarmonyOS devices and applications.

[0142] The self-developed engine provided in this embodiment also includes a cross-platform resource production pipeline and a flexible and efficient cross-platform unified resource management system. The cross-platform resource production pipeline, by formulating resource specifications for each platform, packages and integrates different types of resource files (textures, audio, models, etc.) into a custom resource format and file index, and develops an automated resource conversion tool, so that resource files in a unified format can be previewed on multiple platforms in the editor, allowing artists to focus on making and maintaining a single version of resources, significantly reducing the manpower and time costs of resource production.

[0143] The cross-platform unified resource management system can be divided into resource packaging and resource reading. Packaging game resources (such as textures, audio, models, etc.) into a unified format not only reduces the size of resource files, but also improves loading and searching efficiency, facilitates management and loading, realizes data compression and decompression, and reduces the size of product packages and resource updates. In addition to packaging resources, the resource management system also has the function of pushing resources, which can support hot updates of resources and push new resource changes to clients on any platform including HarmonyOS NEXT. The system can not only update or clean up local resources according to version information, making it convenient for users to update product content, but also predict the resources that users may need in real time while the application is running, and load them in advance. Even if the resources on the server side change frequently, the client can update the resources immediately to ensure that users can always experience the latest resources.

[0144] Figure 4 The block diagram of a computing device 400 according to one embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.

[0145] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0146] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0147] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 400 may also be a mobile or stationary server.

[0148] The processor 420 is used to execute the following computer executable instructions, which implement the steps of the above engine processing method when executed by the processor.

[0149] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above engine processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above engine processing method.

[0150] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above engine processing method when executed by a processor.

[0151] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above engine processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above engine processing method.

[0152] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above engine processing method when executed by a processor.

[0153] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above engine processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above engine processing method.

[0154] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0156] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0157] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0158] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. An engine processing method, characterized in that: include: Receive an access instruction sent by a target platform, and deploy a kernel module and a target application module of a target engine on the target platform, wherein the target application module is an application module corresponding to the target platform among multiple application modules of the target engine; Creating at least one application component by deploying a target application module on the target platform, wherein the application component is used to implement an engine function of the target engine on the target platform; Initialize the application component and the engine function, and control the target platform to display the engine interface of the target engine.

2. The method according to claim 1, characterized in that Before receiving the access instruction sent by the target platform, the method further includes: The kernel module is configured, and the plurality of application modules are configured, wherein the kernel module is configured based on a unified coding specification, and the kernel module is used to implement the general logic of the target engine.

3. The method according to claim 2, characterized in that The kernel module includes a graphics rendering layer; The configuring of the kernel module comprises: For multiple platforms, configure the corresponding graphics interface for each platform respectively; Encapsulate the graphics interfaces corresponding to the platforms, and obtain the target graphics interface corresponding to the graphics rendering layer.

4. The method according to claim 2, characterized in that: The kernel module includes an input management layer; The configuring of the kernel module comprises: A target input interface corresponding to the input management layer is configured, wherein the target input interface is used to receive input signals of various types of devices, and based on the target device type of the input signal, convert the input signal into a target processing instruction corresponding to the target device type.

5. The method according to claim 2, characterized in that: The configuring of the multiple application modules comprises: Obtain platform-level code written in the system language corresponding to each platform and resources configured for each platform; The first platform layer code and the first resource are encapsulated into a first application module, wherein the first application module is an application module corresponding to the first platform, the first platform is any one of the platforms, the first platform layer code is a code written in a system language corresponding to the first platform, and the first resource is a resource configured for the first platform.

6. The method according to claim 5, characterized in that After encapsulating the first platform layer code and the first resource into the first application module, the method further includes: According to the operating system adapted by the first application module, a cross-language interaction interface corresponding to the first application module is configured, wherein the cross-language interaction interface is used to implement cross-language interaction between the first application module and the kernel module.

7. The method according to claim 6, characterized in that The kernel module includes an abstraction layer; The configuring of the kernel module comprises: Configuring multiple application interfaces corresponding to the application module, wherein different application interfaces are used to call platform layer codes in the application module for implementing different functions; The multiple application interfaces are encapsulated to obtain the abstract layer and the corresponding abstract interface.

8. The method according to claim 1, characterized in that The receiving the access instruction sent by the target platform and deploying the kernel module and the target application module of the target engine on the target platform includes: Receive an access instruction sent by a target platform, obtain a target application module corresponding to the target platform from a plurality of application modules of the target engine, and obtain a kernel module of the target engine; The kernel module and the target application module are packaged to obtain an application package, and the application package is deployed on the target platform.

9. The method according to claim 1, characterized in that: The step of creating at least one application component by deploying a target application module on the target platform includes: By deploying the target application module on the target platform, based on the multiple engine functions of the target engine, creating application components corresponding to the engine functions respectively; The cross-language interaction interface is called to transfer the component instance of the application component to the kernel module.

10. The method according to claim 1, characterized in that The engine interface includes a project building control; After controlling the target platform to display the engine interface of the target engine, the method further includes: In response to a triggering operation on the project building control, based on the building script in the kernel module, a building tool of the target platform is called, and a target project is built in a development environment corresponding to the target platform.

11. The method according to claim 10, characterized in that The application component includes a scene processing component; After controlling the target platform to display the engine interface of the target engine, the method further includes: Receiving a real image captured by a target device for a real environment; A real object in the real image is identified, and virtual scene information is added to the real object through the scene processing component.

12. The method according to claim 1, characterized in that The target application module includes a target debugger; The method further comprises: Monitoring data information generated by the target platform running a target product, wherein the target product is a product developed based on the target platform and through the target engine; Based on the target debugger, the target product is tested according to the data information.

13. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the engine processing method according to any one of claims 1 to 12 are implemented.

14. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which, when executed by a processor, implements the steps of the engine processing method described in any one of claims 1 to 12.

15. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the steps of the engine processing method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Game engine system for developing 3D game

    CN105005473A

  • Cross-platform mobile Web application runtime engine

    CN105138399A

  • 3D engine system applied to games

    CN105413176A

  • System for realizing human-computer interaction interface, computer equipment and storage medium

    CN110554873A

  • HTML and CSS parsing and rendering engine framework developed by C language

    CN114115874A