Summary of the invention
A kind of auto upgrading method that provides external equipment to drive is provided fundamental purpose of the present invention, is intended to solve the existing embedded device technical matters bad to external equipment compatibility, for client provides better experience.
In order to realize goal of the invention, the invention provides a kind of auto upgrading method that external equipment drives, it comprises the following steps:
Embedded device obtains the duty of coupled external equipment;
Judge that whether the disabled reason of described external equipment is for lacking driving;
Disabled former because lack while driving when described external equipment, to obtain external equipment mark, and obtain the machine platform model to external equipment transmitting apparatus information request, the external equipment mark and the machine platform model that get are integrated;
Send external equipment mark and the machine platform model and the driving request after integrating to high in the clouds equipment;
Load the driving that high in the clouds equipment pushes.
Preferably, the step that described embedded device obtains the duty of coupled external equipment comprises:
The kernel spacing event of capture device plug receptacle;
Judge whether the external equipment being connected with equipment plug receptacle can be used, if so, process ends; If not, proceed to and judge whether the disabled reason of coupled external equipment is the step that lacks driving.
The step of the driving that preferably, described loading high in the clouds equipment pushes specifically comprises:
Detect and whether exist legacy version to drive;
Redaction is installed after if so, being unloaded again to be driven; If not, redaction being directly installed drives.
The step of the driving that preferably, described loading high in the clouds equipment pushes further comprises:
Amendment the machine system booting script, makes the each start of the machine all automatically load this driving.
Preferably, described embedded device is televisor.
The present invention separately provides a kind of embedded device, and it comprises:
External equipment trapping module, for obtaining the duty of coupled external equipment;
Connect into analysis module, for judging that whether the disabled reason of described external equipment is for lacking driving;
Information interaction module, for when described external equipment disabled former because lack when driving, identify to obtain external equipment to external equipment transmitting apparatus information request, and obtain the machine platform model, the external equipment mark and the machine platform model that get are integrated;
Drive adaptive generation module, for send external equipment mark and the machine platform model and the driving request after integrating to high in the clouds equipment;
Load-on module, the driving pushing for loading high in the clouds equipment.
Preferably, described external equipment trapping module can comprise:
Kernel spacing event analysis unit, for the kernel spacing event of capture device plug receptacle, judges whether the external equipment being connected with equipment plug receptacle can be used, if so, process ends; If not, start connect into analysis module.
Preferably, described load-on module can comprise:
Whether customization units, for detection of existing legacy version to drive; Redaction is installed after if so, being unloaded again to be driven; If not, redaction being directly installed drives.
Preferably, described load-on module also can comprise:
Updating block, for revising the machine system booting script, makes the each start of the machine all automatically load this driving.
The auto upgrading system that the present invention separately provides a kind of external equipment to drive, it comprises:
Embedded device, for obtaining mark and the machine platform model of external equipment, and is integrated together with driving request and is sent to high in the clouds equipment;
High in the clouds equipment, for pushing corresponding driver to described embedded device according to the platform model of described external equipment mark and embedded device.
Preferably, drive the embedded device in auto upgrading system to comprise:
Connect into analysis module, for judging that whether the disabled reason of coupled external equipment is for lacking driving;
Information interaction module, for when described external equipment disabled former because lack when driving, identify to obtain external equipment to external equipment transmitting apparatus information request, and obtain the machine platform model, the external equipment mark and the machine platform model that get are integrated;
Drive adaptive generation module, for send external equipment mark and the machine platform model and the driving request after integrating to high in the clouds equipment;
Load-on module, the driving pushing for loading high in the clouds equipment.
Preferably, above-mentioned embedded device also can comprise:
Kernel spacing event analysis unit, for the kernel spacing event of capture device plug receptacle, judges whether the external equipment being connected with equipment plug receptacle can be used, if so, process ends; If not, start connect into analysis module.
Preferably, described high in the clouds equipment comprises:
Receiver module, for receiving external equipment mark after the integration that embedded device sends and platform model and the driving request of embedded device;
Parsing module, for resolving described request message, obtains platform model and the driving request of external equipment mark and embedded device;
Drive processing module, for pushing corresponding driver to described embedded device according to the platform model of described external equipment mark and embedded device.
Preferably, described driving processing module is further used for:
Whether there is the required driving of embedded device according to platform model retrieval this locality of described external equipment mark and embedded device;
If so, be pushed directly to embedded device, and its propelling movement number of times is kept a record;
If not, find the source file of required driving, automatically select corresponding cross-compiler, cutting compile option, generates compilation script, source code is compiled to generate drive.
Preferably, described driving processing module also for:
In the time there is not the required driving of embedded device in this locality or when the source file of driving, log;
Generate after driving, this driving is added to driving list.
The present invention utilizes embedded technology and cloud computing technology, has solved the adaptive problem of puzzlement embedded device external equipment for a long time from high in the clouds, allows external equipment that the production firm of embedded device will be not all drive and pre-installs; Meanwhile, can also allow on the market external equipment miscellaneous on embedded device, become available, not only reduce enterprise cost, can also bring client good experience, allow client really experience the arriving in intelligence epoch.
Embodiment
In the embodiment of the present invention, embedded device can be the consumption electronic product (such as PDA, vehicle-mounted computer, televisor etc.) with embedded main board, and its operating system can be linux system.External equipment refer to can be connected with embedded device and to carry out arbitrarily data interaction electronic equipment, be preferably the electronic equipment (for convenience of description, hereinafter referred to as USB device) with USB interface.Below will be taking embedded device as televisor, external equipment is as USB device is example, describes the present invention in detail.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
With reference to Fig. 1, Fig. 1 is the process flow diagram of auto upgrading method one embodiment of external equipment driving of the present invention.As shown in Figure 1, this flow process comprises the following steps:
Step S10, embedded device obtains the duty of coupled external equipment; For example, in the time that USB device produces plug action on televisor, the USB interface hardware circuit of TV SKD can change, and causes the response of the hot-swappable mechanism of kernel, now will produce a kernel spacing event.Now can catch this kernel spacing event, and it is analyzed, judge whether the USB device being connected with USB plug receptacle can be used, if because extracting of USB device causes, process ends, no longer carries out following step S20 and down-stream; If because the insertion of USB device causes, continue to judge the use state of USB device, if USB device can use, also process ends; If equipment is unavailable, perform step S20.
Step S20, judges that whether the disabled reason of external equipment is for lacking driving;
Step S30, disabled former because lack while driving when external equipment, to obtain external equipment mark, and obtain the machine platform model to external equipment transmitting apparatus information request, the external equipment mark and the machine platform model that get are integrated; For example, when USB device disabled former because lack drive time, televisor will send request message command to external USB device.USB device receives the kernel spacing that the Verbose Listing of describing its attribute information will be fed back to televisor after solicited message order.Televisor can read this information list from kernel spacing, therefrom screens USB device mark.USB device mark is the unique identification information of USB device, and it determines the driving of which kind of type of needs.After obtaining USB device mark, televisor removes to obtain the type information of its operating platform again, and this type information determines the platform specific version of required driving type.As everyone knows, the embedded platform of different vendor varies, and cannot also can not accomplish to unify completely at present, and different platform has different demand, and both information could uniquely determine through integrating which kind of driving was eligible.The embodiment of the present invention identifies by USB device and the type information of televisor operating platform has determined unique driving that USB device is required jointly.Get after these two information of type information of USB device mark and televisor operating platform, integrate, make it meet the communication format of high in the clouds equipment.
Step S40, sends external equipment mark and the machine platform model and the driving request after integrating to high in the clouds equipment; For example, the USB device mark after integrating and operating platform model and the driving request of televisor are sent to high in the clouds equipment by televisor.Before this, the required overwhelming majority of USB device drives all compiled high in the clouds equipment that is placed on.Receive after the driving request of televisor, high in the clouds equipment will drive accordingly and be sent to televisor according to the operating platform model of USB device mark and televisor.
Step S50, loads the driving that high in the clouds equipment pushes.Televisor receives after the driving of high in the clouds equipment propelling movement, automatically load this driving arrangement, thereby it is available that USB device is able on TV.
The present invention utilizes embedded technology and cloud computing technology, has solved the adaptive problem of puzzlement embedded device external equipment for a long time from high in the clouds, allows external equipment that the production firm of embedded device will be not all drive and pre-installs; Meanwhile, can also allow on the market external equipment miscellaneous on embedded device, become available, not only reduce enterprise cost, can also bring client good experience, allow client really experience the arriving in intelligence epoch.
With reference to Fig. 2, in one embodiment, step S50 specifically comprises:
Whether step S51, detect and exist legacy version to drive; If so, perform step S52, if not, perform step S53;
Step S52, drives redaction being installed again after legacy version driving unloading;
Step S53, directly installs redaction and drives.
Whether televisor receives after the driver of high in the clouds equipment propelling movement, will enter the Auto-mounting state that drives, now, will first detect and exist lowest version to drive, if exist, redaction will be installed after unloading again and drive; If do not exist, redaction is directly installed and drives.
Further, above-mentioned steps S50 also can comprise:
Step S54, amendment the machine system booting script, makes the each start of the machine all automatically load this driving.After installation, also need to revise system booting script, allow the later each start of TV can automatically load this driving, this external equipment is continued available on TV.
In the embodiment of the present invention, when driving after the platform of embedded device is installed, by amendment the machine system booting script, guarantee to drive available and not short-lived.In the situation that guaranteeing system stability, system is carried out to increment customization, renewal, ensure that circumscribed USB equipment continues available on this embedded device in the future.
The embodiment of the present invention also provides a kind of embedded device, in order to realize said method.In a preferred version, embedded device is televisor.With reference to Fig. 3, this embedded device comprises:
External equipment trapping module 10, for obtaining the duty of coupled external equipment; For example, in the time that circumscribed USB equipment produces plug action on televisor, the USB interface hardware circuit of TV SKD can change, and causes the response of the hot-swappable mechanism of kernel, now will produce a kernel spacing event.Now external equipment trapping module 10 can be caught this kernel spacing event, and it is analyzed, and judges whether the USB device being connected with USB plug receptacle can be used, if because extracting of USB device causes, process ends, no longer carries out S10 and down-stream; If because the insertion of USB device causes, continue to judge the use state of USB device, if USB device can use, also process ends; If equipment is unavailable, whether the disabled reason of connect into analysis module 10 is for lacking driving.
Connect into analysis module 20, for judging that whether the disabled reason of external equipment is for lacking driving;
Information interaction module 30, for when external equipment disabled former because lack when driving, identify to obtain external equipment to external equipment transmitting apparatus information request, and obtain the machine platform model, the external equipment mark and the machine platform model that get are integrated; For example, when USB device disabled former because lack drive time, information interaction module 30 will send request message command to external USB device.USB device receives the kernel spacing that the Verbose Listing of describing its attribute information will be fed back to televisor after solicited message order.Information interaction module 30 can read this information list from kernel spacing, therefrom screens USB device mark.USB device mark is the unique identification information of USB device, and it determines the driving of which kind of type of needs.After information interaction module 30 is obtained USB device mark, then remove to obtain the type information of its operating platform, this type information determines the platform specific version of required driving type.As everyone knows, the embedded platform of different vendor varies, and cannot also can not accomplish to unify completely at present, and different platform has different demand, and both information could uniquely determine through integrating which kind of driving was eligible.The embodiment of the present invention identifies by USB device and the type information of televisor operating platform has determined unique driving that USB device is required jointly.Information interaction module 30 gets after these two information of type information of USB device mark and televisor operating platform, integrates, and makes it meet the communication format of high in the clouds equipment.
Drive adaptive generation module 40, for send external equipment mark and the machine platform model and the driving request after integrating to high in the clouds equipment; For example, drive adaptive generation module 40 that the USB device mark after integrating and operating platform model and the driving request of televisor are sent to high in the clouds equipment.Before this, the required overwhelming majority of USB device drives all compiled high in the clouds equipment that is placed on.Receive after the driving request of televisor, high in the clouds equipment will drive accordingly and be sent to televisor according to the operating platform model of USB device mark and televisor.
Load-on module 50, the driving pushing for loading high in the clouds equipment.Televisor receives after the driving of high in the clouds equipment propelling movement, and load-on module 50 loads this driving arrangement automatically, thereby it is available that USB device is able on TV.
Further, above-mentioned external equipment trapping module 10 also comprises:
Kernel spacing event analysis unit 11, for the kernel spacing event of capture device plug receptacle, judges whether the USB device being connected with USB plug receptacle can be used, if so, process ends; If not, start connect into analysis module.
With reference to Fig. 4, in a preferred embodiment, above-mentioned load-on module 50 can comprise:
Whether customization units 51, for detection of existing legacy version to drive; Redaction is installed after if so, being unloaded again to be driven; If not, redaction being directly installed drives.Whether televisor receives after the driver of high in the clouds equipment propelling movement, will enter the Auto-mounting state that drives, now, will first detect and exist lowest version to drive, if exist, redaction will be installed after unloading again and drive; If do not exist, redaction is directly installed and drives.Further, above-mentioned load-on module 50 also can comprise:
Updating block 52, for revising the machine system booting script, makes the each start of the machine all automatically load this driving.Updating block 52 is revised system booting script after drive installation, allows the later each start of TV can automatically load this driving, this circumscribed USB equipment is continued available on TV.
In the embodiment of the present invention, when driving after the platform of embedded device is installed, revise the machine system booting script by updating block 52, guarantee to drive available and not short-lived.In the situation that guaranteeing system stability, by customization units 51, system is carried out to increment customization, renewal, ensure that circumscribed USB equipment continues available on this embedded device in the future.
The auto upgrading system that the present invention separately provides a kind of external equipment to drive, with reference to Fig. 5, the auto upgrading system that embodiment of the present invention external equipment drives comprises:
Embedded device 100, for obtaining mark and the machine platform model of external equipment 300, and is integrated together with driving request and is sent to high in the clouds equipment 200; In the embodiment of the present invention, the principle of work of embedded device 100 can, with reference to earlier figures 1 to embodiment illustrated in fig. 5, not be described further at this.
High in the clouds equipment 200, for pushing corresponding driver to embedded device 100 according to the platform model of external equipment mark and embedded device 100.In the embodiment of the present invention, high in the clouds equipment 200 refers to the data processing equipment that can carry out cloud data interaction with embedded device 100, and it prestores multiple driver or can compile various drivings.The driving request that can send according to embedded device 100, is pushed to embedded device 100 by the driver of corresponding USB device 300.
As shown in Figure 6, in one embodiment, high in the clouds equipment 200 can comprise:
Receiver module 201, for receiving external equipment mark after the integration that embedded device 100 sends and platform model and the driving request of embedded device;
Parsing module 202, for analysis request message, obtains platform model and the driving request of external equipment mark and embedded device;
Drive processing module 203, for pushing corresponding driver to embedded device 100 according to the platform model of external equipment mark and embedded device.
Preferably, drive processing module 203 to be further used for:
Whether there is the required driving of embedded device according to platform model retrieval this locality of external equipment mark and embedded device;
If so, be pushed directly to embedded device 100, and its propelling movement number of times is kept a record;
If not, find the source file of required driving, automatically select corresponding cross-compiler, cutting compile option, generates compilation script, source code is compiled to generate drive.
Preferably, drive processing module 203 also for:
In the time there is not the required driving of embedded device in this locality or when the source file of driving, log;
Generate after driving, this driving is added to driving list.
Specifically, the specific works flow process of high in the clouds equipment 200 is as follows: receiver module 201 receives after the driving request information of televisor, and parsing module 202 analysis request message are obtained platform model and the driving request of USB device mark and embedded device 100; Whether drive processing module 203 first to go to retrieve the required driving of USB device according to information exists:
If exist, be pushed directly to TV end, and its propelling movement number of times is kept a record, will add up pushing number of times at set intervals, the driving explanation client that corresponding number of times is large is many to its demand, before next TV listing, consideration is contained in to TV in advance this driving, facilitates client to use.
If do not exist, whether exist according to the required drive source file of information searching, if do not exist, log, makes reference for increase drive source file in the future; If exist, will automatically select corresponding cross-compiler, cutting compile option, generates compilation script, source code is compiled to generate drive; Cannot generate if drive, log, makes reference for optimize adaptive generation module in the future; If generate and drive smoothly, this driving is added to driving list, complete above-mentioned propelling movement process.
Below by taking USB device as having the game paddle of USB interface, user is connected to TV by this game paddle and plays games and describe the auto upgrading system that external equipment of the present invention drives in detail into example:
Game paddle is plugged TV by user;
The hot-swappable mechanism of system for TV set responds, and produces kernel spacing event;
This kernel events is caught in kernel spacing event analysis unit 51, and analyzes;
If this event is because equipment insertion causes, according to linux device model, whether the logo file under read/sys file system ad-hoc location, continue judgment device in down state, if unavailable,
Connect into analysis module 10 judge whether due to lack drive support due to, if lack driving, proceed to information exchange module 20.
Information exchange module 20 will be to game paddle transmitting apparatus information request, after allowing it receive, Returning equipment information Verbose Listing is to kernel spacing, afterwards, to carry out information sifting to information list, find out can the information idVendor/idProduct of unique this equipment of mark after, remove again to obtain the type information of TV platform, after both information are integrated, enter and drive adaptive generation module 40.
Drive adaptive generation module 40 to send driving request and the information after integrating to high in the clouds equipment 200;
High in the clouds equipment 200 receives request resolving information, first according to the satisfactory driving of information retrieval, judges whether to exist,
If exist, directly driving is pushed to TV end and does number of times statistics,
If do not exist, find satisfactory drive source file and judge whether existence, if exist, automatically select qualified cross-compiler according to information, cutting compile option, generates compilation script, utilizes script file to carry out cross compile to driving source code.
After compiling, whether interpretation drives and generates smoothly, and words are pushed to driving TV end and do number of times statistics smoothly, then enter load-on module 50.
Load-on module 50 enters and drives Auto-mounting state, and system environments is detected, and judges whether to exist lowest version to drive, if do not exist, redaction is directly installed and drives; If exist, first unload lowest version and drive, then carry out redaction driving is installed, after installing, the booting script under amendment system directory/etc, allows TV start shooting in the future and can load this driving, this equipment is continued available, now client just can utilize game paddle to play games.
These are only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.