CN101833465A - Embedded system supporting dynamic loading operation of application programs - Google Patents

Embedded system supporting dynamic loading operation of application programs Download PDF

Info

Publication number
CN101833465A
CN101833465A CN 201010159861 CN201010159861A CN101833465A CN 101833465 A CN101833465 A CN 101833465A CN 201010159861 CN201010159861 CN 201010159861 CN 201010159861 A CN201010159861 A CN 201010159861A CN 101833465 A CN101833465 A CN 101833465A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
module
management
system
unit
application
Prior art date
Application number
CN 201010159861
Other languages
Chinese (zh)
Other versions
CN101833465B (en )
Inventor
孙鹏
张辉
朱小勇
林军
王劲林
邓峰
韩洪波
Original Assignee
中国科学院声学研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Abstract

The invention relates to an embedded system supporting dynamic loading operation of application programs. The system comprises a frame management module, an application execution engine module, a basic functional unit library module and an API module, wherein the API module, the application execution engine module and the basic functional unit library module are orderly arranged from top to bottom; the frame management module is the core management unit and used for implementing the unified management and dispatching on the terminal software and hardware resources; the frame management moduleis used for providing a system resource acquisition and release interface for the loaded application program, thereby implementing the unified management and dispatching on the system software and hardware resources; the basic functional unit library module is used for being called by other units or application execution engine; and the basic functional unit is distributed onto the terminal accessible server, so that the frame management module can remotely load the basic functional unit according to user needs when the terminal operates. The embedded system of the invention also comprises a multilevel security management module which comprises process management submodules at three levels.

Description

一种支持应用程序动态加载运行的嵌入式系统 That supports dynamic loading applications running embedded systems

技术领域 FIELD

[0001] 本发明涉及嵌入式系统领域,特别涉及一种支持应用程序动态加载运行的嵌入式系统。 [0001] The present invention relates to the field of embedded systems, and particularly to a dynamic loading application running support embedded systems.

背景技术 Background technique

[0002] 随着通信技术的飞速发展,电信网、计算机互联网、有线数字电视网日趋呈现多层次的融合特性,“三网融合”成为通信技术发展的必然产物,国家政策层面也给予了高度重视,是国家发展信息化的重要战略部署。 [0002] With the rapid development of communication technology, telecommunications networks, computer Internet, digital cable television network increasingly showing convergence characteristics of multi-level, "triple play" has become an inevitable product of development of communication technology, the national policy level also given a high priority , it is an important national strategic development of information technology. “三网融合”的发展,为目前国内运营商向全业务综合运营方向发展提供有力支撑,而运营商竞争的核心是能否向用户提供多样化、丰富的应用服务产品。 "Triple play" development for domestic operators to develop an integrated full-service operation direction to provide strong support, while the operator's core competitiveness is the ability to provide users with diverse, rich application service products. 多样化和丰富的应用需要来自最大范围业务提供商的积极参与和创作,而不仅仅是少数业务提供商或运营商自己的工作。 The diversity and richness of applications that require the active participation and creativity from the largest range of service providers, not just a small number of the service provider or operator's own work. 终端作为直接面向用户的业务操控和呈现设备,是业务应用的最终运行载体,运营商希望能够通过吸引更多的第三方应用开发商不断的快速开发和部署新的增值应用,这就需要在技术上实现终端业务的快速开发、部署、运行,降低业务设计以及接入运行的门槛。 As a direct-to-user terminal handling and presentation of business equipment, business applications eventually run carriers, operators want to be able to attract more third-party application developers continue to rapidly develop and deploy new value-added applications, which requires technology the rapid development of terminal operations, deployment, operation, lower the threshold for access to business design and operation.

[0003] 目前传统嵌入式终端业务应用开发运行多采用客户端集成的方式,业务应用程序由应用开发人员开发完成后,以客户端软件库的形式交由终端开发人员进行软件移植,将应用程序集成到嵌入式终端平台的整体软件系统中,再通过大规模的终端整体软件升级, 实现该业务的终端部署运行。 [0003] current traditional business applications developed to run embedded terminal client to use more integrated manner, the business applications developed by the application developer, in the form of client software library handed over to the terminal developers to port software, application integrated into the overall system embedded terminal software platform, and through large-scale whole terminal software upgrade, the business end of the deployment operation. 此种应用开发方式,对于业务应用的丰富和业务开发商的引入,存在诸多限制因素: Such application development approach for the introduction of a wealth of business and developers of business applications, there are many constraints:

[0004] 1、应用开发技术门槛高,开发周期长。 [0004] 1, application development high technical threshold, long development cycle.

[0005] 目前嵌入式终端多种多样,在主芯片类型、资源配置、操作系统类型、软件架构等各方面存在差异,应用开发因采取移植的方式集成到终端软件系统中,需要应用开发人员对终端的软件架构熟悉了解,这对应用开发提出了较高的技术需求。 [0005] At present a variety of embedded devices, there are differences in all aspects of the main chip type, resource configuration, operating system type, such as software architecture, application development due to take the form of transplantation-to-end integrated software system, the need for application developers familiar with the software architecture of the terminal, which application developers raised higher technical requirements. 而移植过程中,终端开发人员与应用开发人员间的技术沟通磨合,势必造成应用开发周期的加长,无法实现业务的快速开发部署。 The transplant process, the communication between terminal technology developers and application developers to run, will inevitably result in the application development cycle is longer, can not achieve rapid development and deployment of services.

[0006] 2、应用采用内置方式,对嵌入式终端资源配置带来挑战。 [0006] 2, with built-in application mode, the embedded terminal resource allocation challenges.

[0007] 应用程序以客户端软件库形式内嵌在嵌入式终端整体软件系统中,当应用开发快速发展,应用数量极大丰富时,势必产生对终端资源配置的巨大挑战,造成终端硬件平台的不断升级换代,使运营商反复重复投资,终端开发商技术重复投入,而分散新业务应用开发的投入力度。 [0007] application to the client software library in the form of embedded software systems embedded in the whole terminal, when the rapid development of application development, application number of great wealth, is bound to have a huge challenge for the terminal allocation of resources, resulting in terminal hardware platform constantly upgrading, enabling operators to repeated duplication of investment, technology developers terminal duplication of investment, while investment in new decentralized business application development.

[0008] 3、业务应用更新流程复杂,维护成本高昂。 [0008] 3, the update process complex business applications, high maintenance costs.

[0009] 新应用的开发部署,需应用开发人员、终端开发人员、终端生产厂家、运营商等产业链各环节的参与,流程繁杂,势必造成维护成本高昂。 Various aspects of the [0009] development and deployment of new applications, application developers need, terminal developers, terminal manufacturers, operators and other industry chain involved, complicated process, will inevitably result in high maintenance costs. 并且某个应用的更新,需大规模用户终端软件升级,带来运营风险提高。 And update an application, the user terminal to be large-scale software upgrade, bringing operational risk increased.

[0010] 针对业务应用极大丰富的需求,针对现有应用开发的问题,急需构建一种将应用程序开发与嵌入式终端平台隔离,并支持应用程序动态加载、运行具有完善的生命周期管理,适合嵌入式系统应用的基础软件框架,为业务应用的快速开发、部署、下载、运行提供技术支撑。 [0010] for the great wealth of demands business applications, application development for the existing problems, the urgent need to construct a terminal application development platform and embedded isolation, and support for dynamic loading applications, running with a sound life-cycle management, basic software framework for embedded system applications, to provide technical support for the rapid development of business applications, deployment, download, run.

发明内容 SUMMARY

[0011] 本发明的目的在于,为克服现有技术的应用开发技术门槛高,开发周期长,应用采用内置方式,对嵌入式终端资源配置要求很高以及业务应用更新流程复杂,维护成本高昂等缺点,从而提出一种支持应用程序动态加载运行的嵌入式系统。 [0011] The object of the present invention is to overcome the prior art application development high threshold, long development cycle, with built-in application mode, the allocation of resources to the embedded terminal, and business applications demanding complex update procedure, high maintenance costs, etc. shortcomings, which presents a dynamic load support applications running in embedded systems.

[0012] 鉴于业务快速开发部署需求和嵌入式终端多样性特点,本发明提供一种支持应用程序动态加载运行的开放的嵌入式终端基础软件框架,该框架是一个面向嵌入式终端应用开发和动态加载运行的开放式终端基础软件平台。 [0012] In view of the rapid development and deployment of business needs and diversity of the embedded terminal, the present invention provides a support for open application infrastructure software framework for embedded dynamic loading terminal operation, which is a framework for embedded application development and dynamic terminal load open infrastructure software platform running terminal. 该软件平台能为应用开发商提供硬件无关的开发环境,具备应用的动态发现、加载和管理功能,并能够整合终端系统的软硬件资源为应用提供运行环境,并为第三方应用的运行提供任务管理和资源管理功能。 The software platform provides hardware-independent development environment for application developers, with the application of dynamic discovery, loading and management capabilities, and the ability to integrate hardware and software resources to provide end system for application execution environment, and provides task to run third-party applications management and resource management functions.

