CN104836798A - Method and device for maintaining client connection information - Google Patents

Method and device for maintaining client connection information Download PDF

Info

Publication number
CN104836798A
CN104836798A CN201510177729.0A CN201510177729A CN104836798A CN 104836798 A CN104836798 A CN 104836798A CN 201510177729 A CN201510177729 A CN 201510177729A CN 104836798 A CN104836798 A CN 104836798A
Authority
CN
China
Prior art keywords
client
lane place
management table
connection management
preallocated
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
CN201510177729.0A
Other languages
Chinese (zh)
Other versions
CN104836798B (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.)
National Computer Network and Information Security Management Center
Original Assignee
National Computer Network and Information Security Management Center
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 National Computer Network and Information Security Management Center filed Critical National Computer Network and Information Security Management Center
Priority to CN201510177729.0A priority Critical patent/CN104836798B/en
Publication of CN104836798A publication Critical patent/CN104836798A/en
Application granted granted Critical
Publication of CN104836798B publication Critical patent/CN104836798B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and device for maintaining client connection information. The method comprises: establishing a connection management table; and distributing a fixed position section for a client in the connection management table after receiving a connection request sent from the client, and storing the identification information and active time information of the client in the position section. According to the method and the device, after the connection management table is established and the connection request sent from the client is received, the fixed position section is distributed for the client in the connection management table; and the identification information and active time information of the client are stored in the position section. A remote control switch in the invention is simple in structure and may effectively solve a problem of disordered connection information of a client connection table in the prior art.

Description

