CN109462652A - Terminating gateway load allocation method in smart home system based on hash algorithm - Google Patents

Terminating gateway load allocation method in smart home system based on hash algorithm Download PDF

Info

Publication number
CN109462652A
CN109462652A CN201811388232.3A CN201811388232A CN109462652A CN 109462652 A CN109462652 A CN 109462652A CN 201811388232 A CN201811388232 A CN 201811388232A CN 109462652 A CN109462652 A CN 109462652A
Authority
CN
China
Prior art keywords
gateway
terminating
terminating gateway
edge calculations
data
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.)
Granted
Application number
CN201811388232.3A
Other languages
Chinese (zh)
Other versions
CN109462652B (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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN201811388232.3A priority Critical patent/CN109462652B/en
Publication of CN109462652A publication Critical patent/CN109462652A/en
Application granted granted Critical
Publication of CN109462652B publication Critical patent/CN109462652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L2012/284Home automation networks characterised by the type of medium used
    • H04L2012/2841Wireless

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses the terminating gateway load allocation methods in a kind of smart home system based on hash algorithm.Load distribution of the invention is in the network being made of more terminating gateways and local server, and terminating gateway receives the sensing data being sent to from the sub- equipment of Zigbee using Zigbee coordinator, and stores on the server;Data are cut into multiple minizones and are mapped on Hash ring by master control gateway, position of the terminating gateway on Hash ring is replaced with dummy node, the calculation power of terminating gateway is indicated with the quantity of dummy node, i.e. when edge calculations network is added in terminating gateway, master control gateway is according to the dummy node that the calculation power of terminating gateway is that terminating gateway distributes respective numbers, and its dummy node is mapped on Hash ring with hash function, dummy node goes data nearest from it on capture fixed-direction, the gateway system for coming into edge calculations state is allowed to possess while being dynamically added and exiting edge calculations network, it is still able to achieve by the ability for calculating the distribution load of power ratio.

Description

Terminating gateway load allocation method in smart home system based on hash algorithm
Technical field
The invention discloses the terminating gateway load allocation methods in a kind of smart home system based on hash algorithm.
Background technique
Smart home is the embodiment of the instrumentation under the influence of internet.Smart home will be in family by technology of Internet of things Various equipment (such as audio & video equipment, lighting system, curtain control, airconditioning control, security system, Digital Theater Systems, audio-visual clothes Business device, shadow cabinet system, network home appliance etc.) it connects together, home wiring control, Lighting control, remote control using telephone, indoor and outdoor are provided The multiple functions such as remote control, burglar alarm, environmental monitoring, HVAC control, infrared forwarding and programmable Timer control and means.With Common household is compared, and smart home not only has traditional inhabitation function, has both building, network communication, information household appliances, equipment certainly Dynamicization provides comprehensive information exchange function, and even various energy expenditures save fund.
Among these, as data forwarding, the aggregation node of exchange, circulation, status is particularly important terminating gateway.With The development of hardware industry, mobile terminal, the performance of device end and quantity welcome the growth of outburst row, according in the industry, it is expected that It there will be over 50,000,000,000 terminal and equipment networking to the year two thousand twenty, only China will generate 10,000,000,000 or more Internet of Things connection number. The development of Internet of Things allows the electronic device in ordinary people all to have become vivaciously, these electronic devices is only allowed to connect to network It is inadequate, it would be desirable to the data preferably generated using these electronic components, and be preferably current using these data Home services.In smart home application field, it is contemplated that network bandwidth and data privacy protection, it would be desirable to which these data are best It is only capable of in local circulation, and directly in processing locality, and arithmetic center of the server as smart home system, it carries The heavy burden of processor active task.We need gateway as edge nodes, allow generated data in own consumer home while, It can use the stronger and stronger edge calculations ability of gateway and provide the ability that auxiliary calculates for smart home system.
The priority task of terminating gateway should be the reception of user data, forwarding, and when in the idle state, server can Service distributing is carried out with the data that will need to calculate beyond the clouds, return data to terminating gateway carries out user behavior recommendation, data The non-emergent calculating task such as form collator and conversion.This kind of business scenario has wide answer in common smart home field With.Traditional cloud computing solution may be at the initial stage of applying, and calculated performance is superfluous, causes cost excessively high;And in the application In the later period, as terminating gateway increases, amount of user data increases, and will appear the inadequate situation of calculated performance, needs to increase to cloud Hold the investment of resource.So the application of edge calculations can be very good to solve the problems, such as this, local server is by calculative Business is cut into muti-piece, is handed down to terminating gateway, in gateway idle, carries out edge calculations, is uploaded to local server after the completion.? Using initial stage can calculate beyond the clouds power it is little in the case where, auxiliary calculate.The later period is being applied, due to mentioning for terminating gateway quantity It rises, the performance of edge calculations is also promoted therewith, can save the resource input of cloud server.
Since terminating gateway needs preferential answering data forwarding task, edge calculations net dynamically can be added and exited Network, it can be seen that how calculating task reasonably to be divided, and distribute to terminal device according to the computing capability of terminating gateway, allow Terminal device reasonably loads calculating task, just seems particularly critical.
Summary of the invention
The purpose of the present invention is to provide the terminating gateways in a kind of smart home system based on hash algorithm to load distribution Method.
The system that the present invention applies includes gateway control system, local server, sensory-control system and mobile terminal Equipment.
The gateway control system includes master control gateway and terminating gateway, and master control gateway and terminating gateway directly adopt RPC Agreement connection, terminating gateway connect Zigbee coordinator by a variety of built-in Linux control panels;Sensory-control system is by intelligence Socket, lighting apparatus, combined aural and visual alarm, intelligent lock, fresh air system, air-conditioning equipment, electrically driven curtain connect Zigbee module group At Zigbee equipment composition;Local server is put as needed at home or in the computer room of Property Management of residence;It is mobile Terminal device includes mobile phone or plate used in everyday etc..
The control panel of the master control gateway and terminating gateway uses Tiny4412 control panel, it is based on Samsung Exynos 4412 4 core processors, dominant frequency are up to 1.5GHz, carry 1G DDR3RAM and 4G eMMC cache, and possess good Power consumption control.
The terminating gateway system is forwarded to server progress for receiving the data generated in the sub- equipment of Zigbee Storage, on the other hand, the control instruction issued on the mobile terminal device directly controlled to user is forwarded.Edge is added Calculate the calculating task that network carries out server distribution.
On the Zigbee coordinator and the sub- equipment of Zigbee use CC2530 development kit, be equipped with 8KB RAM and 256KB flash memory, can support the large-scale network-estabilishing of coordinator and 254 sub- equipment, and possess low-down power consumption.
One side of sensing and controlling system is used to various sensing datas being uploaded to master control gateway system, on the one hand uses In the various control instructions that reception master control gateway system issues, corresponding smart machine is controlled.
The local server is used to receive and store the data of master control gateway system upload.Carry out the control of edge calculations System, cutting including edge calculations task and issues, carries out the result treatment after data mart modeling, to being added and exit edge calculations The control and scheduling of the master control gateway of network.
Mobile terminal device, that is, user mobile phone used in everyday or tablet computer etc..
Technical solution of the invention:
Load distribution of the invention is the terminating gateway benefit in the network being made of more terminating gateways and local server The sensing data being sent to from the sub- equipment of Zigbee is received with Zigbee coordinator, and is stored on the server.Despotic network Data are cut into multiple minizones and are mapped on Hash ring by pass, replace position of the terminating gateway on Hash ring with dummy node It sets, the calculation power of terminating gateway is indicated with the quantity of dummy node, i.e., when edge calculations network is added in terminating gateway, despotic network Close be according to the calculations power of terminating gateway terminating gateway distribution respective numbers dummy node, and by its dummy node hash function It is mapped on Hash ring, dummy node goes data nearest from it on capture fixed-direction, allows and comes into edge calculations state Gateway system possess while being dynamically added and exiting edge calculations network, be still able to achieve by calculate power ratio distribution load Ability.
Specific step is as follows for the technical solution adopted by the present invention to solve the technical problems:
When step 1, system initialization, a tensor calculus power table is stored in master control gateway, based on the network interface card MAC value of terminating gateway Key assignments, whether all terminating gateways that smart home system is added in inquiry have recorded it in calculating power table and have calculated power, if remembered Record, enters step 1;Otherwise calculate present terminal gateway calculation power, and calculate power table in record present terminal gateway MAC value and Corresponding calculation power, then until the calculation power of all terminating gateways, which is recorded in after calculating in power table, enters step 2.
Step 2 judges current data accumulation and system operation time, if data volume accumulation is arrived on current server C and when system time has run T, initiates edge calculations request from master control gateway to server and terminating gateway;Otherwise enter Gateway normal operating condition.
After step 3, terminating gateway receive the edge calculations request of master control gateway sending, judge whether its own currently locates In idle state, if it is, entering step 4 into edge calculations network;Otherwise it is added without edge calculations network.
Step 4, the current calculation for calculating all terminating gateways being in edge calculations network in power table of master control gateway inquiry Force value, and its ratio beta is calculated, it is that each terminating gateway distributes N number of dummy node, the void of every terminating gateway as unit of K Quasi- vertex ticks are as follows: node (n)=Mn-1, Mn-2 ..., Mn-N | n ∈ 1~M, N=K β (n) }, by them by hash function It is all mapped on Hash ring.
Step 5, when need edge calculations total amount of data be Q GB when, after master control gateway is obtained from server, by him Be divided into size be P MB sample, obtain Q/P data block, and the data block of segmentation is labeled as 1~Q/P in order, Using hash function, it is mapped on Hash ring.
Step 6, on Hash ring, labeled as x deblocking block according to going for clockwise from data block itself most Close dummy node finds the terminating gateway of dummy node ownership, and the data block is assigned to the end of dummy node ownership Edge calculations are carried out on the gateway of end, the path of this distribution is recorded in routing table, in storage to server and are sent to every In a terminating gateway, corresponding end successively then is sent by deblocking according to the sequence marked in step 5 by deblocking It holds on gateway.
Step 7, each terminating gateway compare the data path in the deblocking and routing table taken, if worked as The data path of the deblocking that the terminating gateway at preceding place is taken in the routing table is directed toward oneself, no with regard to carrying out edge calculations Then without calculating.
Step 8, when there is new terminating gateway to access smart home system, also need the initialization for carrying out step (1) Process.When there is new terminating gateway to enter edge calculations state, then it is index with MAC value similarly in calculating power table, searches new The corresponding calculation force value of terminating gateway.It obtains after calculating force value, calculates other terminal networks in new terminal gateway and edge calculations network The calculation power ratio beta (y) of pass, and the N number of dummy node new for new terminating gateway distribution, are labeled as node (y)={ My-1, My- 2 ..., My-N | N=K β (y) }, according to the calculating of hash function, new dummy node is all mapped on Hash ring, will be breathed out Nearest terminating gateway is found to rotating clockwise in position on uncommon ring where deblocking, then newly assigned dummy node is again Deblocking can be captured, updates new distribution path in the routing table, sends routing table, server root to all gateways again Block data is sent according to new path.
Step 9, when terminating gateway is switched to busy state by idle state, need to exit edge calculations network, this When, the corresponding all dummy nodes of the terminating gateway exit Hash ring, similarly update distribution path in the routing table.
Step 10, each data block, which calculate, to be completed, and calculated result is returned to server by terminating gateway, when all edge meters After the completion of calculation task, server summarizes calculated result, carries out corresponding subsequent processing and storage.
Further, calculation power table described in step 1 is that terminating gateway processor calculates power, can be provided by equipment manufacturer, can also be with When the processor for carrying out step 1 calculates the calculating of force estimation, can be calculated by software,.
Further, C has been arrived in data volume accumulation on current server described in step 2 and system time has run T, specifically Process and necessity are as follows:
(1) process: when data volume accumulate reach C when and system operation time do not reach T when, do not start carry out edge It calculates;Similarly when the system is operated between reach T when, when data volume does not accumulate C, also do not start carry out edge calculations;Only When data cumulant reaches C and system operation time reaches T, just start to carry out edge calculations.
(2) necessity: edge calculations are by data-driven, and the application much calculated, to rely on, is counted with a large amount of data Not enough according to amount, it will increase meaningless calculating;When too short between when the system is operated, collection may be a large amount of superfluous to data Remainder evidence, sample collection lack of diversity are equally little for the meaning of edge calculations.
Further, idle state described in step 3 determines current net according to the cpu busy percentage of present terminal gateway It closes and whether is in idle condition, according to the load of gateway, when cpu busy percentage is less than or equal to T1 (T1 can be customized) more than U Between when, belong to idle state, edge calculations network be added;If belonging to busy state, then not when cpu busy percentage is greater than T1 It is added or exits edge calculations network.
Further, the calculation force value of each terminating gateway is calculated described in step 4 and calculates its ratio beta, as unit of K, The necessity for distributing N number of dummy node for each terminating gateway is as follows:
In practical situations, due to be connected to edge calculations network each terminating gateway equipment process performance not Together, cause to calculate power difference, so if being clearly unreasonable by the end that deblocking is distributed to each edge calculations.Institute It is that the equipment of each edge calculations end distributes the number of dummy node, just so that processor is calculated power ratio as measurement standard Seem particularly necessary.
Further, the distribution path of all data blocks found according to step 6 is stored in routing table, and data block is pressed Detailed process on corresponding terminal device is sent to according to the Sequential Block marked in step 5 and necessity is as follows:
(1) process: after routing table determines, server is according to the information in routing table, by data block according to step (4) 1,2,3..., Q/P of middle label, piecemeal are sent to corresponding terminating gateway.After having sent first deblocking, continue to send Remaining deblocking.
(2) it necessity: avoids and is sent all deblockings for belonging to some terminating gateway, then go under transmission This mode bring of the deblocking of one terminating gateway loads unreasonable disadvantage.
Further, step 8, the 9 newly assigned dummy nodes can capture deblocking, and dummy node exits Hash Ring can discharge deblocking, and update routing table, and server sends the detailed process and necessity of block data according to new path Property is as follows:
(1) process: after new dummy node enters Hash ring, captured deblocking is necessarily had before Again it is assigned on new dummy node;Similarly, captured before necessarily having when dummy node exits Hash ring Deblocking is released again, is captured by the dummy node currently still on Hash ring, so needing to update server On routing table, server compares old routing table according to new routing table, and deblocking is labeled as three kinds of states: having been sent out The deblocking sent, not sent deblocking, failed deblocking.Wherein failed deblocking is new and old routing Different data piecemeal in path in table.Server continues to send not sent deblocking and failed deblocking to gateway.
(2) necessity: firstly, when new dummy node enters ring or old dummy node moves back, since ratio is fixed, not In the case where changing unit K, the dummy node quantity and ratio of each terminating gateway of representative on ring will not occur originally Change.Secondly, by Hash consistency it is found that position of the dummy node of script on Hash ring remains unchanged, and it is new virtual Node enters after Hash ring or partial virtual node move back ring, according to the principle of capture deblocking clockwise, only part The path of deblocking has sent variation.Finally, router issues deblocking according to new routing table, without using spanning gateway Data Migration reduces the pressure of network transmission and the load of server forwarding, is advantageously implemented the quick of deblocking path Migration.
Beneficial effects of the present invention:
(1) using the present invention, the probability that each deblocking is assigned to each terminating gateway is and to calculate power proportional 's.It can be guaranteed that the calculation amount that each terminating gateway is assigned to is reasonable after data block largely issues.Allow terminal Gateway is dynamically added and exits edge calculations network, not only will not influence the everyday tasks demand of terminating gateway, but also can use end It holds the idle of gateway to calculate power, saves the calculating pressure and cost of investment of server.
(2) when being added due to any one or more terminating gateways or exit edge calculations network, it will not influence edge The state loaded by the distribution of power ratio is calculated for calculating network internal terminating gateway, so when any one or more terminating gateways are set It is standby break down, user actively stops using some or several terminating gateways, has newly-increased terminating gateway equipment to need to access intelligence It is all " being distributed by power, able people should do more work " always, therefore this system has very flexible scalability, cutting property when energy house system And availability.
(3) using the present invention, when new terminating gateway is added or exits edge calculations network, only a part of data are lost Effect, reduces Data Migration amount;Operational data is re-issued by server, instead of by fail data holder's Transmission via Gateway Way, alleviate network data transmission pressure.
Detailed description of the invention
Fig. 1 is the structure chart of terminating gateway load allocation method of the present invention.
Fig. 2 is terminating gateway load allocation method work flow diagram of the present invention.
Fig. 3 is mapping graph of the dummy node on Hash ring.
Fig. 4 is the mapping graph after Additional Virtual Node M4 on Hash ring.
Fig. 5 is the mapping graph after deleting dummy node M3 on Hash ring.
Specific embodiment
The following are in conjunction with attached drawing to further explanation of the invention.
In conjunction with Fig. 1, this system includes: gateway control system, local server and Control System of Intelligent, mobile terminal Equipment.
Wherein, gateway control system includes master control gateway and terminating gateway, and master control gateway and terminating gateway use RPC agreement Connection, terminating gateway connect Zigbee coordinator by a variety of built-in Linux control panels;Sensory-control system is by intelligently inserting Seat, lighting apparatus, combined aural and visual alarm, intelligent lock, fresh air system, air-conditioning equipment, electrically driven curtain connection Zigbee module composition Zigbee equipment composition;Local server, which can according to need, to be put at home or in the computer room of Property Management of residence;It moves Dynamic terminal device includes mobile phone or plate used in everyday etc..
As a kind of specific example: the control panel of the master control gateway and terminating gateway uses Tiny4412 control panel, It is based on 4,412 4 core processor of Samsung Exynos, and dominant frequency is up to 1.5GHz, carries 1G DDR3RAM and 4G eMMC high speed Caching, and possess good power consumption control.
The master control gateway system is forwarded to server progress for receiving the data generated in the sub- equipment of Zigbee Storage, on the other hand, the control instruction issued on the mobile terminal device directly controlled to user is forwarded.Edge is added Calculate the calculating task that network carries out server distribution.
As a kind of specific example: using CC2530 exploitation set on the Zigbee coordinator and the sub- equipment of Zigbee Part is equipped with 8KB RAM and 256KB flash memory, can support the large-scale network-estabilishing of coordinator and 254 sub- equipment, and possesses very low Power consumption.
One side of sensing and controlling system is used to various sensing datas being uploaded to terminating gateway system, on the one hand uses In the various control instructions that reception terminating gateway system issues, corresponding smart machine is controlled.
The local server is used to receive and store the data of master control gateway system upload.Carry out the control of edge calculations System, cutting including edge calculations task and issues, carries out the result treatment after data mart modeling, to being added and exit edge calculations The control and scheduling of the terminating gateway of network.
Mobile terminal device, that is, user mobile phone used in everyday or tablet computer etc..
Specific step is as follows by the present invention combined with Figure 1 and Figure 2:
(1) when system initialization, a tensor calculus power table is stored in master control gateway, using the network interface card MAC value of terminating gateway as major key All terminating gateways in this system are added in value, inquiry, and if it has been recorded in calculating power table and has calculated power, if recorded, into Enter step (2);Otherwise it calculates it and calculates power, enter step (2) after recording its MAC value and corresponding calculation power in calculating power table.
(2) current data accumulation and system operation time are judged, if data volume accumulation has arrived C simultaneously on current server And system time initiates edge computation requests by master control gateway when having run T;Otherwise enter gateway normal operating condition.
(3) whether terminating gateway judgement is currently in idle condition, if it is, into edge calculations network, into step Suddenly (4);Otherwise it is added without edge calculations network.
(4) the current calculation power for calculating all terminating gateways being in edge calculations network in power table of master control gateway inquiry Value, and calculates its ratio beta, is that each terminating gateway distributes N number of dummy node as unit of K, every terminating gateway it is virtual Vertex ticks are as follows: node (n)=Mn-1, Mn-2 ..., Mn-N | n ∈ 1~M, N=K β (n) }, they are complete by hash function Portion is mapped on Hash ring.
As a kind of specific example: such as Fig. 3, having 3 terminating gateways, query operator power table, β (1) in edge calculations network =1, β (2)=3, β (3)=2, so the dummy node number for terminating gateway distribution is respectively 5,15,10.Respectively Labeled as node (1)={ M1-1, M1-2 ..., M1-5 }, node (2)=M2-1, M2-2 ..., M2-15 }, node (3)= {M3-1,M3-2,...,M3-10}.The range of Hash ring is 0~232- 1, by these three gather in whole elements using Hash In Function Mapping to Hash ring.
Further, dummy node is distributed as unit of K=5 for the distribution of each gateway is only to illustrate, and realizes process In, the dummy node for the distribution of each gateway is more, the closer ratio for calculating power β of data distribution finally distributed for each gateway Value.
(5) when needing the total amount of data of edge calculations to be Q GB, after master control gateway is obtained from server, they are divided It is segmented into the sample that size is P MB, Q/P data block is obtained, they is labeled as 1~Q/P in order, using hash function, reflect It is mapped on Hash ring.
As a kind of specific example: such as Fig. 3, if total amount of data is 10GB, their cuttings are 10 by master control gateway Deblocking, each deblocking size are 1GB, this 10 deblockings are labeled as 1~10, are mapped on Hash ring.
(6) on Hash ring, labeled as x data block according to the dummy node nearest from it is gone for clockwise, look for To dummy node which terminating gateway belonged to, which terminating gateway which, which is just assigned on, carries out edge calculations, by this The path of kind distribution is recorded in routing table, in storage to server and is sent in each terminating gateway, then by data block It is sent on corresponding terminating gateway according to the Sequential Block marked in step (5).
As a kind of specific example: as shown in figure 3, the deblocking labeled as 1 finds closest to him void clockwise Quasi- node belongs to terminating gateway 1, then the routed path of deblocking 1 is terminating gateway 1, records in the routing table, His deblocking is similarly.After the routing iinformation record of all deblockings, which is issued to each terminal network The Central Shanxi Plain.
(7) each terminating gateway compares after taking deblocking with the data path in routing table, if current institute Gateway take the data road strength of data in the routing table and be directed toward oneself, with regard to carrying out edge calculations, otherwise without calculating.
As a kind of specific example: when terminating gateway 1, taking deblocking 1, and after query routing information is errorless, logarithm According to piecemeal 1, edge calculations are carried out.
Further, when terminating gateway carries out edge calculations, server continues to send not sent deblocking With failed deblocking.
(8) when there is new terminating gateway to access this smart home system, the initialization for carrying out step (1) is also needed Journey.When there is new terminating gateway to enter edge calculations state, then similarly in calculating power table, it is index with MAC value, searches new The corresponding calculation force value of terminating gateway.It obtains after calculating force value, calculates other terminating gateways in new terminal gateway and edge calculations network Calculation power ratio beta (y), and the N number of dummy node new for new terminating gateway distribution be labeled as node (y)={ My-1, My- 2 ..., My-N | N=K β (y) }, according to the calculating of hash function, new dummy node is all mapped on Hash ring, will be breathed out Nearest terminating gateway is found, then the meeting again of newly assigned dummy node to rotating clockwise in position on uncommon ring where data block Data block is captured, updates new distribution path in the routing table, sends routing table to all gateways again, server is according to new Path send block data.
As a kind of specific example: as shown in figure 4, when terminating gateway 4 enters edge calculations state, query operator Li Biao get To the calculation power β (4)=2 of terminating gateway 4, so 10 dummy nodes new for its distribution, are similarly mapped on Hash ring, then it is former This is captured by new dummy node now by the deblocking that 3 dummy node of terminal captures, and master control gateway is by the road of information It is recorded by information, if current data piecemeal 4 is also not sent, by deblocking 4 labeled as failed, and to all Terminating gateway and server send new routing table.Server is sent the deblocking 4 of failure again according to new routing table It is sent in new terminating gateway 4, despotic network pass is forwarded.
(9) when terminating gateway is switched to busy state by idle state, need to exit edge calculations network, at this point, The corresponding all dummy nodes of the terminating gateway exit Hash ring, similarly update distribution path in the routing table.
As a kind of specific example: as shown in figure 5, when the corresponding dummy node of terminating gateway M3 exits Hash ring, Originally the deblocking 2 captured by the dummy node of terminating gateway M3, if inquiry deblocking 2 has been sent out in the routing table It send, does not then update the state and routing iinformation of deblocking 2;If deblocking 2 is not sent, recorded in new routing table Deblocking 2 is to have failed, and server and terminating gateway update routing table, and server retransmits failed deblocking.
(10) each data block, which calculates, completes, and calculated result is returned to server by terminating gateway, when all edge calculations After the completion of task, server summarizes calculated result, carries out corresponding subsequent processing and storage.

