CN102710452A - Method and device for managing visit of multiple clients - Google Patents
Method and device for managing visit of multiple clients Download PDFInfo
- Publication number
- CN102710452A CN102710452A CN2012102131910A CN201210213191A CN102710452A CN 102710452 A CN102710452 A CN 102710452A CN 2012102131910 A CN2012102131910 A CN 2012102131910A CN 201210213191 A CN201210213191 A CN 201210213191A CN 102710452 A CN102710452 A CN 102710452A
- Authority
- CN
- China
- Prior art keywords
- client
- address
- visit
- service thread
- identification
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment provided by the invention discloses a method for managing visit of multiple clients. The method comprises the following steps: pre-obtaining an IP (internet protocol) address of each client allowed to visit and distributing a service thread identification to each client allowed to visit; judging whether to allow the access of the client according to the IP address of the client carried in an access demand when receiving the access demand; and starting the service route expressed by the service thread identification when judging the access allowance. The embodiment of the invention also provides a corresponding device. According to the technical scheme, the waste of thread and internal memory can be avoided, internal memory fragments can be prevented from generating, the efficiency of a server system can be improved, the multiple clients visiting a server can be effectively managed, and the security is high.
Description
Technical field
The present invention relates to transformer station's technical field, be specifically related to a kind of method and apparatus of managing the multi-client visit.
Background technology
The IEC61850 standard that International Electrotechnical Commission (International Electro technical Commission) formulates has become the international standard of substation communication network and system.The client/server traffic model is that the equipment room that the IEC61850 standard provides is set up and the mechanism that keeps being connected, and the mechanism that realizes access control.A physical unit can comprise one or more servers, and a server can be a plurality of clients provides service, and the content that server comprises is defined as visual with addressable.
In order to ensure moving with efficient in order of transformer substation system, be necessary comprising the physical unit end of server, the client of visiting is managed.At present, the management to client has following several kinds of modes:
First kind of mode is that server is that the client of each visit provides service.This kind mode implements simply, but need distribute thread and memory source for the client of each visit, when client is broken off connection, need discharge these resources again, and server system is easy to generate memory fragmentation.In addition, the fail safe of this mode is very poor, and when the client constantly initiated to connect, the resource of system exhausted easily, causes system crash.Simultaneously, because the distribution of system resources such as thread and internal memory and destruction need certain overhead, so the efficient of this mode is also very low.
The second way is the client terminal quantity of visiting simultaneously in the basic limit of first kind of mode.This mode has been avoided the system crash that causes because of resource exhaustion, the fail safe that has improved system, but system still is easy to generate memory fragmentation, and efficient is still very low, and when the client terminal quantity of visiting reaches restriction, the problem of denial of service can occur.
The third mode is the service thread and the memory source of preassignment some in system initialization.This mode defines the maximum quantity of the client of visiting simultaneously, and fail safe is higher.Simultaneously can not produce memory fragmentation, efficient is also higher.But to the bad measurement of the maximum allowable quantity of the client of visiting simultaneously, if quantity Ding Detai is little, occur denial of service easily, client can not get serving timely and effectively; If quantity Ding Detai is big, cause system resource to waste in a large number again easily.
More than several kinds of modes, all have certain defective, can not to the visit a plurality of clients effectively manage.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus of managing the multi-client visit, so that a plurality of clients of access server are more effectively managed.
A kind of method of managing the multi-client visit comprises:
Obtain the Internet protocol IP address that each allows the client of visit in advance, and for each allows the client distribution services thread identification of visiting;
When receiving the access request of client, judge whether to allow to insert said client according to the IP address of the said client of carrying in the said access request;
When being judged as the permission access, start the service thread that said service thread label table shows.
A kind of device of managing the multi-client visit, this device is the device that adopts the IEC of International Electrotechnical Commission 61850 standards, this device comprises:
Acquisition module is used to obtain the Internet protocol IP address that each allows the client of visit;
Distribution module is used to the client distribution services thread identification that each allows visit;
Receiver module is used to receive the access request of client, and the IP address of said client is carried in this access request;
Judge module is used for judging whether to allow to insert said client according to the IP address of said client;
AM access module is used for when said reading module is judged as the permission access, starting the service thread that said service thread label table shows.
The embodiment of the invention adopts and obtains the Internet protocol IP address that each allows the client of visit in advance; And for each allows the client distribution services thread identification of visit; When receiving the access request of client, client-based IP address judges whether to allow the technical scheme of client access; Adopt this technical scheme, the client that only is allowed to could be visited the IEC61850 device, and is safe; And, can avoid the waste of thread and memory source, can avoid generating memory fragmentation, can improve the efficient of server system; Thereby, can more effectively manage a plurality of clients of access server.
Description of drawings
Fig. 1 is the flow chart of the method for the management multi-client visit that provides of the embodiment of the invention;
Fig. 2 is the building-block of logic of the device of the management multi-client visit that provides of the embodiment of the invention.
Embodiment
The embodiment of the invention provides a kind of method of managing multi-client visit, comprising: obtain the Internet protocol IP address that each allows the client of visit in advance, and for each allows the client distribution services thread identification of visiting; Receive the access request of client, the IP address of said client is carried in this access request; IP address according to said client judges whether to allow said client to insert; When being judged as permission, start the service thread that distributes for said client.Adopt embodiment of the invention method, can more effectively manage a plurality of clients of access server.The embodiment of the invention also provides corresponding device thereof.Below be elaborated respectively.
Embodiment one,
Please refer to Fig. 1, the embodiment of the invention provides a kind of method of managing the multi-client visit, comprising:
101, obtain the Internet protocol IP address that each allows the client of visit in advance, and for each allows the client distribution services thread identification of visiting.
In the embodiment of the invention, IEC 61850 devices can comprise an above server, and the operating system of this server operates according to multithreading, and said multithreading comprises a main thread at least, can also comprise more than one and serve thread.Saidly obtain the Internet protocol IP address that each allows the client of visit in advance, and can carry out by main thread for the operation of each client distribution services thread identification that allows to visit.The client of wherein said permission visit is meant the client that needs access server and visited by the server permission, can be confirmed based on actual conditions are artificial by operating personnel, perhaps also can be definite voluntarily based on the rule of presetting by IEC 61850 devices.
In the present embodiment, the server of IEC 61850 devices can obtain the Internet protocol IP address that each allows the client of visit in several ways in advance.For example; Can allow each the IP address configuration of the client of visit IEC 61850 devices to arrive in " allowing visit IP allocation list " of IEC 61850 devices, the IP address that makes server said through reading " allowing to visit the IP allocation list " obtain the client that allows visit.This configuration operation can pass through the front-end configuration instrument, or the manual modification configuration file is realized.
When IEC 61850 devices were initialized, server can distribute client identification for each allows the client of visit based on " allowing visit IP allocation list ".Said client identification is included as the service thread identification (ID) of the service thread of this client distribution at least, can also comprise the communications status sign of this client, and certainly, client ip address also can be regarded as client identification.The server of IEC 61850 devices can be created one " client identification formation " and store client identification; Can store the IP address that each allows the client of visit according to the tabulation mode in " client identification formation ", and service thread identification and service state that corresponding stored is distributed for this client identify.
Said service Thread Id is unique sign of server identification service thread.Server can distribute the thread that service is provided for each client, is called the service thread.Need to prove that at this initialization step, IEC 61850 only installs the distribution services thread identification and gives client, and does not distribute actual service thread and memory source.In fact, service thread and memory source will first during access server, distribute in subsequent client; After the distribution, connect even client is broken off, this service thread also exists always; Install initialization once more up to IEC 61850.
Said communications status sign is used to the signal intelligence of representing that client is current, and this signal intelligence can comprise following four kinds of states:
(1) access state not: client was not visited, and it is invalid to serve thread this moment.
(2) communication normal condition: client inserts, is carrying out normal services request.
(3) communication off-state: client is initiatively broken off connection, and server system will stop service to the service thread suspension.
(4) communication fault state: abnormal conditions appear in communication.As: client is not initiatively broken off and being connected, but system does not receive the services request of client for a long time.
IEC 61850 devices can adopt four different characters or numeral to identify above four kinds of states.
When 102, receiving the access request of client, judge whether to allow to insert said client according to the IP address of the said client of carrying in the said access request.
Server is through the establishment server socket, and lasting this socket of monitoring, and receives the access request that client is sent.Carry the IP address of client in this access request.
Because server has obtained the Internet protocol IP address of the client of each permission visit in advance, therefore, server can judge whether the current client of sending the request of access is the client that allows access according to the IP address.Concrete; Server can scan " client identification formation ", and the IP address and the said client identification formation of said client compared, and checks wherein whether store the IP address that is complementary with current IP address of sending the client of the request of access; If have; Then explanation allows to insert this client, if do not have, explains not allow to insert this client.Said be complementary can be meant usually identical.When being judged as when not allowing to insert said client, directly refuse this client and insert, and the response message that sends " inserting wrong " getting final product to client.
103, when being judged as the permission access, start the service thread that said service thread label table shows.
Judging the current client of sending the request of access when server is when allowing the client of access, can insert said client through starting to said client service thread that distribute, that said service thread label table shows, and detailed process is following:
Server is judged when allowing to insert, and at first from said client identification formation, is retrieved as the service thread identification that said client is distributed.Then, check further whether this service thread identification is effective.If it is invalid to serve thread identification, represent that this client is to insert for the first time, server needs client distribution services thread and memory source for this reason, and this newly assigned service thread is identified by the service Thread Id of allocating in advance to client.If it is effective to serve thread identification; Represent that then this client once inserted; Server need not to redistribute service thread and memory source, only need the service thread of correspondence be bound with the communication socket of creating for this client again, to reinitializing of some correlated variabless.Wherein, server can identify to check whether this service thread is effective through discerning the corresponding communications status of this service thread identification, for example; If service thread label table shows is access state not; Then this service thread identification of explanation is invalid, otherwise, explain that this service thread identification is effective.
At last, startup of server is the service thread that said client is distributed, and gives this service thread process the access request of client, realizes inserting this client; Follow-up, other services request of client is all transferred to this service thread process; The main thread of server then continues to monitor socket, and whether detect has new client to send the request of access.
To sum up; The embodiment of the invention provides a kind of method of managing the multi-client visit; This method adopts and obtains the Internet protocol IP address that each allows the client of visit in advance; And, when receiving the access request of client, judge whether to allow to insert the technical scheme of client according to the IP address of client for each allows the client distribution services thread identification of visit; Adopt this technical scheme, the client that only is allowed to could be visited the IEC61850 device, and fail safe is higher; Server is only served sharing out the work of thread and memory source when client asks to insert first, ask if the client that is allowed to is never sent to insert, then always can distribution services thread and memory source, stopped the wasting of resources; The service thread and the memory source that distribute when inserting first can exist always; When client inserts once more; The just binding again of communication socket and the work that reinitializes of some variablees; Thread and the memory source of having avoided client to insert repeatedly, take place when breaking off distributes, the process of destruction, thereby improves system works efficient, and avoids generating memory fragmentation.
Embodiment two,
Please refer to Fig. 2, the embodiment of the invention also provides a kind of device of managing the multi-client visit, and this device is the device that adopts the IEC of International Electrotechnical Commission 61850 standards, and this device comprises:
In a preferred embodiment; Said acquisition module 201; Specifically can be used for reading the Internet protocol IP address that each allows the client of visit, store the IP address of the client that allows visit in the said permission visit IP allocation list from pre-configured permission visit IP allocation list.
In a preferred embodiment, said device can also comprise: create module; At this moment, said distribution module also is used to the client allocate communications status indicator that each allows visit; Said establishment module then is used to create the client identification formation, stores the IP address of the client that allows visit in the said client identification formation and the service thread identification and the communications status that distribute for this client identify.
In a preferred embodiment, said judge module 204 can comprise:
Comparing unit is used for the IP address and the said client identification formation of said client are compared;
Judging unit is used for when said client identification formation stores the IP address identical with the IP address of said client, is judged as to allow to insert said client.
In a preferred embodiment,
Said judge module also is used for further judging whether said service thread identification is effective;
Said distribution module also is used for if said service thread identification is invalid, then is said client distribution services thread and memory source, and the service thread of this distribution is represented by said service thread identification;
Said AM access module comprises: bind unit and start unit;
Said binding unit is used for if said service thread identification is effective, and then that this effective service thread identification is represented service thread is bound with the communication socket of creating in advance;
Said start unit is used to start the service thread that said service thread label table shows.
To sum up; The embodiment of the invention provides a kind of device of managing the multi-client visit; This device can obtain each Internet protocol IP address that allows the client of visit in advance; And, when receiving the access request of client, judge whether to allow to insert client according to the IP address of client for each allows the client distribution services thread identification of visit; This device can comprise a plurality of servers, adopts this device, and the client that only is allowed to could be visited the IEC61850 device, and fail safe is higher; Server is only served sharing out the work of thread and memory source when client asks to insert first, ask if the client that is allowed to is never sent to insert, then always can distribution services thread and memory source, stopped the wasting of resources; The service thread and the memory source that distribute when inserting first can exist always; When client inserts once more; The just binding again of communication socket and the work that reinitializes of some variablees; Thread and the memory source of having avoided client to insert repeatedly, take place when breaking off distributes, the process of destruction, thereby improves system works efficient, and avoids generating memory fragmentation.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description can accomplish through hardware; Also can accomplish through the relevant hardware of program command; This program can be stored in the computer-readable recording medium, and storage medium can comprise: read-only memory, random-access memory, disk or CD etc.
More than the method and the device of management multi-client that the embodiment of the invention provided visit carried out detailed introduction, but the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof, should not be construed as limitation of the present invention.The technical staff in present technique field is in the technical scope that the present invention discloses, and the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.
Claims (10)
1. a method of managing the multi-client visit is characterized in that, comprising:
Obtain the Internet protocol IP address that each allows the client of visit in advance, and for each allows the client distribution services thread identification of visiting;
When receiving the access request of client, judge whether to allow to insert said client according to the IP address of the said client of carrying in the said access request;
When being judged as the permission access, start the service thread that said service thread label table shows.
2. method according to claim 1 is characterized in that, the described Internet protocol IP address that obtains the client of each permission visit comprises:
From pre-configured permission visit IP allocation list, read the IP address that each allows the client of visit, store the IP address of the client that allows visit in the said permission visit IP allocation list.
3. method according to claim 1 is characterized in that, described IP address according to the said client of carrying in the said access request also comprises before judging whether to allow to insert said client:
For each allows the client allocate communications status indicator of visit;
Create the client identification formation, store the IP address of the client that allows visit in the said client identification formation and the service thread identification and the communications status that distribute for this client identify.
4. method according to claim 3 is characterized in that, described IP address according to the said client of carrying in the said access request judges whether that allowing to insert said client comprises:
The IP address and the said client identification formation of said client are compared;
When in said client identification formation, storing the IP address identical, be judged as and allow to insert said client with the IP address of said client.
5. according to claim 1,2,3 or 4 described methods, it is characterized in that described being judged as when allow inserting starts the service thread that said service thread label table shows and comprise:
Further judge whether said service thread identification is effective;
If said service thread identification is invalid, then be said client distribution services thread and memory source, the service thread of this distribution is represented by said service thread identification;
If said service thread identification is effective, then that this effective service thread identification is represented service thread is bound with the communication socket of creating in advance;
Start the service thread that said service thread label table shows then.
6. manage the device that multi-client is visited for one kind, this device is the device that adopts the IEC61850 of International Electrotechnical Commission standard, it is characterized in that this device comprises:
Acquisition module is used to obtain the Internet protocol IP address that each allows the client of visit;
Distribution module is used to the client distribution services thread identification that each allows visit;
Receiver module is used to receive the access request of client, and the IP address of said client is carried in this access request;
Judge module is used for judging whether to allow to insert said client according to the IP address of said client;
AM access module is used for when said reading module is judged as the permission access, starting the service thread that said service thread label table shows.
7. device according to claim 6 is characterized in that:
Said acquisition module specifically is used for reading the Internet protocol IP address that each allows the client of visit from pre-configured permission visit IP allocation list, stores the IP address of the client that allows visit in the said permission visit IP allocation list.
8. device according to claim 6 is characterized in that, also comprises: create module;
Said distribution module also is used to the client allocate communications status indicator that each allows visit;
Said establishment module is used to create the client identification formation, stores the IP address of the client that allows visit in the said client identification formation and the service thread identification and the communications status that distribute for this client identify.
9. device according to claim 8 is characterized in that, said judge module comprises:
Comparing unit is used for the IP address and the said client identification formation of said client are compared;
Judging unit is used for when said client identification formation stores the IP address identical with the IP address of said client, is judged as to allow to insert said client.
10. according to claim 6,7,8 or 9 described devices, it is characterized in that:
Said judging unit also is used for further judging whether said service thread identification is effective;
Said distribution module also is used for if said service thread identification is invalid, then is said client distribution services thread and memory source, and the service thread of this distribution is represented by said service thread identification;
Said AM access module comprises: bind unit and start unit;
Said binding unit is used for if said service thread identification is effective, and then that this effective service thread identification is represented service thread is bound with the communication socket of creating in advance;
Said start unit is used to start the service thread that said service thread label table shows.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210213191.0A CN102710452B (en) | 2012-06-26 | 2012-06-26 | Method and device for managing visit of multiple clients |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210213191.0A CN102710452B (en) | 2012-06-26 | 2012-06-26 | Method and device for managing visit of multiple clients |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102710452A true CN102710452A (en) | 2012-10-03 |
CN102710452B CN102710452B (en) | 2014-12-17 |
Family
ID=46903022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210213191.0A Expired - Fee Related CN102710452B (en) | 2012-06-26 | 2012-06-26 | Method and device for managing visit of multiple clients |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102710452B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243253A (en) * | 2014-09-28 | 2014-12-24 | 福建星网锐捷安防科技有限公司 | Method and system for controlling client access equipment |
CN105808349A (en) * | 2016-03-03 | 2016-07-27 | 甘肃省电力公司风电技术中心 | Design method for large-scale wind power real-time monitoring data flow ring buffer |
CN106209513A (en) * | 2016-07-12 | 2016-12-07 | 积成电子股份有限公司 | IEC 61850 multi-client implementation method based on burse mode |
CN107450978A (en) * | 2016-05-31 | 2017-12-08 | 北京京东尚科信息技术有限公司 | The thread management method and device of distributed system |
CN109614294A (en) * | 2018-12-14 | 2019-04-12 | 河南飙风信息科技有限公司 | Enterprise's log analysis access system |
CN112433865A (en) * | 2020-11-23 | 2021-03-02 | 清创网御(合肥)科技有限公司 | Resource calling method based on threft frame threeadpool mode |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101923678A (en) * | 2010-07-30 | 2010-12-22 | 武汉天喻信息产业股份有限公司 | Data security protection method of enterprise management software |
CN102340410A (en) * | 2010-07-21 | 2012-02-01 | 中兴通讯股份有限公司 | Cluster management system and method |
-
2012
- 2012-06-26 CN CN201210213191.0A patent/CN102710452B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340410A (en) * | 2010-07-21 | 2012-02-01 | 中兴通讯股份有限公司 | Cluster management system and method |
CN101923678A (en) * | 2010-07-30 | 2010-12-22 | 武汉天喻信息产业股份有限公司 | Data security protection method of enterprise management software |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243253A (en) * | 2014-09-28 | 2014-12-24 | 福建星网锐捷安防科技有限公司 | Method and system for controlling client access equipment |
CN104243253B (en) * | 2014-09-28 | 2018-01-12 | 福建星网物联信息***有限公司 | The control method and system of a kind of client access device |
CN105808349A (en) * | 2016-03-03 | 2016-07-27 | 甘肃省电力公司风电技术中心 | Design method for large-scale wind power real-time monitoring data flow ring buffer |
CN107450978A (en) * | 2016-05-31 | 2017-12-08 | 北京京东尚科信息技术有限公司 | The thread management method and device of distributed system |
CN106209513A (en) * | 2016-07-12 | 2016-12-07 | 积成电子股份有限公司 | IEC 61850 multi-client implementation method based on burse mode |
CN106209513B (en) * | 2016-07-12 | 2019-03-29 | 积成电子股份有限公司 | 61850 multi-client implementation method of IEC based on burse mode |
CN109614294A (en) * | 2018-12-14 | 2019-04-12 | 河南飙风信息科技有限公司 | Enterprise's log analysis access system |
CN112433865A (en) * | 2020-11-23 | 2021-03-02 | 清创网御(合肥)科技有限公司 | Resource calling method based on threft frame threeadpool mode |
Also Published As
Publication number | Publication date |
---|---|
CN102710452B (en) | 2014-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102710452A (en) | Method and device for managing visit of multiple clients | |
US8842697B2 (en) | Method and device for allocating MAC addresses in a carrier-current communication network | |
CN102025798B (en) | Address allocation processing method, device and system | |
CN100452715C (en) | Intelligent terminal managing method | |
EP3073676B1 (en) | Method, apparatus and system for controlling auto-provisioning of network device | |
CN103580880B (en) | Method, equipment and system abnormal a kind of fast notification CGN | |
CN102263667B (en) | Network management system and network management processing method | |
CN102413203A (en) | IP (Internet Protocol) address allocation method and device | |
CN104604193A (en) | Auto management of a virtual device context enabled network infrastructure | |
CN102959912A (en) | Prioritized transfer of data telegrams | |
CN103828333A (en) | IP address distribution system and IP address distribution method | |
CN102025574B (en) | Cable modem termination system and method | |
CN105704042A (en) | Message processing method, BNG and BNG cluster system | |
CN102695194A (en) | Element management system and method and system for self-configuration of eNodeBs | |
CN110401651A (en) | A kind of distributed type assemblies node monitoring method, apparatus and system | |
CN103414641B (en) | Neighbor table item release, device and the network equipment | |
CN101237460B (en) | Processing method, system and device upon lease status change of DHCP Server | |
CN106357723A (en) | Synchronous system and method for multi-cluster information caching based on cloud host | |
CN105072145A (en) | IOT (Internet of Things) communication method and system | |
CN104009961A (en) | PPPoE session ID distribution method and equipment thereof | |
CN102638396B (en) | Load balancing method and device | |
CN102571511A (en) | Local area network access control system and method, and server | |
CN105337766A (en) | Network element automatic discovery method and system based on DHCP | |
CN102523316B (en) | A kind of address distribution method and equipment | |
CN104468729A (en) | Dynamic-IP-based remotely-monitored CD-R machine control upgrading method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C56 | Change in the name or address of the patentee | ||
CP03 | Change of name, title or address |
Address after: 518057 Nanshan District high tech Industrial Village, Guangdong, R2,, B5 Patentee after: Farad Electric Co., Ltd. Address before: 518110 Nanshan District high tech Industrial Village, Guangdong, R2,, B5 Patentee before: Shenzhen Hualite Electric Appliances Co., Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141217 Termination date: 20200626 |