A news App construction generation method and system based on a layered componentization architecture

CN122884523APending Publication Date: 2026-10-09HUNAN DAILY INTELLIGENT MEDIA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611083973.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]针对现有技术中所存在的不足,本发明提供了一种基于分层组件化架构的新闻App构建生成方法及系统,其解决了传统单体化架构下新闻App的开发周期长、功能复用性低、维护成本高、难以快速定制化和多端部署的问题

Benefits of technology

通过将新闻App拆分为所述公共基础层组件和所述业务模块层组件,且各所述业务模块层组件通过标准化接口定义自身功能,各模块间无直接依赖关系,并通过所述路由中心模块实现间接通信,使每个业务模块可独立开发、独立编译、独立运行,甚至可单独作为SDK发布复用,从而使得开发团队可并行推进不同模块的开发工作,大幅缩短开发周期,且由于各模块独立,修改某一模块不会影响其他模块,显著降低了维护成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884523A_ABST
    Figure CN122884523A_ABST
Patent Text Reader

Abstract

The application provides a news App construction generation method and system based on a layered componentization architecture, which comprises the following steps: abstracting the basic capabilities of the news App into a plurality of public basic layer components; dividing the business functions of the news App into a plurality of business module layer components, each business module layer component defines its function through a standardized interface, and there is no direct dependency relationship between the modules; constructing a modular factory configuration file; parsing the configuration file through a modular factory engine, extracting the corresponding public basic layer components and business module layer components, and automatically injecting the corresponding dependency relationship of the public basic layer components and the business module layer components based on the dependency relationship of the configuration file; merging the public basic layer components, the business module layer components and the corresponding dependency relationship, executing code compilation and packaging, and generating a news App installation package. The application solves the problems of long development cycle, low function reuse, high maintenance cost, difficulty in quick customization and multi-terminal deployment of the news App under the traditional monolithic architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile application development technology, and in particular to a method and system for building and generating a news app based on a layered component architecture. Background Technology

[0002] With the popularization of mobile internet and the rapid development of 5G technology, news and information mobile applications (news apps) have become the main channel for users to obtain information. Users' expectations for news apps have shifted from simple information browsing to high requirements for real-time performance, personalization, interactivity, and consistent experience across multiple devices.

[0003] The current development approach for news apps primarily follows the traditional monolithic architecture, which highly couples all business logic, user interface, and data access layer into a single codebase. This architecture is efficient in the early stages of a project or when the functionality is simple, but as the business scales up, its inherent limitations become increasingly apparent, as follows: Firstly, the development cycle is long, making it difficult to quickly respond to the diverse needs of different customers and the ever-changing market demands. Secondly, the functionality is not reusable, and components and modules are difficult to share across multiple projects or different versions of the app, leading to redundant development. Third, the maintenance cost is high. The business logic and interface code are closely intertwined, and any minor modification may have a ripple effect, seriously hindering the product's iteration and upgrade. Fourth, it is difficult to meet the needs of rapid customization and batch generation for multiple business scenarios.

[0004] To address these issues, some developers have begun to explore modular or component-based design concepts in existing technologies. However, most solutions remain at the level of code-level logical decomposition, failing to form a systematic engineering solution. For example, some technical solutions focus on using cross-platform frameworks (such as React Native and Flutter) to improve development efficiency. However, in practical applications, these solutions still struggle to overcome the adaptation challenges caused by underlying platform differences, especially when dealing with the unique needs of news apps, such as "high-frequency content updates," "real-time push notifications," and "personalized recommendations," where performance and user experience bottlenecks are particularly evident. Furthermore, while some solutions have proposed microservice architectures, their implementation on mobile devices often faces challenges such as complex inter-module communication, chaotic dependency management, and difficulties in dynamic deployment. Especially for news media that need to support rapid publishing across multiple channels and formats, there is currently a lack of a systematic architectural approach that can achieve "develop once, deploy across multiple platforms" and support flexible, on-demand combinations. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for building and generating news apps based on a layered component architecture. This method solves the problems of long development cycles, low functional reusability, high maintenance costs, and difficulty in rapid customization and multi-terminal deployment of news apps under the traditional monolithic architecture.

