Method and system for compiling interactive content based on a scripting description file

CN123011243APending Publication Date: 2026-10-30FUJIAN QIXIANG UNLIMITED NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611240512.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]鉴于上述问题,本申请提供了一种基于编排描述文件的互动内容编译生成的技术方案,用以解决现有技术在互动内容开发流程中,配置文件与代码开发割裂、多平台需重复适配、用户行为数据采集依赖人工埋点导致开发效率低且数据采集不完整的技术问题

Benefits of technology

[0055]区别于现有技术,上述技术方案涉及的一种基于编排描述文件的互动内容编译生成方法及系统,属于互动内容编译生成技术领域。该方法包括:接收包含分集配置信息和节点定义信息的编排意图描述文件,节点定义信息中的多个节点通过跳转关系形成节点跳转树,事件节点作为一级节点,视频节点作为二级节点;解析该描述文件,构建节点标识与节点之间的查找表,为每个节点附加处理元数据,生成中间表示;遍历中间表示中的节点,基于视频节点的处理元数据编译生成视频播放组件调用代码,基于事件节点的处理元数据编译生成对应事件类型的控制流代码,并在编译过程中根据事件节点的处理元数据在控制流代码的生成位置自动注入用户交互行为数据采集代码,最终编译生成目标平台的原生代码包。本申请实现了从编排描述到原生代码的自动化编译生成,无需人工编写平台特定代码和手动埋点,大幅降低开发成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011243A_ABST
    Figure CN123011243A_ABST
Patent Text Reader

Abstract

The application discloses an interactive content compiling generation method and system based on an arrangement description file. The method comprises the following steps: receiving an arrangement intention description file containing diversity configuration information and node definition information; parsing the arrangement intention description file, constructing a lookup table between node identification and nodes, attaching processing metadata to each node, and generating an intermediate representation; traversing the nodes in the intermediate representation, compiling and generating video playing component calling code based on the processing metadata of the video nodes, compiling and generating control flow code of a corresponding event type based on the processing metadata of the event nodes, and automatically injecting user interaction behavior data collection code at the generation position of the control flow code according to the processing metadata of the event nodes during the compiling process, and finally compiling and generating a native code package of a target platform. The application realizes automatic compiling generation from arrangement description to native code, and greatly reduces development cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of interactive content compilation and generation technology, specifically to an interactive content compilation and generation method and system based on an arrangement description file. Background Technology

[0002] Interactive content refers to content formats that can dynamically adjust the presentation order and plot direction based on users' real-time actions or choices. It is widely used in interactive videos, interactive games, interactive advertising, online education, digital marketing, and many other fields. With the rapid development of the mobile internet and short video ecosystem, interactive content has received widespread attention due to its high participation and strong immersion.

[0003] Taking interactive film / games (also known as interactive short dramas or interactive narrative games) as an example, it is a specific form of interactive content that has emerged in recent years with the development of short video platforms and mini-program ecosystems. It combines linear video viewing with branching narrative game mechanics, allowing viewers to make choices at key points during the viewing process, thereby influencing the plot and obtaining a differentiated viewing experience. Currently, interactive film / games are mainly distributed through platforms such as WeChat mini-programs and Douyin mini-programs.

[0004] In the practice of creating interactive content, existing technologies typically employ the following process: First, video editing software is used to edit video footage; then, interactive nodes are manually marked, branch options and jump targets are configured in a web-based interactive editing tool to generate a configuration file describing the node relationships; subsequently, after receiving the configuration file, developers manually write code to implement the interactive logic defined in the configuration, and adapt the code for different platforms; finally, the code for collecting user behavior data is manually added by developers during the development process, with the tracking points and reporting logic scattered in various places.

[0005] The above process has the following drawbacks: First, the configuration file is only used as a "reference document" rather than a "compilation source file." There is a lack of a unified intermediate representation that can directly drive code generation between the various stages. As a result, any change to the configuration file requires manual modification of code on multiple platforms, leading to a fragmented development process and high collaboration costs. Second, when releasing to multiple platforms, the same business logic needs to be implemented and maintained separately for each platform. When iterating on features, multiple code repositories need to be modified simultaneously, and the manpower cost increases linearly with the number of platforms. Third, the tracking code for user behavior data is added manually by developers and scattered across various nodes and callbacks. When requirements change, it is easy to miss the tracking points of newly added nodes, resulting in incomplete data collection. Furthermore, the differences in tracking interfaces across different platforms also require separate maintenance. Summary of the Invention

[0006] In view of the above problems, this application provides a technical solution for generating interactive content based on an orchestration description file, in order to solve the technical problems in the existing interactive content development process, such as the separation of configuration files and code development, the need for repeated adaptation to multiple platforms, and the reliance on manual data collection for user behavior data, which leads to low development efficiency and incomplete data collection.

[0007] To achieve the above objectives, in a first aspect, this application provides a method for compiling and generating interactive content based on an orchestration description file, the method comprising:

[0008] S1: Receive orchestration intent description file, which includes diversity configuration information and node definition information. The diversity configuration information includes at least one diversity, and the node definition information includes multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video node is a second-level node, and the event node is a first-level node. The first-level node is attached to the root node of the node jump tree, and the second-level node is attached to the first-level node. The event node defines a control flow event through an event type field. The control flow event is used to control the jump logic between the video nodes.

[0009] S2: Parse the orchestration intent description file, construct a lookup table between node identifiers and nodes, and attach processing metadata to each of the multiple nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code and generate an intermediate representation.

[0010] S3: Based on the intermediate representation, traverse the nodes in the intermediate representation. Based on the processing metadata of the video node, compile the video node into video playback component calling code. Based on the processing metadata of the event node, compile the event node into control flow code corresponding to the event type. During the compilation and generation of the native code package, based on the processing metadata of the event node, automatically inject user interaction behavior data collection code at the generation location of the control flow code. The user interaction behavior data collection code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered, so as to compile and generate the native code package of the target platform. The native code package is used to run on the target platform to execute interactive content. The plot transition of the interactive content responds to the control flow event corresponding to the event node and switches between the video nodes.

[0011] Furthermore, the metadata processing includes cross-set state inheritance configuration, which is used to define the condition variable transit relationship between the sets;

[0012] In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes, including:

[0013] S21: Detect the condition variable referenced in the node definition information, the condition variable being used to record the user's decision result at the event node;

[0014] S22: Based on the reference relationship of the condition variable, construct a cross-set state inheritance graph, which is used to indicate the transmission path of the condition variable between the sets;

[0015] S23: Associate the cross-set state inheritance graph as part of the processing metadata with the intermediate representation.

[0016] Furthermore, the compilation to generate the native code package for the target platform includes:

[0017] Based on the cross-episode state inheritance graph, state inheritance code is generated. The state inheritance code is used to pass the value of the condition variable between episodes when the native code package is running, so that the plot branches of subsequent episodes adjust the jump targets between video nodes according to the value of the condition variable.

[0018] Furthermore, generating state inheritance code based on the cross-set state inheritance graph includes:

[0019] Based on the cross-set state inheritance graph, determine the propagation path of the condition variable among the sets;

[0020] Based on the transmission path, platform-native local storage read / write code is generated. The local storage read / write code is used to write the value of the condition variable to the local storage of the target platform when the session is switched, and to read the value of the condition variable from the local storage when the subsequent session is started.

[0021] The local storage read / write code is native code adapted to the storage interface of the target platform.

[0022] Furthermore, the processed metadata includes video content fingerprint information, which is used to identify the timeline features of the video content corresponding to the video node;

[0023] The orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is attached to each of the multiple nodes, including: extracting the content fingerprint of the video content corresponding to the video node to obtain the timeline label of the video content, the timeline label of the video content is used to identify scene switching points, audio energy peak ranges and image motion vector intensity peak ranges in the video content; the timeline label is used as the fingerprint information of the video content and associated with the processing metadata of the video node.

