XR application and content operation method, device and storage medium

By introducing runtime containers into the XR application development system and providing a runtime environment, it solves the problems of complex XR application development and difficulty in running across devices in the existing technology, realizes cross-platform and cross-device XR application development, and simplifies development. process.

CN117009029BActive Publication Date: 2024-09-24ZHEJIANG TMALL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310617469.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-09-24
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

In the existing technology, the game engine for terminal R&D engineers is difficult to adapt to the development of XR applications, and when the game engine embeds 3D scenes in 2D applications, there are problems such as resource waste, difficulty in UI interaction, and difficulty in integrating with the SDK of 2D applications. This makes XR application development complex and inconvenient.

Method used

Provide a terminal-oriented XR application development system, including a runtime container, a content generator and an application generation platform. The runtime container provides a runtime environment during the generation and operation of XR applications, shields the underlying information of the device, and achieves cross-platform, Cross-device XR application development.

Benefits of technology

It simplifies the development and operation of XR applications, lowers the development threshold, supports cross-device operation, solves the problems of XR application development and cross-device operation, and adapts to the development needs of XR technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009029B
    Figure CN117009029B
Patent Text Reader

Abstract

The embodiments of the present application provide an XR application and content operation method, device and storage medium. In the embodiments of the present application, the application content of the XR application is generated based on the runtime environment provided by the runtime container; when the application content is generated, the XR application is generated according to the application content and the runtime container, and the runtime container runs between the application content and the operating system, and the runtime container provides a runtime environment for the application content. Since the runtime container is added between the application content and the operating system, the operation of the application content is no longer strongly dependent on the operating system, so that the development and operation of the XR application can be cross-platform and cross-device, which makes the development of XR applications simple and easy to implement, and solves the problems of development and cross-device operation of XR applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to an XR application and content operation method, device and storage medium. Background Art

[0002] Extended Reality (XR) is a general term for Augmented Reality (AR) and Virtual Reality (VR). VR refers to the use of computers to generate a technology that can directly exert visual, auditory and tactile sensations on participants and allow them to interactively observe and operate the virtual world. AR is a technology that cleverly integrates virtual information with the real world. It uses a variety of technical means such as multimedia, three-dimensional modeling, intelligent interaction, and sensing to simulate computer-generated virtual information such as text, images, three-dimensional models, audio, and video, and then applies it to the real world to achieve "enhancement" of the real world.

[0003] With the popularization of XR technology, the supply of XR applications based on XR technology has become an urgent problem to be solved. In the existing technology, there are game development engines for three-dimensional (3D) game developers and two-dimensional (2D) application development engines for terminal R&D engineers, but these development engines are not suitable for the development of XR applications. Therefore, there is an urgent need for a development solution that can develop XR applications. Summary of the invention

[0004] Multiple aspects of the present application provide an XR application and content operation method, device and storage medium to solve the development problem of XR applications.

[0005] The embodiment of the present application provides an XR application development system for terminal development, including: generating a runtime container required by the XR application, which is used to provide a runtime environment during the generation and operation of the XR application;

[0006] A content generator, in which the runtime container is integrated, and is used to generate application content of the XR application based on the runtime environment provided by the runtime container;

[0007] An application generation platform, configured to generate the XR application according to the application content and the runtime container;

[0008] Among them, during the running process of the XR application, the runtime container runs between the application content and the operating system of the target device where the XR application is located, and the application content runs in the runtime environment provided by the runtime container.

[0009] An embodiment of the present application provides an XR application development method for terminal development, including: pre-developing a runtime container required for generating an XR application, the runtime container being used to provide a runtime environment during the generation and operation of the XR application; in a content generator integrated with the runtime container, generating application content of the XR application based on the runtime environment provided by the runtime container; generating the XR application based on the application content and the runtime container; wherein, during the operation of the XR application, the runtime container runs between the application content and an operating system of a target device where the XR application is located, and the application content runs in the runtime environment provided by the runtime container.

[0010] The embodiment of the present application further provides a content generator, which has a runtime container required for generating an XR application integrated therein, and the runtime container is used to provide a runtime environment during the generation or operation of the XR application, and the content generator also includes:

[0011] A 3D scene effect editing module, for responding to an XR application generation operation, loading a 3D scene static resource, and editing 3D scene dynamic information for the 3D scene static resource based on a runtime environment provided by the runtime container to obtain 3D scene resource data;

[0012] A 3D application logic editing module, configured to edit application logic code for the 3D scene resource data based on a runtime environment provided by the runtime container, so as to obtain application content of the XR application;

[0013] The application content and the runtime container form the XR application, and the runtime container in the XR application provides a runtime environment for the application content during the running of the XR application.

[0014] An embodiment of the present application also provides an XR application editing method, which is applied to a content generator, wherein a runtime container is integrated in the content generator, and the runtime container is used to provide a runtime environment during the generation process or operation process of the XR application. The method includes: in response to the XR application generation operation, loading 3D scene static resources; based on the runtime environment provided by the runtime container, adding 3D scene dynamic information to the 3D scene static resources to obtain 3D scene resource data; based on the runtime environment provided by the runtime container, editing application logic code for the 3D scene resource data to obtain application content of the XR application; wherein the application content and the runtime container form the XR application, and the runtime container in the XR application provides a runtime environment for the application content during the operation of the XR application.

[0015] The embodiment of the present application also provides a runtime container for providing a runtime environment during the generation and operation of an XR application, including: a framework layer, a runtime environment layer, and a software library layer;

[0016] The software library layer includes multiple software engines and provides second-class application programming interfaces API of the multiple software engines, so as to obtain the first-class API by encapsulating the second-class API;

[0017] The framework layer is used to provide the first class API to application developers, so that the application developers can write application logic code of the XR application based on the first class API, and perceive target events during the generation or operation of the XR application, run at least one function entity of the first class API corresponding to the target event, and provide the target API encapsulated in the function entity to the runtime environment layer, where the target API belongs to the second class API;

[0018] The runtime environment layer is used to call the corresponding software engine in the software library layer to respond to the target event according to the target API.

[0019] An embodiment of the present application also provides an XR application running method, including: in response to a trigger operation to run the XR application, starting a runtime container in the XR application to provide a runtime environment for application content in the XR application, the runtime container running between the application content and an operating system of a target device where the XR application is located; running the application content based on the runtime environment provided by the runtime container to run the XR application.

[0020] An embodiment of the present application also provides an XR content running method, which is applied to a host application embedded with an XR runtime container. The method includes: during the running of the host application, displaying access entry information of the XR content; responding to a triggering operation on the access entry information, starting the XR runtime container and obtaining the XR content; and running the XR content based on the runtime environment provided by the XR runtime container.

[0021] An embodiment of the present application provides an electronic device, including: a memory and a processor; the memory is used to store a computer program, and the processor is coupled to the memory to execute the computer program to implement the steps in the XR application editing method or the XR application running method or the XR application development method or the XR content running method provided in the embodiment of the present application.

[0022] An embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps of the XR application editing method, the XR application running method, the XR application development method, or the XR content running method provided in the embodiment of the present application.

[0023] In the embodiment of the present application, the application content of the XR application is generated based on the runtime environment provided by the runtime container; when the application content is generated, the application generation platform generates an XR application including the application content and the runtime container according to the application content and the runtime container; during the operation of the XR application developed based on the runtime container, the runtime container runs between the application content and the operating system, and the runtime container provides a runtime environment for the application content, so that the application content can run in the runtime environment. Since the runtime container is added between the application content and the operating system, the operation of the application content is no longer strongly dependent on the operating system, so that the development and operation of the XR application can be cross-platform and cross-device, which makes the development of XR applications simple and easy to implement, and solves the problems of development and cross-device operation of XR applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 A schematic diagram of the structure of an XR application development system for terminal development provided in an embodiment of the present application;

[0026] Figure 2 An implementation architecture of the runtime container provided in this embodiment;

[0027] Figure 3 A schematic diagram of the relationship between the three-layer architecture of the runtime container provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of a framework of an XR application runtime provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of a 3D scene in which a 3D scene is embedded in a host 2D application provided in an embodiment of the present application;

[0030] Figure 6a A schematic diagram of the initialization process of an XR application provided in an embodiment of the present application;

[0031] Figure 6b A schematic diagram of a process of user-triggered function call provided in an embodiment of the present application;

[0032] Figure 6c A schematic diagram of a user-triggered event callback process provided in an embodiment of the present application;

[0033] Figure 6d A schematic diagram of the structure of a content generator provided in an embodiment of the present application;

[0034] Figure 7a A flowchart of an XR application development method provided in an embodiment of the present application;

[0035] Figure 7b A flowchart of an XR application editing method provided in an embodiment of the present application;

[0036] Figure 8 A flowchart of a method for running an XR application provided in an embodiment of the present application;

[0037] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0039] 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 this application 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 relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0040] With the popularization of XR technology, existing technologies are faced with the problem of developing XR applications. Especially before the large-scale popularization of XR devices, the form of XR applications is mainly 3D scenes embedded in 2D applications. This makes the development of XR applications mainly oriented to terminal R&D engineers for a long time. Terminal R&D engineers refer to engineers who develop 2D applications for mobile terminals such as mobile phones, including but not limited to: client engineers and front-end engineers.

[0041] In order to solve the development problems of XR applications, some application developers, including terminal R&D engineers, have tried to use game engines to develop XR applications. A game engine is a framework for rapid game development. Common game engines include but are not limited to Unity, UE, etc. Game engines are designed for game development and have powerful functions. They involve various functional modules such as rendering, physics, and animation. Complete and complex XR applications can be developed based on game engines. However, developing XR applications based on game engines also has the following shortcomings:

[0042] First, terminal R&D engineers face huge challenges in transitioning to game development. These challenges include at least the following:

[0043] (1) Game engines have high requirements for terminal R&D engineers, who need to have a deep understanding of 3D graphics knowledge, which is a relatively high threshold.

[0044] (2) You need to be familiar with game engines. Game engines such as UE / Unity involve hundreds of header files and thousands of application programming interfaces (APIs), which are difficult to become familiar with.

[0045] (3) The integrated development environment (IDE) of the game engine, such as UE blueprint, Unity editor and other tool chains, is designed independently and is quite different from the IDE for application development. It is difficult for terminal R&D engineers to adapt to it in a short period of time.

[0046] Second, the game engine is not designed for embedded apps, which makes it difficult to support the development of applications that embed 3D scenes in 2D applications. The following problems may exist:

[0047] (1) Multiple instances: The biggest feature of 2D applications is the switching between different pages. Pages are isolated from each other, support state cache recovery, and support back, so each page is an independent instance. However, the game engine is an exclusive mode and lacks life cycle management. It is difficult to recycle resources after page switching, resulting in resource waste. In addition, memory resources easily reach the upper limit of the APP, triggering the application crash.

[0048] (2) User Interface (UI) Interaction: The UI of 2D applications is responsive rendering, while the UI of game engines is immediate rendering. The implementation mechanisms of the two are different, which makes it more difficult for applications developed by game engines to have UI layout and smoothness, and it is also difficult to achieve complex UI effects.

[0049] (3) Problems with interaction with the software development kit (SDK) of 2D applications: Due to the complexity of the game engine architecture, it is impossible to integrate the SDK of 2D applications during the development of 3D scenes. Therefore, data communication between 3D scenes developed based on the game engine and 2D applications can only be carried out through events, which makes code implementation more complicated.