[0013] 本发明提出的一种支持应用程序动态加载运行的嵌入式系统,该系统包含:框架管理模块、应用执行引擎模块、基础功能组件库模块和API模块,其中,由上至下依次为: API模块、应用执行引擎模块和基础功能组件库模块; [0013] Embedded application proposed a system for supporting dynamic loading of the present invention is running, the system comprising: a frame management module, the application execution engine module, and the basic functional components API module library modules, which is from top to bottom : API module, application execution engine module and basic functional component library module;

[0014] 所述的应用执行引擎模块:用于解释应用程序开发语言,为应用程序提供动态运行环境; [0014] The application execution engine module: for explaining an application development language, providing a dynamic operating environment for the application;

[0015] 所述的API模块:用于提供编程的程序接口,且采用开放的API接口; [0015] The API of the module: a program interface for providing programming, and the use of open API;

[0016] 其特征在于, [0016] wherein,

[0017] 所述的框架管理模块是核心管理单元,用于实施对终端软硬件资源的统一管理调度,负责嵌入式系统中应用执行引擎模块、基础功能组件库模块和API模块所加载的应用程序的管理调度,该框架管理模块用于为所加载的应用程序提供系统资源获取和释放接口,实现系统软硬资源统一管理和调度; [0017] The frame management module is the central management unit, for scheduling the centralized management hardware and software resources of the terminal, the embedded system is responsible for the application execution engine module, the application module and the basic functional components API library modules loaded management schedule, the frame management module is used to provide a system for the application resource acquisition and release of the loaded interface, the system software and hardware resources unified management and scheduling;

[0018] 其中,所述的框架管理模块,对同时运行的N个应用程序,能动态分配M个应用执行引擎实例进行解释执行,其中1 <= M <= N; [0018] wherein the frame management module, the N applications running simultaneously, the application can dynamically allocate the M instances interpreted execution engine, where 1 <= M <= N;

[0019] 所述的基础功能组件库模块,用于供其他组件或应用执行引擎调用,将基础功能组件分布到终端可访问的服务器上,终端运行时由所述的框架管理模块根据用户需要进行远程加载。 [0019] The basic function of the component library module configured for other components or the application execution engine call the basic functional components distributed on a server accessible to the terminal, the terminal operates when a frame management module according to user need remote loading.

[0020] 上述技术方案,所述的管理框架模块,包括:初始化单元,用于在系统开机时建立执行引擎的父本进程,当需要创建新的执行引擎时,从该父本进程创建子进程,能完成新的执行引擎实例的初始化;及 [0020] The above technical solutions, the frame management module, comprising: an initialization unit for performing the process of establishing male when the system power engine, when it is desired to create a new execution engine, to create a subprocess from the male parent process , to complete a new instance of the initialization execution engine; and

[0021] 优化分配及调度单元,用于对应用程序和解释执行引擎进行优化分配,提供对进入嵌入式系统的应用代码与所需执行引擎个数的优化分配,该优化分配单元为嵌入式系统的应用程序建立优先级,调度单元根据优先级提供一种可抢占的资源访问控制策略,该策略为:一个执行引擎实例可以执行多个应用代码,各应用代码占用相互独立的线程;新的应用代码需要执行时,系统从当前执行引擎实例中为其选择合适的执行引擎,并保证新的应用代码加入后不会引起该执行引擎上的应用代码之间发生资源冲突;如果当前系统中没有合适的执行引擎,系统为其建立新的执行引擎实例;执行引擎启动新的线程解释执行该应用代码,并为各应用代码提供事件转发机制。 [0021] Optimization of allocation and scheduling unit configured to perform interpretation and application distribution optimization engine, into the optimized allocation of an embedded system application code number of the desired execution engine, the dispensing unit optimization for embedded systems application setup priority, the scheduling unit according to the resource access control policy to provide a preemptive priority of the policy: an example of execution engine may execute a plurality of application code, the application code of each occupied by independent threads; new applications when code needs to be executed, the system from its current execution engine instance, select the appropriate execution engine, and guaranteed not to cause resource conflicts between the application code on the execution engine to join the new application code; if the current system is not appropriate the execution engine, establish a new system for its execution engine instance; execution engine start a new thread to explain the implementation of the application code, and event forwarding mechanism to provide for the application code. [0022] 上述技术方案,所述的基础功能组件库包括:分布式管理单元,用于对分布于网络服务器的各基础功能组件进行分布式管理,包含: [0022] The above technical solutions, the basic functional components of the library comprising: a distributed management unit for each base in the distributed functional components of distributed network management server, comprising:

[0023] 基础组件建立子单元,用于开发商对基础功能组件开发面向特定嵌入式系统的基础功能组件,并为组件建立描述信息; [0023] The basic components create sub-unit basis for the functional components of the basis function component developer for the development of a particular embedded system, and create a description for the component;

[0024] 验证发布子单元,用于开发商与运营商联合对新开发的功能组件进行合格验证, 通过后发布到基础功能组件发布服务器;及 [0024] verify the release sub-unit, for developers and operators to jointly develop new functional components were Qualification, issued after the adoption of the basic functional components Publisher; and

[0025] 组件分发子单元,用于框架管理模块启动应用程序时依据应用程序对组件库的需求,检查终端本地的组件模块是否具有,对于本地没有的组件模块,通过网络下载的方式, 从组件发布服务器下载所需组件模块。 [0025] The distribution sub-assembly unit for the management module when the frame start an application based on the application requirements of the component library, the local terminal to check whether the module assembly, not for local assembly module, downloaded through a network manner, from the assembly Publisher download the required component modules.

[0026] 上述技术方案,所述的应用执行引擎:运行于API模块的下层,基础功能组件库的上层,是包含Java、JavaScript解释语言开发的应用程序的解释处理单元,为应用程序提供动态运行环境,通过框架管理模块调度,实现应用程序的动态解释运行。 [0026] The above technical solutions, the application execution engine: API module running on top of a lower layer, the base component library function, comprising Java, JavaScript interpretation interpretation processing unit of the application development language, dynamic run applications environment, the management module through the frame scheduling, dynamic interpretation of the running applications. 所述的API模块:提供给应用开发人员进行编程的程序接口,接口架构于解释执行引擎之上,可被解释执行引擎解析处理;采用开放API接口生成的应用程序,以一定机制发布到嵌入式终端可访问的应用服务器上,可在嵌入式终端运行时,被框架管理模块发现并动态下载,进一步在管理模块调度下,加载到执行引擎进行运行,而不需将应用程序以移植方式集成到嵌入式终端的软件系统中。 API module according: to the application program developers programming interface, the interface on the engine architecture to explain the implementation, parsing engine may be interpreted processing; generated using open API interface applications, a certain mechanism to release the embedded application server accessible terminal, the terminal may be embedded runtime, the frame management module is discovered and dynamically downloaded, the further scheduling management module, loaded into the execution engine to run, without the application to be integrated into a portable manner embedded terminal software system.

[0027] 作为本发明的一个改进,所述的嵌入式系统还包括:分级系统安全管理模块,用于对框架管理模块、应用执行引擎模块、基础功能组件库模块和API模块进行分级式状态监控和维护,具体采用三级进程管理子模块。 [0027] As an improvement of the invention, the embedded system further comprising: a grading system security management module, configured to frame management module, the application execution engine module, and the basic functional components API library modules hierarchical status monitoring module and maintenance, specific three-stage process management module.

[0028] 所述的三级进程管理子模块,还包含: [0028] The three-stage process management sub-module, further comprising:

[0029] 第一进程管理单元,用于当操作系统启动后启动第一代进程,该进程单元用于启动管理进程,并通过与管理进程之间的心跳报文实时监控管理进程的状态,当管理进程发生异常时对其进行恢复操作; [0029] The first process management unit configured to start when the operating system starts the first generation process, which unit is used to start the management process, real-time monitoring and management process between heartbeat message management process by, when its recovery operation occurs when abnormal management process;

[0030] 第二代进程管理单元,用于实现管理框架的相关功能,负责启动应用进程,分发事件,并实时监控应用进程状态;及 [0030] The second-generation process management unit, related functions for implementing the regulatory framework, responsible for starting the application process, distribute events and real-time status monitoring application process; and

[0031] 第三代进程管理单元,为JVM进程单元,用于负责启动应用线程和二次事件分发。 [0031] Third-generation process management unit, for the JVM process unit, responsible for starting the application threads and the second event distribution.

[0032] 上述技术方案,所述的管理框架模块负责应用代码与执行引擎的调度,具体步骤为: [0032] The above technical solutions, the frame management module is responsible for the execution engine application code scheduling, the specific steps:

[0033] (1)基于操作系统的进程拷贝技术,在系统开机时建立执行引擎的父本进程,当需要创建新的执行引擎时,从该父本进程创建子进程,能完成新的执行引擎实例的初始化; [0033] (1), established based operating system copy process technology at system boot paternal process execution engine, and when you need to create a new execution engine, create a child process from the male parent process, to complete the implementation of the new engine examples of initialization;

[0034] (2)对应用程序和解释执行引擎进行优化分配,提供一种对进入该嵌入式终端基础软件框架的应用代码与所需执行引擎个数的优化分配方法。 [0034] (2) optimizing the allocation of interpretation and application execution engine, providing optimization of the number allocation method into the execution engine for the application code embedded software framework base with the desired one kind of terminal.