[0024] Furthermore, the step of automatically injecting user interaction behavior data collection code at the generation location of the control flow code based on the processing metadata of the event node includes:

[0025] Based on the video content fingerprint information, timeline-level tracking code is injected into the video playback component call code corresponding to the video node. The timeline-level tracking code is used to obtain user interaction behavior data when the video content plays to the position corresponding to the timeline label.

[0026] Furthermore, the step of extracting the content fingerprint of the video content corresponding to the video node to obtain the timeline label of the video content includes:

[0027] The video content is segmented into scenes to identify scene transition points within the video content;

[0028] Perform audio feature analysis on the video content to identify the peak audio energy range in the video content;

[0029] Visual feature analysis is performed on the video content to identify the peak range of motion vector intensity in the video content;

[0030] The timeline labels are generated based on the scene switching points, the audio energy peak range, and the image motion vector intensity peak range.

[0031] Furthermore, the intermediate representation is a scripted object, which retains the original structure of the diversity configuration information and the node definition information, and adds the processing metadata to each node;

[0032] The traversal of the nodes in the intermediate representation includes:

[0033] The intermediate representation is loaded through the overall scheduling of the node state machine;

[0034] For the video node, the following processing is performed: the video content of the video node is converted to a color space, the original color space is converted to a target color space, and color transition animation parameters are generated;

[0035] Double-buffered playback resources are allocated to the video node. The double-buffered playback resources include a front buffer and a back buffer. The front buffer is used for displaying the current frame, and the back buffer is used for pre-decoding and rendering the next frame. According to the jump relationship of the video node, the branch video segments corresponding to the jump relationship are preloaded into the memory cache.

[0036] For the event node, according to the event type field, the event node is assigned to the corresponding event processing logic, which includes click event processing logic, swipe event processing logic, or timed event processing logic.

[0037] Furthermore, the orchestration intent description file also includes branch scheme traffic distribution configuration information, which is used to configure multiple branch schemes for the event node and set a traffic allocation ratio for each branch scheme;

[0038] In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes. This also includes:

[0039] The branch scheme traffic splitting configuration information is parsed, and traffic splitting control metadata is generated for the event node configured with the branch scheme traffic splitting configuration information. The traffic splitting control metadata includes the branch scheme, the traffic allocation ratio and the scheme identifier field. The scheme identifier field is used to identify the branch scheme to which the user interaction behavior data belongs.

[0040] The traffic splitting control metadata is incorporated as part of the processing metadata and associated with the event node;

[0041] In step S3, based on the processing metadata of the event node, the event node is compiled into control flow code corresponding to the event type, including:

[0042] Based on the traffic control metadata, traffic control code is generated. The traffic control code is used to determine the target branch scheme to which the user belongs based on the user identifier of the target platform and the traffic allocation ratio when the control flow event is triggered.

[0043] Based on the target branching scheme, determine the jump target between the video nodes;

[0044] The traffic control code is native code adapted to the user identification interface of the target platform.

[0045] In a second aspect, this application provides an interactive content compilation and generation system based on an orchestration description file, the system comprising:

[0046] The file receiving module is used to receive an orchestration intent description file. The orchestration intent description file contains diversity configuration information and node definition information. The diversity configuration information contains at least one diversity, and the node definition information contains multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video nodes are second-level nodes, and the event nodes are first-level nodes. The first-level nodes are attached to the root node of the node jump tree, and the second-level nodes are attached to the first-level nodes. The event nodes define control flow events through an event type field. The control flow events are used to control the jump logic between the video nodes.

[0047] The lookup table construction module is used to parse the orchestration intent description file and construct a lookup table between node identifiers and nodes.

[0048] The metadata appending module is used to append processing metadata to each of the plurality of nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code.

[0049] An intermediate representation generation module is used to generate an intermediate representation based on the plurality of nodes with the processing metadata attached;

[0050] The node traversal module is used to traverse the nodes in the intermediate representation based on the intermediate representation;

[0051] The video node compilation module is used to compile the video node into video playback component calling code based on the video node's processing metadata;

[0052] An event node compilation module is used to compile the event node into control flow code corresponding to the event type based on the processing metadata of the event node;

[0053] The data acquisition code injection module is used to automatically inject user interaction behavior data acquisition code at the generation location of the control flow code based on the processing metadata of the event node during the compilation and generation of the native code package. The user interaction behavior data acquisition code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered.

[0054] The native code package generation module is used to compile and generate a native code package for the target platform. The native code package is used to run on the target platform to execute interactive content. The plot flow of the interactive content responds to the control flow events corresponding to the event nodes and switches between the video nodes.

[0055] Unlike existing technologies, the above technical solution involves an interactive content compilation and generation method and system based on an orchestration description file, belonging to the field of interactive content compilation and generation technology. The method includes: receiving an orchestration intent description file containing episode configuration information and node definition information; multiple nodes in the node definition information forming a node jump tree through jump relationships, with event nodes as first-level nodes and video nodes as second-level nodes; parsing the description file, constructing a lookup table between node identifiers and nodes, attaching processing metadata to each node, and generating an intermediate representation; traversing the nodes in the intermediate representation, compiling and generating video playback component calling code based on the processing metadata of video nodes, compiling and generating control flow code corresponding to the event type based on the processing metadata of event nodes, and automatically injecting user interaction behavior data collection code at the generation location of the control flow code according to the processing metadata of event nodes during the compilation process, and finally compiling and generating the native code package for the target platform. This application achieves automated compilation and generation from orchestration description to native code, eliminating the need for manual writing of platform-specific code and manual data entry, significantly reducing development costs.

[0056] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0057] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of this application and other related content, and should not be considered as limitations on this application.

[0058] In the accompanying drawings of the instruction manual:

[0059] Figure 1 This is a flowchart of the interactive content compilation and generation method based on an orchestration description file as described in the first exemplary embodiment of this application;

[0060] Figure 2 This is a schematic diagram of an electronic device according to an exemplary embodiment of this application;

[0061] The reference numerals used in the above figures are explained as follows:

[0062] 10. Interactive content compilation and generation system based on orchestration description files; 101. File receiving module; 102. Lookup table construction module; 103. Metadata appending module; 104. Intermediate representation generation module; 105.

[0063] 106. Node traversal module; 107. Video node compilation module; 108. Event node compilation module; 109. Data acquisition code injection module; 100. Native code package generation module. Detailed Implementation

[0064] To explain in detail the possible application scenarios, technical principles, specific feasible solutions, and the objectives and effects that this application can achieve, the following detailed description is provided in conjunction with the specific embodiments listed and the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of this application, and are therefore only examples and should not be used to limit the scope of protection of this application.

[0065] In the first aspect, such as Figure 1 As shown, this application provides a method for compiling and generating interactive content based on an orchestration description file, the method comprising:

[0066] S1: Receive orchestration intent description file, which includes diversity configuration information and node definition information. The diversity configuration information includes at least one diversity, and the node definition information includes multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video node is a second-level node, and the event node is a first-level node. The first-level node is attached to the root node of the node jump tree, and the second-level node is attached to the first-level node. The event node defines a control flow event through an event type field. The control flow event is used to control the jump logic between the video nodes.

[0067] S2: Parse the orchestration intent description file, construct a lookup table between node identifiers and nodes, and attach processing metadata to each of the multiple nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code and generate an intermediate representation.