[0006] According to an embodiment of the present invention, a method for building and generating a news app based on a layered component-based architecture includes the following steps: The basic capabilities that can be reused across business processes in the news app are abstracted into several independent common basic layer components. Each of these common basic layer components includes at least a network request module, a message push module, a data statistics module, and a routing center module. The business functions of the news app are divided into several loosely coupled and highly cohesive business module layer components, each of which includes a news module, a user center module, and an audio-visual module. Each of the business module layer components defines its own functions through standardized interfaces, and there are no direct dependencies between the modules. The routing center module is used to register, discover, and call the standardized interfaces exposed by each of the business module layer components to realize indirect communication between the modules. Construct a modular factory configuration file to describe the product requirements of the target news app. The configuration file specifies the unique identifiers, version numbers, and dependencies of the common infrastructure layer components and the business module layer components to be integrated. The modular factory engine parses the configuration file, extracts the corresponding common infrastructure layer components and business module layer components, and automatically injects the corresponding dependencies of the extracted common infrastructure layer components and business module layer components based on the dependency relationships in the configuration file. The common infrastructure layer components, the business module layer components, and their corresponding dependencies are merged, and the code is compiled and packaged to generate a standalone news app installation package.

[0007] According to another embodiment of the present invention, a news app building and generation system based on a layered component-based architecture includes: The common infrastructure layer is used to store and manage several common infrastructure layer components that have been abstracted into independent plugins. Each of the common infrastructure layer components includes at least a network request module, a message push module, a data statistics module, and a routing center module. The business module layer is used to store and manage several business module layer components that have been decoupled into independent sub-applications. Each business module layer component includes a news module, a user center module, and an audio-visual module. Each business module layer component defines its own functions through a standardized interface, and there is no direct dependency between the modules. The routing center module is used to register, discover, and call the standardized interfaces exposed by each business module layer component to realize indirect communication between the modules. The product assembly output layer stores and manages several generated product assembly output layer components, including a modular factory configuration module, a modular factory engine module, and a compilation and packaging module, wherein: The modular factory configuration module is used to build a modular factory configuration file that describes the product requirements of the target news app. The configuration file specifies the unique identifier, version number, and dependency relationship of the common infrastructure layer components and the business module layer components to be integrated. The modular factory engine module is used to parse the configuration file, extract the corresponding common infrastructure layer components and business module layer components, and automatically inject the corresponding dependencies of the extracted common infrastructure layer components and business module layer components based on the dependency relationships in the configuration file. The compilation and packaging module is used to merge the common infrastructure layer components, the business module layer components and their corresponding dependencies, execute code compilation and packaging, and generate an independently running news app installation package.

[0008] Compared with the prior art, the present invention has the following beneficial effects: By splitting the news app into the common infrastructure layer components and the business module layer components, and with each business module layer component defining its own functions through standardized interfaces, there are no direct dependencies between the modules. Indirect communication is achieved through the routing center module, allowing each business module to be developed, compiled, and run independently, and even released and reused as a standalone SDK. This enables the development team to advance the development of different modules in parallel, significantly shortening the development cycle. Furthermore, since each module is independent, modifying one module will not affect other modules, significantly reducing maintenance costs.

[0009] By constructing a modular factory configuration file, the common basic components and business components required by the target news app product and their dependencies (unique identifiers, version numbers, etc.) are described. The modular factory engine parses the configuration, automatically extracts the corresponding components and automatically injects the dependencies, and finally merges and compiles them to generate an installation package. This allows developers to quickly combine different business modules by simply modifying the configuration file, enabling rapid customization of the application. At the same time, the automated dependency injection and merging compilation mechanism transforms the traditional serial development process into a parallel mode, greatly improving development efficiency.