Claims (3)

1. the terminating gateway load allocation method in smart home system based on hash algorithm, it is characterised in that the load of this method Distribution be in the network being made of more terminating gateways and local server, terminating gateway using Zigbee coordinator receive from The sensing data being sent in the sub- equipment of Zigbee, and store on the server;Data are cut into multiple small by master control gateway Section is simultaneously mapped on Hash ring, position of the terminating gateway on Hash ring is replaced with dummy node, with the quantity of dummy node Indicate the calculation power of terminating gateway, i.e., when edge calculations network is added in terminating gateway, master control gateway is according to the calculation of terminating gateway Power is the dummy node that terminating gateway distributes respective numbers, and its dummy node is mapped on Hash ring with hash function, empty Quasi- node goes data nearest from it on capture fixed-direction, and the gateway system for coming into edge calculations state is allowed to possess dynamic While state is added and exits edge calculations network, still it is able to achieve by the ability for calculating the distribution load of power ratio.
2. the terminating gateway load allocation method in smart home system according to claim 1 based on hash algorithm, It is characterized in that specific step is as follows:
When step 1, system initialization, a tensor calculus power table is stored in master control gateway, using the network interface card MAC value of terminating gateway as major key Value, whether all terminating gateways that smart home system is added in inquiry have recorded it in calculating power table and have calculated power, if recorded, Enter step 2;Otherwise the calculation power of present terminal gateway is calculated, and records in calculating power table the MAC value of present terminal gateway and right The calculation power answered, then until the calculation power of all terminating gateways, which is recorded in after calculating in power table, enters step 2;
Step 2 judges current data accumulation and system operation time, if data volume accumulation has arrived C simultaneously on current server And system time initiates edge calculations request from master control gateway to server and terminating gateway when having run T;Otherwise enter gateway Normal operating condition;
After step 3, terminating gateway receive the edge calculations request of master control gateway sending, judge its own currently whether in sky Not busy state, if it is, entering step 4 into edge calculations network;Otherwise it is added without edge calculations network;
Step 4, the current calculation force value for calculating all terminating gateways being in edge calculations network in power table of master control gateway inquiry, And its ratio beta is calculated, it is that each terminating gateway distributes N number of dummy node, the virtual section of every terminating gateway as unit of K Point label are as follows:
Node (n)=Mn-1, Mn-2 ..., Mn-N | n ∈ 1~M, N=K β (n) }, by the dummy node of label by hash function It is all mapped on Hash ring;
Step 5, when need edge calculations total amount of data be Q GB when, it is after master control gateway is obtained from server, data are total Amount is divided into the sample that size is P MB, obtains Q/P deblocking, and the deblocking of segmentation is labeled as 1 in order~ Q/P is mapped on Hash ring using hash function;
Step 6, on Hash ring, it is nearest from deblocking itself according to going for clockwise labeled as the deblocking block of x Dummy node, find the dummy node ownership terminating gateway, and by the data block be assigned to dummy node ownership terminal Edge calculations are carried out on gateway, the path of this distribution is recorded in routing table, in storage to server and are sent to each In terminating gateway, corresponding terminal successively then is sent by deblocking according to the sequence marked in step 5 by deblocking On gateway;
Step 7, each terminating gateway compare the data path in the deblocking and routing table taken, if current institute The deblocking taken of terminating gateway data path in the routing table be directed toward oneself, with regard to carrying out edge calculations, otherwise not It is calculated;
Step 8, when there is new terminating gateway to access smart home system, also need the initialization procedure for carrying out step 1;When When having new terminating gateway to enter edge calculations state, then similarly in calculating power table, it is index with MAC value, searches new terminal The corresponding calculation force value of gateway obtains after calculating force value, calculates the calculation of other terminating gateways in new terminal gateway and edge calculations network Power ratio beta (y), and the N number of dummy node new for new terminating gateway distribution, labeled as node (y)=My-1, My-2 ..., My-N | N=K β (y) }, according to the calculating of hash function, new dummy node is all mapped on Hash ring, it will be on Hash ring Nearest terminating gateway is found to rotating clockwise in position where deblocking, then newly assigned dummy node can capture again To deblocking, update new distribution path in the routing table, again to all gateways send routing table, server according to newly Path sends block data;
Step 9, when terminating gateway is switched to busy state by idle state, need to exit edge calculations network, at this point, should The corresponding all dummy nodes of terminating gateway exit Hash ring, similarly update distribution path in the routing table;
Step 10, each data block, which calculate, to be completed, and calculated result is returned to server by terminating gateway, when all edge calculations are appointed After the completion of business, server summarizes calculated result, carries out corresponding subsequent processing and storage.
3. the terminating gateway load allocation method in smart home system according to claim 1 based on hash algorithm, It is characterized in that idle state described in step 3, determines whether current gateway is according to the cpu busy percentage of present terminal gateway Idle state when cpu busy percentage, which is less than or equal to T1, is more than the U time, belongs to idle state, side is added according to the load of gateway Edge calculates network;If belonging to busy state when cpu busy percentage is greater than T1, being then added without or exit edge calculations network, T1 It is the threshold value of setting with U.
CN201811388232.3A 2018-11-21 2018-11-21 Terminal gateway load distribution method based on Hash algorithm in intelligent home system Active CN109462652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811388232.3A CN109462652B (en) 2018-11-21 2018-11-21 Terminal gateway load distribution method based on Hash algorithm in intelligent home system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811388232.3A CN109462652B (en) 2018-11-21 2018-11-21 Terminal gateway load distribution method based on Hash algorithm in intelligent home system