[0068] S3: Based on the intermediate representation, traverse the nodes in the intermediate representation. Based on the processing metadata of the video node, compile the video node into video playback component calling code. Based on the processing metadata of the event node, compile the event node into control flow code corresponding to the event type. During the compilation and generation of the native code package, based on the processing metadata of the event node, automatically inject user interaction behavior data collection code at the generation location of the control flow code. The user interaction behavior data collection code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered, so as to compile and generate the native code package of the target platform. The native code package is used to run on the target platform to execute interactive content. The plot transition of the interactive content responds to the control flow event corresponding to the event node and switches between the video nodes.

[0069] In this embodiment, the orchestration intent description file refers to a standardized configuration file using the JSON structured format. JSON is a lightweight data exchange format. The top-level of the file contains three major modules: canvas global configuration, episode configuration, and node list. It fully carries all the plot, interaction, commercialization, and interface configuration information completed by the creator in the visual web console and serves as a standardized input source connecting the front-end orchestration tool and the back-end compilation engine.

[0070] Episode configuration information refers to the configuration unit used to carry the overall structure of a multi-episode series. Each independent episode record unit corresponds to the complete content of a single episode. By default, the first episode is open for viewing. Subsequent episodes can only be accessed after the user completes the preceding plot and meets the corresponding unlocking conditions.

[0071] Node definition information refers to the collection of all interactive units within a single episode. It is divided into two types of basic nodes: video nodes and event nodes. All nodes are assigned a globally unique identifier and rely on the jump target array to form a directed jump relationship, thus building a complete plot flow logic diagram.

[0072] A node jump tree is a hierarchical directed graph of the plot built with each episode as an independent unit. The root node of the tree is the starting point of the plot of each episode. Event nodes are directly attached to the root node as first-level nodes, and video nodes are attached to the corresponding event nodes as second-level nodes, thus achieving layered decoupling between the control flow logic and video playback resources.

[0073] Event nodes abstract all the plot control flow logic that was originally scattered in the business code into independent configurable nodes. The system has five built-in standard event identifiers, which are distinguished by the event type field, corresponding to the initialization option, play an advertisement, restart, end the current episode, and return to reselect interactive capabilities respectively. Each type of event identifier corresponds to a set of standardized interactive logic, eliminating the need to manually write multi-level conditional branch code. The event identifier field serves as the sole criterion for the compilation engine to identify the control logic.

[0074] Metadata processing refers to the extended data set attached to each node after parsing the description file. It does not modify the content of the original structured file and is only used as an auxiliary parameter during the compilation stage. Video nodes are equipped with metadata to control the code generation rules of video playback program, and event nodes are equipped with metadata to control the code generation rules of control logic such as advertising, page jump, and plot reset. At the same time, it carries extended configuration parameters such as cross-episode status, video features, and traffic grouping.

[0075] Intermediate representation refers to the use of scripted objects as a unified data carrier within the compilation engine. Scripted objects are the engine's native data storage carrier, fully preserving the sets, nodes, and jump structures of the original description file. At the same time, they integrate all processing metadata, running through the entire process of material import, scene initialization, node execution, cross-platform adaptation, and code generation, realizing a single data source driving all downstream processing links.

[0076] The native code package refers to a complete, deployable project package that has been compiled and processed to be adapted to the target platform. It directly calls the platform's underlying native program interface, does not use a web page container wrapper, and contains all the business code for video playback, advertising calls, episode state storage, and behavior data collection. It can be directly submitted to the platform for review and deployment.

[0077] User interaction behavior data collection code refers to the program logic used to collect user operation behavior. It is automatically injected into the program during the compilation stage and does not require manual writing. It can monitor all user behaviors such as node triggering, advertisement playback, plot selection, and episode switching, and automatically report data such as behavior type, trigger node, and video timestamp.

[0078] The working principle of this embodiment is as follows:

[0079] In step S1, after the creator completes the global interface, episode, plot nodes, advertisements, and interaction configurations in the web console, the system outputs a standardized JSON orchestration intent description file. The compilation server automatically receives this file and completes asset registration. The episode configuration within the file enables native multi-episode management. The node list stores video nodes and event nodes in a mixed manner. The two types of nodes construct a hierarchical node jump tree based on the jump target array. Event nodes serve as first-level nodes, carrying all control flow logic, while video nodes serve as second-level nodes, carrying video materials and plot branches. The event type field distinguishes five types of control logic: advertisements, resets, episode selections, opening selections, and endings. All switching logic between videos is completely scheduled by event nodes, achieving decoupling of control flow logic from video materials.

[0080] In step S2, the internal configuration conversion module of the compilation engine reads the JSON file. First, it constructs a global node lookup table using the unique identifier of each node as the primary key to enable fast retrieval of any node. Then, it distinguishes between video nodes and event nodes, attaching dedicated processing metadata to each. The video node metadata records the video address, audio and video features, and color parameters, while the event node metadata records the advertising configuration, jump target, and episode status association rules. All original episode structures and node jump relationships are completely preserved, and the attached metadata is uniformly mounted to the corresponding nodes. Finally, it is encapsulated into an intermediate representation in scripted object format, serving as the sole data source for downstream compilation stages, achieving integrated storage of original configuration and compilation extended parameters.

[0081] In step S3, the code generation tool loads the intermediate representation and traverses all nodes through the node state scheduling unit. For video nodes, it reads video class processing metadata and automatically generates component call code for the corresponding platform's double-buffered player, color conversion, and branch preloading. For event nodes, it reads event identifiers and event class metadata and automatically translates them into the corresponding platform's native control flow code. The ad playback identifier is converted into the platform's incentivized ad call interface, and the return reselection identifier is converted into the platform's page back stack instruction. At the synchronous position of each control flow code generation, the data acquisition code injection unit automatically inserts standardized tracking logic without manual intervention. The tracking code listens for control flow event triggering actions in real time and automatically captures interactive data such as the current node, user selection, and ad viewing status. After all code is compiled, a dedicated compilation differentiation identifier is injected according to the target platform, and an independent native code package for the target platform is output. When the code package runs, it relies on event nodes to drive the plot and complete the automatic switching between different video nodes.

[0082] The above solution constructs a complete automated pipeline for webpage configuration, engine compilation, and automatic package generation. Creators only need visual configuration to generate a mini-program package that can be submitted for review, completely eliminating the workload of manually writing code for video playback, advertising, redirection, and event tracking, significantly shortening the development cycle. By decoupling the control flow logic from video resources through event and video layered node jump trees, plot modifications only require adjusting the JSON configuration, without the need to simultaneously modify code on multiple platforms. The unified scripted object format of the intermediate representation shields the underlying differences between platforms, and a single configuration can simultaneously generate native code for multiple platforms, eliminating the maintenance costs of multiple sets of code. Event tracking logic is automatically injected globally during the compilation phase, avoiding the problem of manual event tracking omissions from the root and ensuring the complete collection of user behavior data. The entire process completes node verification and code generation during the compilation period, which can identify jump logic errors in advance and reduce the probability of online failures.

[0083] In this embodiment, the orchestration intent description file is divided into a three-layer fixed configuration structure. The first layer is the global canvas configuration, storing common parameters for the entire project, such as project name, cover image, video landscape / portrait specifications, and interface skin. The second layer is the episode configuration, carrying all episode information for the entire series. Each episode independently stores the episode identifier, display name, lock status, unlock prerequisites, and episode-specific node definition information. The third layer is the set of internal nodes for each episode, distinguishing between video nodes and event nodes, and building a complete node jump tree based on jump relationships. Among them, the event nodes have built-in event type fields and advertising configuration parameters, which can directly configure advertising display rules without modifying the logic within the running program. The entire three-layer structure is stored in a single file, eliminating the need to split multiple configuration documents. When the file changes, only a single file needs to be updated to synchronize all plot, commercialization, and interface parameters.

[0084] In some embodiments, the entire process from orchestration intent description files to native code packages is divided into seven coherent, standardized processing stages:

[0085] The first stage involves the automatic identification and import of materials and files. The system automatically reads the files and accompanying video resources, completes the legality verification, and registers them as resolvable resources.