[0010] By encapsulating common functions into independent components (such as network requests, push notifications, advertising services, AI reading, etc.) and making them reusable as common foundational components for all business modules, common components can be directly reused across multiple business modules or even multiple apps. Only configuration parameters need to be adjusted to adapt to different scenarios, which greatly improves code reusability. At the same time, through component-based layering, the same set of business modules can be adapted to different devices such as mobile phones, tablets, smart screens, and in-vehicle systems, achieving "develop once, deploy on multiple platforms". Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating the steps of a news app construction and generation method based on a layered component architecture, according to Embodiment 1 of the present invention.

[0012] Figure 2 This is a control principle diagram of a news app building and generation system based on a layered component architecture, according to Embodiment 2 of the present invention.

[0013] In the above diagram: 1. Common Foundation Layer; 2. Business Module Layer; 3. Product Assembly Output Layer; 11. Common Foundation Layer Components; 21. Business Module Layer Components; 31. Product Assembly Output Layer Components; 111. Network Request Module; 112. Message Push Module; 113. Data Statistics Module; 114. Routing Center Module; 211. News Module; 212. User Center Module; 213. Audiovisual Module; 311. Modular Factory Configuration Module; 312. Modular Factory Engine Module; 313. Compilation and Packaging Module; 3121. Dependency Conflict Detection Unit. Detailed Implementation

[0014] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0015] Example 1 like Figure 1 As shown in the figure, this embodiment of the invention proposes a method for building and generating a news app based on a layered component-based architecture, including the following steps: S1. The basic capabilities that can be reused across businesses in the news app are abstracted into several independent common basic layer components 11. Each of the common basic layer components 11 includes at least a network request module 111, a message push module 112, a data statistics module 113, and a routing center module 114. Specifically, the common infrastructure component 11 is a technical infrastructure and is unrelated to specific business logic. The common infrastructure component 11 is packaged into an independent HAR package (HarmonyOS) or AAR package (Android) so that upper-layer modules can depend on it as needed.

[0016] Each of the aforementioned common infrastructure layer components 11 includes at least a network request module 111, a message push module 112, a data statistics module 113, and a routing center module 114. The network request module 111 is encapsulated based on @ohos / axios (HarmonyOS) or Retrofit (Android), providing unified GET and POST request interfaces, error handling, caching strategies, and interceptors (such as automatic token refresh), and provides a clear API, such as HttpUtil.get(). The message push module 112 integrates Unity Push Service (HarmonyOS) or Huawei Push (Android) to push notifications such as news and comment replies to users. The data statistics module 113 integrates a data tracking SDK to record user behavior (such as clicks, reading time, and sharing) to provide data support for operations. The routing center module 114 is the core component for decoupled communication between modules, responsible for service registration, discovery, and invocation, and provides a globally unique routing table to manage all publicly exposed interfaces and page paths of all business modules.

[0017] S2. The business functions of the news app are divided into several loosely coupled and highly cohesive business module layer components 21. Each business module layer component 21 includes a news module 211, a user center module 212, and an audio-visual module 213. Each business module layer component 21 defines its own functions through a standardized interface, and there is no direct dependency between the modules. The routing center module 114 is used to register, discover, and call the standardized interfaces exposed by each business module layer component 21 to realize indirect communication between the modules. The news module 211 includes at least a news list, news details, news categories, and a pull-to-refresh function; the user center module 212 includes at least user login, comment management, and favorites functions; and the audiovisual module 213 includes at least video playback and live streaming functions.

[0018] Specifically, each of the business module layer components 21 has a clear business boundary, defines its own functions through standardized interfaces, and there is no direct dependency between modules. Each of the business module layer components 21 is an independent HAR (HarmonyOS) or AAR (Android) project, which allows for independent compilation and independent test running (through the isModule configuration switch), thereby greatly improving the efficiency of parallel development and testing.

[0019] Each of the aforementioned business module layer components 21 includes a news module 211, a user center module 212, and an audiovisual module 213. The news module 211 is responsible for displaying the news list, displaying news details (using WebView to load rich text), news categorization, pull-to-refresh, and pull-to-load functionality, and it only depends on the network request module 111 and the routing center module 114 in the common basic layer component 11. The user center module 212 is responsible for user login (integrating Huawei account or WeChat login), account information management, my favorites, and comment history. The audiovisual module 213 is responsible for video list playback (using ArkUI video component or system player) and live streaming functionality. This module internally encapsulates a complete player UI, logic, and data model.