A kind of method of maintain customer end link information and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and device of maintain customer end link information.
Background technology
In network communication field, most of application software system takes client-side/server-side architecture, how a problem in the link information of service end reasonable management client always, if preserve unreasonable to client's side link information, probably cause client-side information managerial confusion, thus the connection affecting client is experienced.
The method of current existing client's side link information management: during common customer end connection server, client sends authentication information, authorization information, by after client validation information, is kept in local connection table record (array or chained list) by server.When client needs to inquire about, usually issue some configuration informations by client to server, server is inquired about these configuration informations, and Query Result is returned client, but after if a certain index in connection table uses for a long time, may before and after distribute to two even multiple clients.So, when customer end B may be caused to inquire about some information, result is shown as the configuration result of customer end A.Like this, link information will be caused to cause confusion.
Summary of the invention
In view of above-mentioned analysis, the present invention aims to provide a kind of method and device of maintain customer end link information, in order to solve the problem of the link information confusion of client's side link table in prior art.
For solving the problem, the present invention is mainly achieved through the following technical solutions:
One aspect of the present invention provides a kind of method of maintain customer end link information, and the method comprises:
Connect management table;
After receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
Preferably, the method also comprises:
Determine the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
Preferably, the method also comprises: arrange in described connection management table between preallocated lane place;
Described after receiving the connection request that client sends, for before this client distributes the step between fixing lane place in described connection management table, also comprise:
Described client is stored in described preallocated lane place.
Preferably, the present invention, when described client being stored in after in described preallocated lane place, described step of distributing between fixing lane place for this client in described connection management table specifically comprises:
To judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to client active time distance current time duration order the untapped client of maximum duration is eliminated, and by eliminate after lane place between respectively to the client sending connection request.
Preferably, the method also comprises:
According to application scenarios, the maximum number of connections that described client allows is set.
Further aspect of the present invention provides a kind of device of maintain customer end link information, it is characterized in that, comprising:
Build table unit, for the management table that connects;
Allocation units, for after receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
Preferably, this device also comprises:
Eliminate unit, for determining the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
Preferably, described allocation units also for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, then in described connection management table for this client is distributed between fixing lane place.
Preferably, described allocation units specifically for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, to judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to the duration order of client active time distance current time, the untapped client of maximum duration is eliminated, and by eliminate after lane place between distribute to the client sending connection request.
Preferably, this device also comprises:
Setting unit, for arranging the maximum number of connections that described client allows according to application scenarios.
Beneficial effect of the present invention is as follows:
The method of a kind of maintain customer end link information provided by the invention and device, by the management table that connects, and after receiving the connection request that client sends, for this client is distributed between fixing lane place in described connection management table, by storing identification information and the active time information of described client between described lane place, thus effectively can solve the problem of the link information confusion of client's side link table in prior art.
Other features and advantages of the present invention will be set forth in the following description, and the becoming apparent from specification of part, or by implementing the present invention and understanding.Object of the present invention and other advantages realize by structure specifically noted in write specification, claims and accompanying drawing and obtain.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the method for a kind of maintain customer end link information of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the method for the another kind of maintain customer end link information of the embodiment of the present invention;
Fig. 3 is the graph of a relation of the allocation of space of the client of the embodiment of the present invention;
Fig. 4 is the structural representation of the device of a kind of maintain customer end link information of the embodiment of the present invention.
Embodiment
Specifically describe the preferred embodiments of the present invention below in conjunction with accompanying drawing, wherein, accompanying drawing forms the application's part, and together with embodiments of the present invention for explaining principle of the present invention.For purpose of clarity and simplification, when it may make theme of the present invention smudgy, illustrating in detail of known function and structure in device described herein will be omitted.
In order to solve the problem of the link information confusion of prior art client's side link table, the invention provides a kind of method and device of maintain customer end link information, below in conjunction with accompanying drawing and several embodiment, the present invention being further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, do not limit the present invention.
Embodiment of the method
The method of a kind of maintain customer end link information that the embodiment of the present invention provides, see Fig. 1, the method comprises:
S101, connect management table;
S102, after receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
The present invention passes through in connection management table as client is distributed between fixing lane place, by storing identification information and the active time information of described client between this lane place, thus the relatively stable of user profile can be ensured, there will not be the situation of user profile confusion.
The embodiment of the present invention is not limited to connection management table, and those skilled in the art can also by other forms of relevant information of preserving client, as array form etc.
The mode do not covered is adopted in order to solve connection management table in prior art, and the connection letter management table caused is larger, and the problem of space waste, method described in the embodiment of the present invention is by determining the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
That is, the present invention is by arranging superseded time threshold, after the not active time of certain client exceedes this threshold value, the information of this client is deleted from connection management table, thus discharges the free space in connection management table.
Method described in the embodiment of the present invention also comprises: arrange in described connection management table between preallocated lane place, and after receiving the connection request that client sends, described client is stored in described preallocated lane place, namely after receiving connection request, first be temporarily stored in preallocated lane place, then in described connection management table for this client is distributed between fixing lane place.
During concrete enforcement, after receiving the connection request that client sends, described client is stored in preallocated lane place, then to judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to client active time distance current time duration order the untapped client of maximum duration is eliminated, and by eliminate after lane place between respectively to the client sending connection request.
Namely method of the present invention can carry out suitable cleaning according to the state of table and other custom parameters (as superseded time threshold etc.) to connection management table, thus improves the utilance of connection management table.
Method described in the embodiment of the present invention also comprises: arrange according to application scenarios the maximum number of connections that described client allows.
By arranging the maximum number of connections that described client allows according to application scenarios, both the scale of connection management table can have been reduced, thus convenient management, again can Deterministic service end to the service quality of client, server will be caused to occur slack-off or other faults of response speed because of a large amount of appearance connected.
Fig. 2 is the schematic flow sheet of the method for the another kind of maintain customer end link information of the embodiment of the present invention, is described in detail method of the present invention below in conjunction with Fig. 2:
S201, application connection management table space;
The connection request of S202, reception client;
S203, interval to this client pre-dispense position;
S204, to judge in connection management table, between whether available free lane place, if so, then to enter S205, otherwise, enter S206;
This client is given between the lane place of S205, respectively this free time;
S206, use life cycle algorithm, eliminate between the old lane place in connection management table, and give this new client respectively by it.
That is, the present invention is when client is initiated to connect to service end, service end for the user ID in link information in local connection management table between the alternative lane place of preassignment.Then, service end carries out traversing operation in this fragment position interval, search clear position (not namely being assigned with position temporarily), if exist idle, then directly distribute this location index to this client's side link, if there is not clear position between lane place, then all positions that has been assigned with are traveled through, and eliminate a certain connection according to self-defining life cycle algorithm, and the location index of this connection is distributed to new client's side link.The handling process of the method as shown in Figure 2.
A certain size memory headroom of first to file of the present invention is as connection management table; Wherein structure comprises and can be used for distinguishing the information such as the identification information of user and its active time.Suppose that the number of users that may connect is N, each user distributes M link information; For each user, capital has unique subscriber ID to identify, and for each user ID, have in Array for structural body between fixing lane place and distribute to this user ID, such as, being the user of i for user ID, is [i*M+1, (i+1) * M] between its lane place occupied in memory headroom.The allocation of space of each client as shown in Figure 3.
By method of the present invention, even if after system long-play, the connection using same subscriber identification information to initiate is always at fixing position record, and the identification information of the user in record is comparatively fixing, there will not be the situation of user totem information confusion.In addition, the present invention can arrange according to the needs of application scenarios the maximum number of connections that each user allows simultaneously, both the convenient management of scale of management table can have been reduced, again can Deterministic service end to the service quality of client, server will be caused to occur slack-off or other faults of response speed because of a large amount of appearance connected.
Device embodiment
Embodiments provide a kind of device of maintain customer end link information, see Fig. 4, this device comprises interconnectively builds table unit and allocation units;
Build table unit, for the management table that connects;
Allocation units, for after receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
The present invention passes through in connection management table as client is distributed between fixing lane place, by storing identification information and the active time information of described client between this lane place, thus the relatively stable of user profile can be ensured, there will not be the situation of user profile confusion.
Device described in the embodiment of the present invention also comprises: eliminate unit;
Eliminate unit, for determining the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
The information of this client, by arranging superseded time threshold, after the not active time of certain client exceedes this threshold value, is deleted, thus is discharged the free space in connection management table by the present invention from connection management table.
Preferably, described allocation units in the embodiment of the present invention also for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, then in described connection management table for this client is distributed between fixing lane place.
Concrete, described allocation units in the embodiment of the present invention specifically for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, to judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to the duration order of client active time distance current time, the untapped client of maximum duration is eliminated, and by eliminate after lane place between distribute to the client sending connection request.
Namely method of the present invention can carry out suitable cleaning according to the state of table and other custom parameters (as superseded time threshold etc.) to connection management table, thus improves the utilance of connection management table.
Preferably, the device described in the embodiment of the present invention also comprises: setting unit;
Setting unit, for arranging the maximum number of connections that described client allows according to application scenarios.
The maximum number of connections that the present invention allows by arranging described client according to application scenarios, both the scale of connection management table can have been reduced, thus convenient management, again can Deterministic service end to the service quality of client, server will be caused to occur slack-off or other faults of response speed because of a large amount of appearance connected.
Content in the device of the embodiment of the present invention can the related content of reference method part be understood, and does not repeat them here.
The method of a kind of maintain customer end link information provided by the invention and device, at least can bring following beneficial effect:
1, the present invention is by the management table that connects, and after receiving the connection request that client sends, for this client is distributed between fixing lane place in described connection management table, by storing identification information and the active time information of described client between described lane place, thus effectively can solve the problem of the link information confusion of client's side link table in prior art.
2, the present invention can carry out suitable cleaning according to the state of table and other custom parameters (as superseded time threshold etc.) to connection management table, thus improves the utilance of connection management table.
The above; be only the present invention's preferably embodiment, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claims.

