The interlock method and device of more device events
Technical field
The present invention relates to the technical fields of internet of things equipment linkage, more particularly, to a kind of interlock method of more device events
And device.
Background technology
The tide of Internet of Things influences the various aspects of society and life, on the one hand, Internet of Things is human use's informationization
Technology solves the means of existing problem concerning life, such as:The problem of various aspects such as traffic, environmental protection, green, high-efficient development;It is another
Aspect, in State-level, Internet of Things is also that country promotes IT application and industrializes, and what especially using IT to propel industrialization is important
Behave.It stands in operator's level, Internet of Things is also the important directions of its transition.So to the application study of Internet of Things to closing weight
It wants.
It usually needs to realize in Internet of things system, between different hardware equipment and link.Such as:When authorized user is in people's row
When road gate position is swiped the card into community, the corresponding message of broadcast system broadcast may be also needed to.Namely need pavement lock system
Linkage is realized between system and broadcast system.In existing Internet of things system, between each hardware subsystem independently of each other, subsystem it
Between joint-action mechanism realize that flexibility is poor mainly by the mode editted inside program in advance, when needing addition one new
When equipment linkage scene, need to be modified code and again issue, and, when there are many device category, the change of code with
The workload of publication is very big, lacks flexibility.
To sum up, the interlock method flexibility of existing more device events is poor, heavy workload, and practicability is bad.
Invention content
In view of this, the purpose of the present invention is to provide the interlock method of more device events and device, it is existing to alleviate
The interlock method flexibility of more device events is poor, heavy workload, the bad technical problem of practicability.
In a first aspect, an embodiment of the present invention provides a kind of interlock method of more device events, patted applied to linkage tube
Platform, the method includes:
Obtain the function collection of active devices and interlocking equipment, wherein the function, which is concentrated, includes:The master of the active devices
Dynamic function event set, the linkage function event set of the interlocking equipment;
Linkage rule is generated according to configuration of the user based on the function collection, wherein is included at least in the linkage rule:
Target active devices type, target active functions event, target active devices, target linkage function event, target interlocking equipment;
Execution based on the target active functions event of target active devices described in the linkage rule controls the mesh
It marks interlocking equipment and executes the target linkage function event.
With reference to first aspect, an embodiment of the present invention provides the first possible embodiments of first aspect, wherein obtains
The function collection of active devices and interlocking equipment is taken to include:
The log-on message for obtaining the active devices and the interlocking equipment, to complete to active devices and described
The registration of dynamic equipment;
When the active devices and the interlocking equipment start for the first time, the active devices and the interlocking equipment are received
The function collection sent.
With reference to first aspect, an embodiment of the present invention provides second of possible embodiments of first aspect, wherein base
The execution of the target active functions event of target active devices described in the linkage rule controls the target interlocking equipment
Executing the target linkage function event includes:
It obtains the active devices and executes the active functions event sent when active functions event;
Target linkage rule is determined in linkage rule according to the active functions event;
Corresponding mesh is executed based on the target interlocking equipment in target linkage rule described in target linkage rule control
Mark linkage function event.
With reference to first aspect, an embodiment of the present invention provides the third possible embodiments of first aspect, wherein root
Determine that target linkage rule includes in linkage rule according to the active functions event:
The active functions event and the target active functions event in the linkage rule are compared;
If the active functions event and the target active functions event matches in the linkage rule, will be described
Dynamic rule is as target linkage rule.
With reference to first aspect, an embodiment of the present invention provides the 4th kind of possible embodiments of first aspect, wherein institute
The method of stating further includes:
If the active functions event is mismatched with the target active functions event in all linkage rules, mistake
Filter the active functions event.
With reference to first aspect, an embodiment of the present invention provides the 5th kind of possible embodiments of first aspect, wherein institute
The method of stating further includes:
Obtain the cancellation linkage configuration that the user sends;
It is linked to configure according to the cancellation and cancels corresponding linkage rule.
With reference to first aspect, an embodiment of the present invention provides the 6th kind of possible embodiments of first aspect, wherein
Target interlocking equipment executes described in target active functions event control based on the linkage rule and the target active devices
After the target linkage function event, the method further includes:
The feedback information after the execution target linkage function event that the target interlocking equipment is sent is obtained, with determination
The target interlocking equipment completes the target linkage function event.
Second aspect, the embodiment of the present invention additionally provide a kind of linkage of more device events, are applied to linkage management
Platform, described device include:
First acquisition module, the function collection for obtaining active devices and interlocking equipment, wherein the function concentrates packet
It includes:The active functions event set of the active devices, the linkage function event set of the interlocking equipment;
Generation module, for generating linkage rule according to configuration of the user based on the function collection, wherein the linkage rule
It is included at least in then:Target active devices type, target active functions event, target active devices, target linkage function event,
Target interlocking equipment;
Control module, for holding based on the target active functions event of target active devices described in the linkage rule
Row controls the target interlocking equipment and executes the target linkage function event.
In conjunction with second aspect, an embodiment of the present invention provides the first possible embodiments of second aspect, wherein institute
Stating the first acquisition module includes:
First acquisition unit, the log-on message for obtaining the active devices and the interlocking equipment, to complete to institute
State the registration of active devices and the interlocking equipment;
Receiving unit, for when the active devices and the interlocking equipment start for the first time, receiving the active devices
The function collection sent with the interlocking equipment.
In conjunction with second aspect, an embodiment of the present invention provides second of possible embodiments of second aspect, wherein institute
Stating control module includes:
Second acquisition unit, for obtaining the active functions sent when the active devices execute active functions event
Event;
Determination unit, for determining target linkage rule in linkage rule according to the active functions event;
Control unit, for based on the target interlocking equipment in target linkage rule described in target linkage rule control
Execute corresponding target linkage function event.
The embodiment of the present invention brings following advantageous effect:
In the prior art, the joint-action mechanism between each subsystem is real mainly by the mode editted inside program in advance
It is existing, when needing to add a new equipment linkage scene, needs to be modified code and issue again, flexibility is poor, work
Work amount is big, and practicability is bad.Compared with prior art, it in the interlock method of more device events of the invention, first obtains and actively sets
Standby and interlocking equipment function collection, and then linkage rule is generated according to configuration of the user based on function collection, it is based ultimately upon linkage rule
The then execution control targe interlocking equipment performance objective linkage function event of the target active functions event of middle target active devices.
For interlock method in the present invention when realizing, user need to only be based on function collection configuration linkage rule, it may be convenient to add
Equipment linkage scene, flexibility is good, simple to operate, and degree of intelligence is high, and practicability is good, alleviates existing more device events
Interlock method flexibility it is poor, heavy workload, the bad technical problem of practicability.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
It obtains it is clear that understand through the implementation of the invention.The purpose of the present invention and other advantages are in specification, claims
And specifically noted structure is realized and is obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment cited below particularly, and coordinate
Appended attached drawing, is described in detail below.
Description of the drawings
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, in being described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, other drawings may also be obtained based on these drawings.
Fig. 1 is a kind of flow chart of the interlock method of more device events provided in an embodiment of the present invention;
Fig. 2 is the method flow diagram of the function collection of acquisition active devices provided in an embodiment of the present invention and interlocking equipment;
Fig. 3 is the target active functions event of target active devices in the rule provided in an embodiment of the present invention based on linkage
Execute the method flow diagram of control targe interlocking equipment performance objective linkage function event;
Fig. 4 is the schematic diagram provided in an embodiment of the present invention for realizing linkage process;
Fig. 5 is the operation interface schematic diagram of linkage management platform provided in an embodiment of the present invention;
Fig. 6 is a kind of functional block diagram of the linkage of more device events provided in an embodiment of the present invention.
Icon:
The first acquisition modules of 11-;12- generation modules;13- control modules.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
For ease of understanding the present embodiment, the connection first to a kind of more device events disclosed in the embodiment of the present invention
Dynamic method describes in detail.
Embodiment one:
A kind of interlock method of more device events is applied to linkage management platform, and with reference to figure 1, this method includes:
S102, the function collection for obtaining active devices and interlocking equipment, wherein function, which is concentrated, includes:The active of active devices
Function event set, the linkage function event set of interlocking equipment;
In embodiments of the present invention, the executive agent of the interlock method is linkage management platform, in the linkage management platform
It is embedded with regulation engine.
Specifically, each equipment has the function collection of oneself, when the interlock method is realized, linkage management platform will first obtain
Obtain the function collection of active devices and interlocking equipment.Particular content will hereinafter be described, and details are not described herein.
S104, linkage rule is generated according to configuration of the user based on function collection, wherein included at least in linkage rule:Mesh
Mark active devices type, target active functions event, target active devices, target linkage function event, target interlocking equipment;
After obtaining function collection, which can generate linkage rule according to configuration of the user based on function collection.
S106, the execution control targe linkage based on the target active functions event of target active devices in linkage rule are set
Standby performance objective linkage function event.
After obtaining linkage rule, when the target active functions event of target active devices arrives, linkage management platform
(being specially regulation engine) inquiry linkage rule, target linkage function event corresponding with target active functions event is sent to
The application of corresponding target interlocking equipment, so that the application of target interlocking equipment sends corresponding control life to target interlocking equipment
It enables so that target interlocking equipment performance objective linkage function event realizes the linkage between more device events.Particular content will be
It is described hereinafter, details are not described herein.
In the prior art, the joint-action mechanism between each subsystem is real mainly by the mode editted inside program in advance
It is existing, when needing to add a new equipment linkage scene, needs to be modified code and issue again, flexibility is poor, work
Work amount is big, and practicability is bad.Compared with prior art, it in the interlock method of more device events of the invention, first obtains and actively sets
Standby and interlocking equipment function collection, and then linkage rule is generated according to configuration of the user based on function collection, it is based ultimately upon linkage rule
The then execution control targe interlocking equipment performance objective linkage function event of the target active functions event of middle target active devices.
For interlock method in the present invention when realizing, user need to only be based on function collection configuration linkage rule, it may be convenient to add
Equipment linkage scene, flexibility is good, simple to operate, and degree of intelligence is high, and practicability is good, alleviates existing more device events
Interlock method flexibility it is poor, heavy workload, the bad technical problem of practicability.
The above briefly describes the process of the interlock method of more device events, below to being directed to
Particular content is described in detail.
In one optionally embodiment, with reference to figure 2, the function collection for obtaining active devices and interlocking equipment includes:
S201, the log-on message for obtaining active devices and interlocking equipment, to complete the note to active devices and interlocking equipment
Volume;
Before obtaining function collection, the registration of equipment is first completed.Specifically, first obtaining active devices and interlocking equipment
Log-on message, to complete the registration to active devices and interlocking equipment.
S202, when active devices and interlocking equipment start for the first time, receive active devices and function that interlocking equipment is sent
Collection.
After the completion of registration, when active devices and interlocking equipment startup, it is connected to linkage management platform, and will need to link
Function be reported to linkage management platform, the function collection that such linkage management platform receives active devices and interlocking equipment is sent,
And these function collection are managed, storage to database is stored.
The process for obtaining the function collection of active devices and interlocking equipment is described in detail in the above, below to base
The execution control targe interlocking equipment performance objective linkage of the target active functions event of target active devices in linkage rule
The process of function event is described.
In one optionally embodiment, with reference to figure 3, the target active work(based on target active devices in linkage rule
Can the execution control targe interlocking equipment performance objective linkage function event of event include:
S301, the active functions event sent when active devices execution active functions event is obtained;
S302, target linkage rule is determined in linkage rule according to active functions event;
Specifically, (1) compares active functions event and the target active functions event in linkage rule;
(2) if active functions event and the target active functions event matches in linkage rule, linkage rule is made
It links for target regular;
(3) if active functions event is mismatched with the target active functions event in all linkage rules, master is filtered
Dynamic function event.
S303, corresponding target connection is executed based on the target interlocking equipment in target linkage rule control target linkage rule
Dynamic function event.
The process is described with reference to Fig. 4:
Equipment 1 (i.e. active devices) can be sent out active functions event by event bus when executing active functions event
It send to regulation engine, after regulation engine receives active functions event, by active functions event and the target master in linkage rule
Dynamic function event is compared, if the two matches, the target linkage function event in linkage rule is sent to and is answered
With 2, so as to send control command, realization 2 performance objective of equipment connection to equipment 2 (i.e. interlocking equipment) by event bus using 2
The purpose of dynamic function event.
Here with equipment 1 be only active devices, equipment 2 is the explanation carried out for interlocking equipment, in practice, according to
The configuration arbitrary equipment at family all can serve as active devices and interlocking equipment, and can be multiple active work(of multiple active devices
Energy one interlocking equipment of event control executes a linkage function event, or multiple active functions of an active devices
One interlocking equipment of event control executes linkage function event etc., and variation is various, and flexibility is good.
In addition, after user configuration generates linkage rule, linkage rule can also be cancelled.
In one optionally embodiment, this method further includes:
(1) the cancellation linkage configuration that user sends is obtained;
(2) regular according to the corresponding linkage of configuration cancellation that links is cancelled.
The process of configuration linkage rule is introduced with reference to Fig. 5, Fig. 5 is that the operation interface of linkage management platform is shown
It is intended to.
A column is some information of active devices above in Figure 5, is some information of interlocking equipment below.User first exists
The type of selection target active devices in device class column, the type of target active devices is gate inhibition in Fig. 5, then selects thing
Part type (namely target active functions event), the face enabling in as Fig. 5 report, selection triggering equipment (i.e. target master
Dynamic equipment), as md2 equipment (namely ID is the pavement lock of md2).It completes to postpone matching for active devices, it is further right
Interlocking equipment is configured.
Selection target linkage function event, that is, the linkage call in Fig. 5 and/or linkage broadcast, and add target
Interlocking equipment (ID of addition target interlocking equipment).
Complete above-mentioned with postponing, after the lock certification of pavement, lock triggering authentication in pavement passes through authorized user
Event;When authentication is by course of event regulation engine, regulation engine calls broadcast playback event, and calls calling elevator thing
Part, notification broadcast application and elevator applications;Broadcasted application sends control command to corresponding broadcasting equipment, and elevator applications send control
System order needs the information (such as welcoming authorized user's entrance) broadcasted with broadcasting and calls correspondence to corresponding lift facility
Elevator waited in target location.
Further include delete button in addition, in the operation interface schematic diagram of Fig. 5, is used for delete target linkage function event
It is regular to cancel linkage with target interlocking equipment.
Interlock method in the present invention is convenient, flexible when realizing, easy to operate.
In addition, being held in the target active functions event control target interlocking equipment based on linkage rule and target active devices
After row target linkage function event, this method further includes:
The feedback information sent after target interlocking equipment performance objective linkage function event is received, to determine that target linkage is set
It is standby to complete target linkage function event.
Specifically, if not receiving feedback information, determine that target interlocking equipment breaks down, and then fault message is sent out
It send to related personnel, so that related personnel carries out trouble hunting to target interlocking equipment.
Embodiment two:
A kind of linkage of more device events is applied to linkage management platform, and with reference to figure 6, which includes:
First acquisition module 11, the function collection for obtaining active devices and interlocking equipment, wherein function, which is concentrated, includes:
The active functions event set of active devices, the linkage function event set of interlocking equipment;
Generation module 12, for generating linkage rule according to configuration of the user based on function collection, wherein in linkage rule extremely
Include less:Target active devices type, target active functions event, target active devices, target linkage function event, target connection
Dynamic equipment;
Control module 13 executes control for the target active functions event based on target active devices in linkage rule
Target interlocking equipment performance objective linkage function event.
In the linkage of more device events of the present invention, the function collection of active devices and interlocking equipment is first obtained, in turn
Linkage rule is generated according to configuration of the user based on function collection, is based ultimately upon the target of target active devices in linkage rule actively
The execution control targe interlocking equipment performance objective linkage function event of function event.Interlock method in the present invention is being realized
When, user need to only be based on function collection configuration linkage rule, it may be convenient to add equipment linkage scene, flexibility is good, behaviour
Make simple and convenient, degree of intelligence is high, and practicability is good, and the interlock method flexibility for alleviating existing more device events is poor, work
Amount is big, the bad technical problem of practicability.
Optionally, the first acquisition module includes:
First acquisition unit, the log-on message for obtaining active devices and interlocking equipment, to complete to active devices and
The registration of interlocking equipment;
Receiving unit, for when active devices and interlocking equipment start for the first time, receiving active devices and interlocking equipment hair
The function collection sent.
Optionally, control module includes:
Second acquisition unit, for obtaining the active functions event sent when active devices execute active functions event;
Determination unit, for determining target linkage rule in linkage rule according to active functions event;
Control unit, for executing correspondence based on the target interlocking equipment in target linkage rule control target linkage rule
Target linkage function event.
Optionally it is determined that unit includes:
Contrast subunit, for comparing active functions event and the target active functions event in linkage rule;
Subelement is set, it, will connection if active functions event and the target active functions event matches in linkage rule
Dynamic rule is as target linkage rule.
Optionally it is determined that unit further includes:
Subelement is filtered, if active functions event is mismatched with the target active functions event in all linkage rules,
Then filter active functions event.
Optionally, which further includes:
Second acquisition module, the cancellation for obtaining user's transmission, which links, to be configured;
Cancel module, cancels corresponding linkage rule for linking to configure according to cancellation.
Optionally, which further includes:
Receiving module, for receiving the feedback information sent after target interlocking equipment performance objective linkage function event, with
Determine that target interlocking equipment completes target linkage function event.
Particular content in the embodiment two can refer to the description in above-described embodiment one, and details are not described herein.
The interlock method for more device events that the embodiment of the present invention is provided and the computer program product of device, including deposit
The computer readable storage medium of program code is stored up, the instruction that said program code includes can be used for executing previous methods and implement
Method described in example, specific implementation can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
It with the specific work process of device, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In addition, in the description of the embodiment of the present invention unless specifically defined or limited otherwise, term " installation ", " phase
Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can
Can also be electrical connection to be mechanical connection;It can be directly connected, can also indirectly connected through an intermediary, Ke Yishi
Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood at this with concrete condition
Concrete meaning in invention.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
In the description of the present invention, it should be noted that term "center", "upper", "lower", "left", "right", "vertical",
The orientation or positional relationship of the instructions such as "horizontal", "inner", "outside" be based on the orientation or positional relationship shown in the drawings, merely to
Convenient for the description present invention and simplify description, do not indicate or imply the indicated device or element must have a particular orientation,
With specific azimuth configuration and operation, therefore it is not considered as limiting the invention.In addition, term " first ", " second ",
" third " is used for description purposes only, and is not understood to indicate or imply relative importance.
Finally it should be noted that:Embodiment described above, only specific implementation mode of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, it will be understood by those of ordinary skill in the art that:Any one skilled in the art
In the technical scope disclosed by the present invention, it can still modify to the technical solution recorded in previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover the protection in the present invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.