[0020] S3. Construct a modular factory configuration file to describe the product requirements of the target news app. The configuration file specifies the unique identifier, version number and dependency relationship of the common infrastructure layer component 11 and the business module layer component 21 to be integrated. The configuration file includes a component list of the public infrastructure layer component 11, a component list of the business module layer component 21, inter-module routing rules, and a global style theme configuration document. Based on the inter-module routing rules, the modular factory engine automatically registers and binds the page routes of each of the business module layer components 21 in the generated news app installation package, thereby enabling seamless jumps and communication between modules.

[0021] Specifically, the configuration file serves as a blueprint for the entire automated build process, specifying: 1) List of basic components to be integrated, including "Network Request Module 111v2.1.0" and "Route Center Module 114v1.5.0"; 2) List of business components to be integrated, including "News Module 211v3.0.0", "User Center Module 212v1.0.0", and "Audiovisual Module 213v2.0.0"; 3) Inter-module routing rules, for example, defining the route of the news details page as / news / detail and the user center page as / personal / home, the modular factory engine will automatically register the routes in the final App according to these rules; 4) Global style theme configuration, defining theme colors, fonts, icons, etc., to achieve brand differentiation; 5) Differentiated customization parameters: Define unique parameters for different customers or environments, such as default channel list, homepage recommendation algorithm strategy (e.g., weight A:0.6, B:0.4 or A:0.3, B:0.7), UI skin resource path, etc.

[0022] S4. The configuration file is parsed through the modular factory engine to extract the corresponding common basic layer component 11 and business module layer component 21, and the corresponding dependency relationship of the extracted common basic layer component 11 and business module layer component 21 is automatically injected based on the dependency relationship in the configuration file. Specifically, based on the dependencies in the configuration file, the modular factory engine automatically injects dependencies. This means that when generating project code, the engine modifies (or generates) the dependency configuration file of the App shell project (HAP or APK) to ensure that all selected components and their transitive dependencies are correctly declared. For example, the engine will parse the oh-package.json5 of the news module and find that it depends on common, so it will automatically add the dependency "common": "file:.. / .. / common" to the final product / phone project.

[0023] S5. Merge the common infrastructure layer component 11, the business module layer component 21 and their corresponding dependencies, compile and package the code, and generate an independently running news app installation package.

[0024] The news app installation package is either a HAP package based on the HarmonyOS platform or an APK package based on the Android platform, and supports cross-platform component reuse and one-click packaging and deployment.