[0050] In view of the above, the embodiment of the present application provides an XR application development system for terminal development, which includes a runtime container that can provide a runtime environment during the XR application generation process (the generation process of the XR application can also be called the development process of the XR application) and the operation process, a content generator responsible for content generation, and an application generation platform responsible for packaging applications; the runtime container is integrated in the content generator, and the application content of the XR application is generated based on the runtime environment provided by the runtime container; when the application content is generated, the application generation platform generates an XR application containing the application content and the runtime container according to the application content and the runtime container; during the operation of the XR application developed based on the runtime container, the runtime container runs between the application content and the operating system, and the runtime container provides a runtime environment for the application content, so that the application content can run in the runtime environment. Since the runtime container is added between the application content and the operating system, the underlying information of the device can be shielded, so that the operation of the application content is no longer strongly dependent on the operating system, so that the development and operation of the XR application can be cross-platform and cross-device, thereby making the development of the XR application simple and easy to implement, solving the problem of the development and cross-device operation of the XR application.

[0051] Furthermore, developing XR applications based on runtime containers makes the development and operation of XR applications cross-platform and cross-device. This allows terminal R&D engineers to develop both independent XR applications for XR devices and XR applications that mainly embed 3D scenes in 2D applications. This can meet the needs of XR devices for independent XR applications and the needs of terminal devices for XR applications that mainly embed 3D scenes in 2D applications. This solves the pain points of cross-device (such as mobile phones, AR devices, and VR devices) faced by the XR field and adapts to the development of XR technology.

[0052] Furthermore, the XR application development system for terminal development provided in the embodiment of the present application pre-develops a runtime container that can provide a runtime environment, and provides a content generator and an application generation platform. For developers, they only need to develop application content based on the runtime container, and then use the application generation platform to package the application content and the runtime container into an XR application. It has the advantages of low threshold, parallel research and development, and complete research and development support, and has low requirements for developers. It is suitable for both terminal research and development engineers and other developers such as game engineers. In addition, due to the existence of the runtime container, the development of XR applications is more pure, and various application requirements can be directly considered without being subject to various restrictions of the game engine. The various defects and problems faced by the development of XR applications based on the game engine mentioned above can be overcome, and XR applications with cross-device and cross-platform characteristics can be developed.

[0053] Furthermore, since the runtime environment is provided by the runtime container, the development of application content is relatively independent. The application content mainly includes 3D scene resource data and application logic code. During the specific implementation, the application code is written in dynamic languages ​​such as JS. The XR applications developed in this way also have the characteristics of fast iteration and high performance.

[0054] In the embodiments of the present application, the implementation form of the XR device is not limited, and it can be either an AR device or a VR device. AR devices include but are not limited to: AR glasses, AR helmets, etc.; VR devices include but are not limited to: VR glasses, VR helmets, etc. Correspondingly, the terminal device running the 2D application with embedded 3D scene can be but is not limited to: a mobile phone, a tablet computer, a laptop computer, and a smart bracelet, etc.

[0055] The following embodiments of the present application will describe in detail the XR application development system for terminal development provided by the embodiments of the present application in conjunction with the accompanying drawings.

[0056] Figure 1 The schematic diagram of the structure of an XR application development system 100 for terminal development provided in an embodiment of the present application. Figure 1 As shown, the system 100 includes: a content generator 20 , a runtime container 30 and an application generation platform 40 .

[0057] like Figure 1As shown, the XR application development system 100 of this embodiment includes a runtime container 30. The runtime container 30 is a pre-developed software stack that runs on the operating system. It does not belong to the operating system. The software stack is provided for XR application development and is required for the development of XR applications. Its function is to provide a runtime environment during the development and operation of XR applications. The runtime environment refers to the environment required for the operation of the developed XR application or the intermediate program code in the XR application development process, such as some software engines and environment variables required for the operation of the XR application or the intermediate program code, and the operation logic required for the operation of the XR application or the intermediate program code. In this embodiment, the software engine is a broad concept, which is a summary of various engines, library functions, etc.

[0058] On the basis that the XR application development system 100 includes a runtime container 30, the XR application development process of this embodiment includes: a process of developing application content required for the XR application based on the runtime environment provided by the runtime container 30 and a process of generating the XR application based on the runtime container and the application content. Among them, the content generator 20 is responsible for generating the application content of the XR application based on the runtime environment provided by the runtime container 30. In order to facilitate the content generator 20 to use the runtime environment provided by the runtime container 30, the runtime container 30 is integrated in the content generator 20. In this embodiment, the application content is developed based on the runtime environment provided by the runtime container 30, so that the application content has the ability to run in the runtime environment provided by the runtime container 30, and the application content effect during development and the application content effect at runtime can be consistent.

[0059] When generating application content, the application generation platform 40 is responsible for generating an XR application based on the runtime container 30 and the application content. In this embodiment, the XR application is different from a traditional application program, and it includes both application content and a runtime container 30 responsible for providing a runtime environment for the application content. Since the application content is developed based on the runtime environment provided by the runtime container 30, the application content has the ability to run in the runtime environment provided by the runtime container 30. Based on this, the runtime container 30 and the application content are integrated together to form an XR application. In this way, during the operation of the XR application, the runtime container 30 can run between the application content and the operating system of the target device where the XR application is located, and is responsible for providing a runtime environment for the application content, so that the application content runs in the runtime environment provided by the runtime container, and finally achieves the purpose of normal operation of the XR application. Among them, the target device where the XR application is located can be an XR device or a terminal device running a host 2D application, which is not limited.

[0060] In this embodiment, the runtime container 30 runs on the operating system of the target device where the XR application is located, and uses the operating system to provide a runtime environment for the application content of the XR application. Specifically, it uses the various hardware and software resources of the target device, such as CPU, GPU, memory, network card, bandwidth and other resources, and based on these hardware and software resources, provides the application content of the XR application with the runtime environment required for its operation, so that the application content runs in the runtime environment, and then presents 3D scenes and interaction and / or control based on 3D scenes to users.

[0061] In this embodiment, the implementation form of the XR application can be an independent application form, or it can be an application form that is mainly a 2D application with a 3D scene embedded. Depending on the different implementation forms of the XR application, the way the application generation platform 40 generates the XR application will be different. The role of the application generation platform 40 is to package the runtime container 30 into the corresponding installation package for release according to the implementation form of the XR application, so that the target device can install the runtime container 30 locally according to the corresponding installation package.

[0062] If the XR application is an independent application, the application generation platform 40 can integrate the runtime container 30 and the application content into the installation package of the XR application and publish the installation package of the XR application, so that the XR application can be downloaded, installed and run like other independent applications. Specifically, the XR application can be an AR application running on an AR device or a VR application running on a VR device, without limitation.

[0063] If the XR application is an application form that mainly embeds 3D scenes in 2D applications, the 2D application that needs to embed 3D scenes is called a host 2D application, and the application generation platform 40 can integrate the runtime container 30 into the installation package of the host 2D application and publish the installation package of the host 2D application to the outside, so that when the host 2D application is downloaded, installed and run like other independent applications, the runtime container 30 will also be downloaded, installed and run. Among them, the application content of the XR application can be published independently of the host 2D application, or it can be embedded in the installation package of the host 2D application and published together with the installation package, and there is no limitation on this. Optionally, considering the large amount of data in the application content of the XR application, the application content of the XR application can be published separately to the resource server corresponding to the host 2D application. In this way, during the operation of the host 2D application, when it is necessary to run the 3D scene provided by the XR application, the application content of the XR application can be downloaded from the resource server on demand, and the application content can be run in the runtime environment provided by the runtime container 30, thereby presenting the 3D scene in the page of the host 2D application, wherein the 3D scene is embedded in a page of the host 2D application.

[0064] It should be noted that the embodiments of the present application are not limited to the host 2D application, and can be any 2D application with 3D scene display requirements, such as e-commerce applications, entertainment applications, teaching applications, or medical applications.

[0065] The runtime container 30 of this embodiment is a provider of a runtime environment running on the operating system. Whether in the XR application development process or in the XR application running process, the runtime container 30 provides the runtime environment in the same or similar manner. Figure 2 As shown, an implementation architecture of the runtime container 30 provided in this embodiment includes: a framework layer 31, a runtime environment layer 32 and a library layer 33. The three layers are introduced and explained below:

[0066] Libraries layer 31: Contains a series of basic libraries required for XR applications. These basic libraries provide various software engines and / or library functions, such as but not limited to: 3D rendering engine, AI reasoning engine, engine or library function for implementing download function provided by download library, engine or library function for implementing storage function provided by storage library, engine or library function for implementing network function provided by network library, engine or library function for implementing configuration function provided by configuration library, blockchain engine, engine or library function for implementing point-of-use function provided by point-of-use library, 2D UI engine and event engine, etc. Further, depending on the downloaded content, the download library can be divided into picture library, video library, etc. These software engines are responsible for providing XR applications with some basic capabilities required for their operation, such as 3D scene rendering capability, reasoning capability of neural network models, download capability of various resources, storage capability, network communication capability, configuration capability, etc. The following description of various engines and software libraries is only an exemplary description and is not limited to this:

[0067] 3D rendering engine: responsible for providing 3D rendering, animation, physical simulation and other capabilities, such as but not limited to: AceNNR.

[0068] AI inference engine: responsible for providing the end-side inference and operation capabilities of deep neural network models, such as MNN.

[0069] Blockchain engine: responsible for providing blockchain services.

[0070] Network library: Provides efficient network transmission capabilities between the end side (mainly the target device where the XR application is located) and the cloud side (mainly the cloud server corresponding to the XR application).

[0071] Download library: Based on the network library and combined with the download library encapsulated on the cloud side, it provides the ability to download various resources from the cloud side and cache resources;

[0072] Image library: Based on the network library and combined with the image download library encapsulated on the cloud side, it supports image downloads in multiple compression formats and provides a local image caching mechanism.

[0073] Video library: Based on the network library and combined with the video download library encapsulated by the cloud-side server, it supports video downloads in multiple formats and provides a local video caching mechanism.

[0074] Tracking library: responsible for providing log tracking services, compressing the log data generated during the operation of XR applications on the client side and uploading it to the cloud side;

[0075] Repository: Provides file storage services. If the repository is a relational database, it provides relational storage services. If the database is a time series database, it provides time series storage services, etc.

[0076] Configuration library: responsible for providing various configuration functions for 3D models, coordinates, events, etc. in XR applications.

[0077] In this embodiment, the basic capabilities provided by the above-mentioned various software engines can be encapsulated into APIs, and these basic capabilities are exposed to the outside through these APIs. These APIs are called basic APIs. Relative to the first type of API, these basic APIs can also be called second type APIs. The first type of API is a type of API exposed to application developers, and is provided for application developers to write application logic code. The second type of API does not need to be exposed to application developers. The first type of API is encapsulated based on the second type of API. Each function entity corresponding to the first type of API may contain one or more second type APIs, and there is no limitation on this. Application developers develop application logic code based on the first type of API. During the running of the XR application, when these application logic codes are run, the call of the first type of API is first triggered, and then the call of the second type of API encapsulated in the first type of API is triggered, and then the call of the corresponding software engine is triggered, and then the basic capabilities provided by the software engine are used to realize the presentation of 3D scenes, etc.

[0078] Framework layer 32: Provides the relevant capabilities required for XR application development, mainly exposing the first-class APIs to application developers. The specific implementation of the first-class APIs is mostly provided by the software engine in the Libraries layer. Depending on the application scenario, the number and type of the first-class APIs provided by the Framework layer will also vary. The following are some examples of the first-class APIs, including but not limited to the following:

[0079] (1) 3D scene API: This type of API is used for 3D scene development. Moreover, this type of API mainly encapsulates the 3D rendering capabilities of the 3D rendering engine in the Libraries layer, so that application developers do not have to deal with the 3D rendering engine. To a certain extent, it can lower the threshold for application developers to understand and develop XR applications.

[0080] There are multiple 3D scene APIs. Here are some examples of 3D scene APIs:

[0081] XRScene: represents a 3D scene. A 3D scene can be realized through this API.