[0086] The second stage is intermediate representation compilation, which generates a global node identifier lookup table, adds processing metadata to all nodes, and generates an intermediate representation in scripted object format.

[0087] The third stage is the initialization of the runtime rendering environment, which automatically generates a multi-layered interactive rendering canvas that adapts to both horizontal and vertical display specifications.

[0088] In the fourth stage, the intermediate representation is loaded by the node state machine's overall scheduling, and the corresponding processing logic is executed on the video and the node respectively;

[0089] The fifth stage involves event dispatching, matching the corresponding interactive interface, and completing the rendering and display.

[0090] The sixth phase involves launching a platform adaptation unit to uniformly isolate the differences in native interfaces across different target platforms;

[0091] The seventh stage involves batch packaging across multiple platforms, filtering out irrelevant program logic based on the selected platform, and outputting the corresponding complete native code package.

[0092] The entire process uses only intermediate representation as a unified data interaction carrier. A single orchestration configuration can generate multi-platform projects in parallel, and platform-specific logic is automatically isolated during the packaging stage.

[0093] In some embodiments, the processing metadata includes a cross-set state inheritance configuration, which is used to define the condition variable transit relationship between the sets;

[0094] In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes, including:

[0095] S21: Detect the condition variable referenced in the node definition information, the condition variable being used to record the user's decision result at the event node;

[0096] S22: Based on the reference relationship of the condition variable, construct a cross-set state inheritance graph, which is used to indicate the transmission path of the condition variable between the sets;

[0097] S23: Associate the cross-set state inheritance graph as part of the processing metadata with the intermediate representation.

[0098] In this embodiment, cross-set state inheritance configuration refers to an extended configuration item attached to the node processing metadata, which is specifically used to record the transit constraints and dependencies of condition variables between different sets.

[0099] Condition variables are variables that record the results of user decisions at event nodes, such as plot choices, unlocking behaviors, and ad viewing records. These variables will affect the plot branching targets in subsequent episodes.

[0100] A cross-set state inheritance graph is a directed graph generated based on the reference relationships of condition variables within all sets. Nodes in the graph represent sets, and edges represent the direction of variable propagation. It fully marks which subsequent sets the condition variables generated in a certain set need to be passed to, and is the core basis for generating cross-set state synchronization code.

[0101] The working principle of this embodiment is as follows:

[0102] In step S21, the parsing phase traverses all event nodes and video nodes of each episode in the intermediate representation, identifies all business logic for reading and writing condition variables, distinguishes between variable generation episodes and variable consumption episodes, collects a complete list of all condition variables for the entire series, and marks the production node and usage node of each variable.

[0103] In step S22, based on the variable production and consumption subset dependencies identified in the previous step, a global cross-set state inheritance directed graph is constructed. Each directed edge in the graph corresponds to a variable transmission path. For example, if the first set generates a role selection variable and the third and fourth sets need to read this variable, a transmission link from set one to set three and set four is established in the inheritance graph to fully record all variable cross-set flow rules.

[0104] In step S23, the complete state inheritance graph is used as a sub-module for processing metadata and associated with the global intermediate representation, so that the downstream code compilation stage can read all cross-set variable passing rules and provide a complete basis for generating the set state synchronization code.

[0105] This implementation automatically identifies condition variable dependencies across the entire series during the compilation phase, eliminating the need for manual analysis of cross-episode plot connections and significantly reducing the maintenance difficulty of long, multi-episode interactive content. A standardized cross-episode state inheritance graph visually displays variable propagation paths, facilitating development, operation, and debugging of plot branch logic, and quickly locating anomalies in state transitions. State propagation rules are solidified into intermediate representation metadata, which can be uniformly read by downstream compilation stages, ensuring consistency of cross-episode plot logic. Dependency verification is performed in advance during compilation, allowing for the early detection of logical errors such as missing variable references and broken propagation chains, reducing testing workload.

[0106] Furthermore, the compilation to generate the native code package for the target platform includes:

[0107] Based on the cross-episode state inheritance graph, state inheritance code is generated. The state inheritance code is used to pass the value of the condition variable between episodes when the native code package is running, so that the plot branches of subsequent episodes adjust the jump targets between video nodes according to the value of the condition variable.

[0108] In this embodiment, the state inheritance code refers to the native business code automatically generated based on the cross-set state inheritance graph during the compilation stage. It is specifically responsible for the storage, reading and passing of condition variables during episode switching. It is the underlying logic code that enables cross-set plot coherence and completely replaces the scattered, handwritten state management program.

[0109] In this embodiment, cross-set state code generation logic is added to the compilation and generation of native code packages. The specific process is as follows:

[0110] The code generation tool reads the cross-episode state inheritance graph stored in the intermediate representation metadata, extracts the episode propagation path for each condition variable, and automatically generates corresponding state inheritance code for each path. During code execution, when the user completes the current episode and switches to the next, the state inheritance code automatically reads all condition variables generated in the previous episode. During the new episode's plot loading and node jump determination phases, it automatically reads the saved variable values ​​and dynamically adjusts the video node jump target based on the variable values, ensuring that the user's decisions in the previous episode continuously influence the plot development of all subsequent episodes. The entire state synchronization logic is automatically generated, eliminating the need for developers to manually write local storage, variable reading, and branch determination code.

[0111] The above solution automatically generates standardized cross-episode state synchronization code, enabling user choices to permanently affect the entire series of episodes' storylines, providing a coherent and complete long-form interactive narrative experience. All state transition logic is compiled and generated uniformly, resulting in a well-structured code with no scattered state judgment logic, significantly reducing the probability of abnormal online storyline branches. State inheritance code follows the unified generation of the intermediate representation; when adding new episodes or condition variables, only the orchestration configuration needs to be updated, eliminating the need for manual modification of multi-platform state code, significantly improving iteration efficiency. The code only passes the condition variables required by the storyline, with no redundant data read / write, balancing runtime performance and storage resource consumption.

[0112] In some embodiments, generating state inheritance code based on the cross-set state inheritance graph includes:

[0113] Based on the cross-set state inheritance graph, determine the propagation path of the condition variable among the sets;

[0114] Based on the transmission path, platform-native local storage read / write code is generated. The local storage read / write code is used to write the value of the condition variable to the local storage of the target platform when the session is switched, and to read the value of the condition variable from the local storage when the subsequent session is started.

[0115] The local storage read / write code is native code adapted to the storage interface of the target platform.

[0116] In this embodiment, the platform native local storage read / write code refers to the read / write program that adapts to different mini-program storage interfaces. WeChat adapts to the local synchronous storage read / write interface, and Douyin adapts to the platform-specific local synchronous storage interface. This is used to persistently store cross-set condition variables, and the data will not be cleared after the program exits.

[0117] The working principle of this embodiment is as follows:

[0118] The first step is to read the cross-set state inheritance graph, analyze the set switching read / write nodes corresponding to all variables one by one, and clarify the storage and reading timing of each variable;

[0119] The second step involves generating a corresponding native storage program based on the target platform type. When switching episodes and exiting the current episode, the writing program stores all newly added variables in the device's local persistent space; when a new episode starts, the reading program retrieves all previous variables, and the delivery status inheritance program completes the branch determination.

[0120] The entire storage program directly calls the platform's native interface, relying on compilation to differentiate and isolate the storage logic of the two platforms. One intermediate carrier can generate two storage programs adapted to WeChat and Douyin respectively.

[0121] In this embodiment, the storage program natively adapts to the official interfaces of various platforms, ensuring strong compatibility and eliminating adaptation issues caused by third-party middleware. Variables are persistently stored locally on the device, allowing for complete restoration of the entire storyline upon program restart, and enabling normal browsing of multiple episodes even without a network connection. The compiler automatically differentiates storage logic for each platform, eliminating the need for manual maintenance of two separate sets of storage code and reducing manpower investment in multi-platform development. Only variables required for the storyline are retained, avoiding redundant cache files and saving local storage space on the user's device.