Claims (10)

1. a method for maintain customer end link information, is characterized in that, comprising:
Connect management table;
After receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
2. method according to claim 1, is characterized in that, also comprises:
Determine the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
3. method according to claim 2, is characterized in that, also comprises: arrange in described connection management table between preallocated lane place;
Described after receiving the connection request that client sends, for before this client distributes the step between fixing lane place in described connection management table, also comprise:
Described client is stored in described preallocated lane place.
4. method according to claim 3, is characterized in that, when described client being stored in after in described preallocated lane place, described step of distributing between fixing lane place for this client in described connection management table specifically comprises:
To judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to client active time distance current time duration order the untapped client of maximum duration is eliminated, and by eliminate after lane place between respectively to the client sending connection request.
5. according to the method in claim 1-4 described in any one, it is characterized in that, also comprise:
According to application scenarios, the maximum number of connections that described client allows is set.
6. a device for maintain customer end link information, is characterized in that, comprising:
Build table unit, for the management table that connects;
Allocation units, for after receiving the connection request that client sends, for this client is distributed between fixing lane place, by storing identification information and the active time information of described client between described lane place in described connection management table.
7. device according to claim 6, is characterized in that, also comprises:
Eliminate unit, for determining the not active duration of described client according to described active time, after the not active duration of described client is greater than default superseded time threshold, in described connection management table, this client is eliminated.
8. device according to claim 7, is characterized in that,
Described allocation units also for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, then in described connection management table for this client is distributed between fixing lane place.
9. device according to claim 8, is characterized in that,
Described allocation units specifically for, arrange in described connection management table between preallocated lane place, after receiving the connection request that client sends, described client is stored in described preallocated lane place, to judge in described connection management table between whether available free lane place, if had, for described client is distributed between the lane place of this free time, otherwise, according to the duration order of client active time distance current time, the untapped client of maximum duration is eliminated, and by eliminate after lane place between distribute to the client sending connection request.
10. according to the device in claim 6-9 described in any one, it is characterized in that, also comprise:
Setting unit, for arranging the maximum number of connections that described client allows according to application scenarios.
CN201510177729.0A 2015-04-15 2015-04-15 A kind of method and device for safeguarding client link information Expired - Fee Related CN104836798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510177729.0A CN104836798B (en) 2015-04-15 2015-04-15 A kind of method and device for safeguarding client link information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510177729.0A CN104836798B (en) 2015-04-15 2015-04-15 A kind of method and device for safeguarding client link information