[0082] XRModel: represents a 3D model. This API can be used to implement a 3D model in a 3D scene.

[0083] XRAnchor: represents a reference coordinate in a 3D world. This API can be used to achieve position calibration in a 3D scene.

[0084] XREvent: represents system and application related events. Through this API, you can respond to various events in the 3D scene and make responses;

[0085] XRConfig: represents the configuration of XR applications. Through this API, you can configure various XR applications, such as configuring different resource loading and running strategies for XR applications for high-end, medium-end, and low-end devices. You can also configure the resolution, level, and type of each 3D model or other object in the 3D scene.

[0086] (2) Lifecycle Management API: responsible for managing the lifecycle of XR applications, including but not limited to the launch, exit, and update of XR applications. This type of API is mainly implemented by encapsulating the lifecycle management capabilities of the lifecycle management engine in the Libraries layer.

[0087] (3) Resource Management API: Responsible for managing various resources of XR applications, including but not limited to downloading, caching, and storage of resources required by XR applications. This type of API mainly encapsulates the download and storage capabilities provided by the download engine and storage engine in the Libraries layer.

[0088] (4) UI Interaction API: This type of API is applied to the application form of 3D scenes embedded in 2D applications. It is responsible for managing the UI interaction between the XR application and its host 2D application, and supports the display of pages developed by the front end in W3C mode. The UI interaction API can be implemented as a web container, which is responsible for handling the display function of the visual UI of the host 2D application in the XR application. It is a physical container responsible for providing the GUI of the 2D application. Alternatively, it can be implemented as a Native container, which is a virtualized container. This type of API mainly encapsulates the UI interaction capabilities provided by the 2D UI engine in the Libraries layer.

[0089] (5) Event Interaction API: responsible for managing event interactions in XR applications, including but not limited to click, long press, zoom, rotation, approach, and other event behaviors. This type of API mainly encapsulates the event management and response capabilities provided by the event engine in the Libraries layer.

[0090] In addition to exposing the first-class API to application developers, the Framework layer 32 also has some logical functions. For example, during the generation or operation of the XR application, it is responsible for sensing the target event, which refers to an event involving the call to at least one first-class API. According to the operation logic between at least one first-class API, the function entity of at least one first-class API is run, and the target API encapsulated in the function entity is provided to the runtime environment layer 33. Here, the target API is a second-class API encapsulated in the function entity of the first-class API. For different first-class APIs, the functions they implement are generally different, so the second-class APIs encapsulated in their function entities will also be different, and there is no limitation on this.

[0091] Runtime environment layer 33: responsible for providing a runtime virtual machine (VM) adapted to the programming language used by the XR application. These runtime VMs are responsible for providing a runtime environment for the XR application. Specifically, they are used to call the corresponding software engine in the Libraries layer to respond to the target events perceived by the Framework layer 32 according to the target API provided by the Framework layer 32, so as to complete the operation of intermediate resource data in the XR application development process or complete the operation of application content in the XR application.

[0092] Among them, the VM adapted to the programming language used by the XR application can be a JS VM or a Python VM. If the application logic code of the XR application is written in JS language, a JS VM is provided; if the application logic code of the XR application is written in Python language, a Python VM is provided. It is explained here that these runtime VMs provide a runtime environment for XR applications. On the one hand, they use the software and hardware resources of the target device with the help of the operating system of the target device to provide the software and hardware resources required by the XR application. On the other hand, based on these software and hardware resources, the basic capabilities provided by the corresponding software engine in the Libraries layer are called to render the 3D scene resource data and interpret and execute the application logic code, so that the XR application can use the various basic capabilities in the Libraries layer, and finally present the 3D scene and the interaction and / or control process based on the 3D scene to the user.

[0093] JS VM: mainly supports application developers (such as terminal R&D engineers) to write JS application logic code, dynamically distribute it and interpret and execute it through JS VM to realize dynamic update of XR application logic. For example, the UI interface and interaction logic of 3D scenes.

[0094] Python VM: mainly supports application developers (such as terminal R&D engineers) to write Python application logic code, dynamically distribute it and interpret and execute it through Python VM, so as to realize dynamic update of application code written in Python (such as a certain algorithm task). For example, in AR scenarios, application logic code can be written in Python language, specifically, face recognition algorithm tasks in AR applications can be written.

[0095] It should be noted that in the embodiment of the present application, the number of runtime VMs included in the runtime environment layer 33 is not limited, and the number of runtime VMs may be one or more. For example, a JS VM or a Python VM may exist alone, or a JS VM and a Python VM may exist at the same time. In the case where there are multiple runtime VMs, different runtime VMs are implemented in different dynamic programming languages ​​to provide a runtime environment for XR applications implemented in different dynamic programming languages.

[0096] Furthermore, in the case where there are multiple runtime VMs, the runtime environment layer 33 also includes: a VM scheduling module, which is used to schedule a target VM implemented in the same dynamic programming language as the XR application among multiple runtime VMs according to the dynamic programming language used by the XR application during the running of the XR application, so that the target VM provides a runtime environment for the XR application. Accordingly, the VM scheduling module is also used to: during the development of the XR application, according to the dynamic programming language used to develop the XR application, schedule a target VM implemented in the same dynamic programming language as the XR application among multiple runtime VMs, so that the target VM provides a runtime environment for the intermediate resource data in the development of the XR application.

[0097] In this embodiment, there is an association relationship between the three-layer architecture of the runtime container 30. Figure 3 As shown, the Libraries layer 31 is located at the bottom layer, and the runtime environment layer 33 is located between the Libraries layer 31 and the Framework layer 32. The Libraries layer 31 is responsible for providing various basic capabilities. The basic capabilities provided by different software engines are different. For example, the 3D rendering engine provides 3D rendering capabilities, and the AI ​​reasoning engine provides AI model reasoning capabilities based on deep neural networks. These basic capabilities are encapsulated to form different second-class APIs for capability exposure. On the one hand, the second-class API is exposed to the runtime environment layer 33, and on the other hand, the second-class API is further encapsulated as the first-class API and transmitted to application developers through the Framework layer 32. For the Framework layer 32, during the development or operation of the XR application, the target event that triggers the call of the first type of API can be sensed, for example, the event that triggers the running of the XR application during the running of the XR application, the event that loads the static resources of the 3D scene, or the trigger event that checks the 3D scene effect after adding the dynamic information of the 3D scene, or the trigger event that checks the interactive effect after adding the application code, etc. These target events will trigger at least one first type of API to be called, and execute at least one function entity of the first type of API. When the second type of API contained in the function entity is executed, the second type of API is provided to the runtime environment layer 33. For the runtime environment layer 33, during the development or operation of the XR application, the second type of API provided by the Framework layer 32 can be received, and the basic capabilities provided by the software engine in the Libraries layer 31 can be called through the second type of API. For the event of loading the static resources of the 3D scene, the trigger event that checks the 3D scene effect after adding the dynamic information of the 3D scene, and the trigger event that checks the interactive effect after adding the application code, please refer to the description below.

[0098] In this embodiment, various basic capabilities in the Libraries layer can be implemented in C++, which is a cross-platform language. By implementing various basic capabilities in the Libraries layer based on C++, XR applications developed based on the runtime environment provided by the runtime container have cross-platform and cross-device characteristics.

[0099] In this embodiment, when various basic capabilities in the Libraries layer are implemented in C++ language, the various basic capabilities can be exposed in the following ways, but not limited to:

[0100] The first one is the native exposure method, which requires the application logic code in the XR application to be developed in C++. This exposure method does not have the ability of rapid iteration.

[0101] The second method is non-native transparency, which means that the application logic code in the XR application can be written in JS or Python. With the advantages of JS or Python, the dynamic update and iteration of the application logic can be achieved.

[0102] Furthermore, in the case of adopting a non-native transparent method, Figure 3 As shown, the following two methods can be used to implement API exposure:

[0103] (1) In the Libraries layer, the second-class API is exposed to the JS VM or Python VM in the runtime environment layer through JS Binding or Python Binding technology. The JS VM or Python VM encapsulates the second-class API into the first-class API, and then exposes the first-class API to the Framework layer;

[0104] (2) In the Libraries layer, the second-class API is exposed to the JS VM or Python VM in the runtime environment layer 33 through JS binding or Python binding technology, and the second-class API is encapsulated into the first-class API, and the first-class API is directly exposed from the Libraries layer to the Framework layer.

[0105] In the embodiment of the present application, the application content of the XR application mainly includes 3D scene resource data and application logic code. Among them, 3D scene resource data refers to the resource data responsible for presenting the 3D scene, for example, including: 3D scene static resources and 3D scene dynamic information. 3D scene static resources refer to static resources in the 3D scene, such as various 3D models, images, etc.; 3D scene dynamic information refers to some dynamic information related to the 3D scene effect, such as the movement trajectory of the 3D model, the camera system in the 3D scene, the water system in the 3D scene, etc. These dynamic information can make the 3D scene effect richer and more diverse. The application logic code data includes various code data that reflect the application logic. These application logics include control and interaction logic of various resources in the 3D scene from the application level, such as movement control of character models, interaction control with character models or object models, and some special effects when specific conditions are met.

[0106] In an optional embodiment, a 3D scene static resource is generated in advance, and based on this, 3D scene dynamic information and application logic code are edited on the 3D scene static resource to obtain the application content of the XR application. Based on this, one way for the content generator 20 to generate application content includes: responding to the XR application generation operation, loading the 3D scene static resource, and adding the 3D scene dynamic information and application logic code to the 3D static scene resource based on the runtime environment provided by the runtime container 30 to obtain the application content of the XR application.

[0107] Among them, the application logic code can be written by the application developer based on the first type of API provided to the application developer by the Framework layer in the runtime container 30.

[0108] In an alternative embodiment, if Figure 1 As shown, the XR application development system 100 provided in this embodiment also includes: a 3D model development tool 10, which is used for model developers, so that model developers can use the 3D model development tool 10 to develop 3D scene static resources that generate XR applications. Specifically, the 3D model development tool 10 can respond to the 3D model development operation of the model developer, generate various 3D models, and output these 3D models as at least part of the 3D scene static resources.

[0109] Among them, 3D scene static resources include various static resources required to build 3D scenes in XR applications, such as but not limited to:

[0110] (1) 3D model file, used to describe the 3D model. The 3D model can be classified according to application requirements. In different application scenarios, the 3D model can be classified differently. Figure 5Taking the XR scene shown above as an example, 3D models can be divided into three categories: people, objects, and scenes. Figure 5 The characters, shoes, bags, etc. shown in the figure are all 3D models, and the entire 3D scene is also a 3D model. In this embodiment, the format of the 3D model is not limited, for example, it can be but not limited to: FBX, OBJ, GItf, etc.

[0111] (2) Image resources refer to images that need to be presented at certain locations in the 3D scene.

[0112] (3) Video resources refer to video information that needs to be presented at certain locations in the 3D scene.

[0113] (4) Audio resources refer to audio information that needs to be played at certain locations in the 3D scene.

[0114] It should be noted that the above-mentioned 3D model files are required resources, while image resources, video resources and audio resources are optional resources, which can be determined according to the application scenario.

[0115] In this embodiment, the implementation method of the 3D model development tool 10 is not limited. Any development tool that can provide code editing function, code compilation function, debugging function and graphical interactive interface of the 3D model is applicable to the embodiment of the present application. For example, Android Studio or XCode can be used to write plug-ins, or a self-developed IDE for XR application development can be used. The self-developed IDE needs to have the following functions: code editing function, code compilation function, debugging function and graphical interactive interface of the 3D model.

[0116] After obtaining the 3D scene static resources required for developing XR applications, 3D scene dynamic information and application logic code can be added to these static resources through the content generator 20, and finally the application content of the XR application is obtained. The application content of the XR application can also be called the resource package of the XR application.