Publications (2)

Publication Number Publication Date
CN109462652A true CN109462652A (en) 2019-03-12
CN109462652B CN109462652B (en) 2021-06-01

Family

ID=65611099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811388232.3A Active CN109462652B (en) 2018-11-21 2018-11-21 Terminal gateway load distribution method based on Hash algorithm in intelligent home system

Country Status (1)

Country Link
CN (1) CN109462652B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636007A (en) * 2019-09-11 2019-12-31 北京智芯微电子科技有限公司 Route arranging method, route arranger and system for edge computing network
CN111586091A (en) * 2020-03-25 2020-08-25 重庆特斯联智慧科技股份有限公司 Edge computing gateway system for realizing computing power assembly
CN112272239A (en) * 2020-10-30 2021-01-26 深圳市雷鸟网络传媒有限公司 Edge calculation method and device, intelligent terminal and computer readable storage medium
WO2021012330A1 (en) * 2019-07-24 2021-01-28 南京智能制造研究院有限公司 Computing power migration method and system based on evaluation of data quality of edge data gateway
WO2021027842A1 (en) * 2019-08-13 2021-02-18 中兴通讯股份有限公司 Method, device and system for implementing edge computing
CN112395070A (en) * 2019-08-12 2021-02-23 阿里巴巴集团控股有限公司 Data processing system and method
WO2021047678A1 (en) * 2019-09-12 2021-03-18 华为技术有限公司 Computing power routing method and apparatus
CN112929424A (en) * 2021-01-26 2021-06-08 成都佳发安泰教育科技股份有限公司 Gateway load balancing method, device, equipment and storage medium
CN113556380A (en) * 2021-06-07 2021-10-26 广东东华发思特软件有限公司 Edge distributed multi-copy processing method, device and medium of Internet of things equipment
CN115473753A (en) * 2022-07-20 2022-12-13 青岛海尔科技有限公司 Control method and device of gateway equipment, storage medium and electronic device
CN115550002A (en) * 2022-09-20 2022-12-30 贵州电网有限责任公司 TEE-based intelligent home remote control method and related device
CN117729206A (en) * 2024-02-07 2024-03-19 湖南三湘银行股份有限公司 Multimedia access method based on Internet of things

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791862A (en) * 2016-03-21 2016-07-20 杭州电子科技大学 Three-dimensional video coding depth map internal mode selection method based on edge complexity
CN106507326A (en) * 2015-09-07 2017-03-15 中国移动通信集团公司 A kind of charging method, system and relevant device
CN106792821A (en) * 2016-12-27 2017-05-31 中国移动通信集团江苏有限公司 Connection control method and device based on virtual gateway
CN108111542A (en) * 2018-01-30 2018-06-01 深圳大学 Internet of Things ddos attack defence method, device, equipment and medium based on SDN
US10104039B1 (en) * 2017-09-28 2018-10-16 Cloudflare, Inc. Establishing and using a tunnel from an origin server in a distributed edge compute and routing service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106507326A (en) * 2015-09-07 2017-03-15 中国移动通信集团公司 A kind of charging method, system and relevant device
CN105791862A (en) * 2016-03-21 2016-07-20 杭州电子科技大学 Three-dimensional video coding depth map internal mode selection method based on edge complexity
CN106792821A (en) * 2016-12-27 2017-05-31 中国移动通信集团江苏有限公司 Connection control method and device based on virtual gateway
US10104039B1 (en) * 2017-09-28 2018-10-16 Cloudflare, Inc. Establishing and using a tunnel from an origin server in a distributed edge compute and routing service
CN108111542A (en) * 2018-01-30 2018-06-01 深圳大学 Internet of Things ddos attack defence method, device, equipment and medium based on SDN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴以凡,张桦,戴国骏: ""面向多处理器资源预留的实时程序划分方法"", 《电子学报》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021012330A1 (en) * 2019-07-24 2021-01-28 南京智能制造研究院有限公司 Computing power migration method and system based on evaluation of data quality of edge data gateway
CN112395070A (en) * 2019-08-12 2021-02-23 阿里巴巴集团控股有限公司 Data processing system and method
KR20220012315A (en) * 2019-08-13 2022-02-03 지티이 코포레이션 Edge Computing Implementation Methods, Devices and Systems
WO2021027842A1 (en) * 2019-08-13 2021-02-18 中兴通讯股份有限公司 Method, device and system for implementing edge computing
US11930399B2 (en) 2019-08-13 2024-03-12 Zte Corporation Method, device and system for implementing edge computing
KR102599812B1 (en) 2019-08-13 2023-11-07 지티이 코포레이션 Edge computing implementation methods, devices and systems
CN110636007A (en) * 2019-09-11 2019-12-31 北京智芯微电子科技有限公司 Route arranging method, route arranger and system for edge computing network
WO2021047678A1 (en) * 2019-09-12 2021-03-18 华为技术有限公司 Computing power routing method and apparatus
CN112491716B (en) * 2019-09-12 2023-07-18 华为技术有限公司 Force calculation routing method and device
CN111586091A (en) * 2020-03-25 2020-08-25 重庆特斯联智慧科技股份有限公司 Edge computing gateway system for realizing computing power assembly
CN112272239A (en) * 2020-10-30 2021-01-26 深圳市雷鸟网络传媒有限公司 Edge calculation method and device, intelligent terminal and computer readable storage medium
CN112929424A (en) * 2021-01-26 2021-06-08 成都佳发安泰教育科技股份有限公司 Gateway load balancing method, device, equipment and storage medium
CN112929424B (en) * 2021-01-26 2022-11-15 成都佳发安泰教育科技股份有限公司 Gateway load balancing method, device, equipment and storage medium
CN113556380A (en) * 2021-06-07 2021-10-26 广东东华发思特软件有限公司 Edge distributed multi-copy processing method, device and medium of Internet of things equipment
CN115473753A (en) * 2022-07-20 2022-12-13 青岛海尔科技有限公司 Control method and device of gateway equipment, storage medium and electronic device
CN115550002A (en) * 2022-09-20 2022-12-30 贵州电网有限责任公司 TEE-based intelligent home remote control method and related device
CN115550002B (en) * 2022-09-20 2024-05-24 贵州电网有限责任公司 TEE-based intelligent home remote control method and related device
CN117729206A (en) * 2024-02-07 2024-03-19 湖南三湘银行股份有限公司 Multimedia access method based on Internet of things
CN117729206B (en) * 2024-02-07 2024-05-31 湖南三湘银行股份有限公司 Multimedia access method based on Internet of things