[0025] Specifically, all extracted components, configuration files, and automatically generated dependencies are merged to form a complete, compileable project structure. Then, the system compiler (such as DevEco Studio's build tools or Gradle) is called to compile, link, and package the project, ultimately generating a standalone news app installation package (such as a .hap package for HarmonyOS or a .apk package for Android).

[0026] Furthermore, it also includes the following steps: S6. When generating the news app installation package, the UI skin resources, default channel list and homepage recommendation algorithm strategy in the news module 211 are dynamically replaced for different customers or different business scenarios through the differentiated customization parameters in the configuration file, so as to batch produce a number of news app installation packages with different brand appearances and content operation strategies.

[0027] Specifically, when generating installation packages, the modular factory engine produces products with different brand appearances for different customers. While parsing the differentiated customization parameters in the configuration file, and after extracting the business module (such as news module 211), the engine dynamically replaces the resource files within that module based on the parameter values. For example, if customer A's configuration file specifies "uiSkin": "client_a_skin", the engine will overwrite the UI resources (colors, icons, images) from the preset "skin package A" into the resource directory of news module 211. For the default channel list, the engine will directly modify the corresponding configuration constant file. This process achieves rapid batch production of "one set of code, multiple skins" without modifying any business logic code.

[0028] In this embodiment, the specific workflow of the news app building and generation method of the present invention is as follows: First, the basic capabilities that can be reused across business processes in the news app are abstracted into several independent common foundation layer components 11. Then, the business functions of the news app are divided into several loosely coupled and highly cohesive business module layer components 21. Each component has a clear business boundary, defines its own functions through standardized interfaces, and there are no direct dependencies between modules. Next, a modular factory configuration file (such as a JSON or XML file) is created to describe the product requirements of the target news app. The modular factory engine reads the configuration file and sequentially performs operations such as parsing the manifest, extracting components, and handling dependencies. Subsequently, based on the dependency relationships in the configuration file, the modular factory engine automatically completes the injection of dependency relationships. Finally, all extracted components, configuration files, and automatically generated dependency relationships are merged to form a complete and compilable project structure. Then, the system compiler (such as DevEco Studio's build tools or Gradle) is called to compile, link, and package the project, ultimately generating an independently running news app installation package (such as a .hap package for HarmonyOS or a .apk package for Android).

[0029] To verify the beneficial effects of the present invention, we selected a medium-sized news app project for comparative testing. The test included four core business modules: news, users, video, and live streaming. The specific test results are shown in the table below.

[0030] The experimental data fully demonstrates the significant advantages of this invention in improving development efficiency, reducing maintenance costs, enhancing flexibility, and optimizing user experience.

[0031] Example 2 like Figure 2 As shown, another embodiment of the present invention proposes a news app building and generation system based on a layered component-based architecture, comprising: The common infrastructure layer 1 is used to store and manage several common infrastructure layer components 11 that have been abstracted into independent plugins. Each of the common infrastructure layer components 11 includes at least a network request module 111, a message push module 112, a data statistics module 113, and a routing center module 114. The business module layer 2 is used to store and manage several business module layer components 21 that have been decoupled into independent sub-applications. Each business module layer component 21 includes a news module 211, a user center module 212, and an audio-visual module 213. Each business module layer component 21 defines its own functions through a standardized interface, and there is no direct dependency between the modules. The routing center module 114 is used to register, discover, and call the standardized interfaces exposed by each business module layer component 21 to realize indirect communication between the modules. Product assembly output layer 3 is used to store and manage several generated product assembly output layer components 31. The product assembly output layer components 31 include a modular factory configuration module 311, a modular factory engine module 312, and a compilation and packaging module 313, wherein: The modular factory configuration module 311 is used to construct a modular factory configuration file that describes the product requirements of the target news app. The configuration file specifies the unique identifier, version number and dependency relationship of the common basic layer component 11 and the business module layer component 21 to be integrated. The modular factory engine module 312 is used to parse the configuration file, extract the corresponding public basic layer component 11 and business module layer component 21, and automatically inject the corresponding dependency relationship of the extracted public basic layer component 11 and business module layer component 21 based on the dependency relationship in the configuration file. The compilation and packaging module 313 is used to merge the common basic layer component 11, the business module layer component 21 and their corresponding dependencies, execute code compilation and packaging, and generate an independently running news app installation package.

[0032] Furthermore, the modular factory engine module 312 includes a dependency conflict detection unit 3121, which is used to detect version conflicts between components before injecting dependencies, and automatically select a compatible version or prompt the developer to handle the conflict according to a predefined conflict resolution strategy.

[0033] Furthermore, the business module layer component 21 is an independent dynamic library or plugin package. The dynamic library or plugin package encapsulates its corresponding UI layout, business logic and data model, and interacts with the main App through a predefined module lifecycle interface to support hot loading, dynamic updates or on-demand uninstallation when the news App installation package is running.

[0034] In this embodiment, the common infrastructure layer 1 is responsible for storing and managing all common infrastructure layer components 11 that have been abstracted into independent plugins. It acts like a "tool library," providing underlying technical support for upper-layer services. When the application starts, the components in this layer (especially the routing center module 114) will complete initialization first, preparing for subsequent service registration and discovery.

[0035] The business module layer 2 is responsible for storing and managing all business module layer components 21 that have been decoupled into independent sub-applications. These components are "plug-and-play" business units, and each business module layer component 21 follows a unified engineering specification. 1) Internal integrity: It contains a complete UI layout (ArkUI declarative or Jetpack Compose), business logic (ViewModel or Presenter), and data model (Model).

[0036] 2) Standardized Interfaces: Interacting with external systems through predefined interfaces and lifecycles. For example, each business module must implement an IModuleLifecycle interface, containing methods such as onCreate(Context) and onDestroy(), so that the main App can uniformly schedule its lifecycle at startup.