[0117] In this embodiment, if Figure 1 As shown, one input of the content generator 20 is a 3D scene static resource. Based on the runtime environment provided by the runtime container 30, 3D scene dynamic information is added to the 3D scene static resource to obtain 3D scene resource data including the 3D scene static resource and the 3D scene dynamic information. Figure 1 As shown, another input of the content generator 20 is the application logic code. Based on the runtime environment provided by the runtime container 30, the application logic code is added to the 3D scene resource data to obtain the application content of the XR application.

[0118] In this embodiment, the internal implementation architecture of the content generator 20 is not limited. Figure 6d As shown, an implementation structure of a content generator 20 includes: a 3D scene effect editing module 21, a 3D application logic editing module 22, a content output module 23 and a runtime container 30. In the hierarchical architecture, the 3D scene effect editing module 21 and the 3D application logic editing module 22 are located above the runtime container 30, and the runtime container 30 is required to provide a runtime environment for them.

[0119] The 3D scene effect editing module 21 is used to respond to the XR application generation operation, load the 3D scene static resources, and edit the 3D scene dynamic information for the 3D scene static resources based on the runtime environment provided by the runtime container 30 to obtain 3D scene resource data.

[0120] The 3D application logic editing module 22 is communicatively connected to the 3D scene effect editing module 21, and is used to load 3D scene resource data, and based on the runtime environment provided by the runtime container 30, edit the application logic code for the 3D scene resource data to obtain the application content of the XR application.

[0121] The content output module 23 is communicatively connected to the 3D application logic editing module 22, and is used to output the application content of the XR application to the application generation platform 40, so that the application generation platform 40 generates the XR application according to the application content and the runtime container 30. The application content of the XR application includes 3D scene resource data and application logic code. Among them, the 3D scene resource data includes but is not limited to: the organization description file of the 3D scene, mesh data, material data, map data, video data and other information. Among them, the organization description file of the 3D scene includes but is not limited to: 3D scene organization, lighting settings, rendering settings, camera movement, physical collision, etc. Material data includes but is not limited to: glass material, metal material and other information. Among them, the application logic code data can be written in JS language but is not limited to, and can be expressed as xxx.js.

[0122] During the application content generation process, the role of the runtime container 30 is to provide a runtime environment for the intermediate data that appears in the XR application generation process, so that the intermediate data can present the running effect, and then determine whether it is necessary to adjust the 3D scene dynamic information or application logic code based on the running effect, and finally obtain application content with running effects that meet the requirements.

[0123] For the 3D scene effect editing module 21, it is specifically used to: respond to the loading operation of the 3D scene static resource, start the runtime container 30, and run the 3D scene static resource in the runtime environment provided by the runtime container 30 to obtain a 3D static picture; respond to the editing operation on the 3D static picture, edit the 3D scene dynamic information for the 3D scene static resource to obtain the first intermediate state resource data; respond to the scene effect viewing operation, re-call the runtime container 30, run the first intermediate state resource data in the runtime environment provided by the runtime container 30, and obtain the first intermediate state 3D picture; when the first intermediate state 3D picture does not meet the scene effect, adjust the 3D scene dynamic information to meet the scene effect to obtain the 3D scene resource data.

[0124] Optionally, the 3D scene effect editing module 21 is used to respond to the project creation operation, create the project, and name the project. For example, the 3D scene can be used as the name of the project, such as AAA; respond to the import operation of the 3D scene static resources, import the 3D scene static resources, and these static resources include but are not limited to: various 3D models, etc.; start the runtime container 30, run the 3D scene static resources in the runtime environment provided by the runtime container 30, and display the 3D static picture on the interactive interface, and the 3D static picture contains these 3D models. In this embodiment, the content generator provides an interactive interface, which is a 3D interface with three coordinate axes xyz. Preferably, the 3D scene itself is a 3D model. When displaying the 3D scene, the center of the 3D scene can be at the origin position of the xz plane of the editing interface, and the y value of the ground plane is 0. Further, on this basis, the 3D scene effect editing module 21 edits dynamic information for these 3D models, and finally obtains the target 3D scene resource data that meets the requirements.

[0125] In this embodiment, the content generator 20 provides an interactive interface and can also display the first intermediate state 3D picture. Further, in response to the editing operation on the 3D static picture, the 3D scene dynamic information is edited for the 3D scene static resource, including: displaying the editing control on the 3D static picture, responding to the triggering operation of the editing control, displaying the dynamic information editing interface, and displaying various editable information items on the dynamic information editing interface; in response to the configuration operation of these information items, obtaining the information configured by these information items as 3D scene dynamic information, and superimposing these 3D scene dynamic information with the 3D scene static resource to form 3D scene resource data.

[0126] Depending on the XR application scenario, the interface form of the above dynamic information editing interface and the information items displayed will be different, and there is no limitation on this. Take the information items as examples: for example, it can include information items for configuring trigger actions, and the triggering methods that can be configured for this information item include but are not limited to: sliding trigger, long press trigger, drag trigger and multiple click trigger; for another example, it includes information items for configuring the display effect of 3D models, and the display methods that can be configured for this information item include but are not limited to: animation, sound effects, joining a meeting, etc.; for another example, it includes information items for configuring the ending form of the 3D model, and the ending forms that can be configured for this information item include but are not limited to: hiding at the end, closing at the end, looping, etc. In addition, according to the application scenario, you can also edit relevant dynamic information such as camera control, lighting control, water control, scene placeholders, pathfinding systems, etc. for 3D scene static resources.

[0127] The following is an exemplary description of the process of editing the above-mentioned 3D scene dynamic information for 3D scene static resources:

[0128] (1) Camera control: In response to the camera control editing operation for the 3D model, the relevant camera control information is edited for the 3D model, so as to provide the 3D model with rich camera control capabilities in the 3D scene. The relevant camera control information edited for the 3D model includes but is not limited to: control information for controlling the 3D model to switch between different perspectives, control information for controlling the 3D model to move on the camera preset track, and control information for controlling the 3D model to move with other 3D models or other scene objects. In this way, when presenting the 3D scene, when running to these camera control information, the 3D rendering engine can be called to execute these camera control information, and the 3D model can be controlled to switch between different perspectives, move on the preset track, or move with other 3D models or other scene objects, etc.

[0129] (2) Lighting control: The 3D rendering engine provided by the runtime container 30 supports two types of lighting: real-time lighting and baked lighting. Real-time lighting supports directional light sources, and baked lighting supports directional light, point light, spot light, and area light. In response to the lighting control editing operation for the 3D model, the relevant lighting control information is edited for the 3D model, such as selecting the light source type for the 3D model, editing the parameters such as the color, illumination angle, illumination range, and illumination intensity of the light source, so as to render the 3D model in the 3D scene with the lighting effect that meets the requirements.

[0130] (3) Water body control: The 3D rendering engine provided by the runtime container 30 supports water body materials. Using water body materials based on plane meshes can quickly achieve water surface rendering effects. Select Shader Graphs or Water Shader under the Material option to use water body materials. In this embodiment, the parameters involved in the water body material include but are not limited to: Deep Color: deep water color; Shallow Color: shallow water color; Strength: currently ineffective; Smoothness: smoothness; Displacement: wave movement range; NormalSteength: wave normal strength; Normal Tiling: wave normal map tiling coefficient. In response to the water body control editing operation for the 3D model, edit the relevant water body control information for the 3D model, such as selecting a water body shader for the 3D model, editing parameters such as water body color, smoothness, wave movement range, wave normal strength, etc., so as to render the 3D model in the 3D scene with a water surface rendering effect that meets the requirements.

[0131] (4) Scene placeholder editing: Placeholder information needs to be added to the 3D scene, such as placeholder information for 3D models, placeholder information for cameras, and placeholder information for images, videos, or other objects for use by the application layer. The specific location in the 3D scene where the placeholder information is set varies depending on the application's product requirements document (PRD). For example: 1) Image placeholders are used to mark the locations in the 3D scene where images need to be placed; 2) Video placeholders are used to mark the locations in the 3D scene where videos need to be placed; 3) Red envelope placeholders are used to mark the locations in the 3D scene where red envelopes need to be displayed; 4) Camera placeholders: multiple camera placeholders can be defined in a 3D scene so that the camera perspective can be switched on these camera placeholders during runtime; 5) 3D model placeholders: used to mark the locations of corresponding 3D models in the 3D scene, which can implement operations such as moving, rotating, and scaling the models, and can also support subsequent updates of the 3D models; 6) Clickable area placeholders: 3D models in a 3D scene can add clickable components to mark clickable areas outside the 3D model in the 3D scene, as well as locations for collision detection in the 3D scene. In response to the placeholder editing operation on the 3D scene, relevant placeholder information is edited for the 3D scene. For example, placeholder information such as 3D model placeholders, picture placeholders, video placeholders, red envelope placeholders, camera placeholders, and clickable area placeholders are set in the 3D scene, so as to display 3D models, pictures, videos, red envelopes and other objects in reasonable positions in the 3D scene and perform rendering effects such as switching the camera perspective of the 3D model in the camera placeholder.

[0132] (5) Pathfinding system editing: Set three different areas according to the map of the 3D scene: 1) Walkable: indicates that the current area allows specific model objects (such as character models) to walk on it, such as the ground surface; 2) Not Walkable: indicates obstacles (such as walls), indicating that specific model objects cannot pass through; 3) Jump: indicates that the current area allows specific model objects to jump over, such as thresholds or gullies. In response to the pathfinding editing operation for the 3D scene, edit the relevant pathfinding information for the 3D scene, for example, set the area in the 3D scene that allows specific model objects to pass through, the area that does not allow passing through, or the area that can be skipped, so as to present the pathfinding rendering effect of the specific model objects in the 3D scene.

[0133] It is explained here that in the above-mentioned process of editing the 3D scene static resources, the 3D scene effect editing module 21 in the content generator 20 can start the runtime container 30, and run the first intermediate state resource data obtained after adding the above-mentioned dynamic information in the runtime environment provided by the runtime container 30. For example, the 3D rendering engine provided by the runtime container 30 can be called to render the first intermediate state resource data to obtain a first intermediate state 3D picture. The above-mentioned dynamic information is continuously corrected according to the rendering effect of the first intermediate state 3D picture until a rendering effect that meets the requirements is obtained. The dynamic information at this time is used as the final dynamic information, and the final dynamic information and the 3D scene static resources form the 3D scene resource data in the application content.

[0134] In an optional embodiment, the above-mentioned dynamic information editing interface can be independent of the interface presenting the 3D static picture, or the above-mentioned dynamic information editing interface can be implemented by being embedded in the interface presenting the 3D static picture, and there is no limitation on this. Regardless of the interface form, a refresh control or an effect viewing control can be set on the above-mentioned dynamic information editing interface or the interface presenting the 3D static picture. The application developer can initiate the operation of viewing the 3D scene effect after adding the 3D scene dynamic information by clicking or long pressing these controls. The 3D scene effect editing module 21 can respond to the scene effect viewing operation, re-call the runtime container 30, run the first intermediate state resource data in the runtime environment provided by the runtime container 30, and obtain the first intermediate state 3D picture. The first intermediate state 3D picture reflects the 3D scene effect after adding the 3D scene dynamic information to the 3D scene static resource.

[0135] In this embodiment, the application developer can manually determine whether the first intermediate state 3D picture meets the scene effect, and if it is determined that the first intermediate state 3D picture does not meet the scene effect, adjust the 3D scene dynamic information, regenerate the first intermediate state resource data, and run the regenerated first intermediate state resource data in the runtime environment provided by the runtime container 30, until the first intermediate state 3D picture that meets the scene effect is obtained, and the 3D scene dynamic information and the 3D scene static resources at this time form the 3D scene resource data. Alternatively, a functional module or component for scene effect recognition and judgment of various 3D pictures can also be generated, and the functional module or component automatically captures the picture state of the first intermediate state 3D picture, and determines whether the first intermediate state 3D picture meets the scene effect according to the picture state.

[0136] For the 3D application logic editing module 22, it is specifically used to: respond to the loading operation of 3D scene resource data, start the runtime container 30, and run the 3D scene resource data in the runtime environment provided by the runtime container 30 to obtain a first intermediate 3D picture; respond to the editing operation of the application logic code, generate second intermediate resource data according to the 3D scene resource data and the application logic code, and re-call the runtime container 30, and run the second intermediate resource data in the runtime environment provided by the runtime container 30 to obtain a second intermediate 3D picture; when the second intermediate 3D picture does not meet the interactive effect, adjust the application logic code to meet the interactive effect to obtain the application content of the XR application.

[0137] In this embodiment, the running effect of the second intermediate state resource data, that is, the running effect of the application logic code in the 3D scene is divided into two categories, one is scene control, and the other is scene interaction.

[0138] Scene control: Control the 3D model in the 3D scene according to user input. This means that the application logic code has the function of responding to user input and controlling the 3D model in the 3D scene according to the user input. There is no limit to the way to control the 3D model in the 3D scene. For example, the 3D model can be controlled to move, jump, etc., or the camera perspective can be switched. For example, in Figure 5In the scene shown, the character model can be controlled to move according to the user's operation of the joystick (an example of user input), and the new position coordinates of the character model are calculated according to the user input, such as the world coordinates [0.15, 0.22, 0.31], and the character model is moved from the original position coordinates to the new position coordinates. It should be noted that the user input method will be different depending on the target device that displays the 3D scene. If the target device is a mobile terminal such as a mobile phone, the user can input through gestures, voice or touch; if the target device is a VR device or AR device, the user can input through the buttons on the handle or input through posture. Taking touch input as an example, it can be operations such as clicking, long pressing or double-clicking on the 3D scene interface by the user, or it can be a user triggering certain controls in the 3D scene.

[0139] Scene interaction: mainly refers to triggering various response events or interactive information based on user input or 3D models manipulated by users. This means that the application logic code has the function of responding to user input or monitoring the status of 3D models manipulated by users, and triggering response events or interactive information based on user input or the status of 3D models. For example: 1) The user clicks on the 3D model to control the display or hiding of the 3D model, or to display related special effects; 2) When the user manipulates a 3D model to approach a certain area or object, red envelope information or other interactive information is displayed in the 3D scene.

[0140] Based on the above, when the second intermediate state 3D picture does not meet the interactive effect, exemplary cases of adjusting the application logic code include but are not limited to: when the position of the 3D model is not ideal, modify the position of the interaction with the 3D model in the application logic code, the trigger operation type of the 3D model, etc.; when the display of red envelope information in the 3D scene does not meet the application requirements, modify the red envelope information in the application logic code to flip card information, etc., until the application logic code that meets the interactive effect is obtained, and the application logic code and the 3D scene resource data at this time form the application content of the XR application.

[0141] In this embodiment, the content generator 20 provides an interactive interface, and the first intermediate state 3D picture and the second intermediate state 3D picture can be displayed on the interactive interface. Similarly, regarding the method of identifying whether the second intermediate state 3D picture meets the interactive effect, please refer to the method of identifying whether the first intermediate state 3D picture meets the scene effect mentioned above, which will not be repeated here.

[0142] In this embodiment, the application logic code is pre-written by the application developer. In addition to providing the runtime environment, the runtime container of this embodiment can also provide the application developer with the API required for developing XR applications. For the convenience of description and distinction, these APIs for application developers are called the first type of API. Application developers can write the application logic code required for XR applications based on the first type of API. Among them, the first type of API is obtained by encapsulating the second type of API. The second type of API is the API provided to the outside by the software engine provided by the runtime container 30. The software engine provided by the runtime container can be called through the second type of API, and then these software engines provide intermediate resource data or the runtime environment required for the XR application. Since the first type of API is obtained by encapsulating the second type of API, its number is much smaller than that of the second type of API, and the first type of API is more concrete and easy to understand, so that application developers can write application logic code more simply and efficiently, reducing the difficulty of developing XR applications.

[0143] It is explained here that, depending on the different implementation architectures of the runtime container 30, the manner of running the above-mentioned 3D scene static resources, 3D scene resource data, first intermediate resource data and second intermediate resource data in the runtime environment provided by the runtime container 30 may be different. Figure 2 The implementation architecture of the runtime container 30 is shown and described in detail.

[0144] When editing 3D scene dynamic information:

[0145] The 3D scene effect editing module 21 responds to the loading operation of the 3D scene static resources and starts the runtime container 30. After the runtime container 30 is started, the Framework layer perceives the loading event of the 3D scene static resources, which is a specific example of the aforementioned target event, and determines at least one first-class API corresponding to the event, for example, including but not limited to: 3D scene API, life cycle management API and resource management API, etc.; then, according to the logical relationship between these APIs, the function entities of these APIs are executed, and the second-class API is encapsulated in the function entities of these APIs, for example, the function entity of the 3D scene API encapsulates the second-class API corresponding to the 3D rendering engine, the function entity of the life cycle management API encapsulates the second-class API corresponding to the life cycle management engine, and the function entity of the resource management API encapsulates the second-class API corresponding to the resource management engine. The second-class API encapsulated in these function entities is called the target API. When any target API is executed, the Framework layer provides the target API to the runtime environment layer, and the runtime environment layer responds to the event of loading the 3D scene static resources by calling the corresponding software engine according to the target API. Exemplarily, the runtime environment layer calls the 3D rendering engine to render the 3D scene static resources to obtain a 3D static image, and calls the lifecycle management engine to manage the lifecycle of the 3D static image, such as displaying and closing; and calls the resource management engine to perform resource management on the 3D scene static resources, such as local storage, caching, etc.

[0146] The 3D scene effect editing module 21 responds to the scene effect viewing trigger operation and re-calls the runtime container 30. After the runtime container 30 is re-called, the Framework layer perceives the event of viewing the 3D scene effect after adding the 3D scene dynamic information, which is a specific example of the aforementioned target event, and determines at least one first-class API corresponding to the event, for example, including but not limited to: 3D scene API, life cycle management API and resource management API, etc.; then, according to the logical relationship between these APIs, the function entities of these APIs are executed, and the second-class API is encapsulated in the function entities of these APIs, for example, the function entity of the 3D scene API encapsulates the second-class API corresponding to the 3D rendering engine, the function entity of the life cycle management API encapsulates the second-class API corresponding to the life cycle management engine, and the function entity of the resource management API encapsulates the second-class API corresponding to the resource management engine. The second-class API encapsulated in these function entities is called the target API. When any target API is executed, the Framework layer provides the target API to the runtime environment layer, and the runtime environment layer calls the corresponding software engine according to the target API to respond to the event of loading the 3D scene static resources. Exemplarily, the runtime environment layer calls the 3D rendering engine to render the first intermediate state resource data to obtain a first intermediate state 3D image, and calls the lifecycle management engine to manage the lifecycle of the first intermediate state 3D image, such as displaying and closing; and calls the resource management engine to perform resource management on the first intermediate state resource data, such as local storage, caching, etc.

[0147] While editing the application logic code:

[0148] The 3D application logic editing module 22 responds to the loading operation of the 3D scene resource data and starts the runtime container 30. After the runtime container 30 is started, the Framework layer senses the loading event of the 3D scene resource data, which is a specific example of the aforementioned target event, and determines at least one first-class API corresponding to the event, for example, including but not limited to: 3D scene API, lifecycle management API, resource management API, UI interaction API, and event interaction API, etc.; then, according to the logical relationship between these APIs, the function entities of these APIs are executed, and the function entities of these APIs are encapsulated with the second-class API, for example, the function entity of the 3D scene API encapsulates the second-class API corresponding to the 3D rendering engine, the function entity of the lifecycle management API encapsulates the second-class API corresponding to the lifecycle management engine, the function entity of the resource management API encapsulates the second-class API corresponding to the resource management engine, the function entity of the UI interaction API encapsulates the second-class API corresponding to the 2D UI engine, and the function entity of the event interaction API encapsulates the second-class API corresponding to the event management engine. The second type of API encapsulated in these function entities is called the target API. When any target API is executed, the Framework layer provides the target API to the runtime environment layer, and the runtime environment layer calls the corresponding software engine according to the target API to respond to the loading event of the 3D scene static resource. Exemplarily, the runtime environment layer calls the 3D rendering engine to render the 3D scene resource data to obtain the first intermediate state 3D picture, and calls the life cycle management engine to manage the life cycle of the first intermediate state 3D picture, such as display and closing; and calls the resource management engine to perform resource management on the 3D scene resource data, such as local storage, caching, etc., and further the event engine responds to the interactive events during the operation of the 3D scene resource data, such as responding to the interactive events such as long press, click, rotation, etc. on the interface. When the XR application is implemented as a 3D scene embedded in the host 2D application, the application logic code may contain the function of UI interaction with the host 2D application, then the 2D UI engine can respond to the UI interaction between the application logic code and the host 2D application, and respond to it.

[0149] The 3D application logic editing module responds to the editing operation of the application logic code and re-calls the runtime container 30. After the runtime container 30 is re-called, the Framework layer perceives the editing event of the application logic code, which is a specific example of the aforementioned target event, and determines at least one first-class API corresponding to the event, such as but not limited to: 3D scene API, lifecycle management API, resource management API, UI interaction API, and event interaction API, etc.; then, according to the logical relationship between these APIs, the function entities of these APIs are executed, and the second-class APIs are encapsulated in the function entities of these APIs. The second-class API encapsulated in these function entities is called the target API. When any target API is executed, the Framework layer provides the target API to the runtime environment layer, and the runtime environment layer calls the corresponding software engine according to the target API to respond to the event of loading 3D scene static resources. For a detailed description, please refer to the above embodiment, which will not be repeated here.

[0150] Based on the above operations, the application content of the XR application can be generated, and then the application generation platform 40 packages the application content with the runtime container to generate the XR application. According to the application form of the XR application, different methods can be used to deploy it to the target device. After the XR application is deployed to the target device, the XR application can be run on the target device. Regardless of the method, the running process of the XR application refers to starting the runtime container 30 in the XR application. The runtime container 30 runs between the application content of the XR application and the operating system of the target device where the XR application is located. The runtime container 30 provides a runtime environment for the application content of the XR application, runs the application content in the runtime environment, and then presents the 3D scene and the interaction or control in the 3D scene to the user. Among them, the framework of the XR application runtime is as follows: Figure 4 As shown, the top layer is the application content of the XR application, the middle layer is the runtime container 30, and the bottom layer is the operating system of the target device that carries the XR application. The runtime container 30 runs on the operating system of the target device and provides a runtime environment for the application content of the XR application. The application content of the XR application runs in the runtime environment, displays the 3D scene to the user and interacts and / or controls based on the 3D scene. The interaction here includes user-triggered interaction and also includes interaction and / or control automatically triggered in the 3D scene according to application requirements.

[0151] In the above framework, the Framework layer 32 of the runtime container 30 senses the target event during the running of the XR application, runs the function entity of at least one first-class API corresponding to the target event, and provides the target API encapsulated in the function entity to the runtime environment layer 33, where the target API refers to the second-class API encapsulated in the function entity. The runtime environment layer 33 is used to call the corresponding software engine in the Libraries layer 31 to respond to the target event according to the target API provided by the Framework layer 32. Specifically, the runtime environment layer 33 can call the corresponding software engine in the Libraries layer 31 to respond to the target event according to the target API, and transmit the response result to the application interface of the XR application through the Framework layer 32.