Also Published As

Publication number Publication date
CN109462652B (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN109462652A (en) Terminating gateway load allocation method in smart home system based on hash algorithm
CN105577420B (en) Automatically generate the method and system of servomechanism network topology
CN106537878B (en) Private content distributed network
CN103404165B (en) Automation foundation facilities management system and the method for realizing real-time power management
CN103236949B (en) Monitoring method, device and the system of a kind of server cluster
CN108873712A (en) ECS edge calculations system
CN102113273A (en) Selectively re-mapping network topology
CN109085999A (en) data processing method and processing system
CN103372275A (en) Internet-of-things fire monitoring system based on cloud services
CN107249121A (en) A kind of video monitoring system based on cloud platform
CN109547875A (en) A kind of FC exchange network arbitrary port access design method
CN104184604A (en) Cloud platform basic framework supervision system
CN108199944A (en) The airborne main cabin core system and dynamic positioning method of a kind of dynamic daisy chain looped network
CN103546572A (en) Cloud storage device and multi-cloud storage networking system and method
CN105227212A (en) Reverse power supply management method, Apparatus and system
CN206100019U (en) Intelligence house node management system
CN1330124C (en) Method and apparatus for virtualizing network resources
CN104601378A (en) Virtual resource flexible scheduling implementation method combining application performance indicator monitoring data
CN117221251B (en) Computing power sensing and routing method and system for software-defined computing power network
CN111556090B (en) Function aggregation self-organization system and method of intelligent Internet of things
CN109257804A (en) Centralization central machine room energy-saving control method for 5G communication
CN113742048B (en) Hotel cloud service system and service method thereof
CN115834434A (en) Network device control method, control server, proxy device and communication network
CN107343038A (en) A kind of remote real-time monitoring device and method based on IPMI
CN115242717A (en) Centralized storage system based on end-side calculation and control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant