It is applied to self adaptation installation system and the installation method of embedded device service software
Technical field
The present invention relates to embedded device service software installing area, specifically refer to a kind of self adaptation installation method being applied to embedded device service software.
Background technology
At present, there is the various embedded device based on linux kernel for providing software service on the market, such as things-internet gateway, home networking gateway, embedded server device etc..These facilities need the service provided may have multiple, and after device sales, are also possible to increase new service request according to era development and user's request.
At present similar devices is once sold away and basically can not be installed new being served by, and part can be updated upgrading to the service installed, and the new service software of installation can be provided individually to rely primarily on following several method:
(1) after-sale service personnel provide make house calls, in user family or office space be updated upgrading;
(2) built-in services program on embedded device, automatically downloads all up-to-date service routines and installs;
(3) user automatically download latest services application install.
At present major part similar devices all cannot increase new service, in a small amount of existing technology that similar service is provided, and no matter which kind of method, the most very time and effort consuming, equipment or user are required the highest.Such as: first method needs special service personal, and enterprise to expend huge human cost and carry out after-sales service, not only waste resource, and increase operation cost of enterprises, be unfavorable for enterprise's existence in competition;Second method then needs to install all latest services in embedded device, expends large number quipments resource, increases cost of equipment maintenance;The third then needs user to have good technical ability to carry out service upgrade, and the most most user is not possess this respect technical ability.
Summary of the invention
The technical problem to be solved is to provide a kind of self adaptation installation system being applied to embedded device service software, only need to arrange one and be specifically designed to the embedded device that service is provided, this equipment can be that multiple offer by service equipment services, and system structure is simple, it is simple to safeguard.
Another technical problem to be solved by this invention is then to provide a kind of self adaptation installation method being applied to embedded device service software, by running program, serviced by by service device request, embedded device responder the service of mount request of service are provided, a kind of self adaptation installation method is provided for the embedded device of service substantially cannot be updated at present, convenient and swift, and do not waste resource.
The purpose of the present invention is achieved through the following technical solutions: be applied to the self adaptation installation system of embedded device service software, mainly by the interconnective embedded device providing service and being formed by service equipment, the described quantity by service equipment and kind are more than one.In this technical scheme, an embedded device providing service can be that multiple offer by service equipment services, and saves device resource.
This system also includes the service software data base being connected by network with the embedded device providing service, in the embedded device that service is provided during not presence service port, can carry out inquiring about the service whether having request in service software data base by network, if having, installation can be downloaded, adding and can be supplied to by the installation procedure of service equipment.
It is applied to the self adaptation installation method of embedded device service software, comprises the following steps:
A () brings into operation after program, it is provided that the embedded device of service is intercepted and captured and asked by the service of service equipment;
B () provides the kernel tasks response of the embedded device of service to be asked by the service of service equipment, check whether serve port exists;
If the existence of (c) serve port, service request is delivered to corresponding service routine, and completes to end task after service is asked;If serve port does not exists, directly end task.
Generally, multiple need service software to be mounted can be deposited in advance in the embedded device that service is provided, so above three step can meet major part by the installation requirements of service equipment.
In order to be able to meet more by the installation requirements of service equipment, further, in described step (c) serve port do not exist directly end task before be additionally provided with following steps:
(c.1) embedded device providing service keeps request, and by default port, request feature is sent to demons, and described request is characterized as service port number;
(c.2) demons pass through network inquiry service software data base, whether there is newly requested service software in confirmed service software database;
(c.3) if newly requested service software exists, then download newly requested service software, end task after installation;If newly requested service software does not exists, then abandon the request of holding and end task.
The service downloading installation request in described step (c.3) is to download latest services software and install, and then runs;Further, kernel tasks completes service request after the service request kept is passed to new service routine by newly installed port.
In abandoning the request of holding in described step (c.3) and ending task after the request abandoning holding, kernel tasks responds " destination interface is unreachable " according to computer network with standard network protocol, then ends task.
The present invention compared with prior art, has such advantages as and beneficial effect:
(1) present invention passes through as by the external embedded device providing service of service equipment, depositing software to be updated in advance in the embedded device providing service, for being provided one conveniently mode by service equipment increase service or renewal service.
(2) present invention one provides the embedded device of service can be multiple by service device service, not only saves the energy, and hardware system structure is simple, it is simple to safeguard.
(3) present invention is for providing the embedded device of service to be connected to service software data base also by network, adds and can be supplied to by the installation procedure of service equipment.
(4) present system structure and the setting of installation method, make the embedded service equipment that substantially cannot update at present can increase service at any time or update service, safeguard without special personnel after sale, more need not expend substantial amounts of hardware resource, cut operating costs for enterprise.
(5) present invention can apply to all of embedded device, application is wide, can be applicable the most on a large scale.
On the whole, the present invention intercepts and captures user's request to new service automatically by the self adaptation installation system arranged and installation method, new service is installed automatically, avoid manual intervention, reduce system maintenance cost, extend relevant device and use the cycle, more exchange device will not be needed because of not providing some service software.
Accompanying drawing explanation
Fig. 1 is the system structure schematic diagram of the embodiment of the present invention 1.
Fig. 2 is the operational process schematic diagram of the embodiment of the present invention 1.
Fig. 3 is the system structure schematic diagram of the embodiment of the present invention 2.
Fig. 4 is the operational process schematic diagram of the embodiment of the present invention 2.
Detailed description of the invention
Below in conjunction with embodiment, the present invention is described in further detail, but embodiments of the present invention are not limited to this.
Embodiment 1
It is illustrated in figure 1 and is applied to the self adaptation installation system that embedded device service software is basic, the main embedded device serviced by offer and connected formed by service equipment, it is current normally used things-internet gateway, home networking gateway, embedded server device etc. by service equipment.One embedded device providing service can be that more than one offer by service equipment services, and generally, is multiple, is used for economizing on resources, it is simple to system maintenance.
It is the self adaptation installation method using Fig. 1 structure to be embedded device build-in services software as shown in Figure 2, after program brings into operation, the equipment providing service is intercepted and captured and is asked by the service of service equipment, and whether the network port that in its kernel, task of guarding searches this service exists.If this serve port exists and opens, then the service routine that this service request is directly submitted to correspondence completes service request;If this serve port does not exists, directly end task.
Owing to by the service of service equipment requirements offer, some is mounted, some is uninstalled.The service that equipment requirements provides if being served is installed, then use above-mentioned system and method just can meet increase service or update the requirement of service, the service that equipment requirements provides if being served is not installed, said system just cannot meet requirement, Given this, in order to increase service area, the self adaptation installation system in our special proposition embodiment 2 and installation method.
Embodiment 2
With differing only in of embodiment 1: as it is shown on figure 3, in the system structure of Fig. 1, for providing the embedded device also network of service to be connected to service software data base, service software data base can exist more service software needed by service equipment.For uninstalled service, the embedded device providing service can automatic inquiry service software database, whether the service software of inquiry request exists, and realizes the new service software existed automatically downloading and installing, and supports by the request that newly services of service equipment in the way of transparence.
As shown in Figure 4, following steps it are additionally provided with: if i.e. this serve port does not exists before serve port does not exist and directly ends task, then the feature (serve port usually accessed) of this request is delivered in demons by default port, hang up this service request simultaneously.Demons inquiry service software data base, if there is the software that this request is corresponding, then automatic download service software, and install and run it, then kernel tasks ends task after giving, by the serve port newly opened, the service that newly installed service routine completes request by the service request hung up.Otherwise end task after being responded " destination interface is unreachable " message by service equipment by the requirement of computer network with standard network protocol.
The feature of the first time service request of the present invention automatic Intercept and capture service equipment place environment, such as service port number, inquires about data base automatically, as there is corresponding service routine, the most automatically download latest services program, automatically install, the most just can provide corresponding service in running environment.
The above, be only presently preferred embodiments of the present invention, and the present invention not does any pro forma restriction, every above example is made according to the technical spirit of the present invention any simple modification, equivalent variations, within each falling within protection scope of the present invention.