[0152] During the running of the XR application, the target events that the Framework layer 32 can perceive include but are not limited to: trigger events for running the XR application, interaction events with target objects in the XR application, trigger events for closing the XR application, etc. Among them, the target objects in the XR application include but are not limited to: at least one of a 3D model, a 2D object, and an interactive area in a 3D scene. Figure 5 As shown, the 3D model can be a character model, an object model, or a whole 3D scene model; correspondingly, the 2D objects include but are not limited to: pictures, audio or video that need to be displayed in the 3D scene.

[0153] In an optional embodiment, the XR application is implemented as an independent application form, and the user can click, double-click, or long press the icon of the XR application to initiate a trigger operation to run the XR application; the Framework layer 32 can respond to the trigger operation of the XR application icon and generate a trigger event to run the XR application.

[0154] In another optional embodiment, the XR application is implemented as an application form in which a 3D scene (or XR content) is embedded in a host 2D application. In this application form, access entry information of the 3D scene (or XR content) is provided in the host 2D application, and the user can click, double-click, or long press the access entry information to initiate a trigger operation to run the XR application; the Framework layer 32 can respond to the trigger operation of the access entry information of the XR application or XR content, and generate a trigger event to run the XR application.

[0155] Depending on the application scenario to which the XR application belongs, the first category API corresponding to the trigger event of running the XR application will be different, and the embodiments of the present application do not limit this. For example: the first category API corresponding to the trigger event of running the XR application includes: 3D scene API, lifecycle management API and resource management API, and the function entities of these APIs encapsulate the second category API corresponding to the software engine. For example, the function entity of the 3D scene API encapsulates the second category API corresponding to the 3D rendering engine, the function entity of the lifecycle management API encapsulates the second category API corresponding to the lifecycle management engine, and the function entity of the resource management API encapsulates the second category API corresponding to the resource management engine. The Framework layer 32 runs the function entities of the first category API in sequence according to the application logic, and when running to the second category API encapsulated in these function entities, the second category API is used as the target API and provided to the runtime environment layer 33. The runtime environment layer 33 responds to the trigger event of running the XR application by calling the corresponding software engine according to the target API. Exemplarily, the runtime environment layer 33 calls the 3D rendering engine to call the lifecycle management engine to download the resource package of the XR application, calls the 3D rendering engine to render the downloaded resources, and feeds back the download and resource loading status to the Framework layer 32 through the runtime environment layer to complete the 3D scene initialization of the XR application. During this process, the resource management engine can also be called to manage the resource package of the XR application, such as local storage, caching, etc.

[0156] Depending on the application scenario to which the XR application belongs, the first-class API corresponding to the interactive event of the target object in the XR application will be different, and the embodiments of the present application do not limit this. For example: at least one first-class API corresponding to the interactive event, for example, includes but is not limited to: 3D scene API, UI interaction API, and event interaction API, etc., and the function entity of these APIs encapsulates the second-class API corresponding to the 3D rendering engine, the function entity of the UI interaction API encapsulates the second-class API corresponding to the 2D UI engine, and the function entity of the event interaction API encapsulates the second-class API corresponding to the event management engine. The Framework layer 32 runs the function entities of the first-class API in sequence according to the application logic, and when running to the second-class API encapsulated in these function entities, the second-class API is used as the target API and provided to the runtime environment layer 33. The runtime environment layer 33 responds to the interactive event by calling the corresponding software engine according to the target API. Exemplarily, the runtime environment layer calls the 3D rendering engine to render the resource data involved in the interactive events, and calls the event engine to respond to the interactive events, such as responding to interactive events such as long press, click, rotation, etc. on the interface, and when the interactive events include UI interactions with the host 2D application, the 2D UI engine can also be called to respond to UI interactions with the host 2D application.

[0157] For the runtime environment layer 33, the method of calling the corresponding software engine in the Libraries layer 31 to respond to the target event will be different according to the different target APIs. The following is an example of some software engines included in the Libraries layer 31:

[0158] When the target API includes the second type of API corresponding to the download engine in the Libraries layer 31, calling the download engine to download the application content of the XR application from the server;

[0159] When the target API includes the second type of API corresponding to the storage engine in the Libraries layer 31, calling the storage engine to perform storage management on the application content of the XR application;

[0160] When the target API includes a second type of API corresponding to the lifecycle management engine in the Libraries layer 31, calling the lifecycle management engine to perform lifecycle management on the XR application;

[0161] When the target API includes the second type of API corresponding to the 3D rendering engine in the Libraries layer 31, calling the 3D rendering engine to perform 3D rendering on the XR application;

[0162] When the target API includes the second type of API corresponding to the AI ​​inference engine in the Libraries layer 31, calling the AI ​​inference engine to perform AI inference processing on the XR application;

[0163] When the target API includes the second type API corresponding to the 2D UI engine in the Libraries layer 31, the 2D UI engine is called to process the UI interaction between the XR application and the host 2D application;

[0164] When the target API includes the second type of API corresponding to the event engine in the Libraries layer 31, the event engine is called to process the event callback logic in the XR application.

[0165] In the following embodiments, an XR application is an application form in which a 3D scene is embedded in a host 2D application. Assuming that the host 2D application is an e-commerce app, in order to increase the fun and user experience of the e-commerce app, a 3D scene can be embedded in the e-commerce app, such as an AR fitting scene, a VR shopping scene, etc. The operation process of the runtime container provided in the embodiment of the present application is described by taking this scenario as an example.

[0166] An access portal to the XR application is set on a certain page of the e-commerce APP. After the user clicks on the access portal, he enters the 3D scene space presented by the XR application, such as Figure 5 In this embodiment, the application content (or resource package) of the XR application includes 3D scene resource data and application logic code written in JS, which is developed based on the above development system. During the operation of the e-commerce APP, when the user triggers access to the 3D scene space of the XR application, the 3-layer architecture in the runtime container can be called, and the 3-layer architecture supports the display and interaction of the 3D scene space, including but not limited to the following aspects:

[0167] 1. XR application lifecycle management

[0168] The runtime container responds to the trigger operation of the XR application, calls the API corresponding to the download library in the second category of APIs, downloads the resource package of the XR application, completes the resource loading of the XR application, and calls the API corresponding to the 3D rendering engine in the second category of APIs, and uses the 3D rendering engine to render 3D scenes for the XR application, so as to display the 3D scene space on the relevant pages of the e-commerce APP, and responds to the exit or close operation of the XR application, and performs actions such as cleaning up related resources (such as memory, CPU) when the XR application exits, so as to realize the management of the XR application life cycle.

[0169] Furthermore, the management process of the XR application lifecycle is explained in combination with the three-layer architecture of the runtime container. Figure 6aAs shown, the process of initializing the XR application includes: the framework layer enters the 3D scene in response to the trigger operation of entering the 3D scene space, triggers the runtime VM to initialize the 3D scene, and the runtime VM calls the download library in the software library layer to download the resource package of the XR application; the runtime VM calls the 3D rendering engine to render the 3D scene according to the downloaded resources, and updates the resource download and rendering status, and provides the resource download and rendering status to the framework layer; after the resource package of the XR application is downloaded, the download library notifies the runtime VM that the resource package download is complete; the runtime VM notifies the framework layer to complete the initialization of the 3D scene; after that, the framework layer completes the UI operation on the 3D scene, etc. It is explained here that the resource package of the XR application can be encrypted and compressed, so before rendering, the runtime VM can also call the corresponding engine to decrypt and decompress the resource package.

[0170] 2. The user triggers the first type of operation in the 3D scene space. The first type of operation refers to the operation that triggers a function call. The called function is responsible for responding to the first type of operation and responding to the first type of operation.

[0171] by Figure 5 Taking the 3D scene space shown in the figure as an example, the first type of operations triggered by the user include but are not limited to the following:

[0172] The user operates the joystick in the 3D scene to move the character model. This operation triggers a series of behaviors, such as position and scene changes in the roaming state, which can be responded to and processed by the callback function;

[0173] The user manipulates the camera's perspective, which triggers scene changes that can be responded to and processed by callback functions;

[0174] The user clicks the screen to trigger the play function, which will trigger the playing of music or special effects and map switching, etc. These changes can be responded to and processed by the callback function.

[0175] Furthermore, the processing of user-triggered function calls is explained in combination with the three-layer architecture of the runtime container. Figure 6b As shown, the process of the user triggering the first type of operation includes:

[0176] Case 1: In response to the user's operation of moving the character model, the framework layer notifies the runtime VM of the user's operation of moving the character model, and the runtime VM calls the 3D rendering engine in the software library layer to re-render the position of the character model;

[0177] Case 2: In response to the user's operation of switching the camera perspective, the framework layer notifies the runtime VM of the user's operation of switching the camera perspective, and the runtime VM calls the 3D rendering engine in the software library layer to re-render the 3D scene or 3D model to obtain the 3D scene or 3D model under the new perspective;

[0178] Case 3: The framework layer responds to the user's operation of playing music and special effects, and notifies the runtime VM of the user's operation of playing music and special effects. The runtime VM calls the multimedia library and 3D special effects library in the software library layer to play music and special effects.

[0179] 3. The user triggers the second type of operation in the 3D scene space. The second type of operation refers to the operation that triggers the event callback. The called back event is responsible for responding to the second type of operation and responding to the second type of operation.

[0180] by Figure 5 Taking the example shown above, situations in which a user initiates the second type of operation to trigger an event callback include but are not limited to: the user operates the character model to move, the 3D rendering engine performs collision detection, and when it finds that the character model approaches or leaves the specified model object, it triggers an event callback to the upper application logic code layer for response, such as popping up a red envelope, coupon, or venue message.

[0181] Furthermore, the processing of user-triggered event callbacks is described in conjunction with the three-layer architecture of the runtime container. Figure 6c As shown, the processing process of the user triggering the second type of operation includes:

[0182] Case 1: VM calls the 3D rendering engine in the software library layer to monitor whether the 3D model (taking the character model as an example) collides with the set object, which is referred to as physical collision detection; when it is detected that the character model is close to the preset object, it is fed back to the framework layer through the runtime VM; the framework layer executes the corresponding code data in the target application logic code data to respond, such as displaying red envelope information.

[0183] Case 2: The VM calls the 3D rendering engine in the software library layer to monitor whether the 3D model (taking the character model as an example) collides with the set object, which is referred to as physical collision detection; when it is detected that the character model leaves the preset object, it feeds back to the framework layer through the runtime VM; the framework layer calls the corresponding code data in the target application logic code data to respond, such as canceling the display of red envelope information.

[0184] The XR application development system provided in the embodiment of the present application has the following beneficial effects:

[0185] (1) Cross-device and high performance: Implement the basic capabilities in the Libraries layer through C++, and optimize them to achieve better performance, such as parallel computing acceleration of the device's instruction set, to achieve cross-device from the code running level; further, when encapsulating these basic capabilities to obtain APIs, you can perform secondary encapsulation on the APIs of different devices, so that XR applications can also be cross-device at the interaction level, thereby improving the performance of XR applications;

[0186] (2) Fast iteration: Choose to use dynamic programming languages ​​such as Python or JS to implement the application logic code and runtime VM of XR applications, and use the runtime VM as the glue layer to call the basic capabilities in the underlying Libraries layer implemented in C++. The iteration frequency of the basic capabilities in the Libraries layer is low, and they can be iterated through version updates. However, the update frequency of the application logic of XR applications is high, and it is implemented using dynamic programming languages. With the advantages of dynamic programming languages, it is conducive to the rapid release and update of application logic while ensuring global high performance.