[0037] 3) Independence: They only depend on the components of the common infrastructure layer 1, and there is no direct dependency between them. Communication between modules is completed entirely through the routing center module 114.

[0038] The product assembly output layer 3 is the core decision-making and execution layer for automated build generation. It includes the modular factory configuration module 311, the modular factory engine module 312, and the compilation and packaging module 313. The modular factory configuration module 311 provides a visual configuration interface or configuration file editor, allowing product managers or configuration engineers to generate modular factory configuration files describing the requirements of the target app by filling out forms or editing JSON files. Configuration items include selecting component versions, defining route mappings, uploading brand skins, and setting operational parameters. The modular factory engine module 312 is responsible for executing the core logic and internally includes a parser (reading and validating the syntax and integrity of the configuration file) and a dependency resolution mechanism. The engine includes a conflict detection unit 3121 (which handles component dependencies and resolves version conflicts using predefined rules, such as "recent version priority" or "highest version priority" strategies; when two components depend on different versions of the same base library, the engine attempts to automatically select a compatible version; if the conflict cannot be resolved, a conflict report is generated for developers to handle), a code generator (which generates configuration files and entry code for the final App shell project, such as generating RouterConfig.kt or RouterPageList.ets based on routing rules, which contains routing mapping tables for all selected business modules); and a compilation and packaging module 313 (which receives the complete project structure from the engine, calls the system compiler (DevEco StudioCLI or Gradle CLI) to perform headless build, and finally outputs a packaged installation package (.hap or .apk). This module supports multi-threaded compilation, which can significantly shorten the build time. It supports one-click packaging and deployment to real devices or simulators, as well as outputting a hardened release package).

[0039] By introducing the product assembly output layer 3, the news app's construction process is transformed from manual assembly to automated factory production. Product managers only need to define requirements through the configuration file, and the system can automatically complete the entire process of component extraction, dependency resolution, configuration injection, compilation, and packaging, greatly reducing the risk of errors caused by manual intervention and increasing production efficiency several times over. Since the business module layer component 21 is an independent unit, it can be independently developed, tested, and deployed. The same news module 211 can be used in multiple different news app projects without modification. Differentiation can be achieved simply by switching brand skins and operational strategies through the configuration file at the outer layer. The component reuse rate can reach over 90%. Furthermore, due to the business... Module layer component 21 is an independent package and communicates through the routing center module 114. The system natively supports hot reloading, allowing users to dynamically download the audio-visual module 213 as needed during the news app's runtime, thus achieving on-demand loading of functions and greatly reducing the size of the first installation package (for example, the first package can be reduced by more than 50%). The layered structure forcibly ensures the unidirectionality of dependencies (business layer → common layer), resulting in a clear code structure and well-defined responsibilities. This allows new developers to quickly understand and get started with a specific business module without needing to understand the complexity of the entire system. When upgrading the technology stack, only the common foundation layer 1 needs to be modified, with minimal impact on the upper-layer business modules, significantly reducing the long-term maintenance costs of the system.