[0035] 其中,所述的优化分配方法,具体步骤如下: [0035] wherein said optimal allocation method, the following steps:

[0036] 5-1) 一个执行引擎实例可以执行多个应用代码,各应用代码占用相互独立的线程; [0036] 5-1) a plurality of execution engine instance can execute the application code, the application code of each occupied by independent threads;

[0037] 5-2)新的应用代码需要执行时,系统从当前执行引擎实例中为其选择合适的执行引擎,并保证新的应用代码加入后不会引起该执行引擎上的应用代码之间发生资源冲突; When [0037] 5-2) needs to perform the new application code, the application code on the system between the execution engine for execution engine instances from the current select the appropriate execution engine, and to ensure that the new application code does not cause the addition of the occurrence of resource conflict;

[0038] 5-3)如果当前系统中没有合适的执行引擎,系统为其建立新的执行引擎实例;[0039] 执行引擎启动新的线程解释执行该应用代码,并为各应用代码提供事件转发机制。 [0038] 5-3) If the current system does not have proper execution engine, establish a new system for its execution engine instance; [0039] execution engine start a new thread to explain the implementation of the application code, and event forwarding to provide for the application code mechanism.

[0040] 上述技术方案,所述的分布式管理,组件可存储于远程网络服务器,框架管理模块依据应用程序运行需要,从远程网络下载和加载相应组件到本地终端,具体步骤如下: [0040] The above technical solution, the distributed management component may be stored in a remote network server, the management module frame based applications require, downloaded from the remote network and load the appropriate components to the local terminal, the following steps:

[0041] (1)基础功能组件开发商开发面向特定嵌入式系统的基础功能组件,并为组件建立描述信息; [0041] (1) based developers to develop basic functional components of the functional components for specific embedded system, and to establish a description for the component;

[0042] (2)开发商与运营商联合对新开发的功能组件进行合格验证,通过后发布到基础功能组件发布服务器; [0042] (2) developers and operators to jointly develop new functional components were Qualification, issued after the adoption of the basic functional components of the publisher;

[0043] (3)框架管理模块启动应用程序时,依据应用程序对组件库的需求,检查终端本地的组件模块是否具有,对于本地没有的组件模块,通过网络下载的方式,可从组件发布服务器下载所需组件模块。 [0043] (3) framework for the management module when you start the application, according to the application requirements for the component library, check the terminal local component modules whether, for local assembly module is not through the network to download way, the publisher from the component download the required component modules.

[0044] 本发明所提出的软件框架采用模块化开放式架构设计,各构成模块通过标准接口以松耦合的形式结合在一起,内部管理模块除具备对应用的完善管理,同时具有对框架自身构成模块如:基础功能组件、应用执行引擎的管理功能,可实现但不限于功能组件、执行引擎的注册、加载、更新、卸载等生命周期管理。 [0044] The software framework of the present invention proposed modular open architecture, each of the modules together constitute a loosely coupled via standard interfaces in the form of internal management module Besides sound management applications, while having a configuration of the frame itself modules such as: basic functional components, application execution engine management functions can be achieved, but not limited to functional components registered execution engine, load, update, uninstall, and other life-cycle management. 其他开发人员所开发的执行引擎、功能组件,在满足接口、功能、运行方式等要求的前提下,可通过管理模块的注册、加载,吸纳到本发明的软件框架中。 Developed by other developers execution engine functional components, the premise of meeting the interface, function, operation mode and other requirements, may be registered by the management module, loaded, absorbed into the software framework of the present invention. 框架管理模块是所述软件框架的核心管理单元,实施对终端软硬件资源的统一管理调度,负责框架中各功能模块及所加载应用程序的管理调度:具有对所加载应用程序的全生命周期管理功能,实现应用的发现、下载、加载、运行、卸载等过程管理调度;具有对终端平台资源的统一监控调度,确保资源的高效利用并有效避免资源冲突;具有用户事件分发处理功能,通过维护遥控器等输入设备事件监听,完成用户输入事件获取并分发给相应的应用程序;具有软件框架自身组件的管理功能,可实现执行引擎、功能组件等的注册、加载、更新、卸载等生命周期管理;具有系统状态的监控和维护功能,实时检测系统异常,并进行恢复操作。 Frame management module is the core unit of the management software framework, unified scheduling management hardware and software resources of the terminal is responsible for the functional modules and the frame of the loaded application management schedule: a loaded application lifecycle management function to achieve discoveries and applications, download, load, run, unloading process management scheduling; a unified monitoring and dispatching terminal platform resources to ensure the efficient use of resources and to avoid resource conflicts; has a user event distribution processing functions, by maintaining remote control input devices such as event monitoring, complete the user input event acquired and distributed to the appropriate application; has a software framework itself components of management capabilities that enable the implementation of registration engine, functional components such as load, update, uninstall, and other life-cycle management; It has the system status monitoring and maintenance functions, real-time detection system abnormalities, and recovery operations.

[0045] 本发明的优点在于,通过终端平台资源、能力抽象及解释执行引擎优化,将应用程序与终端平台隔离,并通过框架管理模块,实现应用程序的发现、下载、加载、运行、卸载全生命周期管理,使应用开发无需关心终端平台技术细节,并提供丰富的终端应用资源,为应用程序的快速开发、部署、下载和运行提供技术支撑,具有良好的实用价值。 [0045] The advantage of the present invention is that, through the resources, capability of abstraction and interpreted SEO, isolating applications and the terminal platform, and through the frame management module, find application download, load, run, unload the full terminal platform lifecycle management, application developers do not need to care about the technical details of the terminal platform, and provides a wealth of resources to end-use applications, rapid application development, deployment, download and run to provide technical support, it has a good practical value.

附图说明 BRIEF DESCRIPTION

[0046] 图1系统的状态监控机制图; [0046] The condition monitoring system of FIG mechanism of FIG. 1;

[0047] 图2本发明的嵌入式系统架构图; [0047] FIG embedded system architecture of Figure 2 of the invention;

[0048] 图3是本发明的框架管理模块构成示意图; [0048] FIG. 3 is a frame configuration management module according to the present invention, a schematic diagram;

[0049] 图4基于本发明的软件框架的事件分发过程示意图。 [0049] FIG event distribution software framework 4 of the present invention is based on the process of FIG.

具体实施方式 detailed description

[0050] 为使本发明的技术方案更加清晰,下面将结合附图对本发明做进一步的详细阐述。 [0050] To make the technical solutions of the present invention more clearly, the accompanying drawings will now be explained in further detail of the present invention. 本发明提出一种支持应用程序动态加载运行的嵌入式终端基础软件框架,该软件框架运行于嵌入式终端平台中,通过移植层接口,与终端底层的驱动、操作系统等平台相关软件隔离,可集成到不同嵌入式终端平台中。 The present invention provides a support for dynamic loading application software framework embedded base terminal running the embedded software running on the terminal platform frame, the spacer via an interface, the terminal graft layer underlying drivers, operating systems and other software platforms, may embedded terminal integrated into different platforms. 该软件框架主要由基础功能组件库、应用执行引擎、API模块和框架管理模块构成。 The software framework is mainly composed of basic functional component library, application execution engine, API and framework module management module. 附图1为系统的状态监控机制图; Figure 1 is a system monitoring mechanism of FIG state;

[0051] 本发明所提供的嵌入式终端基础软件框架中各模块通过标准的移植层接口与终端平台的底层软件隔离,可移植集成到不同的嵌入式终端平台,如图2所示。 [0051] software embedded terminal base frame of the present invention provides the underlying software modules via standard interface terminal platform porting layer isolation portable terminal embedded integrated into different platforms, as shown in FIG.

[0052] 本发明所提出的软件框架,如图2所示,至少由管理框架、应用执行引擎、基础功能组件库、API模块组成,其中: [0052] The software framework proposed by the present invention, shown in Figure 2, at least by the management frame, the application execution engine, the basis function component library, the API module, wherein:

[0053] 1)所述框架管理模块是软件框架的核心管理单元,实施对终端软硬件资源的统一管理调度,负责框架中各功能模块及所加载应用程序的管理调度。 [0053] 1) of the frame management module is a software framework for the central management unit, the centralized management of hardware and software resources scheduling the terminal, the functional modules in charge of the framework and the loaded application management scheduling. 具有应用发现下载、应用管理、应用调度、事件分发、资源管理、框架组件管理、应用执行引擎调度等功能子模块。 It has found application download, application management, application scheduling, event distribution, resource management, component management framework, application execution engine scheduling sub-module. 应用发现下载子模块负责应用程序运行前的生命周期管理:管理应用程序的发现、下载、加载和卸载操作;应用管理子模块负责管理下载到终端平台的应用程序,实现应用程序的加载、 卸载,应用程序下载后,以文件形式存储于终端平台特定目录下,为方便管理,每个应用程序采用独立的目录,应用管理子模块维护一个下载应用程序信息的列表,列表中每一描述项对应一个应用程序,应用程序的加载和卸载对应为列表项的添加和删除;应用调度子模块负责应用程序的运行时生命周期管理,并提供统一的应用程序状态控制接口;事件分发子模块负责输入事件向各应用程序的分发管理;资源管理子模块为应用程序和其他模块提供统一的资源访问接口;组件管理子模块对基础功能组件库的组件采用分布式管理,能根据用户需要动态从远程网络发现和加载 Application discovery life cycle before downloading sub-module is responsible for application operation and management: Discovery management applications, download, load and unload operations; application management sub-module responsible for managing the application downloaded to the terminal platform, to achieve loaded applications, unloading, after application download, a file stored in the terminal platform-specific directory, for the convenience of management, each application uses a separate directory, the application management module maintains a list of a sub-application download information in the list of each descriptor entry corresponding to a application, loading and unloading of the corresponding application to add and delete list items; lifecycle management to run the application scheduling sub-module is responsible for the application of the time, and provide a unified application state control interface; event distribution sub-module is responsible for input events to distribution management of each application; resource management sub-module provides a unified resource access interface for applications and other modules; management sub-module components of a distributed management component of the basic functions of the component library can dynamically discover from a remote network according to user needs and load 相关组件,实现一种分布式的组件管理方法,并对本地预加载的组件进行维护;应用执行引擎调度子模块为进入运行环境的应用程序选择已有的执行弓I擎实例或创建新的执行引擎。 Related components, to achieve a distributed component management methods, and local assemblies preloaded maintenance; application execution engine scheduling sub-module select an existing instance execution engine as I bow into the operating environment of the application or create a new execution engine.

[0054] 2)应用执行引擎实现应用程序的解释执行,是应用程序的解释处理单元,为应用程序提供动态运行环境,实现应用程序的动态解释运行;本发明软件框架所述的解释执行引擎完全构建于基础功能组件库及终端平台移植层接口之上,通过接口调用终端的软硬件资源能力; [0054] 2) application execution engine implements interpretation executing applications, interpretation processing unit is an application, to provide a dynamic operating environment for the application, dynamic interpretation of the running applications; interpretation execution engine according to the present invention completely software framework builds on the basic function of the component library and portable internet terminal layer interface, the ability to invoke hardware resource of the terminal through the interface;

[0055] 3)基础功能组件库是终端资源能力的集合,针对应用需求,每个组件均具有相对独立的功能;本软件框架中,还以本地方法实现组合功能组件库,组合功能组件库中的组件通过对独立功能组件接口调用,将多个功能集成到一起以标准接口形式提供执行引擎调用;基础功能组件库为终端应用开发提供所需的功能支撑,提高代码复用效率,降低应用开发难度;基础功能组件模块还为第三方开发接口提供本地方法支持,通过应用执行引擎的本地方法调用机制提高应用执行效率;基础功能组件提供功能相关的API接口,供其他组件或执行引擎调用; [0055] 3) library is a collection of basic functional components of the terminal resource capabilities for applications, each assembly has a relatively independent function; software framework of the present, there is also a local library of functional components implemented method of composition, the combination of functional components library components provided by independent component interface function calls, a plurality of functions integrated together to form a standard interface invocation execution engine; basic functional components to provide the desired library functions support the terminal application development, improve the efficiency of code reuse, reduce application development difficulty; basic functional component modules also provide an interface for third-party developers to support native methods to improve the efficiency of the application by invoking the mechanism native method application execution engine; basic functional components provide functionality related API interface for other components or execution engine call;

[0056] API模块为应用开发人员提供编程接口,API模块构建于应用执行引擎之上,可被应用执行引擎解析处理;采用开放API接口生成的应用程序,以一定机制发布到终端可访问的应用服务器上,并被终端框架管理模块发现和动态加载执行,而不需将应用程序以移植方式集成到嵌入式终端的软件系统中;API模块与解释执行引擎相结合,利用应用执行引擎的本地方法调用机制,通过扩展API组件和相应的基础功能组件进行接口扩展;API模块采用解释执行语言,从而为应用开发者提供硬件无关的开发方法。 [0056] API module provides application developers programming interface, API module built on the application execution engine, parsing engine may be application execution process; generated using open API interface applications, a certain mechanism to publish applications accessible to the terminal on the server, and the terminal management module frame performing discovery and dynamic loading, without the application software in a portable manner integrated into a system embedded in a terminal; the API module and interpreted execution engine combination, methods using a local execution engine call mechanism, extended by the corresponding API component and base component interface function expansion; API module is interpreted language, thereby providing for the development of a method of hardware-independent application developers.

[0057] 本发明所述框架管理模块是整个软件框架的核心管理单元,负责框架中各功能模块及所加载应用程序的管理调度。 [0057] The present invention is a frame management module is the core unit of the software management framework, the framework is responsible for the functional modules and applications loaded schedule management. 具有应用发现下载、应用管理、应用调度、事件分发、资源管理、框架组件管理等功能子模块。 It has found application download, application management, application scheduling, event distribution, resource management, component management framework features such as sub-modules. 其构成如图3所示: Configured as shown in Figure 3:

[0058] (1)其中,应用发现下载子模块实现新发布应用的发现和下载功能。 [0058] (1) where the application discovery download sub module for the discovery of new publishing applications and downloads. 应用的部署发现可采用以下方法:基于B/S架构的Web部署发现方法和基于C/S架构的消息通告部署发现方法,但不限于这两种方法。 Deployment of the application can be found in the following methods: based on B / S structure of the Web-based deployment discovery method and C / S architecture Newsletter deployment discovery method, but is not limited to these two methods. 采用基于Web的应用部署发现方法,应用服务器将所要发布的应用程序以网页的形式呈现给终端用户,应用发现下载子模块通过终端功能组件库的浏览器组件访问应用发布网页并呈现给用户,由用户选择希望下载的应用启动下载。 A Web-based application deployment discovery method, the application server will be published application presented in the form of a web page to the end user, application discovery download sub-module browser component access applications published on the page through a terminal functional component library and presented to the user, by the users select wish to download the application to start the download. 而基于消息通告的应用部署发现方法,应用服务器与嵌入式终端之间保持一个网络链接,新应用注册到应用服务器后,服务器通过该链接向当前在线的嵌入式终端发送通过信息,终端收到信息后根据发布信息和用户操作启动应用下载。 The application deployment between discovery method, application server and embedded terminal NEWSLETTER based on maintaining a network link, after registering a new application to the application server, the server via the link to the current line of embedded terminal sends the received information through the terminal after the operation starts according to published information and to download the application user. 应用下载可采用通用的下载协议,如FTP, HTTP, TFTP等,也可采用私有下载协议。 Application can be generic download protocol, such as FTP, HTTP, TFTP, etc., may also be used to download the private protocol. 如果采用通用下载协议,终端得到应用下载协议和下载路径后直接调用相应的下载器下载应用;如果采用私有协议,终端首先根据下载提示下载私有协议下载器,然后启动私有协议下载器下载应用;下载后的应用程序存放到指定目录。 Direct call if using a common download protocol, the terminal to obtain application download protocol and download path corresponding download manager application; if a proprietary protocol, the terminal first according to the downloading instructions to download proprietary protocol to download, and then start the proprietary protocol download manager application; Download after the application stored in the specified directory.

[0059] 所发布的应用程序不仅包括JAVA字节代码,而是以“应用程序+应用描述”的方式进行打包,完整的应用程序包可具有但不限于以下信息: [0059] published applications including not only the JAVA byte code, but in "Application + application description" packed manner, a complete application package may have, but is not limited to the following information:

[0060] 1)应用程序及程序运行所需要的各类辅助数据文件; [0061] 2)应用描述,可采用xml文件形式,其中集成了关于应用的详细描述信息。 [0060] 1) all types of auxiliary data files and application programs required for the operation; [0061] 2) application described, may take the form of xml file, which detailed description information about the integrated application.

[0062] 3)应用海报等图片资源,以确保应用展示的美观; [0062] 3) Application picture posters resources to ensure beautiful application display;

[0063] (2)其中,应用管理子模块负责管理下载到终端平台的应用程序,实现应用程序的加载、删除。 [0063] (2) where the application management sub-module responsible for managing the application downloaded to the terminal platform, to achieve loaded applications, delete. 应用程序下载后,以文件形式存储于终端平台特定目录下,为方便管理,每个应用程序可采用一个独立的目录。 After application download, a file stored in the terminal platform specific directory, for the convenience of management, each application may employ a separate directory. 应用管理子模块维护一个下载应用程序信息的列表文件, 列表文件中每一描述项对应一个应用程序,描述项包括但不限于以下信息: The application manager maintains a sub-module to download application information list file, list file entry but not limited to information corresponding to an application, description of each item is described comprising:

[0064] [0064]

描述项名称Γ^Μ 数据类型是否必选 Describes whether the item name Γ ^ Μ data type Required

SERVICE ID 应用ID,应该可以唯一标识一个应用I^t M SERVICE ID application ID, a unique identifier may be an application I ^ t M

应用类型,四个字节,第一个字节用 Application type, four bytes, with the first byte

SERVICE TYPE 于标识应用执行类型(JAVA或者JS, int 0 默认为JAVA) SERVICE TYPE performed to identify the application type (JAVA or JS, int 0 default JAVA)