[0187] (3) Lightweight: According to the development requirements of XR applications, the software engines or software libraries in the Libraries layer are lightweight, such as discarding some unnecessary software libraries and introducing some software libraries through grafting rather than direct transplantation. In addition, the software engines or software libraries in the Libraries layer are released dynamically instead of being released together with the installation package of the XR application or the installation package of the host 2D application, further achieving lightweight. Furthermore, when an AI inference engine is included, the MNN engine is used to implement image processing, matrix calculation and other operations based on MNN, which is conducive to reducing the package size of the end-side AI inference engine and further achieving lightweight.

[0188] (4) Low threshold: By encapsulating the basic capabilities in the Libraries layer and exposing the first class of APIs to application developers through the Framework layer, it abstractly encapsulates the basic capabilities such as rendering, physics, and animation provided by the 3D rendering engine, and provides a few concepts such as XRScene, XRModel, XRAnchor, XREvent, and XRConfig, which are easy for XR application developers to understand and use.

[0189] (5) As the XR application runs, the stability of the XR application can be monitored, and multi-dimensional data such as the crash information, startup performance, and page performance of the XR application can be obtained in real time. Based on these monitoring data, post-operation and maintenance operations can be performed on the XR application. These operation and maintenance operations include but are not limited to: patch repair, information configuration, etc.

[0190] In this embodiment, a set of editing tool chains suitable for embedding 3D scenes in host 2D applications is constructed based on the runtime container, namely, the content generator 20, the structure and function description of which can be found in the aforementioned Figure 6d The illustrated embodiment will not be described in detail here. The content generator 20 can meet the constraints of package size, performance, effect, etc. embedded in the 2D application based on the runtime container, and has the following effects:

[0191] (1) Improved efficiency, greatly reducing the cost of art and technical communication and collaboration. By integrating the runtime container in the content generator, the 3D rendering engine in the software library layer of the runtime container can achieve WYSIWYG editing of 3D scene effects, making it easier for application developers to edit 3D scene effects and application logic code.

[0192] (2) Consistent effects: The 3D content generator and the target device reuse the same runtime container, which can ensure consistency between content editing and target device operation effects.

[0193] (3) Standard constraints: The 3D content generator embeds custom 3D model standard specifications, covering geometry, materials, lighting, cameras, animation, etc. The final 3D scene export will be verified according to the 3D model standard, ensuring the standardization of the final precipitated 3D model and meeting the constraints such as the effect and performance of the XR application running on the target device.

[0194] In addition to providing an XR application development system, the embodiments of the present application also provide an XR application development method, an XR application editing method, and an XR application running method. The following embodiments will describe the XR application development method, the XR application editing method, and the XR application running method respectively.

[0195] Figure 7a A flowchart of an XR application development method provided in an embodiment of the present application is shown in FIG. The method is applied to the above-mentioned XR application development system, such as Figure 7a As shown, the method includes:

[0196] 71a. Pre-develop a runtime container required for generating an XR application and integrate the runtime container into the content generator, where the runtime container is used to provide a runtime environment during the XR application generation and operation process;

[0197] 72a. In a content generator integrated with a runtime container, generate application content of the XR application based on a runtime environment provided by the runtime container;

[0198] 73a. Generate an XR application based on the application content and the runtime container; wherein, during the running of the XR application, the runtime container runs between the application content and the operating system of the target device where the XR application is located, and the application content runs in the runtime environment provided by the runtime container.

[0199] In an optional embodiment, in the runtime container content generator integrated with the runtime container, the application content of the XR application is generated based on the runtime environment provided by the runtime container, including: responding to the XR application generation operation, loading 3D scene static resources; based on the runtime environment provided by the runtime container, adding 3D scene dynamic information to the 3D scene static resources to obtain 3D scene resource data; based on the runtime environment provided by the runtime container, editing application logic code for the 3D scene resource data to obtain the application content of the XR application. For the detailed implementation of each step, please refer to the relevant description of the aforementioned system embodiment or the following method embodiment, which will not be repeated here.

[0200] In an optional embodiment, the XR application is generated according to the application content and the runtime container, including: integrating the runtime container and the application content into an installation package of the XR application and publishing the installation package of the XR application; and / or integrating the runtime container into an installation package of a host two-dimensional 2D application and publishing the installation package of the host 2D application, and publishing the application content to a resource server corresponding to the host 2D application, wherein the host 2D application is a 2D application that needs to embed the XR application.

[0201] Figure 7b A flowchart of an XR application editing method provided in an embodiment of the present application. The method is applied to the content generator in the above-mentioned XR application development system, and the content generator is integrated with a runtime container, which is used to provide a runtime environment during the XR application generation process or operation process, such as Figure 7b As shown, the method includes:

[0202] 71b. Respond to the 3D resource editing operation and load the 3D scene static resource;

[0203] 72b. Based on the runtime environment provided by the runtime container, add 3D scene dynamic information to the 3D scene static resource to obtain 3D scene resource data;

[0204] 73b. Based on the runtime environment provided by the runtime container, edit the application logic code for the 3D scene resource data to obtain the application content of the XR application; the application content and the runtime container form an XR application, and the runtime container in the XR application provides a runtime environment for the application content during the running of the XR application.

[0205] In an optional embodiment, based on the runtime environment provided by the runtime container, 3D scene dynamic information is added to the 3D scene static resource to obtain 3D scene resource data, including:

[0206] In response to the loading operation of the 3D scene static resource, the runtime container is started, and the 3D scene static resource is run in the runtime environment provided by the runtime container to obtain a 3D static image;

[0207] In response to the editing operation on the 3D static screen, the 3D scene dynamic information is edited for the 3D scene static resource to obtain the first intermediate state resource data;

[0208] In response to the scene effect viewing operation, the runtime container is re-invoked, and the first intermediate state resource data is run in the runtime environment provided by the runtime container to obtain the first intermediate state 3D picture;

[0209] When the first intermediate state 3D picture does not satisfy the scene effect, the 3D scene dynamic information is adjusted to obtain the scene effect to obtain the 3D scene resource data.

[0210] In an optional embodiment, based on the runtime environment provided by the runtime container, the application logic code is edited for the 3D scene resource data to obtain the application content of the XR application, including:

[0211] In response to the loading operation of the 3D scene resource data, the runtime container is started, and the 3D scene resource data is run in the runtime environment provided by the runtime container to obtain a first intermediate 3D picture;

[0212] In response to the editing operation of the application logic code, second intermediate state resource data is generated according to the 3D scene resource data and the application logic code, and the runtime container is re-invoked to run the second intermediate state resource data in the runtime environment provided by the runtime container to obtain a second intermediate state 3D picture;

[0213] When the second intermediate state 3D picture does not satisfy the interactive effect, the application logic code is adjusted to satisfy the interactive effect to obtain the application content of the XR application.

[0214] In an optional implementation, the runtime container includes: a framework layer, a runtime environment layer and a software library layer. The architecture and working principle of the runtime container can be found in the aforementioned embodiment and will not be repeated here.

[0215] Based on the above, the 3D scene static resource is run in the runtime environment provided by the runtime container to obtain a 3D static picture, including: the framework layer senses the first loading event of the 3D scene static resource, and runs at least one function entity of the first class API corresponding to the first loading event; when running to the first target API encapsulated in the function entity, the first target API is provided to the runtime environment layer, and the first target API belongs to the second class API; the runtime environment layer calls the corresponding software engine in the software library layer to respond to the first loading event according to the first target API;

[0216] Correspondingly, the first intermediate state resource data is run in the runtime environment provided by the runtime container to obtain a first intermediate state 3D picture, including: the framework layer senses the first editing event on the 3D static picture, and runs at least one function entity of the first class API corresponding to the first editing event; when running to the first target API encapsulated in the function entity, the first target API is provided to the runtime environment layer, and the first target API belongs to the second class API; the runtime environment layer calls the corresponding software engine in the software library layer to respond to the first editing event according to the first target API.

[0217] Accordingly, running the 3D scene resource data in the runtime environment provided by the runtime container to obtain a first intermediate 3D picture includes:

[0218] The framework layer senses a second loading event of the 3D scene resource data, and runs a function entity of at least one first-category API corresponding to the second loading event; when running to a second target API encapsulated in the function entity, the second target API is provided to the runtime environment layer, and the second target API belongs to the second-category API; the runtime environment layer calls the corresponding software engine in the software library layer to respond to the second loading event based on the second target API.

[0219] Correspondingly, the second intermediate state resource data is run in the runtime environment provided by the runtime container to obtain a second intermediate state 3D picture, including: the framework layer perceives the second editing event of the application logic code, and runs at least one function entity of the first category API corresponding to the second editing event; when running to the second target API encapsulated in the function entity, the second target API is provided to the runtime environment layer, and the second target API belongs to the second category API; the runtime environment layer calls the corresponding software engine in the software library layer to respond to the second editing event according to the second target API.

[0220] Figure 8 A flowchart of a method for running an XR application provided in an embodiment of the present application is shown. The method is applied to the runtime container in the above-mentioned XR application development system, such as Figure 8 As shown, the method includes:

[0221] 81. In response to a trigger operation to run the XR application, start a runtime container in the XR application to provide a runtime environment for application content in the XR application, the runtime container running between the application content and an operating system of a target device where the XR application is located;

[0222] 82. Run the application content based on the runtime environment provided by the runtime container to run the XR application.

[0223] In an optional embodiment, before responding to the trigger operation of running the XR application, the method further includes: installing the runtime container and application content of the XR application on the target device according to the installation package of the XR application, and the installation package of the XR application includes the runtime container and the application content. Accordingly, responding to the trigger operation of running the XR application can be responding to a trigger operation such as double-clicking or long pressing the icon of the XR application to trigger running the XR application.

[0224] and / or,

[0225] In an optional embodiment, before responding to the trigger operation of running the XR application, it also includes: installing a runtime container on the target device according to the installation package of the host 2D application, the host 2D application is a 2D application that needs to embed the XR application, and the installation package of the host 2D application includes a runtime container, and the application content is published to the resource server corresponding to the host 2D application for dynamic loading. During the operation of the host 2D application, the access entry information of the XR application can be displayed. Accordingly, the response to the trigger operation of running the XR application can be a response to the trigger operation of the access entry information, such as a click or a long press. In addition, in this scenario, before running the application content based on the runtime environment provided by the runtime container, it also includes an operation of downloading the application content from the resource server.

[0226] In an optional embodiment, the runtime container includes: a framework layer, a runtime environment layer and a software library layer. The architecture and working principle of the runtime container can be found in the aforementioned embodiment and will not be described in detail here.

[0227] Accordingly, the application content is run based on the runtime environment provided by the runtime container to run the XR application, including:

[0228] The framework layer senses the target event during the running of the XR application. The running target event corresponds to at least one function entity of the first-class API. The target API encapsulated in the function entity is provided to the runtime environment layer. The target API belongs to the second-class API.

[0229] The runtime environment layer calls the corresponding software engine in the software library layer to respond to the target event according to the target API provided by the framework layer to run the XR application;

[0230] The first type of API is obtained by encapsulating the second type of API, and the second type of API is the API corresponding to the software engine included in the software library layer.

[0231] The runtime environment layer calls the corresponding software engine in the software library layer to respond to the target event according to the target API provided by the framework layer, including at least one of the following operations:

[0232] When the target API includes a second type of API corresponding to the download engine in the software library layer, calling the download engine to download application content of the XR application from the server;

[0233] When the target API includes a second type of API corresponding to the storage engine in the software library layer, calling the storage engine to perform storage management on the application content of the XR application;

[0234] When the target API includes a second type of API corresponding to the lifecycle management engine in the software library layer, calling the lifecycle management engine to perform lifecycle management on the XR application;

[0235] When the target API includes a second type of API corresponding to the 3D rendering engine in the software library layer, calling the 3D rendering engine to perform 3D rendering on the XR application;

[0236] When the target API includes a second-category API corresponding to the AI ​​inference engine in the software library layer, calling the AI ​​inference engine to perform AI inference processing on the XR application;