[0122] In some embodiments, the processed metadata includes video content fingerprint information, which is used to identify the timeline features of the video content corresponding to the video node;

[0123] The orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is attached to each of the multiple nodes, including: extracting the content fingerprint of the video content corresponding to the video node to obtain the timeline label of the video content, the timeline label of the video content is used to identify scene switching points, audio energy peak ranges and image motion vector intensity peak ranges in the video content; the timeline label is used as the fingerprint information of the video content and associated with the processing metadata of the video node.

[0124] In this embodiment, video content fingerprint information refers to a set of multi-dimensional features embedded in the metadata of the video unit processing. It is generated by the program automatically parsing video images, audio, and inter-frame motion data, and is used to standardize and record key features of the entire video timeline.

[0125] Timeline tags are the basic building blocks of video content fingerprints. They use playback timestamps as indexes to record three types of features: scene transition points, high-energy audio ranges, and high-motion video ranges. They serve as the underlying data support for refined data collection and automatic ad matching.

[0126] Scene switching points refer to the time nodes when the content of a scene changes abruptly, which are identified by the image histogram and edge features, such as the precise time when an indoor scene switches to a fighting scene.

[0127] The peak audio energy range refers to the continuous time period during which the short-term loudness and energy value of audio exceed a preset threshold, corresponding to the climax of the plot and the explosive sound effects.

[0128] The peak range of motion vector intensity in a scene refers to the continuous period of large-scale movement of an object, calculated from the motion vectors between frames, corresponding to chase and fighting scenes.

[0129] In this embodiment, after the engine video resource recognition program detects the addition of new video material to the description file, it starts three independent parsing pipelines in parallel to process the same video resource, as follows:

[0130] The first step involves frame-by-frame comparison of image features to identify the time of all scene transitions.

[0131] The second step involves analyzing the audio track waveform to calculate short-time energy and marking the start and end intervals of the audio peak.

[0132] The third step involves analyzing inter-frame motion vectors to identify periods of high-motion scenes.

[0133] After the three types of features are analyzed, they are sorted in a unified time sequence, duplicate intervals are removed, and standardized timeline labels are generated. The entire set of labels is encapsulated as video content fingerprints and associated with the corresponding video unit metadata. It is then stored in an intermediate carrier to provide multi-dimensional video semantic data for subsequent refined collection and automatic ad matching. The entire analysis process is fully automated.

[0134] In this embodiment, the program automatically extracts three types of video features: visuals, audio, and motion. This eliminates the need for manual annotation of each scene segment, significantly reducing manpower costs associated with processing large volumes of material. Standardized timeline labels accurately locate key plot segments, supporting frame-level user behavior collection and providing richer data analysis dimensions. Video features are uniformly stored in an intermediate carrier, allowing the same set of data to be reused across multiple stages, including data collection, ad matching, and video preloading, enabling single-analysis reuse across multiple services. Multi-dimensional features are adaptable to various interactive video materials, including dialogue, suspense, and combat, offering excellent scalability.

[0135] In some embodiments, relying on the timeline tags within the video content fingerprint, the compilation process can automatically complete the matching of advertisements with video scenes, as follows: The compiler reads scene switching, motion intensity, and audio peak tags to automatically identify the video content type; high-motion fighting intervals are automatically matched with game-type advertisement configurations; and calm dialogue and emotional intervals are automatically matched with social advertisements; the advertisement parameters are only stored in the orchestration intent description file, and operators only need to modify the configuration in the web page orchestration tool to switch the advertisement strategy, without modifying the native code package or resubmitting to the platform for review.

[0136] Furthermore, the step of automatically injecting user interaction behavior data collection code at the generation location of the control flow code based on the processing metadata of the event node includes:

[0137] Based on the video content fingerprint information, timeline-level tracking code is injected into the video playback component call code corresponding to the video node. The timeline-level tracking code is used to obtain user interaction behavior data when the video content plays to the position corresponding to the timeline label.

[0138] In this embodiment, the timeline-level embedding code refers to generating a refined collection program based on video content fingerprints and timeline tags, using the video playback timestamp as the trigger benchmark, and starting data recording only when the playback progress hits the feature interval, thereby realizing segment and frame-level behavior statistics.

[0139] The video playback component calling code refers to the underlying executable program of the player generated by the compiler based on the video unit metadata. It fully includes all the logic of material loading, buffer scheduling, screen rendering, progress monitoring, and branch jumping, and is the basic unit for playing videos at runtime.

[0140] User interaction behavior data refers to all user operation records including video dragging, pausing, branch selection, ad triggering, and episode switching. Each record is synchronously bound to the current playback timestamp and the corresponding scene identifier.

[0141] During the compilation of the video playback program in step S3, the system reads the timeline tags stored internally in the video unit metadata and sets scene transitions, audio peaks, and high-motion intervals as acquisition trigger anchors. A timeline-level acquisition program is embedded within the player's progress monitoring logic. The player synchronizes the current playback timestamp in real time during runtime. When the progress matches any characteristic interval, the acquisition program automatically captures all user operations during that time period and synchronously binds scene identifiers to complete data recording. This entire refined acquisition logic is automatically written into the player's underlying layer during the compilation phase, eliminating the need for manual annotation of acquisition points based on video time.

[0142] The above solution leverages the multi-dimensional features of automatic video analysis to achieve precise segment acquisition. It can distinguish user operating habits in mundane dialogues, dramatic climaxes, and action scenes, resulting in richer data analysis dimensions. The acquisition program is generated uniformly along with the player, eliminating the workload of manually marking materials frame by frame. Behavioral records are bound to video scenes one by one, enabling rapid identification of high-churn and high-interaction plot segments, providing accurate data for content and commercialization adjustments. The acquisition logic is embedded in the player's underlying layer, without additional loop calculations, resulting in minimal performance loss to video playback smoothness.

[0143] In some embodiments, the step of extracting content fingerprints from the video content corresponding to the video node to obtain the timeline labels of the video content includes:

[0144] The video content is segmented into scenes to identify scene transition points within the video content;

[0145] Perform audio feature analysis on the video content to identify the peak audio energy range in the video content;

[0146] Visual feature analysis is performed on the video content to identify the peak range of motion vector intensity in the video content;

[0147] The timeline labels are generated based on the scene switching points, the audio energy peak range, and the image motion vector intensity peak range.

[0148] In this embodiment, scene segmentation refers to determining the lens boundary based on computer vision frame comparison calculation, using color histograms and image edge features, and outputting a standardized scene switching timestamp sequence.

[0149] Audio feature analysis refers to performing a short-time Fourier transform operation on an audio track, calculating the audio loudness and short-time energy values ​​frame by frame, and filtering out continuous time periods that exceed the threshold to generate audio peak intervals.

[0150] Visual motion vector analysis refers to extracting optical flow and motion vector data from adjacent frames of a video, statistically analyzing the global motion intensity value, and marking the frame intervals where the motion intensity continuously exceeds the threshold.

[0151] Timeline tags are structured arrays generated by fusing three types of video features. They use the playback timestamp as a unique index and are the underlying data carriers that constitute the fingerprint of video content.

[0152] In this embodiment, after the engine video import unit reads the video material, it simultaneously starts three independent parsing pipelines for parallel processing, as follows:

[0153] The first pipeline performs scene segmentation, compares the features of the preceding and following images frame by frame, and records the precise time of all shot transitions.

[0154] The second pipeline analyzes the audio track energy data, filters out silent intervals, and extracts the time intervals corresponding to plot climaxes and sound effect explosions.