SERVICE NAME 应用的名称 string M SERVICE NAME application name string M

SERVICE PATH 应用的路径 string M SERVICE PATH application path string M

DESCRIPTION 应用的描述 String 0 Description DESCRIPTION applications String 0

[0065] 应用管理子模块通过对列表文件的操作维护,实现对下载应用程序的管理。 [0065] application management sub-module through the operation of a list of files to maintain, manage to download the application.

[0066] (3)其中,应用调度子模块实现应用程序的加载执行调度和应用生命周期管理功能:[0067] a)应用调度子模块维护一个任务调度请求列表(TRL)和一个任务调度管理列表(TML),当用户操作触发应用启动请求时,应用请求向TRL注册一个表项;应用调度子模块实时监控TRL状态,一旦TRL不为空,则取出TRL中的表项,根据表项内容启动相应的应用进程,并把应用进程信息加入TML ; [0066] (3) where the application scheduling sub-module for loading and executing scheduling and application lifecycle management function of the application: [0067] a) application of scheduling sub-module maintains a scheduling request list (TRL) and a task scheduling management list (the TML), when the user operates the trigger application start request, the application requesting to register an entry to the TRL; scheduling sub-module real-time monitoring TRL state, when the TRL is not empty, then the entry TRL is removed startup according to the entry content corresponding application process and the application process Join TML;

[0068] b)应用调度子模块提供一个应用生命周期调度接口,应用程序和其他模块可通过该接口改变特定应用程序的状态;应用程序在运行时有就绪、活动、暂停、销毁四种状态,应用调度子模块提供应用程序的装载、启动、暂停和销毁四个功能接口,管理程序以及其他模块均可通过这些接口控制相关应用程序的运行时状态; [0069] c)应用调度子模块统计各应用的用户访问特性,根据用户访问关注度为各应用动态建立优先级; [0068] b) application scheduling sub-module provides an application lifecycle dispatch interface, applications, and other modules can be changed through the interface specific application of state; there are ready application at run-time, active, suspended, destroyed four states, application scheduling sub-module provides application loading, start, pause and destroyed four functional interface, program management and other related application modules can be run when the state controlled via these interfaces; [0069] c) application scheduling sub-module statistics for each users access nature of the application, according to the degree of concern for the users to access applications to dynamically establish priorities;

[0070] d)应用调度子模块实时监控各应用进程的状态,一旦发现有应用进程发生异常或退出,则强行终止未退出的异常进程,并从TML中删除相应表项。 [0070] d) Scheduling time monitoring the state of each sub-module of the application process, if it is found abnormal occurred in the process or to exit the application, the process is not forcibly terminated abnormal exit, and delete the corresponding entry from the TML.

[0071] (4)其中,事件分发子模块负责统一捕获用户操作事件,并采用基于进程间通信的方式进行事件分发。 [0071] (4) where the event distribution sub-module is responsible for operating unified capture user events, and using event-based distribution mode of inter-process communication. 需监听事件的应用进程向事件分发子模块进行注册,子模块捕获事件后分发到已注册事件监听的各应用进程。 Application process required to listen for events of distribution sub-module to register to the event, after sub-module captures events distributed to registered applications event listening. 事件分发采用管道通信机制,事件监听注册表节点包含应用进程号和传递事件所需要写入的描述符信息。 Event distribution using pipe communication mechanism event listener registry contains the application process node number and descriptor information transfer events to be written. 应用程序启动时,事件分发子模块为该应用程序建立事件监听注册表项,加入监听注册表,此时事件分发子模块会将捕捉到的操作信息经过事件映射后传递给该应用程序进程;应用程序进入后台运行时,事件分发子模块将应用程序对应的事件监听注册表项设置屏蔽标志,此时事件分发子模块不会向该应用进程分发事件;应用程序从后台转到前台运行时,将其事件监听注册表项屏蔽标志复位;当应用程序退出时,删掉其事件监听注册表项。 When the application starts, event distribution sub-module for the application to create an event listener registry entries, add monitor registry, this time the event will capture the distribution sub-module operating information to the application process after the event map; application when entering the program running in the background, event distribution sub-module application corresponding to the event listener registry entry mask flag, this time the event will not distribute distribution sub-module event to the application process; the application from the background to the foreground running, its event listener registry entry mask flag is reset; when the application exits, delete its event listener registry entries. 分发过程如图4所示。 Distribution process shown in FIG.

[0072] (5)其中,资源管理子模块实现对嵌入式系统软硬件资源的统一管理和分配;资源管理模块负责管理的主要资源有:内存,实现内存分配的统一管理,应能避免因内存申请过多引起的异常;解码器和解复用器等平台相关资源。 [0072] (5) where resource management sub-module to achieve unified management and distribution of embedded systems software and hardware resources; primarily responsible for managing the resources in the resource management module are: memory, memory allocation to achieve unified management, should be able to avoid memory abnormalities caused by excessive application; decoder and demultiplexer related resources and other platforms. 应用程序启动时需向资源管理子模块进行资源申请,以检查当前终端空闲资源是否满足应用运行的条件,如此将终端资源分为三类:已分配使用的资源、即将被使用的资源、空闲资源。 The need for application startup resources to the resource management sub-module application to check the condition of the current terminal idle resources meets the application running, so the terminal resources are divided into three categories: the use of the allocated resources, the resource is about to be used, free resources . 资源管理子模块提供统一的资源访问接口,应用程序和其他模块访问资源时必须通过该接口完成,如此该模块可检测到所有的资源冲突:即应用马上要访问的资源已经被其他应用程序占用。 Resource management sub-module provides a unified resource access interfaces, applications, and other modules must be done through this interface when accessing resources, so the module can detect all resource conflicts: the application immediately to access the resources already in use by another application. 利用应用调度子模块提供的应用优先级信息和应用状态调度接口,进行可抢占的资源访问控制。 Application using the application state information and priority scheduling module scheduling sub-interface application, the resource access control preemptable.

[0073] (6)其中,框架组件管理模块负责基础软件框架自身解释执行引擎、各功能组件等模块的管理,可实现但不限于功能组件、执行引擎的注册、加载、更新、卸载等生命周期管理。 [0073] (6) wherein the frame component management module is responsible for basic software framework itself explain the execution engine management function of each module components, etc., can be achieved, but not limited to functional components, execution engine registration, load, update, uninstall and other life cycle management. 其他开发人员所开发的执行引擎、功能组件,在满足接口、功能、运行方式等要求的前提下,可通过管理模块的注册、加载,吸纳到本发明的软件框架中。 Developed by other developers execution engine functional components, the premise of meeting the interface, function, operation mode and other requirements, may be registered by the management module, loaded, absorbed into the software framework of the present invention. 确保软件框架的开放性特色。 Opening Feature ensure software framework.

[0074] (7)其中,系统监控子模块负责监控管理进程的状态,该模块在系统启动时启动一个监控进程,监控进程与管理进程之间建立一个周期为1秒的心跳报文,报文可采用消息队列实现,也可采用TCP连接建立,从而监控管理进程的运行状态,并在管理进程发生异常是进行恢复处理,具体步骤为: [0074] (7) where the system status monitoring sub-module responsible for monitoring the management process, the module start to establish a cycle between a monitoring process, monitoring process and management process 1 second heartbeat message at system startup, the message message queue can be implemented, may also be employed to establish a TCP connection, whereby the operating state monitoring process management, process management and abnormality occurs in a recovery process, the specific steps:

[0075] a)操作系统启动监控进程;[0076] b)监控进程启动管理进程,并于管理进程建立心跳机制,管理进程每隔1秒向监控进程汇报状态; [0075] a) starting the operating system monitoring process; [0076] b) monitoring process starts and management process, and the establishment of heartbeat mechanism to process management, report management process once a second state to the monitoring process;

[0077] c)管理进程启动执行引擎实例进程,并实时监控执行引擎实例进程的状态信号, 当发现其退出时进行相应资源清理工作; [0077] c) management process execution engine start status signal instance process, and real-time monitoring of process execution engine instance, when found in the corresponding resource cleanup when it exits;

[0078] d)执行引擎实例进程为各应用建立新线程,并监控个应用线程状态; [0078] d) execution engine process for each application instance to create a new thread and thread status monitoring applications;

[0079] (8)其中,管理框架提供一个应用执行引擎调度子模块,与应用程序解释执行引擎相结合,对进入该软件框架的须同时运行的N个应用程序提供所需的执行引擎个数为M的最优分配,其中1 < = M < = N,实现应用程序的执行调度;具体方法和步骤如下: [0079] (8) where the management framework provides a scheduling engine application execution sub-module, the application execution engine explained in conjunction with providing the required engine performed on the N number of applications to be run simultaneously into the framework of the software optimal allocation of M, where 1 <= M <= N, to achieve the application execution schedule; specific methods and steps are as follows:

[0080] e)为每个执行引擎建立一个空闲资源列表,刚初始化时其空闲资源列表为S ; [0080] e) establishing a list of free resources for each execution engine, just initializes its idle resource list is S;