Publications (2)

Publication Number Publication Date
CN104836798A true CN104836798A (en) 2015-08-12
CN104836798B CN104836798B (en) 2018-11-20

Family

ID=53814434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510177729.0A Expired - Fee Related CN104836798B (en) 2015-04-15 2015-04-15 A kind of method and device for safeguarding client link information

Country Status (1)

Country Link
CN (1) CN104836798B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826055A (en) * 2010-04-06 2010-09-08 山东高效能服务器和存储研究院 Management method for data cache distribution in Linux system
CN102572799A (en) * 2011-12-29 2012-07-11 华为终端有限公司 Method for acquiring network connection information of client terminal accessing Wi-Fi spot and terminal
CN102902709A (en) * 2012-08-02 2013-01-30 何建亿 Space allocation fixing file memory system and implementation method
CN103365929A (en) * 2012-04-10 2013-10-23 阿里巴巴集团控股有限公司 Management method and management system of database connection
US20140156739A1 (en) * 2010-11-22 2014-06-05 Sony Corporation Client device, information processing method, and information processing system
CN103888492A (en) * 2012-12-20 2014-06-25 鸿富锦精密工业(深圳)有限公司 Memory management system and method
CN103970807A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Method and system for managing database connection

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826055A (en) * 2010-04-06 2010-09-08 山东高效能服务器和存储研究院 Management method for data cache distribution in Linux system
US20140156739A1 (en) * 2010-11-22 2014-06-05 Sony Corporation Client device, information processing method, and information processing system
CN102572799A (en) * 2011-12-29 2012-07-11 华为终端有限公司 Method for acquiring network connection information of client terminal accessing Wi-Fi spot and terminal
CN103365929A (en) * 2012-04-10 2013-10-23 阿里巴巴集团控股有限公司 Management method and management system of database connection
CN102902709A (en) * 2012-08-02 2013-01-30 何建亿 Space allocation fixing file memory system and implementation method
CN103888492A (en) * 2012-12-20 2014-06-25 鸿富锦精密工业(深圳)有限公司 Memory management system and method
CN103970807A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Method and system for managing database connection

Also Published As

Publication number Publication date
CN104836798B (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN102369688B (en) Method for adjusting resources dynamically and scheduling device
CN103281203B (en) A kind of dhcp address allocation management method based on ecos systems
CN103176790A (en) Application releasing method and application releasing system
CN105338297A (en) Video data storage and playback system, device and method
CN100421427C (en) Method for maintenance of neighbor entry
CN110740155B (en) Request processing method and device in distributed system
CN101594376A (en) The method and the corresponding device thereof of device are provided to the CIMOM registering CIM
WO2020197728A3 (en) Cryptography-based platooning mechanism for autonomous vehicle fleet management
JP4797867B2 (en) Message management device for vehicle control system and vehicle control system
CN102387156A (en) Equipment logging treatment method, device and system
CN101308467A (en) Task processing method and device
CN109600721A (en) A kind of communication means and device
CN104639646A (en) Method and equipment for processing user request
US20150006622A1 (en) Web contents transmission method and apparatus
CN103414641A (en) Neighbor table item release method, device and network equipment
AU2001244336A1 (en) Data networks
CN106446050A (en) Method and system for subscription by aiming at changed data of database
CN103812707B (en) A kind of method for processing forwarding of line identification message
CN104519145A (en) An address resource managing method, system and DHCP server
CN110750289B (en) Gray switching state maintaining method for distributed system
CN105337766A (en) Network element automatic discovery method and system based on DHCP
CN102594941B (en) Method for device access and device communication in building intercom system
CN104836798A (en) Method and device for maintaining client connection information
CN105429823B (en) Flux of multicast detection method and device in distributed communication equipment
CN106815334A (en) A kind of data query method and device for terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181120

CF01 Termination of patent right due to non-payment of annual fee