CN1307549C - Component Management Method Supporting Pervasive Computing - Google Patents
Component Management Method Supporting Pervasive Computing Download PDFInfo
- Publication number
- CN1307549C CN1307549C CNB2004100184389A CN200410018438A CN1307549C CN 1307549 C CN1307549 C CN 1307549C CN B2004100184389 A CNB2004100184389 A CN B2004100184389A CN 200410018438 A CN200410018438 A CN 200410018438A CN 1307549 C CN1307549 C CN 1307549C
- Authority
- CN
- China
- Prior art keywords
- component
- components
- information
- control block
- computing
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
本发明公开了一种支持普适计算的构件管理方法。1)除了一般构件自身的封装外,通过构件容器对构件进行二次封装,并提供构件的运行时环境,解决构件粒度不统一的问题;2)通过构件控制块来管理构件运行时的元信息,其中包含构件描述信息和控制信息,每一个构件都唯一对应一个构件控制块,它是构件动态性的集中反映,是系统对构件进行识别和控制的依据;3)引入了构件注册器来记录某种设备能感知到的所有构件,实现构件的动态注册、替换、添加和删除。本发明的优点是在构件的基础上进一步封装,从而支持普适计算环境下的高度异构、高可移动性、高度透明性的特点。使得不同粒度、不同厂商的构件也能够很好的兼容;实现网络构件的动态注册、替换、添加和删除。
The invention discloses a component management method supporting pervasive computing. 1) In addition to the encapsulation of the general component itself, the component container is used to encapsulate the component twice, and the runtime environment of the component is provided to solve the problem of inconsistent granularity of the component; 2) The meta-information of the component runtime is managed through the component control block , which contains component description information and control information, each component corresponds to a component control block, which is a concentrated reflection of component dynamics and the basis for the system to identify and control components; 3) A component register is introduced to record All components that can be perceived by a certain device realize dynamic registration, replacement, addition and deletion of components. The invention has the advantage of further encapsulating on the basis of components, thereby supporting the characteristics of high heterogeneity, high mobility and high transparency under the pervasive computing environment. Make components of different granularities and different manufacturers well compatible; realize dynamic registration, replacement, addition and deletion of network components.
Description
技术领域technical field
本发明涉及构件化软件设计,尤其涉及一种支持普适计算的构件管理方法。The invention relates to componentized software design, in particular to a component management method supporting pervasive computing.
技术背景technical background
在传统的开发技术下,大规模的软件往往会出现系统分析复杂,开发周期长,维护费用增高及功能扩展困难的问题。不仅如此,随着网络技术的飞速发展,软件需要具有开放的系统结构和跨越多个异构平台的能力,软件如果严重依赖于操作系统和特定的网络服务,会导致应用系统开放性很差。开发者为了适应不同的应用环境而不得不开发不同的代码,这样会出现大量的重复劳动,严重的影响着软件生产效率和软件质量的提高。Under the traditional development technology, large-scale software often has problems such as complex system analysis, long development cycle, high maintenance cost and difficulty in function expansion. Not only that, with the rapid development of network technology, software needs to have an open system structure and the ability to span multiple heterogeneous platforms. If the software is heavily dependent on the operating system and specific network services, the openness of the application system will be poor. In order to adapt to different application environments, developers have to develop different codes, which will cause a lot of duplication of work, which seriously affects the improvement of software production efficiency and software quality.
构件化技术的出现解决了长期困扰软件工程界的种种难题。所谓软件构件指的是可以重用的软件单元,它能够被用来构造其它软件。它可以是被封装的对象类、一些功能模块、软件框架、软件系统模型、软件文档等等。软件构件不依靠于某一个系统,可以被功能向上的构件所替代,并且具有实际的功能意义。基于构件化的软件开发,就是从构件库中选择适用的构件,通过构件的组装和控制来构造应用软件。构件化技术使得软件具有良好的平台兼容性、结构开放性、规模可变性、系统可配置性以及代码重用的能力。The emergence of component technology has solved various problems that have plagued the software engineering field for a long time. The so-called software component refers to a reusable software unit that can be used to construct other software. It can be encapsulated object classes, some functional modules, software frameworks, software system models, software documents, and so on. Software components do not depend on a certain system, can be replaced by functional components, and have practical functional significance. Component-based software development is to select the applicable components from the component library, and construct the application software through the assembly and control of the components. Component technology enables software to have good platform compatibility, structure openness, scale variability, system configurability and code reuse capabilities.
从广义上来说,构件有如下的几个基本特点。1、构件是可独立配置的单元,因此构件必须自包容;2、构件强调与环境和其它构件的分离,因此构件的实现是严格封装的,外界没机会或没必要知道构件内部的实现细节;3、构件可以在适当的环境中被复合使用,因此构件需要提供清楚的接口规范,可以与环境交互;4、构件不应当是持续的,即构件没有个体特有的属性,理解为构件不应当与自身副本区别。Broadly speaking, components have the following basic characteristics. 1. A component is an independently configurable unit, so the component must be self-contained; 2. The component emphasizes the separation from the environment and other components, so the implementation of the component is strictly encapsulated, and the outside world has no chance or need to know the implementation details inside the component; 3. Components can be compounded and used in an appropriate environment, so components need to provide clear interface specifications and can interact with the environment; 4. Components should not be persistent, that is, components have no individual-specific attributes, which means that components should not interact with the environment. Self copy difference.
从以上四个特点可以看出,构件沿袭了对象的封装特性,但同时并不局限在一个对象,其内部可以封装一个或多个类、原型对象甚至过程,结构是灵活的。构件突出了自包容和被包容的特性,From the above four characteristics, it can be seen that a component inherits the encapsulation characteristics of an object, but at the same time it is not limited to one object. It can encapsulate one or more classes, prototype objects or even processes inside, and its structure is flexible. Components highlight the characteristics of self-containment and containment,
构件化对软件开发的工程化是非常重要的,有了构件才能通过构件的组装、互连,实现软件的工程化开发。构件化是一种前沿的软件设计思想,对整个软件行业的发展有着推动作用。如果回顾经典的工业化革命,不难得出一些有益的启示:功能再复杂的产品都是由大量标准的零件组成,零件在生产线上装配成一个成品,所有零件在成品中共同发挥作用。分工越细致、专业生产的程度越高,总体生产效率就越高。而构件技术所扮演的角色就是把零件、生产线和装配运行的概念运用在软件工业中,可以预见,软构件技术是软件产业化革命的必然发展趋势。Componentization is very important to the engineering of software development. Only with components can the engineering development of software be realized through the assembly and interconnection of components. Componentization is a cutting-edge software design idea, which promotes the development of the entire software industry. If we look back at the classic industrialization revolution, it is not difficult to draw some useful revelations: products with complex functions are composed of a large number of standard parts, and the parts are assembled into a finished product on the production line, and all parts play a role in the finished product. The more detailed the division of labor and the higher the degree of specialized production, the higher the overall production efficiency. The role of component technology is to apply the concepts of parts, production lines and assembly operations in the software industry. It can be predicted that software component technology is an inevitable development trend of the software industrialization revolution.
“构件化”可以说是跨世纪软件技术发展的一个趋势,它解决了传统软件难以重用、维护和更新、系统不易于用户定制的缺点。虽然目前支持构件化软件技术的系统也不少,但还没有统一的标准实施方案,每个公司设计构件的方法都不一样(如COM、JAVA),它们都主要是为了解决构件的独立性、高可重用性、移植性以及构件的可维护性的问题。"Componentization" can be said to be a trend in the development of software technology across the century. It solves the shortcomings of traditional software that are difficult to reuse, maintain and update, and the system is not easy to customize. Although there are quite a few systems that support component-based software technology, there is no unified standard implementation plan. Each company designs components in different ways (such as COM, JAVA). They are all mainly to solve the independence of components, High reusability, portability, and maintainability of components.
计算机发展到今天,普适计算已经由理想逐渐转变成现实。随着计算机科学的进步,我们生活的空间中会充斥着越来越多的无线的嵌入式设备,如:掌上电脑,BP机、车载智能设备、笔记本计算机、手表、智能卡、智能手机、机顶盒、POS销售机、屏幕电话,它们的尺寸大小不一样,提供的功能不一样,存在的形式也不一样。有的把一个类作为构件,有的把一个服务作为构件,有的甚至把好几个应用程序捆绑在一起作为构件;这样的局面就造成了构件异构,使得构件之间难以兼容。更令人头疼的是,普适计算环境下的构件还具有数目众多、移动性强的特点,某一个构件可能随时离开(或者进入)某一个设备的“视线”,这就造成构件难以管理。这些问题都是有待解决的。With the development of computers, ubiquitous computing has gradually turned from an ideal to a reality. With the advancement of computer science, our living space will be filled with more and more wireless embedded devices, such as: handheld computers, BP machines, vehicle-mounted smart devices, notebook computers, watches, smart cards, smart phones, set-top boxes, POS vending machines and screen phones have different sizes, provide different functions, and exist in different forms. Some use a class as a component, some use a service as a component, and some even bundle several applications together as a component; such a situation results in heterogeneous components, making it difficult for components to be compatible. What is even more troublesome is that the components in the ubiquitous computing environment also have the characteristics of large number and strong mobility. A certain component may leave (or enter) the "line of sight" of a certain device at any time, which makes the component difficult to manage. These problems are yet to be resolved.
普适计算软件系统应该满足的四个要求:There are four requirements that a pervasive computing software system should meet:
1、有效利用活动空间:普适计算的活动空间的含义非常广泛;可以是一间卧室,也可以是一个庭院。各式的嵌入式设备必须与活动空间有机的融合在一起。比如说,在一间屋子里,嵌入式计算设备可以根据室内温度和亮度来控制是否应该开启暖气和电灯;同样环境的变化也可以引起嵌入式设备的功能变化。1. Effective use of activity space: The meaning of activity space in ubiquitous computing is very broad; it can be a bedroom or a courtyard. All kinds of embedded devices must be organically integrated with the activity space. For example, in a room, embedded computing devices can control whether the heating and lights should be turned on according to the indoor temperature and brightness; similarly, changes in the environment can also cause changes in the functions of embedded devices.
2、对用户透明:用户不必关心嵌入式计算设备的工作过程,而应该是在不经意中就能享受到各种优质服务。这就要求嵌入式设备能够感知用户的意图,自动适应各种可能的情况。2. Transparent to users: users do not need to care about the working process of embedded computing devices, but should be able to enjoy various high-quality services inadvertently. This requires embedded devices to be able to perceive the user's intentions and automatically adapt to various possible situations.
3、局部可测量性:计算的活动空间和周围环境有很密切的交互,但是可利用的网络带宽资源却非常有限。因此当一个嵌入式计算设备离开后,活动空间必须感知这各行为,切断和这个设备的联系;同样当一个计算设备进入后,活动空间必须和这个新来的设备取得联系。这样做的目的在于能够让移动用户减少与距离远的设备发生关联,尽量让移动用户与小范围内的设备有关联;从而保证计算资源的有效利用率。3. Local scalability: The computing activity space has a close interaction with the surrounding environment, but the available network bandwidth resources are very limited. Therefore, when an embedded computing device leaves, the active space must perceive these behaviors and cut off the connection with this device; similarly, when a computing device enters, the active space must get in touch with the new device. The purpose of this is to reduce the association between mobile users and devices that are far away, and allow mobile users to associate with devices within a small range as much as possible, thereby ensuring the effective utilization of computing resources.
4、对不平衡负载的屏蔽:所处的环境不同,计算设备的数量也不同。在会议室、办公室、实验室中,可能存在很多的嵌入式设备;而在一些信息相对闭塞、器材较少的地方,如草坪、花园、足球场里,计算设备就屈指可数。普适计算要求屏蔽掉这些不平衡的情况,给用户提供统一的环境。4. Shielding of unbalanced loads: different environments have different numbers of computing devices. In conference rooms, offices, and laboratories, there may be a lot of embedded devices; while in some places with relatively closed information and few equipment, such as lawns, gardens, and football fields, there are only a handful of computing devices. Ubiquitous computing requires shielding these unbalanced situations and providing users with a unified environment.
从软件系统的角度来讲,普适计算环境下,各种小型计算设备在位置不断移动的过程中或在地理位置分布很广的范围内,在不稳定的通信条件下实现联机事务处理和企业核心数据访问.这些小型计算设备,具有多种通信手段,如移动通信网络、红外、蓝牙、卫星,能与互联网或企业内部网相连,但这种连接不是固定的连接,而是间断的连接。因此,普适计算学要新的软件结构,使得用户可以使用这些设备进行复杂的联机事务处理和信息访问。From the perspective of software systems, in the ubiquitous computing environment, various small computing devices can achieve online transaction processing and enterprise computing under unstable communication conditions during the process of continuous movement or in a wide range of geographical distribution. Core data access. These small computing devices have a variety of communication means, such as mobile communication networks, infrared, Bluetooth, and satellites, and can be connected to the Internet or intranet, but this connection is not a fixed connection, but an intermittent connection. Therefore, ubiquitous computing requires new software architectures that allow users to use these devices for complex online transaction processing and information access.
发明内容Contents of the invention
本发明的目的是提供一种支持普适计算的构件管理方法。The purpose of the present invention is to provide a component management method supporting ubiquitous computing.
1)除了一般构件自身的封装外,通过构件容器对构件进行二次封装,并提供构件的运行时环境,解决构件粒度不统一的问题;1) In addition to the encapsulation of the general component itself, the component container is used to re-encapsulate the component and provide the runtime environment of the component to solve the problem of inconsistent component granularity;
2)通过构件控制块来管理构件运行时的信息,其中包含构件描述信息和控制信息,每一个构件都唯一对应一个构件控制块,它是构件动态性的集中反映,是系统对构件进行识别和控制的依据;2) Manage component runtime information through the component control block, which includes component description information and control information. Each component is uniquely corresponding to a component control block, which is a concentrated reflection of component dynamics. It is the identification and control of components by the system. basis for control;
3)引入了构件注册器来记录某种设备能感知到的所有构件,实现构件的动态注册、替换、添加和删除。3) A component register is introduced to record all components that a certain device can perceive, and realize dynamic registration, replacement, addition and deletion of components.
本发明的优点是在构件的基础上进一步封装,从而支持普适计算环境下的高度异构、高可移动性、高度透明性的特点。使得不同粒度、不同厂商的构件也能够很好的兼容;实现网络构的动态注册、替换、添加和删除。The invention has the advantage of further encapsulating on the basis of components, thereby supporting the characteristics of high heterogeneity, high mobility and high transparency under the pervasive computing environment. Make components of different granularity and different manufacturers well compatible; realize dynamic registration, replacement, addition and deletion of network components.
附图说明Description of drawings
图1是构件容器对构件的封装示意图;Fig. 1 is a schematic diagram of component container encapsulation of components;
图2是构件控制块的结构及举例说明示意图;Fig. 2 is the structure of the component control block and a schematic illustration of an example;
图3是构件注册器对构件的管理示意图;Fig. 3 is a schematic diagram of component management by the component register;
图4是感知空间示意图;Fig. 4 is a schematic diagram of perception space;
图5是访问构件过程的流程示意图。Fig. 5 is a schematic flowchart of the process of accessing components.
具体实施方式Detailed ways
本发明是基于崭新的软件设计思想——面向构件设计方法,在我们的设计中“一切都是构件”。发明主要解决了两个难题:构件的异构问题、构件的移动性问题。本发明的详细描述如下:The present invention is based on a brand-new software design idea - component-oriented design method, in our design "everything is a component". The invention mainly solves two problems: the heterogeneous problem of components and the mobility problem of components. The detailed description of the present invention is as follows:
支持普适计算的构件管理系统软件应该解决一下关键问题:Component management system software supporting pervasive computing should address the following key issues:
1、发现机制:当用户把一个新设备带入一个空间或在已有的设备上采用新的构件时,这种构件和其它可用的构件以及设备之间是如何相互地发现以及在它们之间需要进行哪些交互。同时普适计算系统是一个逐渐扩展的系统,这个过程应该不要求重新启动系统,或重写已有代码,这也是以发现机制作为基础的。目前已经有一些这方面的技术基础。1. Discovery mechanism: When a user brings a new device into a space or adopts a new component on an existing device, how does this component and other available components and devices discover each other and how to communicate between them? What interactions are required. At the same time, the ubiquitous computing system is a gradually expanding system. This process should not require restarting the system or rewriting existing codes, which is also based on the discovery mechanism. There are already some technical foundations for this.
2、自适应:普适计算系统中各种设备拥有的资源是不同的和变化的,从最小的系统到嵌入计算能力的物体,到可携带计算设备,再到基础设施中的部件,它们在计算能力、存储容量、电池容量、交互手段因素上都有着很大的差异;设备在不同的环境中移动时,可用的无线网络的带宽也是不同的。这就需要解决自适应的问题。它包括内容的转化和交互界面的转化两部分。前者解决数据传输过程中因为资源的限制而对数据做的处理;后者是因为设备的交互机制的不同,需要把同一个交互接口映射到不同的交互机制下完成。2. Self-adaptation: The resources owned by various devices in the ubiquitous computing system are different and changeable, from the smallest system to objects with embedded computing capabilities, to portable computing devices, and to components in the infrastructure. There are great differences in computing power, storage capacity, battery capacity, and interaction means; when devices move in different environments, the available wireless network bandwidth is also different. This requires solving the problem of self-adaptation. It includes two parts: transformation of content and transformation of interactive interface. The former solves the processing of data due to resource limitations in the process of data transmission; the latter is due to the different interaction mechanisms of devices, and needs to map the same interaction interface to different interaction mechanisms to complete.
3、对物理实体的管理:因为在普适计算系统中,物理世界中的物体都同时具有信息空间中的意义,普适计算的系统软件就必须对这些物理实体具有一定的管理能力。普适计算的系统软件就是一种物理空间的操作系统,它与目前的操作系统的不同之处就是它需要把物理实体也管理起来。这里的管理有两层含义:把物理实体看作一种资源,需要建立对这些资源的位置、结构、功能的表示,而且需要反应动态的实际情况。这需要觉察上下文计算的支持。当物理实体嵌入有传感、计算、效应能力时,必须提供对它们的高层接口,即相当于传统的驱动程序。3. Management of physical entities: Because in a pervasive computing system, objects in the physical world have meanings in the information space, the system software of pervasive computing must have certain management capabilities for these physical entities. The system software of ubiquitous computing is an operating system in physical space. The difference between it and the current operating system is that it needs to manage physical entities. The management here has two meanings: considering the physical entity as a resource, it is necessary to establish a representation of the location, structure, and function of these resources, and it needs to reflect the dynamic actual situation. This requires the support of context-aware computing. When physical entities are embedded with sensing, computing, and effecting capabilities, a high-level interface to them must be provided, which is equivalent to a traditional driver.
4、构件间协调机制:普适计算系统是一个分布的系统,如何把各种分布的构件之间纷繁复杂的互联、通信、协作以一种统一和有机的方式组织!管理起来″而使系统展示出一个协调的行为和功能,这就是协调机制的作用。目前已有的各种分布式组件结构可以认为是一种协调机制,但它们直接用来支持普适计算系统是不合适的,因为用对象来抽象普适计算中的构件是不合适的。4. Coordination mechanism between components: Ubiquitous computing system is a distributed system, how to organize the complex interconnection, communication, and collaboration among various distributed components in a unified and organic way! This is the role of the coordination mechanism. The existing distributed component structures can be considered as a coordination mechanism, but they are directly used to support the ubiquitous computing system is inappropriate, because it is inappropriate to use objects to abstract components in ubiquitous computing.
如图1所示,我们使用构件容器(Vessel)来对组件进行封装。构件容器为封装在其中的构件提供了运行时所需要的环境,构件在这个环境内运行,它的所有通信都是通过构件容器来进行的。构件一旦被装载进了容器,那么对于外界来说就像被装入硬盘盒的硬盘,只有其对外的接口可以被访问,而且对于这些接口的访问都必须要通过构件容器来进行。As shown in Figure 1, we use component containers (Vessel) to encapsulate components. The component container provides the runtime environment for the components encapsulated in it. The component runs in this environment, and all its communication is carried out through the component container. Once a component is loaded into a container, it looks like a hard disk loaded into a hard disk box to the outside world, and only its external interfaces can be accessed, and the access to these interfaces must be done through the component container.
构件容器提供的运行时所需要的环境包括:在需要时激活构件或者在一段时间内不需要时钝化构件,从而保护有限的系统资源,如主内存和CPU资源等等;为常用的构件的各种服务接口提供一个适配层,该适配层避免了客户程序通过直接向构件请求服务带来的麻烦和存在的安全隐患;为构件提供一个回调的适配层,构件容器可以通过这个回调层在感兴趣的事件和消息发生时通知构件;为客户提供一些可以配置的构件参数,用以动态修改构件的属性。The runtime environment provided by the component container includes: activating the component when needed or passivating the component when it is not needed for a period of time, so as to protect limited system resources, such as main memory and CPU resources, etc.; Various service interfaces provide an adaptation layer, which avoids the trouble and potential safety hazards caused by client programs directly requesting services from components; provides a callback adaptation layer for components, and component containers can pass this callback The layer notifies components when interested events and messages occur; provides some configurable component parameters for clients to dynamically modify component properties.
构件容器为包含在其中的构件提供了一个构件监视器,用以完成对构件生命周期策略的监控。它负责其中包括:以什么方式创建构件,创建永久构件还是临时构件,什么时候需要激活构件,什么时候需要钝化构件,什么时候需要销毁构件;另外,客户还可以通过监视器提供的接口来告知构件容器每种构件的实例已经不再需要了。The component container provides a component monitor for the components contained in it to complete the monitoring of the component lifecycle strategy. It is responsible for including: how to create components, whether to create permanent components or temporary components, when to activate components, when to passivate components, and when to destroy components; in addition, customers can also inform through the interface provided by the monitor Component Containers Instances of each component are no longer required.
不同厂商生产的构件的各异的,构件被封装成一个黑箱,外界不可能知道它的内部实现情况。然而客户在获取构件之前,必须获得关于该构件足够多的信息,才能更有效的访问它。为此我们引入了构件控制块CCB(ComponentControl Block)来提供和管理这些有用的信息。The components produced by different manufacturers are different, and the components are packaged into a black box, and it is impossible for the outside world to know its internal implementation. However, before the client obtains the component, he must obtain enough information about the component in order to access it more effectively. For this reason, we introduce component control block CCB (Component Control Block) to provide and manage these useful information.
如图1所示,构件控制块与构件是一一对应的关系,每当系统创建一个构件,就会设置一个构件控制块,再利用构件控制块对构件进行管理和控制;同样当构件被撤消时,系统就收回其构件控制块,构件也随之消亡。所以,构件控制块是构件存在的惟一标志。构件控制块的在构件管理中的作用相当于进程控制块PCB在进程管理中所起的作用。As shown in Figure 1, there is a one-to-one correspondence between component control blocks and components. Whenever the system creates a component, it will set a component control block, and then use the component control block to manage and control the component; , the system retracts its component control block, and the component dies. Therefore, the component control block is the only sign of the existence of the component. The role of component control block in component management is equivalent to that of process control block PCB in process management.
构件和它的控制块一起被封装在构件容器中。如图2所示,构件控制块记录了很多关于构件的元信息,可以分为构件描述信息和控制信息,其中包括:构件的标志符,构件的属性,构件的拥有者(网络中的某个普适计算设备),构件的创建时间,构件的寿命,构件的粒度(类级、服务级还是功能模块级),构件的存储信息,构件的功能描述,构件的接口描述。我们把构件和它的控制块捆绑在一起,这样不管是什么粒度什么功能的构件都可以方便的进行管理。A component is encapsulated together with its control block in a component container. As shown in Figure 2, the component control block records a lot of meta information about the component, which can be divided into component description information and control information, including: component identifier, component attribute, component owner (someone in the network ubiquitous computing equipment), component creation time, component life, component granularity (class level, service level or function module level), component storage information, component function description, and component interface description. We bundle the component and its control block together, so that no matter what granularity or function the component can be managed conveniently.
值得注意的是,构件控制块对元信息的描述必须采用广泛使用的注释语言和建模语言(即XML和UML),这可以使得构件元信息对绝大多数系统是可识别的。我们甚至不必提前知道构件是什么粒度,而只需要从构件控制块中读出该构件的具体信息,考察该构件的是否满足用户的需要,构件是否具有共享属性,存储空间能否容纳该构件的问题,然后根据构件控制块中对接口的描述访问该构件。同时还需要建立自适应服务环境的系统管理配置构件库,完成构件化嵌入式系统服务环境的应激特性和动态重构的要求,用统一的构件接口和构件服务模式满足不同应用个性的要求,将构件组合成服务的具体细节屏蔽在服务环境之中,并且提供基本的构件化的应用零件,为构件化的服务提供可以适应环境与需求的个性及动态变化的应激特性。It is worth noting that the description of meta-information by component control block must use widely used annotation language and modeling language (namely XML and UML), which can make component meta-information recognizable to most systems. We don't even need to know the granularity of the component in advance, but only need to read the specific information of the component from the component control block to check whether the component meets the needs of users, whether the component has shared attributes, and whether the storage space can accommodate the component. problem, and then access the component according to the description of the interface in the component control block. At the same time, it is also necessary to establish a system management configuration component library that is adaptive to the service environment, to complete the stress characteristics and dynamic reconstruction requirements of the component-based embedded system service environment, and to meet the individual requirements of different applications with a unified component interface and component service mode. The specific details of combining components into services are shielded in the service environment, and basic componentized application parts are provided to provide componentized services with individuality and dynamic stress characteristics that can adapt to the environment and needs.
构件容器、构件监视器以及构件控制块很好的解决了构件的封装、构件的生命周期管理,以及构件粒度不统一带来的异构的问题。接下来我们用构件注册器来解决的是构件高度移动性带来的问题。Component containers, component monitors and component control blocks well solve component encapsulation, component life cycle management, and heterogeneous problems caused by non-uniform component granularity. Next, we use the component register to solve the problem caused by the high mobility of components.
普适计算对计算环境提出了新的定义和要求。人们对计算环境的理解将由个人计算机转变为一个物理空间,这个物理空间中有各种各样的计算设备。我们把整个物理空间,而不是其中的单个设备看作一个计算系统;它需要屏蔽掉了物理空间中各个设备的细节,向上提供了标准程序接口,使得这个物理空间变成了一个能被感知的空间。我们设计的操作系统就是要对这个物理空间的资源进行管理,使应用程序能够与物理空间进行交互。我们将客观存在的、有组织的、可扩展的包含一定计算能力的空间叫做物理空间;将每一个普适计算设备所有可获及的构件所形成的空间叫做感知空间Aware Space,如图4所示。Ubiquitous computing puts forward new definitions and requirements for the computing environment. People's understanding of the computing environment will change from a personal computer to a physical space with a variety of computing devices. We regard the entire physical space, rather than a single device in it, as a computing system; it needs to shield the details of each device in the physical space, and provide a standard program interface upwards, making this physical space a perceivable space. The operating system we design is to manage the resources of this physical space, so that applications can interact with the physical space. We call the objectively existing, organized, and expandable space containing certain computing capabilities physical space; the space formed by all the accessible components of each ubiquitous computing device is called the perception space Aware Space, as shown in Figure 4 Show.
普适计算中的各种计算设备之间往往是通过无线方式来进行通信的(比如红外与蓝牙等技术),这种通讯方式在很大程度上会受到通讯距离的限制。任何一个设备都有一定的感知空间(Aware Space),如图4所示;设备无法感知到在感知空间以外的构件。为此,我们引入了构件注册器CR(Component Recorder)来记录某种设备可以感知到的所有构件。支持网络分布式环境的构件化服务能够充分利用网络资源,利用重用代码,获得可动态组合的灵活的构件化服务,以较高的效率实现比较复杂的功能。Various computing devices in ubiquitous computing often communicate with each other through wireless means (such as infrared and bluetooth technologies), which is largely limited by the communication distance. Any device has a certain awareness space (Aware Space), as shown in Figure 4; the device cannot perceive components outside the awareness space. To this end, we introduce a component register CR (Component Recorder) to record all components that a certain device can perceive. Component-based services that support network distributed environments can make full use of network resources and reuse codes to obtain flexible component-based services that can be dynamically combined, and realize more complex functions with high efficiency.
如图3所示,构件注册器定期检测感知空间中的构件,始终保持可用构件的最新记录。每当新构件进入感知空间一段时间之后,就会被检测到;并且在构件注册器中会加入一条关于这个新构件的记录信息。同样的道理,如果已经登记的某个构件从感知空间中离开,构件注册器定期检测后发现构件不复存在,就会把它的记录删除。As shown in Figure 3, the component register periodically detects components in the perception space, always keeping an up-to-date record of available components. Whenever a new component enters the perception space for a period of time, it will be detected; and a record information about the new component will be added in the component register. In the same way, if a registered component leaves the perception space, the component registerer will delete its record after periodic detection and finds that the component no longer exists.
为了更加有效的管理构件,构件注册器的记录分为两个部分,第一部分记录该设备拥有的本地构件,第二部分记录感知空间中其它设备的构件。本地拥有的构件相对稳定,由该设备自行管理;而网络构件的变动比较频繁,设备对它只有使用权而没有管理权。在系统初始化时,首先把本地构件的所有记录存放在构件注册器中;然后检测感知空间中当时所有的网络构件,也把它们的记录加入到构件注册器中。在系统运行时,本地构件记录的添加或者删除是由该设备决定的,管理起来非常容易;而网络构件则需要定期进行检测是否存在、是否可用。In order to manage components more effectively, the record of the component register is divided into two parts. The first part records the local components owned by the device, and the second part records the components of other devices in the sensing space. Locally owned components are relatively stable and managed by the device itself; while network components change frequently, and the device only has the right to use them but not the right to manage them. When the system is initialized, all the records of the local components are firstly stored in the component register; then all network components in the sensing space are detected at that time, and their records are also added into the component register. When the system is running, the addition or deletion of local component records is determined by the device, which is very easy to manage; while network components need to be regularly checked for existence and availability.
网络构件有三种状态:就绪状态、活动状态和僵死状态。构件动态注册采用租借的方式,系统一旦发现某个网络构件后就确定一个租借期限,当租借期限结束后,构件注册器判断该网络构件是否仍然可用,从而确定下一次租借期限,在租借期间的构件处于就绪状态,它随时准备被系统使用;当系统需要调用网络构件完成某项任务的时候,这个构件就由就绪状态转变为活动状态,构件便开始了真正的工作;构件把任务完成后,又将返回到就绪状态;当网络构件被删除,或者离开了系统可以感知到的空间,或者系统没有足够的权限访问它,该构件就处于僵死状态,僵死的构件不能被系统调用。网络构件只有在活动状态的时候才占用系统资源。Network components have three states: ready state, active state and dead state. Component dynamic registration adopts the lease method. Once the system finds a network component, it determines a lease period. When the lease period ends, the component registerer judges whether the network component is still available, thereby determining the next lease period. The component is in the ready state, and it is ready to be used by the system at any time; when the system needs to call the network component to complete a certain task, the component changes from the ready state to the active state, and the component starts the real work; after the component completes the task, It will return to the ready state; when the network component is deleted, or leaves the space that the system can perceive, or the system does not have sufficient permissions to access it, the component is in a dead state, and the dead component cannot be called by the system. Network components occupy system resources only when they are active.
系统为了完成某个任务,需要符合某些要求的构件(比如说要求该构件完成功能A AND构件所需存储空间小于B兆AND构件的生命值大于C秒)。系统向CR提出要求,查找是否有能够满足这些要求的构件。如果这样的构件不存在,则向系统返回空值;如果这样的构件存在并且唯一,则读取构件控制块的完整信息,按照接口要求访问构件;如果这样的构件不止一个,则读取所有这些满足条件的构件控制块的完整信息,然后比较这些构件的性能和网络代价(本地构件网络代价为零),从而选出最佳构件访问之。In order to complete a certain task, the system needs components that meet certain requirements (for example, the component is required to complete the function A AND the required storage space of the component is less than B megabytes AND the life value of the component is greater than C seconds). The system makes requirements to CR to find out whether there are components that can meet these requirements. If such a component does not exist, return a null value to the system; if such a component exists and is unique, read the complete information of the component control block, and access the component according to the interface requirements; if there is more than one such component, read all of them The complete information of component control blocks that meet the conditions, and then compare the performance and network cost of these components (the network cost of the local component is zero), so as to select the best component to visit.
值得注意的是,由于我们的设计采用了“一切都是构件”的思想,构件注册器构件注册器本身也是一个构件,只不过它比较特殊,它是系统在初始化时就自动生成的,它是系统所必须拥有的一个构件。这样的设计大大方便了对构件的管理,因为除了构件以外再也没有别的东西。It is worth noting that since our design adopts the idea of "everything is a component", the component register is also a component, but it is rather special. It is automatically generated when the system is initialized. It is A component that the system must have. This design greatly facilitates the management of components, because there is nothing else but components.
实施例:Example:
解析MPEG4编码文件,并播放视频流。这个例子中共有两个可计算设备:一台跑在是Linux操作系统上的个人计算机,一台是跑在RT Linux上面的PDA;这两个设备都配有蓝牙接口,并且可以通过蓝牙接口进行相互之间的通讯。该例子一共设计了四个构件:解析MPEG4的构件,显示视频的构件,解析JPEG的构件,显示图像的构件;刚开始的时候,这四个构件都在个人计算机上运行。Parse MPEG4 encoded files and play video streams. In this example, there are two computing devices: a personal computer running on the Linux operating system, and a PDA running on RT Linux; both devices are equipped with Bluetooth interfaces, and can be communication between each other. This example designs a total of four components: a component for parsing MPEG4, a component for displaying video, a component for parsing JPEG, and a component for displaying images; at the beginning, these four components were all running on a personal computer.
第一步,在个人计算机上初始化上述四个构件。其中解析MPEG4的构件的初始化过程如下:首先,申请一个构件控制块并且把构件的各种元信息写入它的构件控制块中,如图2所示;然后,用构件监视器管理该构件的生命周期策略;接下来,把构件和它的控制块、监视器一起封装到构件容器中;最后,由构件容器提供构件的运行环境,所有访问都必须通过构件容器进行。其它三个构件的初始化过程也基本相同。In the first step, the above four components are initialized on the personal computer. The initialization process of the component parsing MPEG4 is as follows: First, apply for a component control block and write various meta-information of the component into its component control block, as shown in Figure 2; then, use the component monitor to manage the components Life cycle strategy; next, the component and its control block and monitor are encapsulated into the component container; finally, the component container provides the running environment of the component, and all accesses must be carried out through the component container. The initialization process of the other three components is also basically the same.
第二步,我们把PDA逐渐靠近个人计算机。在一定距离范围内,PDA和个人计算机就可以通过蓝牙接口进行通讯了。这时,PDA检测到了个人计算机上面的四个构件,并把它们的记录存放到构件注册器上。构件此时处于就绪状态,但并不占用PDA的存储空间和计算资源。In the second step, we gradually brought the PDA closer to the personal computer. Within a certain distance, PDA and personal computer can communicate through the Bluetooth interface. At this time, the PDA detects the four components on the personal computer, and stores their records on the component register. The component is in a ready state at this time, but does not occupy the storage space and computing resources of the PDA.
第三步,PDA需要对MPEG4的文件进行解码,并且播放这个文件。这时搜索构件注册器中的构件,查询是否有能够满足要求的构件。由于在第二步中,解析MPEG4的构件和显示视频的构件都已经在构件注册器上登记,因此可以容易的找出这两个构件。接着,通过访问这两个构件的构件控制块获得足够的信息:包括构件的功能、构件的接口、构件所占空间的大小。最后,PDA就可以利用这两个构件完成解码和播放任务了。执行任务时,构件就由就绪状态转变为活动状态,将占用PDA的存储空间和计算资源,如附图5所示。In the third step, the PDA needs to decode the MPEG4 file and play the file. At this time, search the components in the component register to check whether there is a component that can meet the requirements. Since in the second step, the component for parsing MPEG4 and the component for displaying video have been registered on the component register, so these two components can be easily found. Then, obtain sufficient information by accessing the component control blocks of the two components: including the function of the component, the interface of the component, and the size of the space occupied by the component. Finally, the PDA can use these two components to complete the decoding and playback tasks. When executing a task, the component changes from the ready state to the active state, which will occupy the storage space and computing resources of the PDA, as shown in Figure 5.
第四步,MPEG4的文件播放完以后,解析MPEG4的构件和显示视频的构件就要放弃系统资源,重新返回到就绪状态。接下来,如果我们让PDA再一次远离个人计算机,超出了蓝牙作用的范围,上述四个构件就不再可用了,将处于僵死状态,同样也不占用PDA的存储空间和计算资源。In the fourth step, after the MPEG4 file is played, the component for parsing MPEG4 and the component for displaying video will give up system resources and return to the ready state. Next, if we let the PDA stay away from the personal computer again, beyond the scope of the bluetooth effect, the above four components are no longer available, will be in a dead state, and also do not occupy the storage space and computing resources of the PDA.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100184389A CN1307549C (en) | 2004-05-15 | 2004-05-15 | Component Management Method Supporting Pervasive Computing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100184389A CN1307549C (en) | 2004-05-15 | 2004-05-15 | Component Management Method Supporting Pervasive Computing |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1581085A CN1581085A (en) | 2005-02-16 |
| CN1307549C true CN1307549C (en) | 2007-03-28 |
Family
ID=34581781
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2004100184389A Expired - Fee Related CN1307549C (en) | 2004-05-15 | 2004-05-15 | Component Management Method Supporting Pervasive Computing |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1307549C (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100391149C (en) * | 2005-05-12 | 2008-05-28 | 中国科学院计算技术研究所 | Application management subsystem and method in multi-node intelligent network application service system |
| CN101247312B (en) * | 2008-03-05 | 2012-02-15 | 中国科学院计算技术研究所 | Context perception information processing system and method in peer-to-peer mode |
| CN101464795B (en) * | 2008-10-10 | 2014-05-07 | 华南理工大学 | Software design method used for pervasive compution |
| CN103970214B (en) * | 2014-05-19 | 2018-05-04 | 浪潮电子信息产业股份有限公司 | A kind of isomery accelerates bladed computer systems framework |
| CN104102947B (en) * | 2014-06-27 | 2019-07-23 | 许继电气股份有限公司 | Product management and control method based on software components |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1339742A (en) * | 2001-10-12 | 2002-03-13 | 北京大学 | Oil-line avolution method for modular soft ware |
| WO2002097610A1 (en) * | 2001-05-30 | 2002-12-05 | Bea Systems, Inc. | System and method for software component plug-in framework |
-
2004
- 2004-05-15 CN CNB2004100184389A patent/CN1307549C/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002097610A1 (en) * | 2001-05-30 | 2002-12-05 | Bea Systems, Inc. | System and method for software component plug-in framework |
| CN1339742A (en) * | 2001-10-12 | 2002-03-13 | 北京大学 | Oil-line avolution method for modular soft ware |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1581085A (en) | 2005-02-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8234308B2 (en) | Deliver application services through business object views | |
| CN100456237C (en) | Database access method and device | |
| US11615061B1 (en) | Evaluating workload for database migration recommendations | |
| US20160004516A1 (en) | Code Generation Framework for Application Program Interface for Model | |
| CN107315776A (en) | A kind of data management system based on cloud computing | |
| EP2973047A1 (en) | Methods for managing applications using semantic modeling and tagging and devices thereof | |
| CN111459671A (en) | Data processing method and device, data exchange server and storage medium | |
| CN106843835A (en) | A kind of application systems software constructing system of meta data customizing, system constituting method | |
| CN117271460B (en) | Scientific research digital networking service method and system based on scientific research digital object language relation | |
| CN101329629A (en) | A business-level service information management method, device and system | |
| CN108345691B (en) | Data source general processing framework construction method, data source processing method and device | |
| US8707171B2 (en) | Service registry policy editing user interface | |
| CN115665197A (en) | A system and method for automatic warehousing of data collection based on the Internet of Things | |
| Zhao et al. | Grid metadata catalog service-based OGC web registry service | |
| US20130124611A1 (en) | Unified repository & tool infrastructure | |
| CN1307549C (en) | Component Management Method Supporting Pervasive Computing | |
| CN101295261B (en) | A Component Context Processing Method Oriented to Pervasive Computing Environment | |
| KR20020066151A (en) | Spatial information distributing system based on open gis and method thereof | |
| CN115062084A (en) | Method and device for constructing API (application program interface) based on database metadata | |
| JP2013546072A (en) | Autonomous intelligent content items | |
| CN106970971B (en) | Description method of improved central anchor chain model | |
| CN118861167B (en) | A method and device for dynamically switching data storage for a network traffic analysis system | |
| CN101013363A (en) | Software component classification registration method based on domain body | |
| Xu et al. | Researchment and Realization Based on Android Database Application Technology | |
| Mosher | A new specification for managing metadata |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20070328 Termination date: 20130515 |