[0081] f)每个应用程序所需要资源列表为S,假设第j个执行引擎上已有应用代码k个, 则其空闲资源列表为Sj = S-sl-s2-. . . _sk,其中si为其中第i个应用程序所需要的资源列表; [0081] f) each application resource list need to be S, the application code has been assumed that the k on the j-th execution engine, it is a list of free resources Sj = S-sl-s2-... _sk, wherein where si is the i-th list of resources needed for the application;

[0082] g)当新应用程序进入运行环境时,假设其所需资源列表为sn,从当前执行引擎中选择空闲资源列表包含sn的建立一个可用执行引擎列表L ; [0082] g) when a new application into the execution environment, which is assumed to sn list of required resources, select a resource from the free list contains the current execution engine may be implemented with an establishment sn engine list L;

[0083] h)如果L为空,则初始化一个新的执行引擎运行新应用程序,否则从L中选择一个执行引擎运行,该执行引擎空闲资源列表减去sn后最小。 [0083] h) If L is empty, then initialize a new execution engine to run a new application, or select one from L engine run execution, the execution engine idle resources list after subtracting sn minimum.

[0084] 执行引擎的初始化采用操作系统的进程拷贝技术缩短启动延迟,具体方法和步骤如下: Initialization [0084] The copy process execution engine technology using the operating system start-up delay is shortened, and the specific method steps as follows:

[0085] a)系统启动时启动一个执行引擎父本进程 Paternal start a process execution engine startup [0085] a) System

[0086] b)当需要初始化新的执行引擎时,管理框架通知父本进程建立子进程,并把子进程相关信息汇报给管理框架,管理框架与该子进程通信,使其启动新的线程运行相关应用程序 [0086] b) When you need to initialize a new execution engine management framework to inform the process of establishing paternal child process and handle information related to the process of reporting to the regulatory framework, the regulatory framework to communicate with the child process, so that it starts a new thread running Related applications

[0087] (9)对基础功能组件库的组件采用分布式管理,能根据用户需要动态从远程网络发现和加载相关组件,实现一种分布式的组件管理方法,具体步骤如下: [0087] (9) of the basic functional components of the component library distributed management can dynamically find and load related components, to realize a distributed component from a remote network management method based on user needs, the following steps:

[0088] a)组件开发商开发面向特定终端的基础功能组件,并为组件建立描述信息; [0088] a) developers to develop the component-specific basic function of the terminal assembly, and establish a description for the component;

[0089] b)开发商与运营商联合对新开发的功能组件进行测试,测试通过后发布到基础功能组件发布服务器; [0089] b) developers and operators to jointly develop new functional components of the test, after the release by the test publisher to basic functional components;

[0090] c)管理框架启动应用程序时发现程序的执行需要一组基础功能组件(k个) SCiscl, sc2, ...,sck}的支持,并且发现本地已经拥有其中的部分组件(m个)SC' {scl, sc2,. . .,scm},其中m不小于零且不大于k ;如果k等于m,进入步骤5,否则进入步骤4 ; [0090] c) performing discovery procedure when starting the application management framework requires a basic set of functional components (k th) SCiscl, sc2, ..., sck} support, and have already found a local portion wherein the component of (m ) SC '{scl, sc2 ,., scm..}, where m is not less than zero and not more than k; if k is equal to m, proceeds to step 5, otherwise go to step 4;

[0091] d)管理框架从基础功能组件发布服务器下载应用之程序执行需要而本地没有的基础功能组件sc-sc'以及这些组件运行所依赖的其他本地没有的组件; [0091] d) management framework of the application download server publisher performs local assembly needs no other local basis function components sc-sc 'and running of these components depends from the base without functional components;

[0092] e)启动应用程序。 [0092] e) start the application.

[0093] 其中,基础功能组件描述信息中包含组件所适用的软硬件规格及其依赖关系,框架管理利用组件的依赖关系和软硬件规格为特定终端选定需要下载的组件包;管理框架与基础组件发布服务器之间采用HTTP、FTP等标准下载协议进行组件描述信息和组件本身的下载; [0093] wherein the functional components described basic information comprises hardware and software components suitable size and their dependencies, frame management using the hardware and software component dependencies and specifications for a specific terminal to download the selected assembly package; based management framework using HTTP, FTP download and other standard components of an agreement between the publisher and the information for download component description of the component itself;

[0094] 针对分布式组件管理会把网络延迟引入到应用程序的启动延迟,管理框架对组件进行预加载策略,可采用但不限于如下两种方案:[0095] 1)基于用户关注度的组件预加载策略:各应用程序运行时会使用API模块和基础功能组件库中的相关组件来实现其功能,用户关注度较高的应用被用户使用的概率较大, 因此其所用到的组件被调用的概率交大,本方法综合考虑用户对应用的关注度和终端存储能力,将用户关注度较高的应用所需要的API组件和基础功能组件预加载到终端本地存储,从而缩短用户启动应用时的期望延迟,提高用户体验。 [0094] management component for distributed network delay will be introduced into the application startup delay management framework components preloading strategies may be employed but not limited to two options: [0095] 1) degree of interest based on the user's assembly preloading strategy: use the API module and basic functional components library related components of each application is running to achieve its function, the higher the probability of user awareness of the application used by the user is larger, and therefore components it used to be called the probability of National Chiao Tung University, this method takes into account the user's attention to applications and terminal storage capacity, the API component and basic functional components of a high degree of user attention required by the application pre-loaded into the terminal stored locally, thereby reducing the user starts the application expect delays, improve the user experience.

[0096] 2)基于组件使用规律的组件预加载策略:特定用户在使用终端应用过程中,可以统计出常用的API组件和基础功能组件,根据使用频率是进行排序,将前N个API组件和基础功能组件与加载到本地存储。 [0096] 2) based component using regular assembly preloading strategies: a specific user using the terminal application process, can count a common API components and basic functional components, according to the frequency are ordered, the first N API component and basic functional components and loaded into local storage.

[0097] 本发明所述终端功能组件库是在嵌入式终端平台资源、能力合理抽象基础上,针对性组合形成的满足应用开发需求并具备动态扩展能力的组件集合。 [0097] The present invention is a terminal functional component library is embedded in the terminal platform resources, the ability to abstract a reasonable basis, to meet the specific needs of application development and combined to form a set of components includes a dynamic expansion capability. 功能组件的开发采用C/C++等编译执行语言,确保库的执行效率。 Development of functional components using C / C ++ compiler implementation language, etc., to ensure the efficiency of the library. 以静态库或动态链接库的形式集成于基础软件框架中,以标准接口形式提供解释执行引擎调用。 In the form of a static library or dynamic link library integrated in the basic software framework to provide explanations execution engine called to form a standard interface. 针对嵌入式终端应用需求,典型的功能组件举例如下: Terminal for embedded applications, the typical functional components for example as follows:

[0098] (1)浏览器:支持标准HTML、JS网页解析,为B/S架构双向应用提供功能支撑; [0098] (1) Browser: supports standard HTML, JS page parsing of B S bidirectional architecture applications / functionality support;

[0099] (2)媒体播放器:支持多格式音视频媒体文件、流式数据等的解码播放,为应用提供媒体处理功能; [0099] (2) Media Player: multi-format support for decoding and playing audio and video media files, streaming data, etc., to provide for the application of media processing functions;

[0100] (3)网络应用协议栈:针对应用需求,基于操作系统内置的TCP/UDP/IP标准网络协议栈所开发的扩展网络协议栈,如:RTP、SIP、FTP等。 [0100] (3) Application stack network: for applications, built-in operating system based on TCP / UDP / IP standard network protocol stack developed by extended network protocol stack, such as: RTP, SIP, FTP and the like.

[0101] 本发明所述的解释执行引擎是应用程序的解释处理单元,为应用程序提供动态运行环境,典型的解释执行引擎为JAVA虚拟机(JVM),相应的应用程序采用解释执行语言JAVA开发。 [0101] Explanation of the execution engine of the present invention is to explain the application processing unit, to provide a dynamic operating environment for application execution engine typically interpreted as a JAVA virtual machine (the JVM), the corresponding JAVA application development language interpreted using . JAVA是由SUN公司发布的一种标准开放程序语言,其源程序被编译为字节码(Bytecode),通过JVM解释为具体平台的机器指令进行执行,从而使应用程序与具体终端平台隔离,并可在终端运行时,由JVM动态加载运行JAVA应用程序。 JAVA is published by the Company SUN open a standard programming language that source code is compiled into bytecode (Bytecode), through the JVM interprets the platform-specific machine instructions for execution, so that application isolation platform with a particular terminal, and when the terminal is running, dynamically loaded by the JVM to run JAVA applications. 面向应用程序开发,提供标准的JAVA类库包及开放的API接口,同时针对终端平台特有的功能组件库资源,软件框架扩展JAVA类库包,并提供扩展的API接口供应用程序开发使用,通过扩展接口的调用, 应用程序可访问功能组件库资源。 JAVA class library package and open API for application developers to provide a standard, while expanding JAVA library package for terminal platform-specific functional component library resources, software framework, and provide expanded API interface for use by applications developed using, by extended call interface, the application can access the component library resources.