[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for building and generating a news app based on a layered component-based architecture, characterized in that, Includes the following steps: The basic capabilities that can be reused across business processes in the news app are abstracted into several independent common basic layer components. Each of these common basic layer components includes at least a network request module, a message push module, a data statistics module, and a routing center module. The business functions of the news app are divided into several loosely coupled and highly cohesive business module layer components, each of which includes a news module, a user center module, and an audio-visual module. Each of the business module layer components defines its own functions through standardized interfaces, and there are no direct dependencies between the modules. The routing center module is used to register, discover, and call the standardized interfaces exposed by each of the business module layer components to realize indirect communication between the modules. Construct a modular factory configuration file to describe the product requirements of the target news app. The configuration file specifies the unique identifiers, version numbers, and dependencies of the common infrastructure layer components and the business module layer components to be integrated. The modular factory engine parses the configuration file, extracts the corresponding common infrastructure layer components and business module layer components, and automatically injects the corresponding dependencies of the extracted common infrastructure layer components and business module layer components based on the dependency relationships in the configuration file. The common infrastructure layer components, the business module layer components, and their corresponding dependencies are merged, and the code is compiled and packaged to generate a standalone news app installation package.

2. The method for building and generating a news app based on a layered component-based architecture as described in claim 1, characterized in that, The configuration file includes a component list of the common infrastructure layer components, a component list of the business module layer components, inter-module routing rules, and a global style theme configuration document; Based on the inter-module routing rules, the modular factory engine automatically registers and binds the page routes of each business module layer component in the generated news app installation package, enabling seamless navigation and communication between modules.

3. A method for building and generating a news app based on a layered component-based architecture as described in claim 1 or 2, characterized in that, It also includes the following steps: When generating the news app installation package, the UI skin resources, default channel list and homepage recommendation algorithm strategy in the news module are dynamically replaced with differentiated customization parameters in the configuration file for different customers or different business scenarios, so as to batch produce several news app installation packages with different brand appearances and content operation strategies.

4. The method for building and generating a news app based on a layered component-based architecture as described in claim 1, characterized in that, The news module includes at least a news list, news details, news categories, and a pull-to-refresh function; the user center module includes at least user login, comment management, and favorites functions; and the audio-visual module includes at least video playback and live streaming functions.

5. The method for building and generating a news app based on a layered component-based architecture as described in claim 1, characterized in that, The news app installation package is either a HAP package based on the HarmonyOS platform or an APK package based on the Android platform, and supports cross-platform component reuse and one-click packaging and deployment.

6. A news app building and generation system based on a layered component-based architecture, employing the news app building and generation method based on a layered component-based architecture as described in any one of claims 1-5, characterized in that, include: The common infrastructure layer is used to store and manage several common infrastructure layer components that have been abstracted into independent plugins. Each of the common infrastructure layer components includes at least a network request module, a message push module, a data statistics module, and a routing center module. The business module layer is used to store and manage several business module layer components that have been decoupled into independent sub-applications. Each business module layer component includes a news module, a user center module, and an audio-visual module. Each business module layer component defines its own functions through a standardized interface, and there is no direct dependency between the modules. The routing center module is used to register, discover, and call the standardized interfaces exposed by each business module layer component to realize indirect communication between the modules. The product assembly output layer stores and manages several generated product assembly output layer components, including a modular factory configuration module, a modular factory engine module, and a compilation and packaging module, wherein: The modular factory configuration module is used to build a modular factory configuration file that describes the product requirements of the target news app. The configuration file specifies the unique identifier, version number, and dependency relationship of the common infrastructure layer components and the business module layer components to be integrated. The modular factory engine module is used to parse the configuration file, extract the corresponding common infrastructure layer components and business module layer components, and automatically inject the corresponding dependencies of the extracted common infrastructure layer components and business module layer components based on the dependency relationships in the configuration file. The compilation and packaging module is used to merge the common infrastructure layer components, the business module layer components and their corresponding dependencies, execute code compilation and packaging, and generate an independently running news app installation package.

7. A news app building and generation system based on a layered component-based architecture as described in claim 6, characterized in that, The modular factory engine module includes a dependency conflict detection unit, which is used to detect version conflicts between components before injecting dependencies, and automatically select a compatible version or prompt the developer to handle the conflict according to a predefined conflict resolution strategy.

8. A news app building and generation system based on a layered component-based architecture as described in claim 6, characterized in that, The business module layer components are independent dynamic libraries or plugin packages. The dynamic libraries or plugin packages encapsulate their corresponding UI layout, business logic and data models, and interact with the main App through predefined module lifecycle interfaces to support hot loading, dynamic updates or on-demand uninstallation when the news App installation package is running.