[0237] When the target API includes a second type of API corresponding to the 2D UI engine in the software library layer, the 2D UI engine is called to process the UI interaction between the XR application and the host 2D application;

[0238] When the target API includes a second-class API corresponding to the event engine in the software library layer, the event engine is called to process the event callback logic in the XR application.

[0239] In an optional embodiment, the runtime environment layer includes at least one runtime virtual machine VM, and different runtime VMs are implemented in different dynamic programming languages, and are used to provide a runtime environment for XR applications implemented in different dynamic programming languages. Accordingly, in the case where there are multiple runtime VMs, the method further includes: the runtime environment layer schedules a target VM implemented in the same dynamic programming language as the XR application among the multiple runtime VMs according to the dynamic programming language used by the XR application, so that the target VM serves the XR application.

[0240] In addition to the above embodiments, the embodiments of the present application also provide an XR content running method, which is applied to a host application embedded with an XR runtime container, and the XR runtime container is located in the installation package of the host application and can be installed together with the installation of the host application. Among them, the implementation structure and function of the XR runtime container can refer to the runtime container in the aforementioned embodiment. In this embodiment, an XR runtime container is embedded in the host application to provide a runtime environment for the operation of XR content, and the XR content is finally presented in the host application by running the XR content in the runtime environment provided by the XR runtime container. Based on this, the XR content running method includes: running the host application; during the operation of the host application, displaying the access entry information of the XR content, for example, the access entry information can be a link on an application page provided by the host application or an icon or control with a link function, etc., which is not limited to this; in response to the triggering operation of the access entry information, starting the XR runtime container and obtaining the XR content; running the XR content based on the runtime environment provided by the XR runtime container. The detailed implementation of running XR content based on the runtime environment provided by the XR runtime container is the same or similar to the detailed implementation of "running the application content of the XR application based on the runtime environment provided by the runtime container" in the aforementioned embodiment, and will not be repeated here.

[0241] In the embodiments of the present application, the method for obtaining XR content is not limited. In an optional embodiment, the XR content is deployed on the resource server corresponding to the host application, and the method for obtaining the XR content includes: downloading the XR content from the resource server corresponding to the host application. In another optional embodiment, the XR content can also be embedded in the host application. For example, the XR content is located in the installation package of the host application and can be installed together with the installation of the host application. The method for obtaining the XR content includes: loading the XR content from the local cache.

[0242] In an embodiment of the present application, the XR content can be implemented as the application content of the XR application in the aforementioned embodiment; accordingly, the XR content is combined with the XR runtime container to be implemented as the XR application in the aforementioned embodiment.

[0243] The detailed implementation methods and beneficial effects of each step in the above method embodiment of the present application have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0244] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 71 to 73 can be device A; for another example, the execution subject of steps 71 and 72 can be device A, and the execution subject of step 73 can be device B; and so on.

[0245] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 71, 72, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0246] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the electronic device includes: a memory 1001 and a processor 1002 .

[0247] The memory 1001 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions, messages, pictures, videos, etc. for any application or method operating on the electronic device.

[0248] Processor 1002 is coupled to memory 1001 and is used to execute the computer program in memory 1001 to implement the steps in the XR application development method, the XR application editing method, or the XR application running method or the XR content running method provided in the embodiments of the present application.

[0249] For a detailed description of the XR application development method, the XR application editing method, the XR application running method, or the XR content running method, please refer to the aforementioned embodiments and will not be repeated here.

[0250] Further, if Fig. 9 As shown, the electronic device also includes: a communication component 1003, a display 1004, a power component 1005, an audio component 1006 and other components. Fig. 9 Only some components are shown schematically, which does not mean that the electronic device only includes Fig. 9 When the electronic device of this embodiment executes the XR application editing method or the XR application running method, it can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, or an IOT device, or it can also be implemented as an AR device or a VR device. When the electronic device is implemented as an AR device or a VR device, the electronic device can also include components such as an operating handle. Fig. 9When executing the XR application development method, the electronic device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc. that runs a content generator and a runtime container at the same time, or it can be implemented as a traditional server, a cloud server, or a system in which the cloud and the terminal are matched with each other, without limitation.

[0251] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above-mentioned XR application editing method or the steps in the XR application running method or the XR content running method.

[0252] The above-mentioned memory can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0253] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0254] The display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0255] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.

[0256] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0257] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program codes.

[0258] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0259] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0260] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0261] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0262] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0263] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0264] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0265] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A runtime container, It is characterized in that Applied to XR applications, after being started, the runtime container is used to provide a runtime environment for the application content in the XR application during the generation and operation of the XR application, so as to run the application content based on the runtime environment. The runtime container runs between the application content and the operating system of the target device where the XR application is located. The runtime container includes: a framework layer, a runtime environment layer, and a software library layer; The software library layer includes multiple software engines and provides second-class application programming interfaces API of the multiple software engines, so as to obtain the first-class API by encapsulating the second-class API; The framework layer is used to provide the first class API to application developers, so that the application developers can write application logic code of the XR application based on the first class API, and perceive target events during the generation or operation of the XR application, run at least one function entity of the first class API corresponding to the target event, and provide the target API encapsulated in the function entity to the runtime environment layer, where the target API belongs to the second class API; The runtime environment layer is used to call the corresponding software engine in the software library layer to respond to the target event according to the target API.

2. The runtime container according to claim 1, It is characterized in that The software library layer is further used to: provide the second type of API to the runtime environment layer, encapsulate the first type of API based on the second type of API, and provide the first type of API to the framework layer, so that the framework layer provides the first type of API to application developers; or The software library layer is also used to provide the second type of API to the runtime environment layer; the runtime environment layer is also used to encapsulate the first type of API based on the second type of API, and provide the first type of API to the framework layer, so that the framework layer can provide the first type of API to application developers.

3. The runtime container according to claim 1, It is characterized in that The framework layer senses the target event during the running of the XR application, including: In response to a trigger operation of the icon or access portal of the XR application, generating a trigger event for running the XR application; and / or In response to an interactive operation during the running of the XR application, an interactive event with a target object in the XR application is generated, where the target object includes at least one of a 3D model, a 2D object, and an interactive area in a 3D scene.

4. The runtime container according to claim 1, It is characterized in that The runtime environment layer calls the corresponding software engine in the software library layer to respond to the target event according to the target API, including at least one of the following operations: When the target API includes a second type of API corresponding to the download engine in the software library layer, calling the download engine to download application content of the XR application from the server; When the target API includes a second type of API corresponding to the storage engine in the software library layer, calling the storage engine to perform storage management on the application content of the XR application; When the target API includes a second type of API corresponding to the lifecycle management engine in the software library layer, calling the lifecycle management engine to perform lifecycle management on the XR application; When the target API includes a second type of API corresponding to the 3D rendering engine in the software library layer, calling the 3D rendering engine to perform 3D rendering on the XR application; When the target API includes a second type of API corresponding to the AI ​​reasoning engine in the software library layer, calling the AI ​​reasoning engine to perform AI reasoning processing on the XR application; When the target API includes a second type of API corresponding to the 2D UI engine in the software library layer, calling the 2D UI engine to process the UI interaction between the XR application and the host 2D application; When the target API includes a second type of API corresponding to the event engine in the software library layer, the event engine is called to process the event callback logic in the XR application.

5. The runtime container according to any one of claims 1 to 4, It is characterized in that The runtime environment layer includes at least one runtime virtual machine VM, and different runtime VMs are implemented using different dynamic programming languages, and are used to provide a runtime environment for XR applications implemented using different dynamic programming languages.

6. The runtime container according to claim 5, It is characterized in that In the case where there are multiple at least one runtime VMs, the runtime environment layer further includes: The VM scheduling module is used to schedule a target VM implemented in the same dynamic programming language as the XR application among multiple runtime VMs according to the dynamic programming language used by the XR application, so that the target VM provides a runtime environment for the XR application.

7. A method for running an XR application, It is characterized in that include: In response to a trigger operation to run an XR application, a runtime container in the XR application is started to provide a runtime environment for application content in the XR application, wherein the runtime container runs between the application content and an operating system of a target device where the XR application is located; The application content is run based on the runtime environment provided by the runtime container to run the XR application, and the runtime container is the runtime container according to any one of claims 1 to 6.

8. The method according to claim 7, It is characterized in that Before responding to the trigger operation of running the XR application, the method further includes: Installing a runtime container and application content of the XR application on the target device according to the installation package of the XR application, where the installation package of the XR application includes the runtime container and the application content; and / or, The runtime container is installed on the target device according to the installation package of the host 2D application, the host 2D application is a 2D application that needs to embed the XR application, the installation package of the host 2D application includes the runtime container, and the application content is published to the resource server corresponding to the host 2D application for dynamic loading.

9. The method according to claim 7, It is characterized in that The runtime container includes: a framework layer, a runtime environment layer and a software library layer; Accordingly, running the application content based on the runtime environment provided by the runtime container to run the XR application includes: The framework layer senses a target event during the running of the XR application, runs a function entity of at least one first-category API corresponding to the target event, and provides a target API encapsulated in the function entity to the runtime environment layer, where the target API belongs to the second-category API; The runtime environment layer calls the corresponding software engine in the software library layer to respond to the target event according to the target API provided by the framework layer, so as to run the XR application; The first type of API is obtained by encapsulating the second type of API, and the second type of API is the API corresponding to the software engine included in the software library layer.

10. The method according to claim 9, It is characterized in that The runtime environment layer calls the corresponding software engine in the software library layer to respond to the target event according to the target API provided by the framework layer, including at least one of the following operations: When the target API includes a second type of API corresponding to the download engine in the software library layer, calling the download engine to download application content of the XR application from the server; When the target API includes a second type of API corresponding to the storage engine in the software library layer, calling the storage engine to perform storage management on the application content of the XR application; When the target API includes a second type of API corresponding to the lifecycle management engine in the software library layer, calling the lifecycle management engine to perform lifecycle management on the XR application; When the target API includes a second type of API corresponding to the 3D rendering engine in the software library layer, calling the 3D rendering engine to perform 3D rendering on the XR application; When the target API includes a second type of API corresponding to the AI ​​reasoning engine in the software library layer, calling the AI ​​reasoning engine to perform AI reasoning processing on the XR application; When the target API includes a second type of API corresponding to the 2D UI engine in the software library layer, calling the 2D UI engine to process the UI interaction between the XR application and the host 2D application; When the target API includes a second type of API corresponding to the event engine in the software library layer, the event engine is called to process the event callback logic in the XR application.

11. The method according to claim 9 or 10, It is characterized in that The runtime environment layer includes at least one runtime virtual machine VM, where different runtime VMs are implemented using different dynamic programming languages, and are used to provide a runtime environment for XR applications implemented using different dynamic programming languages; In the case where there are multiple at least one runtime VM, the method further includes: The runtime environment layer schedules a target VM among multiple runtime VMs that is implemented using the same dynamic programming language as the XR application according to the dynamic programming language used by the XR application, so that the target VM serves the XR application.

12. A method for running XR content, It is characterized in that Applied to a host application having an embedded XR runtime container, the method includes: When the host application is running, the access entry information of XR content is displayed; In response to a triggering operation on the access entry information, the XR runtime container is started, and the XR content is obtained; the started XR runtime container provides a runtime environment for the XR content, and the XR runtime container runs between the XR content and an operating system of a target device where the host application is located; The XR content is run based on a runtime environment provided by the XR runtime container, wherein the runtime container is the runtime container according to any one of claims 1 to 6.

13. An electronic device, It is characterized in that It comprises a memory and a processor, wherein the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to implement the steps in the method described in any one of claims 7 to 11 and claim 12.

14. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 7 to 11 and claim 12.