[0102] 最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制。 [0102] Finally, it should be noted that the above embodiments are intended to illustrate and not limit the present invention. 尽管参照实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,对本发明的技术方案进行修改或者等同替换,都不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围当中。 While the reference to the present invention, a detailed description of the embodiments, those of ordinary skill will appreciate, modifications to the technical solutions of the present invention, or equivalent replacements without departing from the spirit and scope of the technical solutions of the present invention, which should be encompassed by the present invention, among the scope of the claims.

Claims (6)

  1. 一种支持应用程序动态加载运行的嵌入式系统,该系统包含:框架管理模块、应用执行引擎模块、基础功能组件库模块和API模块,其中,由上至下依次为:API模块、应用执行引擎模块和基础功能组件库模块;所述的应用执行引擎模块:用于解释应用程序开发语言,为应用程序提供动态运行环境;所述的API模块:用于提供编程的程序接口,且采用开放的API接口;其特征在于,所述的框架管理模块是核心管理单元,用于实施对终端软硬件资源的统一管理调度,负责嵌入式系统中应用执行引擎模块、基础功能组件库模块和API模块所加载的应用程序的管理调度,该框架管理模块用于为所加载的应用程序提供系统资源获取和释放接口,实现系统软硬资源统一管理和调度;其中,所述的框架管理模块,对同时运行的N个应用程序,能动态分配M个应用执行引擎实 That supports dynamic loading applications running embedded system, the system comprising: a frame management module, application execution engine module, basic functional components API library modules and module, which is from top to bottom: API module, application execution engine basic functional modules and module component library; the application execution engine module: for explaining an application development language, providing a dynamic operating environment for the application; the API module: program interface for providing programming, and the use of open API interfaces; wherein the frame management module is the central management unit, scheduling for the centralized management of hardware and software resources of the terminal, the application responsible for the embedded system execution engine module, and the basic functional components API library modules modules loading schedule management application, the management module frame system for providing resources to applications loaded acquire and release interfaces, system software and hardware resources to achieve unified management and scheduling; wherein the frame management module is running simultaneously the N applications, the application can dynamically allocate the M real execution engine 进行解释执行,其中1<=M<=N;所述的基础功能组件库模块,用于供其他组件或应用执行引擎调用,将基础功能组件分布到终端可访问的服务器上,终端运行时由所述的框架管理模块根据用户需要进行远程加载。 Be interpreted, where 1 <= M <= N; when the base component library function modules for other components or applications for execution engine call the basic functional components distributed on a server accessible to the terminal, the terminal operated by said frame management module remote loading according to user needs.
  2. 2.根据权利要求1所述的支持应用程序动态加载运行的嵌入式系统,其特征在于,所述的API模块:提供给应用开发人员进行编程的程序接口,被解释执行引擎解析处理;采用开放API接口生成的应用程序,以一定机制发布到嵌入式终端可访问的应用服务器上,当嵌入式终端运行时,被框架管理模块发现并动态下载,进一步在框架管理模块调度下,加载到应用执行引擎进行运行。 The operation of embedded dynamic loading applications said support system as claimed in claim 1, wherein said API module: providing a programming interface to the application programming developers, to be construed analysis processing execution engine; an open API interface generation applications, a certain mechanism to publish an application server accessible to embedded terminal, when the embedded terminal runs, the frame management module is discovered and dynamically downloaded, the management module is further within the framework of the scheduling, is loaded into an application execution engine running.
  3. 3.根据权利要求1所述的支持应用程序动态加载运行的嵌入式系统,其特征在于,所述的管理框架模块,包括:初始化单元,用于在系统开机时建立执行引擎的父本进程,当需要创建新的执行引擎时,从该父本进程创建子进程,能完成新的执行引擎实例的初始化;及优化分配及调度单元,用于对应用程序和解释执行引擎进行优化分配,提供对进入嵌入式系统的应用代码与所需执行引擎个数的优化分配,该优化分配单元为嵌入式系统的应用程序建立优先级,调度单元根据优先级提供一种可抢占的资源访问控制策略,该策略为: 一个执行引擎实例可以执行多个应用代码,各应用代码占用相互独立的线程;新的应用代码需要执行时,系统从当前执行引擎实例中为其选择合适的执行引擎,并保证新的应用代码加入后不会引起该执行引擎上的应用代码之间发生 The operation of embedded dynamic loading applications said support system as claimed in claim 1, wherein the frame management module, comprising: an initialization unit for performing the process of establishing paternal engine during system boot, when a need to create new execution engine, the male create a child process from the process, to complete the initialization of a new instance of the execution engine; and optimal allocation and scheduling unit configured to perform interpretation and application distribution optimization engine, providing into the embedded system optimization application code assigned to the number of the desired execution engine, the optimal distribution unit establishes priority application embedded system, according to the resource scheduling unit access control policy to provide a preemption priority, which strategy: an engine that can execute multiple instances execute application code, application code occupies each independent thread; when new application code needs to do, choose the right system for their execution engine from execution engine in the current instance, and to ensure that the new after the application code does not cause the application code is added between the execution engine 资源冲突;如果当前系统中没有合适的执行引擎,系统为其建立新的执行引擎实例;执行引擎启动新的线程解释执行该应用代码,并为各应用代码提供事件转发机制。 Resource conflicts; if the current system does not have proper execution engine, establish a new system for its execution engine instance; execution engine start a new thread to explain the implementation of the application code, and event forwarding mechanism to provide for the application code.
  4. 4.根据权利要求1所述的支持应用程序动态加载运行的嵌入式系统,其特征在于,所述的基础功能组件库包括:分布式管理单元,用于对分布于网络服务器的各基础功能组件进行分布式管理,包含:基础组件建立子单元,用于开发商对基础功能组件开发面向特定嵌入式系统的基础功能组件,并为组件建立描述信息;验证发布子单元,用于开发商与运营商联合对新开发的功能组件进行合格验证,通过后发布到基础功能组件发布服务器;及组件分发子单元,用于框架管理模块启动应用程序时依据应用程序对组件库的需求, 检查终端本地的组件模块是否具有,对于本地没有的组件模块,通过网络下载的方式,从组件发布服务器下载所需组件模块。 The operation of embedded dynamic loading applications said support system as claimed in claim 1, wherein said basic function library assembly comprising: a distributed management unit for each base in the distributed functional components of a network server distributed management, including: the establishment of sub-component base unit, functional components for developers on the basis of the development of basic functional components for specific embedded systems, and the establishment of descriptive information for the component; verifying release sub-unit, for developers and operators business joint development of new functional components were qualification, after the release by the publisher to the basic functional components; components and sub-distribution unit management module for the frame to start the application based on the application requirements for the component library, check the local terminal whether the module assembly, component modules for local not by way of a network download, download the required components from the Publisher component modules.
  5. 5.根据权利要求1所述的支持应用程序动态加载运行的嵌入式系统,其特征在于,所述的嵌入式系统还包括:分级系统安全管理模块,用于对框架管理模块、应用执行引擎模块、基础功能组件库模块和API模块进行分级式状态监控和维护,具体采用三级进程管理子模块。 The operation of embedded dynamic loading applications said support system as claimed in claim 1, wherein the embedded system further comprising: a grading system security management module, configured to frame management module, the application execution engine module basic functional components API library modules and module grade status monitoring and maintenance, specific three-stage process management module.
  6. 6.根据权利要求5所述的支持应用程序动态加载运行的嵌入式系统,其特征在于,所述的三级进程管理子模块,还包含:第一进程管理单元,用于当操作系统启动后启动第一代进程,该进程单元用于启动管理进程,并通过与管理进程之间的心跳报文实时监控管理进程的状态,当管理进程发生异常时对其进行恢复操作;第二代进程管理单元,用于实现管理框架的相关功能,负责启动应用进程,分发事件, 并实时监控应用进程状态;及第三代进程管理单元,为JVM进程单元,用于负责启动应用线程和二次事件分发。 The dynamic loading of the operating system embedded application support according to claim 5, wherein said three sub-process management module, further comprising: a first process management unit for, when the operating system starts activating the first-generation process, which unit is used to start the management process, and, when an abnormality occurred in the process managing its recovery operation by the real-time status monitoring and management processes between the management heartbeat packet and processes; second-generation process management unit for related functions to achieve the management framework, responsible for starting the application process, distribute events and real-time monitoring of the application process state; and third-generation process management unit, for the JVM process unit, responsible for starting the application threads and the second event distribution .
CN 201010159861 2010-04-23 2010-04-23 Embedded system supporting dynamic loading operation of application programs CN101833465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010159861 CN101833465B (en) 2010-04-23 2010-04-23 Embedded system supporting dynamic loading operation of application programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010159861 CN101833465B (en) 2010-04-23 2010-04-23 Embedded system supporting dynamic loading operation of application programs

Publications (2)

Publication Number Publication Date
CN101833465A true true CN101833465A (en) 2010-09-15
CN101833465B CN101833465B (en) 2013-03-13

Family

ID=42717545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010159861 CN101833465B (en) 2010-04-23 2010-04-23 Embedded system supporting dynamic loading operation of application programs

Country Status (1)