[0155] The third pipeline analyzes the motion vectors of the encoding layer and marks the periods of high-motion scenes such as chases and fights.

[0156] After the above three pipeline operations are completed, the system performs deduplication, temporal sorting and integration on all feature intervals, generates timeline labels in a unified format, and encapsulates the entire set of labels as video content fingerprints, attaches them to the video unit metadata and stores them in an intermediate carrier, forming a standardized semantic data channel between video materials and the compiler. All operations are executed automatically.

[0157] This embodiment integrates video analysis across three dimensions: visuals, audio, and motion. It can accurately identify key plot segments from various types of materials, including dialogue, combat, and emotional content, demonstrating broad feature recognition coverage. The fully automated material analysis process is adapted for industrial-scale mass production, significantly reducing the manpower required for manual annotation. A unified timeline tag is stored in an intermediate carrier, allowing for the reuse of the same set of feature data across multiple stages, including refined data acquisition, ad matching, and branch preloading, enabling single-analysis reuse across multiple business processes. Parallel processing of materials across multiple pipelines shortens the analysis time for individual videos, improving the overall processing efficiency of the entire compilation pipeline.

[0158] In some embodiments, the intermediate representation is a scripted object, which retains the original structure of the diversity configuration information and the node definition information, and appends the processing metadata to each node;

[0159] The traversal of the nodes in the intermediate representation includes:

[0160] The intermediate representation is loaded through the overall scheduling of the node state machine;

[0161] For the video node, the following processing is performed: the video content of the video node is converted to a color space, the original color space is converted to a target color space, and color transition animation parameters are generated;

[0162] Double-buffered playback resources are allocated to the video node. The double-buffered playback resources include a front buffer and a back buffer. The front buffer is used for displaying the current frame, and the back buffer is used for pre-decoding and rendering the next frame. According to the jump relationship of the video node, the branch video segments corresponding to the jump relationship are preloaded into the memory cache.

[0163] For the event node, according to the event type field, the event node is assigned to the corresponding event processing logic, which includes click event processing logic, swipe event processing logic, or timed event processing logic.

[0164] In this embodiment, the scriptable object refers to the engine's native ScriptableObject data carrier, which completely replicates the original architecture of the description file canvas, episodes, and dual-type nodes, and additionally mounts all node processing metadata, running through the entire process of material import, scene initialization, node driving, and code generation, serving as the system's globally unique data source.

[0165] The node state machine general scheduling refers to the global scheduling unit during program execution. After loading the scripted object intermediate carrier, it drives the complete plot flow of single episodes and multiple episodes, and uniformly manages the entire process of video playback, event triggering, branch jumps, and variable reading and writing.

[0166] Color space conversion and color transition animation parameters refer to reading the original color specifications of the video, converting and adapting them to the standard color specifications of mobile devices, and simultaneously generating fade-in / fade-out and shot transition gradient control parameters.

[0167] Double-buffered playback resources refer to allocating two independent memory buffers for a video unit. The front buffer is responsible for rendering and displaying the current frame, while the back buffer asynchronously completes the decoding and pre-rendering of the next video segment.

[0168] Branch preloading refers to reading the target array of video units and asynchronously caching all subsequent jumpable video segments into memory in the background thread.

[0169] The event handling logic refers to the three types of underlying execution branches divided according to the event identifier: clicking the branch corresponds to the plot option operation, sliding the branch corresponds to the playback progress dragging, and the timed branch corresponds to the ad countdown and automatic plot jump.

[0170] In this embodiment, the intermediate carrier adopts the engine's native scripted object, fully preserving the original architecture of the description file canvas, episodes, and dual-node architecture for video and events, and synchronously mounting all metadata such as cross-episode status, video fingerprints, advertising configurations, and traffic groupings. Traversing the intermediate carrier is uniformly loaded and driven by the node state machine's overall scheduling, distinguishing between two types of units for differentiated processing, as follows:

[0171] For each video unit, a color space conversion operation is first performed to generate gradient parameters; double buffer memory resources are allocated for both the foreground and background to ensure continuous output of the video; the jump array is read and the background thread pre-buffers all branch video segments.

[0172] For each event unit, the corresponding underlying logic is automatically dispatched by reading the event identifier. Initialization options, ad playback, and return / reselection are categorized as click logic; video dragging is categorized as swipe logic; and ad countdown and automatic ending jump are categorized as timed logic. These three types of logic are isolated and run independently. The entire set of runtime logic is compiled and generated uniformly with the intermediate carrier, natively adapting to the engine's rendering pipeline.

[0173] The above solution relies on the engine's native scripted objects to build an intermediate carrier, resulting in higher data read / write efficiency and intuitive and convenient configuration, debugging, and parameter modification operations. Double buffering combined with a branch preloading mechanism eliminates black screens and stuttering during plot transitions, significantly improving playback smoothness. Unified color conversion logic ensures consistent color performance across different mobile phones and mini-program terminals. Events are split into independent execution logic based on type, and new interactive functions only expand the corresponding branches, resulting in strong system scalability. All video optimization logic is solidified during the compilation stage, requiring no additional parsing calculations at runtime, allowing the program to run stably even on low-end devices.

[0174] In this embodiment, the system has a built-in unified interactive interface scheduling unit. Each type of event node is matched with a dedicated display interface. All interfaces share a set of creation, display, and hiding lifecycle logic, and uniformly control the fade-in and fade-out animations and rendering layer order, as detailed below:

[0175] Initialize option-type events: pop up a pre-selection interface to display plot identity and difficulty interaction options before video playback;

[0176] Playback of ads events: Generates an ad countdown screen, and after the countdown ends, calls the corresponding platform's native ad control flow code;

[0177] Restart-type events: There is no independent display interface; it directly clears all condition variables of the current episode and jumps to the episode start node.

[0178] End of this episode event: Generates an episode transition or ending display interface, and automatically switches to the next episode when a subsequent episode is detected;

[0179] Return to reselection events: Supports two jump targets: specifying a video identifier will jump to the corresponding segment, while the built-in episode list identifier will open the full episode selection interface. All interfaces require no manual writing of creation and destruction logic; they are automatically managed by the compiled, unified scheduling code.

[0180] In some embodiments, the orchestration intent description file further includes branch scheme traffic allocation configuration information, which is used to configure multiple branch schemes for the event node and set a traffic allocation ratio for each branch scheme;

[0181] In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes. This also includes:

[0182] The branch scheme traffic splitting configuration information is parsed, and traffic splitting control metadata is generated for the event node configured with the branch scheme traffic splitting configuration information. The traffic splitting control metadata includes the branch scheme, the traffic allocation ratio and the scheme identifier field. The scheme identifier field is used to identify the branch scheme to which the user interaction behavior data belongs.

[0183] The traffic splitting control metadata is incorporated as part of the processing metadata and associated with the event node;

[0184] In step S3, based on the processing metadata of the event node, the event node is compiled into control flow code corresponding to the event type, including:

[0185] Based on the traffic control metadata, traffic control code is generated. The traffic control code is used to determine the target branch scheme to which the user belongs based on the user identifier of the target platform and the traffic allocation ratio when the control flow event is triggered.

[0186] Based on the target branching scheme, determine the jump target between the video nodes;

[0187] The traffic control code is native code adapted to the user identification interface of the target platform.

[0188] In this embodiment, the branch scheme traffic splitting configuration information refers to the extended configuration item of the orchestration description file, which is attached below the specified event unit and used for online comparison experiment configuration. It contains multiple sets of differentiated plots and advertising schemes, and each scheme is configured with a fixed traffic percentage value.

[0189] Traffic splitting control metadata refers to the metadata sub-items generated after parsing the traffic splitting configuration, which store all branch schemes, traffic weights, unique scheme numbers, and are bound to the corresponding event units.

