CN104202420B - A kind of method and apparatus for supporting Internet of things middleware cluster expansion - Google Patents

A kind of method and apparatus for supporting Internet of things middleware cluster expansion Download PDF

Info

Publication number
CN104202420B
CN104202420B CN201410478865.9A CN201410478865A CN104202420B CN 104202420 B CN104202420 B CN 104202420B CN 201410478865 A CN201410478865 A CN 201410478865A CN 104202420 B CN104202420 B CN 104202420B
Authority
CN
China
Prior art keywords
things
internet
long connection
middleware
internet gateway
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.)
Active
Application number
CN201410478865.9A
Other languages
Chinese (zh)
Other versions
CN104202420A (en
Inventor
李引
袁峰
吴鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Zhongke Yide Technology Co Ltd
Original Assignee
Guangzhou Institute of Software Application Technology Guangzhou GZIS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Institute of Software Application Technology Guangzhou GZIS filed Critical Guangzhou Institute of Software Application Technology Guangzhou GZIS
Priority to CN201410478865.9A priority Critical patent/CN104202420B/en
Publication of CN104202420A publication Critical patent/CN104202420A/en
Application granted granted Critical
Publication of CN104202420B publication Critical patent/CN104202420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of method and system for supporting Internet of things middleware cluster expansion, this method includes:The control instruction for things-internet gateway is received, the control command is sent to the server of any one Internet of things middleware using load balancing transponder;If not storing the Internet of things middleware in the long Connection Cache area built in advance to be connected with the length of the things-internet gateway, and the relevant information for the things-internet gateway that is stored with the long connection mapping table built in advance, then, connection with the things-internet gateway is set up according to the IP information carried in the relevant information, and the control instruction is sent to the things-internet gateway.This method not only realizes the extension of Internet of things middleware cluster, and causes load balancing transponder really to realize the function of load balancing.

Description

A kind of method and apparatus for supporting Internet of things middleware cluster expansion
Technical field
The application is related to internet of things field, and Internet of things middleware cluster expansion is supported more specifically to one kind Method and apparatus.
Background technology
Internet of things system is hard by Internet of Things application program, things-internet gateway, Internet of things middleware and thing network sensing layer Part node composition.Internet of things middleware is operated in as the bridge between attachment networked application programs and things-internet gateway On server, with the increase for the concurrent number of times that communicated between Internet of Things application program and things-internet gateway, carry in the Internet of Things Between the resource such as calculating, network and the storage of server run of part will decrease and finally reach maximum load, so as to occur The problem of can not connecting.
In the prior art, for such case, Internet of things middleware can be set up to be connected with the length of things-internet gateway so that Internet of Things application can control and obtain at any time the information of things-internet gateway and Internet of things hardware node.So-called long connection, refers to Multiple packets can be continuously transmitted in one connection, during holding is connected, if sent without packet, it is necessary to which both sides send out Link detecting bag, it is ensured that both sides' connection is not interrupted.
When Internet of Things application system will control Internet of Things to perceive hardware node, pass through the load of Internet of things middleware cluster Balanced transponder will ask to be forwarded on some Internet of things middleware server according to certain strategy.Due to existing at present The agreement of load balancing transponder does not consider such case of long connection, it is possible to cause request be forwarded to not with Things-internet gateway is set up on the Internet of things middleware server of long connection, causes operation requests to fail.Further, since there is Internet of Things The long connection of net gateway and Internet of things middleware, this to perceive some Internet of Things the control of hardware node, it is necessary to forward Onto specific Internet of things middleware server so that load balancing transponder can not really realize the function of load balancing.
The content of the invention
In view of this, this application provides a kind of method and apparatus for supporting Internet of things middleware cluster expansion, Ke Yishi The extension of existing Internet of things middleware, so as to ensure being smoothed out for operation requests in Internet of things system, can also further make load Balanced transponder really realizes the function of load balancing..
To achieve these goals, it is proposed that scheme it is as follows:
A kind of method for supporting Internet of things middleware cluster expansion, including:
The control instruction for things-internet gateway is received, is sent to the control command arbitrarily using load balancing transponder The server of one Internet of things middleware;
If not storing the Internet of things middleware and the things-internet gateway in the long Connection Cache area built in advance Long connection, and the long relevant information for connecting the things-internet gateway that is stored with mapping table built in advance, then,
Connection with the things-internet gateway is set up according to the IP information that is carried in the relevant information, and by the control Instruction is sent to the things-internet gateway.
It is preferred that, it is described to receive before being directed to the control instruction of things-internet gateway, in addition to:
The registration message sent according to the things-internet gateway received, sets up and is connected with the length of the things-internet gateway;
The long connection is stored in the long Connection Cache area built in advance, meanwhile, by the things-internet gateway Relevant information and the relevant information of the Internet of things middleware are stored in the long connection mapping built in advance as mapping relations In table.
It is preferred that, the relevant information of the things-internet gateway includes:The id information and things-internet gateway of things-internet gateway IP information.
It is preferred that, the relevant information of the Internet of things middleware includes:The id information and Internet of Things of Internet of things middleware The IP information of middleware.
It is preferred that, it is described that the control instruction is sent to after the things-internet gateway, in addition to:
The logout message sent according to the things-internet gateway of reception connects the length stored in the long Connection Cache area Removing is connect, meanwhile, the mapping relations stored in the long connection mapping table are removed.
A kind of system for supporting Internet of things middleware cluster expansion, including:Receiving unit, construction unit, judging unit with And transmitting element, wherein:
The receiving unit, for receiving the control instruction for things-internet gateway, using load balancing transponder by institute State the server that control command is sent to any one Internet of things middleware;
The construction unit, for building long Connection Cache area and long connection mapping table in advance;
The judging unit being connected respectively with the receiving unit and the construction unit, for judging the structure The Internet of things middleware that whether is stored with the long Connection Cache area of cell formation connects with the long of the things-internet gateway Connect, and, judge the long relevant information for connecting the things-internet gateway that whether is stored with mapping table built in advance;
The transmitting element being connected with the judging unit, for not deposited in the long Connection Cache area that ought build in advance Store up the Internet of things middleware to be connected with the length of the things-internet gateway, and stored in the long connection mapping table built in advance When stating the relevant information of things-internet gateway, set up and the things-internet gateway according to the IP information carried in the relevant information Connection, and the control instruction is sent to the things-internet gateway.
It is preferred that, in addition to the registering unit being connected with the receiving unit, wherein:
The registering unit includes setting up unit and memory cell;
It is described to set up unit, for the registration message sent according to the things-internet gateway received, set up and the Internet of Things The long connection of net gateway;
The memory cell, for the long connection to be stored in the long Connection Cache area built in advance, meanwhile, will The relevant information of the things-internet gateway and the relevant information of the Internet of things middleware are stored in advance as mapping relations In the long connection mapping table of structure.
It is preferred that, the relevant information of the things-internet gateway includes:The id information and things-internet gateway of things-internet gateway IP information.
It is preferred that, the relevant information of the Internet of things middleware includes:The id information and Internet of Things of Internet of things middleware The IP information of middleware.
It is preferred that, in addition to the cancellation unit being connected with the transmitting element, for the Internet of Things net according to reception The logout message for closing transmission removes the long connection stored in the long Connection Cache area, meanwhile, by the long connection mapping table The mapping relations of middle storage are removed.
It can be seen from above-mentioned technical scheme that, it is disclosed in the present application support Internet of things middleware cluster expansion method and System, long connection and the long company of Internet of things middleware and things-internet gateway are stored by the long Connection Cache area built in advance Mapping table is connect to store the relevant information of things-internet gateway to support the extension of Internet of things middleware cluster, once control data quilt It is forwarded to and does not set up on the server of long connection, then the IP address letter of things-internet gateway can be obtained from long connection mapping table Breath, and the connection of Internet of things middleware server and things-internet gateway is set up, rather than foundation before have to be forwarded requests to On the server of long connection.This method not only realizes the extension of Internet of things middleware cluster, and causes load balancing forwarding Device really realizes the function of load balancing.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of application, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart for the method for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application one;
Fig. 2 is a kind of flow chart for the method for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application two;
Fig. 3 is a kind of structural representation for the system for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application three Figure;
Fig. 4 is a kind of structural representation for the system for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application four Figure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation is described, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the application, it is all other that those of ordinary skill in the art are obtained under the premise of creative work is not paid Embodiment, belongs to the scope of the application protection.
To solve in the prior art, the agreement of existing load balancing transponder do not account for such case of long connection and Operation requests are caused to fail, simultaneously so that load balancing transponder can not really realize technology as the function of load balancing Problem, realizes the extension of Internet of things middleware cluster, further such that load balancing transponder really realizes load balancing Function, the application provides following technical scheme:
Embodiment one
As shown in figure 1, Fig. 1 is a kind of method for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application one Flow chart.This method includes:
S101:The control instruction for things-internet gateway is received, control command is sent to any one Internet of things middleware Server.
Specifically, Internet of Things application program sends control instruction to certain things-internet gateway, Internet of things middleware cluster is received For the control instruction of things-internet gateway, control command is sent to any one Internet of things middleware using load balancing transponder Server.
Wherein, control instruction is sent by Internet of Things application program, for the things-internet gateway for controlling it to be controlled Perform corresponding action.As in wisdom road lamp system, control instruction can be turn on light instruction or instruction of turning off the light, naturally it is also possible to Instructed for other, this is not restricted.
S102:Whether judge to be stored with the long Connection Cache area that builds in advance Internet of things middleware and things-internet gateway Long connection, if it is, step S105 is carried out by long connection, if it is not, then carrying out step S103.
Such as, in wisdom road lamp system, when the application program of wisdom road lamp system is to centralized Controls of the ID for 0A0B5301 Device is sent when turning off the light order, and the control command is forwarded to the thing that ID is 0102440A by Internet of things middleware load balancing transponder On networking middleware, the Internet of things middleware checks its long Connection Cache area built in advance, discovery have been set up be with ID The long connection of 0A0B5301 Centralized Controller, then directly transmit control command.
S103:Judge the long relevant information for connecting the things-internet gateway that whether is stored with mapping table built in advance, if It is step S104 then to be carried out, if it is not, then return to step S101.
In such as above-mentioned wisdom road lamp system, if the control command is forwarded to by Internet of things middleware load balancing transponder ID is on 0102440B Internet of things middleware, then the Internet of things middleware can not in its long Connection Cache area built in advance Find and be connected with the length of things-internet gateway, then, the Internet of things middleware then build in advance it is long connect in mapping table with " gateway ID=0A0B5301 " is that querying condition is inquired about, and is successfully found record<0A0B5301,10.0.0.58, 0102440A,172.168.0.21>。
If there is no the relevant information for storing things-internet gateway, Internet of things middleware in the long connection mapping table built in advance To Internet of Things application feeding back unsuccessful information, failure is pointed out, can be specifically Internet of Things application one miscue frame of ejection, so as to In re-starting step S101.
S104:Connection with things-internet gateway is set up according to the IP information carried in relevant information.
Specifically, the connection set up using web socket (socket) between IP address so that HTTP can be passed through Communicated Deng network application-level protocol, so as to set up the connection with things-internet gateway.
As described above, the IP=10.0.0.58 of things-internet gateway is taken out, set up with things-internet gateway after being connected, can To send control command.
S105:Control instruction is sent to things-internet gateway.
Control instruction is sent to the things-internet gateway that Internet of Things application program wants control, realized to the things-internet gateway Control.
From the foregoing, it will be observed that the open method for supporting Internet of things middleware cluster expansion of the embodiment of the present application one, passes through advance structure The long Connection Cache area built stores come the long connection and long connection mapping table for storing Internet of things middleware and things-internet gateway The relevant information of things-internet gateway supports the extension of Internet of things middleware cluster, is not set up once control data is forwarded to On the server of long connection, then the IP address information of things-internet gateway can be obtained from long connection mapping table, and set up Internet of Things The connection of middleware server and things-internet gateway, rather than the server for setting up long connection before have to be forwarded requests to On.This method not only realizes the extension of Internet of things middleware cluster, and load balancing transponder is really realized The function of load balancing.
Embodiment two
The method that the embodiment of the present application two discloses another support Internet of things middleware cluster expansion, as shown in Fig. 2 figure 2 be a kind of flow chart for the method for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application two.This method includes:
S201:The registration message sent according to the things-internet gateway received, sets up and is connected with the length of things-internet gateway.
After things-internet gateway access network, send message to Internet of things middleware and registered, Internet of things middleware is received To registration message, set up and be connected with the length of things-internet gateway.
S202:In the long Connection Cache area that long connection deposit is built in advance, meanwhile, by the relevant information of things-internet gateway And the relevant information of Internet of things middleware is stored in as mapping relations in the long connection mapping table built in advance.
Wherein, long Connection Cache area and long the two units of connection mapping table can be by setting up database, caching etc. Mode is realized, is not limited herein, can be selected as the case may be.
The relevant information of things-internet gateway includes:The id information of things-internet gateway and the IP information of things-internet gateway.Thing The relevant information of networking middleware includes:The id information of Internet of things middleware and the IP information of Internet of things middleware.
Specifically, the long of foundation and things-internet gateway be connected the long connection that deposit Internet of things middleware in advance builds and delay Deposit in area, at the same by the id information of things-internet gateway, the id information of IP information and Internet of things middleware, IP information four-tuple with In the long connection mapping table that mapping relations deposit is built in advance.
Such as in wisdom road lamp system, when having accessed new Centralized Controller (i.e. things-internet gateway), centralized Control Device can send the ID (0A0B5301) and IP for including the Centralized Controller in registration message, message to Internet of things middleware (10.0.0.58).Internet of things middleware is set up to be connected with the long of Centralized Controller, and the long company that long connection deposit is built in advance Connect in buffer area, while obtaining the ID (0102440A) and IP (172.168.0.21) of the Internet of things middleware, controlled together with concentrating ID and IP the generation four-tuple mapping relations of device processed<0A0B5301,10.0.0.58,0102440A,172.168.0.21>, deposit The long connection mapping table built in advance.
S203:The control instruction for things-internet gateway is received, control command is sent to any one Internet of things middleware Server.
Specifically, Internet of Things application program sends control instruction to certain things-internet gateway, Internet of things middleware cluster is received For the control instruction of things-internet gateway, control command is sent to any one Internet of things middleware using load balancing transponder Server.
S204:Whether judge to be stored with the long Connection Cache area that builds in advance Internet of things middleware and things-internet gateway Long connection, if it is, step S207 is carried out by long connection, if it is not, then carrying out step S205.
Such as, in wisdom road lamp system, when the application program of wisdom road lamp system is to centralized Controls of the ID for 0A0B5301 Device is sent when turning off the light order, and the control command is forwarded to the thing that ID is 0102440A by Internet of things middleware load balancing transponder On networking middleware, the Internet of things middleware checks its long Connection Cache area built in advance, discovery have been set up be with ID The long connection of 0A0B5301 Centralized Controller, then directly transmit control command.
S205:Judge the long relevant information for connecting the things-internet gateway that whether is stored with mapping table built in advance, if It is step S206 then to be carried out, if it is not, then return to step S203.
In such as above-mentioned wisdom road lamp system, if the control command is forwarded to by Internet of things middleware load balancing transponder ID is on 0102440B Internet of things middleware, then the Internet of things middleware can not in its long Connection Cache area built in advance Find and be connected with the length of things-internet gateway, then, the Internet of things middleware then build in advance it is long connect in mapping table with " gateway ID=0A0B5301 " is that querying condition is inquired about, and is successfully found record<0A0B5301,10.0.0.58, 0102440A,172.168.0.21>。
If there is no the relevant information for storing things-internet gateway in the long connection mapping table built in advance, return to control and lose The information lost, proceeds step S203.
S206:Connection with things-internet gateway is set up according to the IP information carried in relevant information.
Specifically, the connection set up using web socket (socket) between IP address so that HTTP can be passed through Communicated Deng network application-level protocol, so as to set up the connection with things-internet gateway.
As described above, the IP=10.0.0.58 of things-internet gateway is taken out, linkup transmit control is set up with things-internet gateway System order.
S207:Control instruction is sent to things-internet gateway.
Control instruction is sent to the things-internet gateway that Internet of Things application program wants control, realized to the things-internet gateway Control.
S208:The logout message sent according to the things-internet gateway of reception is clear by the long connection stored in long Connection Cache area Remove, meanwhile, the mapping relations stored in long connection mapping table are removed.
Things-internet gateway leaves network, and sending message to the Internet of things middleware for having set up long connection is unregistered, Internet of Things Net middleware receives logout message, the long connection in long Connection Cache area is removed, while length is connected into reflecting in mapping table Penetrate relation removing.
, it is necessary to by erasing of information after things-internet gateway is offline, otherwise there can be " dirty data ".In the middle of such as Internet of Things Part A and things-internet gateway B establishes long connection, and stores information in " long Connection Cache area " and " long connection mapping table ", After things-internet gateway B battery exhausts, long Joint failure, things-internet gateway A can not get in touch with things-internet gateway B again.And thing Networking gateway A also is stored in long Connection Cache area with things-internet gateway B long link information and length is connected in mapping table, so needing Remove, it is to avoid the idle work asked again things-internet gateway B.
In wisdom road lamp system, when ID nullifies for 0A0B5301 Centralized Controller, ID is 0102440A Internet of Things Middleware is received after message, and the long connection between them is removed.Meanwhile, long connection mapping table is searched, by mapping relations< 0A0B5301,10.0.0.58,0102440A,172.168.0.21>Delete.
From the foregoing, it will be observed that the open method for supporting Internet of things middleware cluster expansion of the embodiment of the present application two, passes through advance structure The long Connection Cache area built stores come the long connection and long connection mapping table for storing Internet of things middleware and things-internet gateway The relevant information of things-internet gateway supports the extension of Internet of things middleware cluster, is not set up once control data is forwarded to On the server of long connection, then the IP address information of things-internet gateway can be obtained from long connection mapping table, and set up Internet of Things The connection of middleware server and things-internet gateway, rather than the server for setting up long connection before have to be forwarded requests to On.This method not only realizes the extension of Internet of things middleware cluster, and load balancing transponder is really realized The function of load balancing.
Embodiment three
In order to support the extension of Internet of things middleware cluster, while making load balancing transponder realize that really load is equal Weighing apparatus, and the method that the support Internet of things middleware cluster expansion disclosed in the embodiment of the present application one can be realized, the embodiment of the present application Three systems for being disclosed directly below support Internet of things middleware cluster expansion.As shown in figure 3, Fig. 3 is disclosed in the embodiment of the present application three A kind of structural representation for the system for supporting Internet of things middleware cluster expansion.
The system includes:Receiving unit 301, construction unit 302, judging unit 303 and transmitting element 304, wherein:
Receiving unit 301, will be described using load balancing transponder for receiving the control instruction for things-internet gateway Control command is sent to the server of any one Internet of things middleware.
Construction unit 302, for building long Connection Cache area and long connection mapping table in advance.
The judging unit 303 being connected respectively with receiving unit 301 and construction unit 302, for judging construction unit 302 Whether be stored with the long connection of Internet of things middleware and things-internet gateway in the long Connection Cache area built, and, judge advance The long relevant information for connecting the things-internet gateway that whether is stored with mapping table of structure.
Such as, in wisdom road lamp system, when the application program of wisdom road lamp system is to centralized Controls of the ID for 0A0B5301 Device is sent when turning off the light order, and the control command is forwarded to the thing that ID is 0102440A by Internet of things middleware load balancing transponder On networking middleware, the Internet of things middleware checks its long Connection Cache area built in advance, discovery have been set up be with ID The long connection of 0A0B5301 Centralized Controller, then directly transmit control command.If Internet of things middleware load balancing is forwarded The control command is forwarded on the Internet of things middleware that ID is 0102440B by device, then the Internet of things middleware is built in advance at it Long Connection Cache area in can not find with things-internet gateway length be connected, then, the Internet of things middleware is then in advance structure So that " gateway ID=0A0B5301 " is that querying condition is inquired about, and is successfully found record in the long connection mapping table built< 0A0B5301,10.0.0.58,0102440A,172.168.0.21>.If the long connection mapping table that construction unit is built in advance In do not have store things-internet gateway relevant information, judging unit then to receiving unit return control failure information.
The transmitting element 304 being connected with judging unit 303, for not stored in the long Connection Cache area that ought build in advance Be stored with things-internet gateway in the long connection of Internet of things middleware and things-internet gateway, and the long connection mapping table built in advance During relevant information, the connection with the things-internet gateway is set up according to the IP information that is carried in relevant information, and by control instruction It is sent to the things-internet gateway.
Specifically, the connection set up using web socket (socket) between IP address so that HTTP can be passed through Communicated Deng network application-level protocol, so as to set up the connection with things-internet gateway.By the IP=of things-internet gateway 10.0.0.58 take out, linkup transmit control command is set up with things-internet gateway, realize the control to the things-internet gateway.
From the foregoing, it will be observed that the open system for supporting Internet of things middleware cluster expansion of the embodiment of the present application three, single by building The long Connection Cache area that member is built in advance connects mapping to store Internet of things middleware and the long connection of things-internet gateway and length Table supports the extension of Internet of things middleware cluster to store the relevant information of things-internet gateway, once judging unit finds control Request, which is forwarded to, does not set up on the server of long connection, and transmitting element then can obtain Internet of Things net from long connection mapping table The IP address information of pass, and the connection of Internet of things middleware server and things-internet gateway is set up, rather than request have to be turned On the server that long connection is set up before being dealt into.This method not only realizes the extension of Internet of things middleware cluster, and causes Load balancing transponder really realizes the function of load balancing.
Example IV
The system that the embodiment of the present application four discloses another support Internet of things middleware cluster expansion, as shown in figure 4, figure 4 be a kind of structural representation for the system for supporting Internet of things middleware cluster expansion disclosed in the embodiment of the present application four.
The system includes:Registering unit 401, receiving unit 402, construction unit 403, judging unit 404, transmitting element 405 and nullify unit 406, wherein:
Registering unit 401 includes:Set up unit 4011 and memory cell 4012.
Unit 4011 is set up, for the registration message sent according to the things-internet gateway received, is set up and Internet of Things net The long connection of pass.
The memory cell 4012 being connected with construction unit 403, for the long Connection Cache for building long connection deposit in advance Qu Zhong, meanwhile, the relevant information of the relevant information of things-internet gateway and Internet of things middleware is stored in as mapping relations In the long connection mapping table built in advance.
Wherein, the relevant information of things-internet gateway includes:The id information of things-internet gateway and the IP letters of things-internet gateway Breath.The relevant information of Internet of things middleware includes:The id information of Internet of things middleware and the IP information of Internet of things middleware.
Specifically, the long of foundation and things-internet gateway be connected the long connection that deposit Internet of things middleware in advance builds and delay Deposit in area, at the same by the id information of things-internet gateway, the id information of IP information and Internet of things middleware, IP information four-tuple with In the long connection mapping table that mapping relations deposit is built in advance.
Receiving unit 402, will be described using load balancing transponder for receiving the control instruction for things-internet gateway Control command is sent to the server of any one Internet of things middleware.
Construction unit 403, for building long Connection Cache area and long connection mapping table in advance.
Wherein, long Connection Cache area and long the two units of connection mapping table can be by setting up database, caching etc. Mode is realized, is not limited herein, can be selected as the case may be.
The judging unit 404 being connected respectively with receiving unit 402 and construction unit 403, for judging construction unit 403 Whether be stored with the long connection of Internet of things middleware and things-internet gateway in the long Connection Cache area built, and, judge advance The long relevant information for connecting the things-internet gateway that whether is stored with mapping table of structure.
The transmitting element 405 being connected with judging unit 404, for not stored in the long Connection Cache area that ought build in advance Be stored with things-internet gateway in the long connection of Internet of things middleware and things-internet gateway, and the long connection mapping table built in advance During relevant information, the connection with the things-internet gateway is set up according to the IP information that is carried in relevant information, and by control instruction It is sent to the things-internet gateway.
The cancellation unit 406 being connected with transmitting element 405, for the logout message sent according to the things-internet gateway of reception The long connection stored in long Connection Cache area is removed, meanwhile, the mapping relations stored in long connection mapping table are removed.
Things-internet gateway leaves network, and sending message to the Internet of things middleware for having set up long connection is unregistered, Internet of Things Net middleware receives logout message, the long connection in long Connection Cache area is removed, while length is connected into reflecting in mapping table Penetrate relation removing.
From the foregoing, it will be observed that the open system for supporting Internet of things middleware cluster expansion of the embodiment of the present application four, single by building The long Connection Cache area that member is built in advance connects mapping to store Internet of things middleware and the long connection of things-internet gateway and length Table supports the extension of Internet of things middleware cluster to store the relevant information of things-internet gateway, once judging unit finds control Request, which is forwarded to, does not set up on the server of long connection, and transmitting element then can obtain Internet of Things net from long connection mapping table The IP address information of pass, and the connection of Internet of things middleware server and things-internet gateway is set up, rather than request have to be turned On the server that long connection is set up before being dealt into.This method not only realizes the extension of Internet of things middleware cluster, and causes Load balancing transponder really realizes the function of load balancing.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that A little key elements, but also other key elements including being not expressly set out, or also include be this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged Except also there is other identical element in the process including the key element, method, article or equipment.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and other Between the difference of embodiment, each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or use the application. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can in other embodiments be realized in the case where not departing from spirit herein or scope.Therefore, the application The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (10)

1. a kind of method for supporting Internet of things middleware cluster expansion, it is characterised in that including:
The control instruction for things-internet gateway is received, the control instruction is sent to any one using load balancing transponder The server of Internet of things middleware;
If not storing the long company of the Internet of things middleware and the things-internet gateway in the long Connection Cache area built in advance Connect, and the relevant information for the things-internet gateway that is stored with the long connection mapping table built in advance, then,
Connection with the things-internet gateway is set up according to the IP information that is carried in the relevant information, and by the control instruction It is sent to the things-internet gateway.
2. according to the method described in claim 1, it is characterised in that it is described receive for things-internet gateway control instruction it Before, in addition to:
The registration message sent according to the things-internet gateway received, sets up and is connected with the length of the things-internet gateway;
The long connection is stored in the long Connection Cache area built in advance, meanwhile, by the correlation of the things-internet gateway Information and the relevant information of the Internet of things middleware are stored in as mapping relations in the long connection mapping table built in advance.
3. method according to claim 2, it is characterised in that the relevant information of the things-internet gateway includes:Internet of Things The id information of gateway and the IP information of things-internet gateway.
4. method according to claim 2, it is characterised in that the relevant information of the Internet of things middleware includes:Internet of Things The id information of net middleware and the IP information of Internet of things middleware.
5. method according to claim 2, it is characterised in that described that the control instruction is sent to the things-internet gateway Afterwards, in addition to:
The logout message sent according to the things-internet gateway of reception is clear by the long connection stored in the long Connection Cache area Remove, meanwhile, the mapping relations stored in the long connection mapping table are removed.
6. a kind of system for supporting Internet of things middleware cluster expansion, it is characterised in that including:Receiving unit, construction unit, sentence Disconnected unit and transmitting element, wherein:
The receiving unit, for receiving the control instruction for things-internet gateway, using load balancing transponder by the control System instruction is sent to the server of any one Internet of things middleware;
The construction unit, for building long Connection Cache area and long connection mapping table in advance;
The judging unit being connected respectively with the receiving unit and the construction unit, for judging the construction unit The Internet of things middleware that whether is stored with the long Connection Cache area built is connected with the length of the things-internet gateway, with And, judge the long relevant information for connecting the things-internet gateway that whether is stored with mapping table built in advance;
The transmitting element being connected with the judging unit, in the long Connection Cache area that ought build in advance without storage institute Internet of things middleware is stated to be connected with the length of the things-internet gateway, and the thing that is stored with the long connection mapping table built in advance During the relevant information of networking gateway, the company with the things-internet gateway is set up according to the IP information carried in the relevant information Connect, and the control instruction is sent to the things-internet gateway.
7. system according to claim 6, it is characterised in that also including the registering unit being connected with the receiving unit, Wherein:
The registering unit includes setting up unit and memory cell;
It is described to set up unit, for the registration message sent according to the things-internet gateway received, set up and the Internet of Things net The long connection of pass;
The memory cell, for the long connection to be stored in the long Connection Cache area built in advance, meanwhile, will be described The relevant information of things-internet gateway and the relevant information of the Internet of things middleware are stored in advance structure as mapping relations Long connection mapping table in.
8. system according to claim 7, it is characterised in that the relevant information of the things-internet gateway includes:Internet of Things The id information of gateway and the IP information of things-internet gateway.
9. system according to claim 7, it is characterised in that the relevant information of the Internet of things middleware includes:Internet of Things The id information of net middleware and the IP information of Internet of things middleware.
10. system according to claim 7, it is characterised in that also including the cancellation unit being connected with the transmitting element, Logout message for being sent according to the things-internet gateway of reception is clear by the long connection stored in the long Connection Cache area Remove, meanwhile, the mapping relations stored in the long connection mapping table are removed.
CN201410478865.9A 2014-09-18 2014-09-18 A kind of method and apparatus for supporting Internet of things middleware cluster expansion Active CN104202420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410478865.9A CN104202420B (en) 2014-09-18 2014-09-18 A kind of method and apparatus for supporting Internet of things middleware cluster expansion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410478865.9A CN104202420B (en) 2014-09-18 2014-09-18 A kind of method and apparatus for supporting Internet of things middleware cluster expansion

Publications (2)

Publication Number Publication Date
CN104202420A CN104202420A (en) 2014-12-10
CN104202420B true CN104202420B (en) 2017-10-13

Family

ID=52087645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410478865.9A Active CN104202420B (en) 2014-09-18 2014-09-18 A kind of method and apparatus for supporting Internet of things middleware cluster expansion

Country Status (1)

Country Link
CN (1) CN104202420B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468830B (en) * 2014-12-29 2018-04-27 广州中国科学院软件应用技术研究所 A kind of web service method and Internet of things system based on Internet of Things
CN110798329A (en) * 2018-08-01 2020-02-14 中兴通讯股份有限公司 Internet of things gateway access method, equipment and storage medium
CN110011910B (en) * 2019-04-08 2022-01-18 陈鹏 Gateway communication system and gateway communication method supporting multi-protocol device access
CN112118275B (en) * 2019-06-20 2023-07-11 北京车和家信息技术有限公司 Overload processing method, internet of things platform and computer readable storage medium
CN110855455B (en) * 2019-11-26 2021-06-22 南京甄视智能科技有限公司 Message forwarding method and device in IOT cluster
CN111200662A (en) * 2020-01-17 2020-05-26 南京甄视智能科技有限公司 Message forwarding method and device in Internet of things, storage medium and server
CN113691605A (en) * 2021-08-18 2021-11-23 深圳市晨北科技有限公司 Data transmission method and device, electronic equipment and storage medium
CN114422569A (en) * 2021-12-30 2022-04-29 天翼云科技有限公司 Message pushing method and device of cloud desktop

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217558A (en) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 An operation middleware service load balancing method
CN102291808A (en) * 2011-06-03 2011-12-21 莫雅静 Network communication method, communication equipment and middleware of communication equipment
CN102857505A (en) * 2012-09-06 2013-01-02 上海计算机软件技术开发中心 Data bus middleware of Internet of things
CN103957280A (en) * 2014-05-21 2014-07-30 中国科学院重庆绿色智能技术研究院 Connection allocation and scheduling method of sensor network in Internet of things

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217558A (en) * 2007-12-26 2008-07-09 中国移动通信集团湖北有限公司 An operation middleware service load balancing method
CN102291808A (en) * 2011-06-03 2011-12-21 莫雅静 Network communication method, communication equipment and middleware of communication equipment
CN102857505A (en) * 2012-09-06 2013-01-02 上海计算机软件技术开发中心 Data bus middleware of Internet of things
CN103957280A (en) * 2014-05-21 2014-07-30 中国科学院重庆绿色智能技术研究院 Connection allocation and scheduling method of sensor network in Internet of things

Also Published As

Publication number Publication date
CN104202420A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104202420B (en) A kind of method and apparatus for supporting Internet of things middleware cluster expansion
CN101296238B (en) Method and equipment for remaining persistency of security socket layer conversation
CN103503424B (en) For realizing the system and method connecting mirror image in multiple nucleus system
CN102223365B (en) User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster
US8780836B2 (en) Network system, controller, and network control method
CN102316160B (en) Website system and communication method thereof
CN103997526B (en) A kind of expansible SiteServer LBS and method
JP5790775B2 (en) Routing method and network transmission apparatus
CN101286884B (en) Method for implementing non-status multi-host backup and proxy gateway
CN103155524B (en) The system and method for IIP address is shared between the multiple cores in multiple nucleus system
JP5861772B2 (en) Network appliance redundancy system, control device, network appliance redundancy method and program
CN105245632B (en) A kind of different segment inter-host communication method in SDN network
CN103491123A (en) Load balancing method based on domain name visiting, system and load balancer
US20110231508A1 (en) Cluster control system, cluster control method, and program
WO2012037787A1 (en) Method and system for terminal access and management in cloud computing
US9137271B2 (en) System for switching between communication devices, switching method, and switching program
WO2010106772A1 (en) Distributed processing system and distributed processing method
CN102970242A (en) Method for achieving load balancing
CN101778425A (en) Method for dynamically balancing broadband access server load in wireless local area network
CN103561060B (en) Communication linkage method and transfer server under a kind of multi-thread environment
CN103516794B (en) The network architecture of a kind of distributed server and its implementation
JP2012242994A (en) Transaction processing system, transaction processing method and transaction processing program
CN102158406A (en) Intelligent routing method for computer network links
JP4619943B2 (en) Packet communication method and packet communication system
CN100563255C (en) The partition method of Internet protocol storage area network and spacer assembly

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190409

Address after: 510000 Room 1921, 27 Huanshi Avenue Center, Nansha District, Guangzhou City, Guangdong Province

Patentee after: Guangzhou Zhongke Yide Technology Co., Ltd.

Address before: 511458 8th Floor, Building A, 1121 Haibin Road, Nansha District, Guangzhou City, Guangdong Province

Patentee before: Institute of Software Application Technology, Guangzhou & Chinese Academy of Sciences

TR01 Transfer of patent right
CP02 Change in the address of a patent holder

Address after: 510000 Room 501, no.221-1, Huanshi Avenue West, Nansha District, Guangzhou City, Guangdong Province (self compiled room 01)

Patentee after: Guangzhou Zhongke Yide Technology Co.,Ltd.

Address before: 510000 Room 1921, 27 Huanshi Avenue Center, Nansha District, Guangzhou City, Guangdong Province

Patentee before: Guangzhou Zhongke Yide Technology Co.,Ltd.

CP02 Change in the address of a patent holder