Country Link
CN (1) CN101833465B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035880A (en) * 2010-11-02 2011-04-27 中兴通讯股份有限公司 Method and device for maintaining connection
CN102129385A (en) * 2011-03-22 2011-07-20 曙光信息产业(北京)有限公司 Management method capable of dynamically expanding management function of virtual machine
CN102170428A (en) * 2011-03-22 2011-08-31 曙光信息产业(北京)有限公司 Dynamic expansion management method of isomerous virtual machine platform
CN102395051A (en) * 2011-11-07 2012-03-28 上海网达软件有限公司 Video player system, development method thereof and installation operation method thereof
CN102479097A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Safe embedded operating system capable of supporting multi-stage loading
CN102486734A (en) * 2010-12-03 2012-06-06 上海宝信软件股份有限公司 Rich client application system
CN102970184A (en) * 2012-11-26 2013-03-13 北京奇虎科技有限公司 Operation state monitoring method of network application and application server
CN102981895A (en) * 2011-09-06 2013-03-20 中国科学院声学研究所 Virtual multi-process operation method of single-process direct frame buffer (FB)
CN103019819A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Dynamic link library uniform scheduling method based on plug-in mechanism
CN103036985A (en) * 2012-12-14 2013-04-10 崔红保 Method and device for resource download based on stream application
CN103077054A (en) * 2012-12-29 2013-05-01 百度在线网络技术(北京)有限公司 Control method and device for version preview in cloud application engine
CN103197935A (en) * 2012-01-09 2013-07-10 腾讯科技(深圳)有限公司 Application loading method and system
CN103378971A (en) * 2012-04-27 2013-10-30 厦门雅迅网络股份有限公司 Data encryption system and method
WO2014005328A1 (en) * 2012-07-06 2014-01-09 华为终端有限公司 Method and device for allocating resource
CN103995751A (en) * 2014-05-30 2014-08-20 上海斐讯数据通信技术有限公司 Cross-platform communication system and method
CN104038796A (en) * 2014-05-20 2014-09-10 江苏银河电子股份有限公司 Intelligent set-top box-based component object model constructing method
CN104104691A (en) * 2014-08-01 2014-10-15 山东中创软件商用中间件股份有限公司 Application server starting method and application server starting system
CN104503794A (en) * 2014-12-24 2015-04-08 天脉聚源(北京)科技有限公司 Method for operating program function module
CN104731568A (en) * 2013-12-23 2015-06-24 朱晓东 Application program operation method and device
CN105183468A (en) * 2015-08-31 2015-12-23 国家计算机网络与信息安全管理中心 Open plugin processing apparatus and distributed system
CN105528224A (en) * 2014-09-30 2016-04-27 中国电信股份有限公司 A multi-system scheduling method and terminal based on application identification

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083217A1 (en) * 1997-07-25 2002-06-27 Ward Alan D. System and method asynchronously accessing a graphics system for graphics application evaluation and control
CN1909481A (en) * 2005-08-05 2007-02-07 中兴通讯股份有限公司 Method for realizing separation of testing appliance and its interface with engine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083217A1 (en) * 1997-07-25 2002-06-27 Ward Alan D. System and method asynchronously accessing a graphics system for graphics application evaluation and control
CN1909481A (en) * 2005-08-05 2007-02-07 中兴通讯股份有限公司 Method for realizing separation of testing appliance and its interface with engine

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035880A (en) * 2010-11-02 2011-04-27 中兴通讯股份有限公司 Method and device for maintaining connection
CN102035880B (en) 2010-11-02 2014-04-30 中兴通讯股份有限公司 Method and device for maintaining connection
CN102479097A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Safe embedded operating system capable of supporting multi-stage loading
CN102479097B (en) 2010-11-26 2014-06-11 中国科学院声学研究所 Safe embedded operating system capable of supporting multi-stage loading
CN102486734A (en) * 2010-12-03 2012-06-06 上海宝信软件股份有限公司 Rich client application system
CN102129385A (en) * 2011-03-22 2011-07-20 曙光信息产业(北京)有限公司 Management method capable of dynamically expanding management function of virtual machine
CN102129385B (en) 2011-03-22 2013-08-28 无锡城市云计算中心有限公司 Management method capable of dynamically expanding management function of virtual machine
CN102170428B (en) 2011-03-22 2013-11-27 无锡城市云计算中心有限公司 Dynamic expansion management method of isomerous virtual machine platform
CN102170428A (en) * 2011-03-22 2011-08-31 曙光信息产业(北京)有限公司 Dynamic expansion management method of isomerous virtual machine platform
CN102981895A (en) * 2011-09-06 2013-03-20 中国科学院声学研究所 Virtual multi-process operation method of single-process direct frame buffer (FB)
CN102395051B (en) 2011-11-07 2014-01-29 上海网达软件股份有限公司 Video player system, development method thereof and installation operation method thereof
CN102395051A (en) * 2011-11-07 2012-03-28 上海网达软件有限公司 Video player system, development method thereof and installation operation method thereof
CN103197935A (en) * 2012-01-09 2013-07-10 腾讯科技(深圳)有限公司 Application loading method and system
CN103378971A (en) * 2012-04-27 2013-10-30 厦门雅迅网络股份有限公司 Data encryption system and method
CN103378971B (en) * 2012-04-27 2017-10-13 厦门雅迅网络股份有限公司 A data encryption system and method
WO2014005328A1 (en) * 2012-07-06 2014-01-09 华为终端有限公司 Method and device for allocating resource
US9336054B2 (en) 2012-07-06 2016-05-10 Huawei Device Co., Ltd. Method and apparatus for configuring resource
CN102970184A (en) * 2012-11-26 2013-03-13 北京奇虎科技有限公司 Operation state monitoring method of network application and application server
CN103019819A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Dynamic link library uniform scheduling method based on plug-in mechanism
CN103036985A (en) * 2012-12-14 2013-04-10 崔红保 Method and device for resource download based on stream application
CN103036985B (en) * 2012-12-14 2015-11-18 崔红保 Method and apparatus for downloading a resource-based streaming applications
CN103077054B (en) * 2012-12-29 2015-12-23 百度在线网络技术(北京)有限公司 One kind of a preview version of the engine control apparatus and method of application cloud
CN103077054A (en) * 2012-12-29 2013-05-01 百度在线网络技术(北京)有限公司 Control method and device for version preview in cloud application engine
CN104731568A (en) * 2013-12-23 2015-06-24 朱晓东 Application program operation method and device
CN104038796A (en) * 2014-05-20 2014-09-10 江苏银河电子股份有限公司 Intelligent set-top box-based component object model constructing method
CN103995751A (en) * 2014-05-30 2014-08-20 上海斐讯数据通信技术有限公司 Cross-platform communication system and method
CN104104691A (en) * 2014-08-01 2014-10-15 山东中创软件商用中间件股份有限公司 Application server starting method and application server starting system
CN105528224A (en) * 2014-09-30 2016-04-27 中国电信股份有限公司 A multi-system scheduling method and terminal based on application identification
CN104503794A (en) * 2014-12-24 2015-04-08 天脉聚源(北京)科技有限公司 Method for operating program function module
CN105183468A (en) * 2015-08-31 2015-12-23 国家计算机网络与信息安全管理中心 Open plugin processing apparatus and distributed system

Also Published As

Publication number Publication date Type
CN101833465B (en) 2013-03-13 grant

Similar Documents

Publication Publication Date Title
US5764915A (en) Object-oriented communication interface for network protocol access using the selected newly created protocol interface object and newly created protocol layer objects in the protocol stack
US5809235A (en) Object oriented network event management framework
US5938733A (en) Object oriented representation of network requests in a client server model
US20060262915A1 (en) Proxy for application server
US20040194059A1 (en) Method to deploy software using an open service gateway initiative (OSGi) framework
US20080140759A1 (en) Dynamic service-oriented architecture system configuration and proxy object generation server architecture and methods
US6981266B1 (en) Network management system and method
US20020032754A1 (en) Method and apparatus for profiling in a distributed application environment
US20100205604A1 (en) Systems and methods for efficiently running multiple instances of multiple applications
Bieber et al. Introduction to service-oriented programming (rev 2.1)
US5784613A (en) Exception support mechanism for a threads-based operating system
US7370322B1 (en) Method and apparatus for performing online application upgrades in a java platform
US7640542B2 (en) Managing midlet suites in OSGI environment
US20060184931A1 (en) System Including Run-Time Software To Enable A Software Application To Execute On An Incompatible Computer Platform
US6105074A (en) Data processing method and device
US20100299437A1 (en) Web Service System and Method
US20020069257A1 (en) Provisioning mechanism for a service gateway
Seinturier et al. A component‐based middleware platform for reconfigurable service‐oriented architectures
US7584466B1 (en) Management tree management in a mobile handset
US7415270B2 (en) Middleware services layer for platform system for mobile terminals
US6654765B2 (en) Method and apparatus for providing plug-in media decoders
US20060136914A1 (en) Application server system and method
US7337436B2 (en) System and method for cross platform and configuration build system
US20120036252A1 (en) Osgi-based heterogeneous service integrating system and method
US6898654B1 (en) Method and system for managing bandwidth on a master-slave bus

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
CF01