[0190] User identifiers refer to the unique identification codes assigned to users by the platform. WeChat corresponds to open user codes, while Douyin corresponds to platform-specific user codes. These codes are used for fixed traffic splitting, ensuring that the same user is assigned the same branch scheme for each access.

[0191] Traffic splitting control code refers to the platform's native program automatically generated during the compilation phase. It uses hash modulo operations combined with user coding and traffic ratio to allocate branches, and simultaneously writes the scheme number into the collection record for data analysis grouping.

[0192] In this embodiment, the orchestration description file has a built-in branching configuration. Operators can configure multiple differentiated schemes for ad unlocking and story selection event units, and set the traffic share for each scheme. In step S2, when parsing the description file, the branching configuration is extracted separately to generate branching control metadata, recording the jump rules, traffic values, and unique numbers for each scheme. This metadata is then attached to the event unit metadata and stored in an intermediate carrier. In step S3, when compiling the event control program, the branching metadata is read to generate the branching execution program. When a control event is triggered, the program reads the platform's native user code, uses hash calculations combined with traffic ratios to allocate a unique branch, and switches the video jump target based on the allocation result. The collection program synchronously writes the scheme number, and the backend can statistically analyze conversion, retention, and advertising revenue data by group. The entire branching logic is solidified during the compilation stage and natively adapted to WeChat and Douyin user code interfaces.

[0193] The above solution supports configuring multiple sets of advertisements and storyline schemes for the same plot node to conduct online comparative experiments, eliminating the need for multiple project packaging and deployment, and allowing for flexible adjustments to operational strategies. Fixed traffic splitting is achieved based on a unique user code, ensuring the same user continuously experiences the same branch without frequent switching affecting user experience. Data collection records automatically carry scheme numbers, naturally supporting grouping and attribution, enabling accurate comparison of conversion effects between different schemes. Traffic splitting is network-independent, allowing for normal branch scheme allocation even offline. Traffic ratios can be adjusted simply by modifying webpage configurations, without requiring changes to the underlying program, resulting in extremely low experimental parameter tuning costs.

[0194] In some embodiments, automatic text synopsis generation configuration can be accomplished by: integrating large language model capabilities, inputting only a story synopsis, and the program automatically generating episode structure, node jump tree, and basic arrangement intent description files. Creators only need minor adjustments to complete the full plot configuration. Furthermore...

[0195] Based on the branch scheme traffic distribution configuration, and by integrating online conversion and advertising revenue data, the program can automatically and dynamically adjust the traffic distribution ratio of each branch without the need for manual modification of configuration files; the web page arrangement tool has a built-in lightweight real-time preview function, allowing users to preview the complete plot flow instantly after modifying node configurations; it also supports saving the entire set of episodes and node configurations as reusable templates, which can be directly imported into new projects, reducing the workload of repetitive production.

[0196] In the second aspect, such as Figure 2 As shown, this application discloses an interactive content compilation and generation system 10 based on an orchestration description file, the system comprising:

[0197] The file receiving module 101 is used to receive an orchestration intent description file. The orchestration intent description file includes diversity configuration information and node definition information. The diversity configuration information includes at least one diversity, and the node definition information includes multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video nodes are second-level nodes, and the event nodes are first-level nodes. The first-level nodes are attached to the root node of the node jump tree, and the second-level nodes are attached to the first-level nodes. The event nodes define control flow events through an event type field. The control flow events are used to control the jump logic between the video nodes.

[0198] The lookup table construction module 102 is used to parse the orchestration intent description file and construct a lookup table between node identifiers and nodes;

[0199] Metadata attachment module 103 is used to attach processing metadata to each of the plurality of nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code.

[0200] The intermediate representation generation module 104 is used to generate an intermediate representation based on the plurality of nodes with the processing metadata attached;

[0201] The node traversal module 105 is used to traverse the nodes in the intermediate representation according to the intermediate representation;

[0202] The video node compilation module 106 is used to compile the video node into video playback component calling code based on the video node's processing metadata.

[0203] The event node compilation module 107 is used to compile the event node into control flow code corresponding to the event type based on the processing metadata of the event node;

[0204] The data acquisition code injection module 108 is used to automatically inject user interaction behavior data acquisition code at the generation location of the control flow code according to the processing metadata of the event node during the compilation and generation of the native code package. The user interaction behavior data acquisition code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered.

[0205] The native code package generation module 109 is used to compile and generate a native code package for the target platform. The native code package is used to run on the target platform to execute interactive content. The plot flow of the interactive content responds to the control flow event corresponding to the event node and switches between the video nodes.

[0206] In this embodiment, the file receiving unit reads the webpage description file, completes the legality verification, and then sends it to the lookup table construction unit. The lookup table construction unit traverses all subsets and interaction units, generates a global retrieval lookup table using node encoding, and passes it to the metadata attachment unit. The metadata attachment unit parses video materials, condition variables, and traffic grouping configurations respectively, generating corresponding processing metadata for each type of unit. The intermediate representation generation unit integrates the original architecture and all metadata, encapsulates it into a scripted object intermediate carrier, and delivers it to the node traversal unit. The node traversal unit loads the intermediate carrier, distinguishes between video and event units, and pushes them to two types of compilation units respectively. The two types of compilation units generate the platform's native business program based on the corresponding metadata. Throughout the code generation process, the data acquisition injection unit synchronously embeds acquisition logic into the business program. After all the code is generated, the native code package generation unit injects the platform's exclusive compilation identifier, integrates resources and SDK files, and outputs a complete project. The project runs by relying on event units to drive the switching of different video unit storylines. The system unit boundaries are clear, with each unit responsible for only a fixed function. Adding new business capabilities only extends the corresponding unit, without needing to reconstruct the entire pipeline.

[0207] In this embodiment, the system adopts a highly cohesive, loosely coupled modular architecture with clearly defined responsibilities for each unit. It supports parallel development by multiple teams and independent unit testing, resulting in low difficulty for later iterations and maintenance. The entire process is executed automatically in sequence, eliminating the need for manual configuration or synchronous program modifications, significantly reducing human error. A unified intermediate carrier serves as the sole interaction medium for each unit; adding new services only requires expanding metadata and the corresponding compilation unit, ensuring strong system scalability. Each unit can be independently iterated and optimized; upgrading the video parsing or traffic splitting unit separately will not interfere with the normal operation of the entire pipeline. The system simultaneously provides dual protection schemes for methods and devices, resulting in more comprehensive patent coverage.

[0208] In this embodiment, when compiling and generating the native code package, the plot parameters, branching rules, and underlying business code are isolated from each other. During program runtime, the new version of the orchestration intent description file can be remotely retrieved to dynamically update the plot, advertisements, and distribution logic without repackaging and publishing. The video node compilation module synchronously generates offline resource management code, automatically downloading video clips to local storage upon the first viewing by the user, and allowing complete playback of cached interactive content even without a network environment. The data acquisition code incorporates a multi-level reporting strategy, dynamically switching the reporting mode according to the device's network status: batch caching reporting on wireless networks, compressed reporting on mobile networks, and real-time reporting of advertisements or key events in the ending, balancing data real-time performance and user traffic consumption.

[0209] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A method for compiling and generating interactive content based on an orchestration description file, characterized in that, The method includes: S1: Receive orchestration intent description file, which includes diversity configuration information and node definition information. The diversity configuration information includes at least one diversity, and the node definition information includes multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video node is a second-level node, and the event node is a first-level node. The first-level node is attached to the root node of the node jump tree, and the second-level node is attached to the first-level node. The event node defines a control flow event through an event type field. The control flow event is used to control the jump logic between the video nodes. S2: Parse the orchestration intent description file, construct a lookup table between node identifiers and nodes, and attach processing metadata to each of the multiple nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code and generate an intermediate representation. S3: Based on the intermediate representation, traverse the nodes in the intermediate representation. Based on the processing metadata of the video node, compile the video node into video playback component calling code. Based on the processing metadata of the event node, compile the event node into control flow code corresponding to the event type. During the compilation and generation of the native code package, based on the processing metadata of the event node, automatically inject user interaction behavior data collection code at the generation location of the control flow code. The user interaction behavior data collection code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered, so as to compile and generate the native code package of the target platform. The native code package is used to run on the target platform to execute interactive content. The plot transition of the interactive content responds to the control flow event corresponding to the event node and switches between the video nodes.

2. The interactive content compilation and generation method based on an orchestration description file as described in claim 1, characterized in that, The processed metadata includes a cross-set state inheritance configuration, which is used to define the condition variable transit relationship between the sets. In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes, including: S21: Detect the condition variable referenced in the node definition information, the condition variable being used to record the user's decision result at the event node; S22: Based on the reference relationship of the condition variable, construct a cross-set state inheritance graph, which is used to indicate the transmission path of the condition variable between the sets; S23: Associate the cross-set state inheritance graph as part of the processing metadata with the intermediate representation.

3. The interactive content compilation and generation method based on an orchestration description file as described in claim 2, characterized in that, The compiled native code package for the target platform includes: Based on the cross-episode state inheritance graph, state inheritance code is generated. The state inheritance code is used to pass the value of the condition variable between episodes when the native code package is running, so that the plot branches of subsequent episodes adjust the jump targets between video nodes according to the value of the condition variable.

4. The interactive content compilation and generation method based on an orchestration description file as described in claim 3, characterized in that, The step of generating state inheritance code based on the cross-set state inheritance graph includes: Based on the cross-set state inheritance graph, determine the propagation path of the condition variable among the sets; Based on the transmission path, platform-native local storage read / write code is generated. The local storage read / write code is used to write the value of the condition variable to the local storage of the target platform when the session is switched, and to read the value of the condition variable from the local storage when the subsequent session is started. The local storage read / write code is native code adapted to the storage interface of the target platform.

5. The interactive content compilation and generation method based on an orchestration description file as described in claim 1, characterized in that, The processed metadata includes video content fingerprint information, which is used to identify the timeline features of the video content corresponding to the video node. The orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is attached to each of the multiple nodes, including: extracting the content fingerprint of the video content corresponding to the video node to obtain the timeline label of the video content, the timeline label of the video content is used to identify scene switching points, audio energy peak ranges and image motion vector intensity peak ranges in the video content; the timeline label is used as the fingerprint information of the video content and associated with the processing metadata of the video node.

6. The interactive content compilation and generation method based on an orchestration description file as described in claim 5, characterized in that, The step of automatically injecting user interaction behavior data collection code at the generation location of the control flow code based on the processing metadata of the event node includes: Based on the video content fingerprint information, timeline-level tracking code is injected into the video playback component call code corresponding to the video node. The timeline-level tracking code is used to obtain user interaction behavior data when the video content plays to the position corresponding to the timeline label.

7. The interactive content compilation and generation method based on an orchestration description file as described in claim 5, characterized in that, The step of extracting the content fingerprint of the video content corresponding to the video node to obtain the timeline label of the video content includes: The video content is segmented into scenes to identify scene transition points within the video content; Perform audio feature analysis on the video content to identify the peak audio energy range in the video content; Visual feature analysis is performed on the video content to identify the peak range of motion vector intensity in the video content; The timeline labels are generated based on the scene switching points, the audio energy peak range, and the image motion vector intensity peak range.

8. The interactive content compilation and generation method based on an orchestration description file as described in claim 1, characterized in that, The intermediate representation is a scripted object, which retains the original structure of the set configuration information and the node definition information, and adds the processing metadata to each node; The traversal of the nodes in the intermediate representation includes: The intermediate representation is loaded through the overall scheduling of the node state machine; For the video node, the following processing is performed: the video content of the video node is converted to a color space, the original color space is converted to a target color space, and color transition animation parameters are generated; Double-buffered playback resources are allocated to the video node. The double-buffered playback resources include a front buffer and a back buffer. The front buffer is used for displaying the current frame, and the back buffer is used for pre-decoding and rendering the next frame. According to the jump relationship of the video node, the branch video segments corresponding to the jump relationship are preloaded into the memory cache. For the event node, according to the event type field, the event node is assigned to the corresponding event processing logic, which includes click event processing logic, swipe event processing logic, or timed event processing logic.

9. The interactive content compilation and generation method based on an orchestration description file as described in claim 1, characterized in that, The orchestration intent description file also includes branch scheme traffic distribution configuration information, which is used to configure multiple branch schemes for the event node and set the traffic allocation ratio for each branch scheme; In step S2, the orchestration intent description file is parsed, a lookup table between node identifiers and nodes is constructed, and processing metadata is appended to each of the plurality of nodes. This also includes: The branch scheme traffic splitting configuration information is parsed, and traffic splitting control metadata is generated for the event node configured with the branch scheme traffic splitting configuration information. The traffic splitting control metadata includes the branch scheme, the traffic allocation ratio and the scheme identifier field. The scheme identifier field is used to identify the branch scheme to which the user interaction behavior data belongs. The traffic splitting control metadata is incorporated as part of the processing metadata and associated with the event node; In step S3, based on the processing metadata of the event node, the event node is compiled into control flow code corresponding to the event type, including: Based on the traffic control metadata, traffic control code is generated. The traffic control code is used to determine the target branch scheme to which the user belongs based on the user identifier of the target platform and the traffic allocation ratio when the control flow event is triggered. Based on the target branching scheme, determine the jump target between the video nodes; The traffic control code is native code adapted to the user identification interface of the target platform.

10. An interactive content compilation and generation system based on an orchestration description file, characterized in that, The system includes: The file receiving module is used to receive an orchestration intent description file. The orchestration intent description file contains diversity configuration information and node definition information. The diversity configuration information contains at least one diversity, and the node definition information contains multiple nodes belonging to the diversity. The multiple nodes include video nodes and event nodes. The multiple nodes form a node jump tree through jump relationships. The node jump tree includes first-level nodes and second-level nodes. The video nodes are second-level nodes, and the event nodes are first-level nodes. The first-level nodes are attached to the root node of the node jump tree, and the second-level nodes are attached to the first-level nodes. The event nodes define control flow events through an event type field. The control flow events are used to control the jump logic between the video nodes. The lookup table construction module is used to parse the orchestration intent description file and construct a lookup table between node identifiers and nodes. The metadata appending module is used to append processing metadata to each of the plurality of nodes. The processing metadata is used to determine the code generation logic of the corresponding node when compiling and generating the native code package. The processing metadata of the video node is used to determine the generation logic of the video playback component calling code, and the processing metadata of the event node is used to determine the generation logic of the control flow code. An intermediate representation generation module is used to generate an intermediate representation based on the plurality of nodes with the processing metadata attached; The node traversal module is used to traverse the nodes in the intermediate representation based on the intermediate representation; The video node compilation module is used to compile the video node into video playback component calling code based on the video node's processing metadata. An event node compilation module is used to compile the event node into control flow code corresponding to the event type based on the processing metadata of the event node; The data acquisition code injection module is used to automatically inject user interaction behavior data acquisition code at the generation location of the control flow code based on the processing metadata of the event node during the compilation and generation of the native code package. The user interaction behavior data acquisition code is used to listen to the control flow event corresponding to the event node and obtain user interaction behavior data when the control flow event is triggered. The native code package generation module is used to compile and generate a native code package for the target platform. The native code package is used to run on the target platform to execute interactive content. The plot flow of the interactive content responds to the control flow events corresponding to the event nodes and switches between the video nodes.