CN102932361A - Method and system for achieving dynamic interface - Google Patents

Method and system for achieving dynamic interface Download PDF

Info

Publication number
CN102932361A
CN102932361A CN2012104448179A CN201210444817A CN102932361A CN 102932361 A CN102932361 A CN 102932361A CN 2012104448179 A CN2012104448179 A CN 2012104448179A CN 201210444817 A CN201210444817 A CN 201210444817A CN 102932361 A CN102932361 A CN 102932361A
Authority
CN
China
Prior art keywords
server
interface
api interface
client
message
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.)
Pending
Application number
CN2012104448179A
Other languages
Chinese (zh)
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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network Technology Co Ltd
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 Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN2012104448179A priority Critical patent/CN102932361A/en
Publication of CN102932361A publication Critical patent/CN102932361A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a method and a system for achieving a dynamic interface. The method comprises that an interface server receives and analyses messages sent by a client, whether an application program interface (API) interface corresponding to the messages is stored locally, if the API interface corresponding to the messages is stored locally, the interface server transmits the messages to a business processing server for processing, a control server generates new APP interface information in accordance with a preset strategy, the new API interface information is sent to the client, the interface server and the business processing server respectively, and the client, the interface server and the business processing server update API interfaces corresponding to local storage in accordance with the received new API interface information.

Description

A kind of method and system that realize dynamic socket
Technical field
The invention belongs to the instant messaging field, relate in particular to a kind of method and system that realize dynamic socket.
Background technology
Along with the continuous progress of Network Society, increasing immediate communication tool is applied in work and the life, such as Fetion, MSN and some enterprise version application software etc.In instant communications applications, the stability of server is even more important.In the practical application, the hacker adopts the mode of " Denial of Service attack ", by send a large amount of legitimate request to server, carries out malicious attack, causes server resource to exhaust, and can not make response to normal service request.Cause puzzlement for user's normal use, and had a strong impact on the service quality of instant messaging.
Summary of the invention
The invention provides a kind of method and system of dynamic socket that realize to address the above problem.
The invention provides a kind of method that realizes dynamic socket, may further comprise the steps.Interface server receives and resolves the message that client sends, and judges local api interface corresponding to described message of whether storing.If, described interface server is transmitted to Service Process Server with described message and processes, wherein Control Server generates new api interface information according to preset strategy, and described new api interface information is sent to respectively described client, interface server and Service Process Server, described client, interface server and Service Process Server are respectively according to the corresponding A PI interface of the local storage of described new api interface information updating that receives.
The invention provides a kind of system that realizes dynamic socket, comprise client, interface server, Service Process Server and Control Server, described client connects described interface server, described interface server connects described Service Process Server, and described Control Server connects respectively described client, interface server and Service Process Server.Described client is used for sending message to described interface server, and the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server.Described interface server, be used for receiving and resolving the message that described client sends, and judge whether this locality has stored api interface corresponding to described message, if, described message is transmitted to Service Process Server, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server.Described Service Process Server for the treatment of the message that described interface server is transmitted, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server.Described Control Server is used for generating new api interface information according to preset strategy, and described new api interface information is sent to respectively client, interface server and Service Process Server.
Compared to prior art, according to the method and system of realization dynamic socket provided by the invention, interface server receives and resolves the message that client sends, and judges local api interface corresponding to described message of whether storing.By the judgement of interface server, guaranteed the safety of Service Process Server.If there is corresponding api interface interface server this locality, then message is transmitted to Service Process Server and processes.Wherein Control Server generates new api interface information according to preset strategy, and new api interface information is sent to respectively client, interface server and Service Process Server, client, interface server and Service Process Server are respectively according to the corresponding A PI interface of the local storage of described new api interface information updating that receives.So, effectively stop the malicious attack of hacker to server, improved server stability.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Figure 1 shows that the flow chart of the method for the realization dynamic socket that preferred embodiment according to the present invention provides;
Figure 2 shows that the schematic diagram of the system of the realization dynamic socket that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter also describe in conjunction with the embodiments the present invention in detail with reference to accompanying drawing.Need to prove that in the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Figure 1 shows that the flow chart of the method for the realization dynamic socket that preferred embodiment according to the present invention provides.As shown in Figure 1, the method for the realization dynamic socket that provides of preferred embodiment of the present invention comprises step 101 ~ 102.
Step 101: interface server receives and resolves the message that client sends, and judges local api interface corresponding to described message of whether storing.
Particularly, client stores the first api interface table, interface server is stored the second api interface table.Described the first api interface table comprises connection name, api interface information, interface server title, interface server IP and port numbers.The second api interface table storage api interface information.Arbitrary moment after client and interface server connect, if client needs to send message to interface server, described client is searched the api interface information corresponding with message to be sent in the first api interface table, and determines to send the connection of described message, interface server IP and the port numbers of the described message of reception according to described api interface information.After interface server receives and resolves described message, obtain api interface corresponding to described message, and search in the second local api interface table whether store described api interface.
Step 102: if, described interface server is transmitted to Service Process Server with described message and processes, wherein Control Server generates new api interface information according to preset strategy, and described new api interface information is sent to respectively described client, interface server and Service Process Server, described client, interface server and Service Process Server are respectively according to the corresponding A PI interface of the local storage of described new api interface information updating that receives.
Particularly, interface server is resolved after described message obtains corresponding api interface, judge local api interface corresponding to described message of whether storing, if, described interface server is transmitted to Service Process Server with described message and processes, if not, described interface server abandons described message, and being connected of disconnection and described client.
In said process, Control Server generates new api interface information according to preset strategy, and described preset strategy is that Control Server timing or not timing generate new api interface information according to predetermined format.For example, if described predetermined format is to add underscore and current time after former api interface information, Control Server on October 29th, 2012 13:36:56 press predetermined format and generate new api interface information, then former interface message for example Login become Login_20121029133656, similarly, other interface message is all done identical change in the 3rd api interface table.In this, described predetermined format can also can arrange as required separately for add temporal information, GUID information or random number behind former api interface, yet to this present invention and be not construed as limiting.
In this, described Control Server is stored the 3rd api interface table, after Control Server generates new api interface information, upgrade described the 3rd api interface table, and described new api interface information is sent to respectively client, interface server and Service Process Server.The interface compilation device is set respectively, in order to compile described new api interface information in described client, interface server and the Service Process Server.Wherein, after the interface compilation device of described client and interface server compiles described new api interface information, upgrade respectively each self-corresponding the first api interface table and second api interface table.After the interface compilation device of described Service Process Server compiles described new api interface information, process according to the message that described new api interface information butt joint mouth server is transmitted.In present embodiment, described interface compilation device is arranged at the inside of described client and server, and in other embodiment, described interface compilation device also can be arranged at the outside of client or server, yet, to this present invention and be not construed as limiting.
For example, be connected if client has been set up respectively 3 with 3 interface servers, and the first api interface table example of described client is as shown in table 1.
Connection name Api interface information The interface server title Interface server IP Port numbers
Socket1 Login、Loginout Interface server 1 202.91.251.130 80
Socket2 Text、Group Interface server 2 202.91.251.131 80
Socket3 NoticeOnline、License Interface server 3 202.91.251.132 80
Table 1
In present embodiment, 3 corresponding the second api interface tables separately of interface server difference, according to table 1, the second api interface table example of interface server 1 correspondence is as shown in table 2, the second api interface table example of interface server 2 correspondences is as shown in table 3, and the second api interface table example of interface server 3 correspondences is as shown in table 4.
Api interface information
Login
Loginout
Table 2
Api interface information
Text
Group
Table 3
Api interface information
NoticeOnline
License
Table 4
The 3rd api interface table example of Control Server is as shown in table 5.
Api interface information
Login
Loginout
Text
Group
NoticeOnline
License
Table 5
In present embodiment, if client need send and the corresponding message of Login interface, then in table 1, search connection Socket1 corresponding to described Login interface, and be 202.91.251.130 by connecting Socket1 to interface server 1(interface server IP, port numbers 80) send corresponding message.After interface server 1 is resolved described message, obtain corresponding api interface information, and in table 2, find the Login interface, then described message is transmitted to Service Process Server, process described message by Service Process Server.
In a certain moment afterwards, if Control Server generates new api interface information, and the api interface information after will upgrading sends to respectively client, 3 interface servers and Service Process Server.Described client updating form 1, interface server 1 updating form 2, interface server 2 updating forms 3, interface server 3 updating forms 4.If client sends message again, then need according to the api interface information after upgrading in the table 1.If there is the hacker still to send and the corresponding message of Login interface according to the api interface information before upgrading, then interface server 1 does not find the Login interface in table 2, will abandon described message, and direct being connected of disconnection and described hacker.
Figure 2 shows that the schematic diagram of the system of the realization dynamic socket that preferred embodiment according to the present invention provides.As shown in Figure 2, the system of the realization dynamic socket that preferred embodiment of the present invention provides comprises client 201, interface server 202, Service Process Server 203 and Control Server 204, described client 201 connects described interface server 202, described interface server 202 connects described Service Process Server 203, and described Control Server 204 connects respectively described client 201, interface server 202 and Service Process Server 203.Described client 201 is used for sending message to described interface server 202, and the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server 204.Described interface server 202, be used for receiving and resolving the message that described client 201 sends, and judge whether this locality has stored api interface corresponding to described message, if, described message is transmitted to Service Process Server 203, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server 204.Described Service Process Server 203 for the treatment of the message that described interface server 202 is transmitted, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server 204.Described Control Server 204 is used for generating new api interface information according to preset strategy, and described new api interface information is sent to respectively client 201, interface server 202 and Service Process Server 203.Operating process about said system is described with above-mentioned method, so repeat no more in this.
In sum, the method and system of the realization dynamic socket that preferred embodiment provides according to the present invention, interface server receives and resolves the message that client sends, and judges local api interface corresponding to described message of whether storing.By the judgement of interface server, guaranteed the safety of Service Process Server.If there is corresponding api interface interface server this locality, then message is transmitted to Service Process Server and processes.Wherein Control Server generates new api interface information according to preset strategy, and new api interface information is sent to respectively client, interface server and Service Process Server, client, interface server and Service Process Server are respectively according to the corresponding A PI interface of the local storage of described new api interface information updating that receives.So, effectively stop the malicious attack of hacker to server, improved server stability.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a method that realizes dynamic socket is characterized in that, may further comprise the steps:
Interface server receives and resolves the message that client sends, and judges local api interface corresponding to described message of whether storing;
If described interface server is transmitted to Service Process Server with described message and processes,
Wherein Control Server generates new api interface information according to preset strategy, and described new api interface information is sent to respectively described client, interface server and Service Process Server, described client, interface server and Service Process Server are respectively according to the corresponding A PI interface of the local storage of described new api interface information updating that receives.
2. method according to claim 1 is characterized in that, described preset strategy is that described Control Server timing or not timing generate new api interface information according to predetermined format.
3. method according to claim 1 is characterized in that, does not locally store api interface corresponding to described message if described interface server is judged, described interface server abandons described message, and being connected of disconnection and described client.
4. method according to claim 1 is characterized in that, described client stores the first api interface table, and described interface server is stored the second api interface table, and described Control Server is stored the 3rd api interface table.
5. method according to claim 4, it is characterized in that, after described Control Server generates new api interface information, upgrade described the 3rd api interface table, and described client and interface server upgrade respectively described the first api interface table and the second api interface table according to the new api interface information that described Control Server sends.
6. system that realizes dynamic socket, it is characterized in that, comprise client, interface server, Service Process Server and Control Server, described client connects described interface server, described interface server connects described Service Process Server, described Control Server connects respectively described client, interface server and Service Process Server
Described client is used for sending message to described interface server, and the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server;
Described interface server, be used for receiving and resolving the message that described client sends, and judge whether this locality has stored api interface corresponding to described message, if, described message is transmitted to Service Process Server, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server;
Described Service Process Server for the treatment of the message that described interface server is transmitted, also is used for the local corresponding A PI of the new api interface information updating interface that sends according to described Control Server;
Described Control Server is used for generating new api interface information according to preset strategy, and described new api interface information is sent to respectively client, interface server and Service Process Server.
CN2012104448179A 2012-11-09 2012-11-09 Method and system for achieving dynamic interface Pending CN102932361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104448179A CN102932361A (en) 2012-11-09 2012-11-09 Method and system for achieving dynamic interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104448179A CN102932361A (en) 2012-11-09 2012-11-09 Method and system for achieving dynamic interface

Publications (1)

Publication Number Publication Date
CN102932361A true CN102932361A (en) 2013-02-13

Family

ID=47647063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104448179A Pending CN102932361A (en) 2012-11-09 2012-11-09 Method and system for achieving dynamic interface

Country Status (1)

Country Link
CN (1) CN102932361A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009012729A1 (en) * 2007-07-26 2009-01-29 Huawei Technologies Co., Ltd. A method, system and device for converting the network access authentication
CN102099802A (en) * 2008-07-28 2011-06-15 索尼公司 Client device, information processing system and associated methodology of accessing networked sevices
CN102355500A (en) * 2011-10-08 2012-02-15 中兴通讯股份有限公司 Business pushing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009012729A1 (en) * 2007-07-26 2009-01-29 Huawei Technologies Co., Ltd. A method, system and device for converting the network access authentication
CN102099802A (en) * 2008-07-28 2011-06-15 索尼公司 Client device, information processing system and associated methodology of accessing networked sevices
CN102099828A (en) * 2008-07-28 2011-06-15 索尼公司 Client device and associated methodology of accessing networked services
CN102355500A (en) * 2011-10-08 2012-02-15 中兴通讯股份有限公司 Business pushing method and device

Similar Documents

Publication Publication Date Title
CN102739720B (en) Distributed cache server system and application method thereof, cache clients and cache server terminals
CN102970362B (en) The method of a kind of high in the clouds data sharing and device
CN108881354B (en) Push information storage method and device, server and computer storage medium
CN103973461A (en) Notification message pushing method and message server
CN111246453A (en) Data transmission method, user plane network element and control plane network element
CN102685270A (en) Method and equipment for distributing dynamic addresses
CN104580085A (en) Business data updating method, system, client side and server
CN102130853A (en) Group message interaction realization method and system
CN102638789B (en) Method for establishing point-to-point transmission and mobile communication system
CN103312708A (en) Lease file based IP (internet protocol) setting method and system
CN102185699A (en) Group information interaction method and system for community platform
CN102984261B (en) Network service login method, equipment and system based on mobile telephone terminal
CN1863193B (en) Method for implementing safety tactics of network safety apparatus
CN101888600A (en) Method and device for concealing subscriber number
CN107707689A (en) A kind of DHCP message processing method, Dynamic Host Configuration Protocol server and gateway device
CN102932360A (en) Method and system for updating interface dynamically
CN103581353A (en) Method and system of automatic configuration of gateway device
US10680930B2 (en) Method and apparatus for communication in virtual network
CN102137038A (en) Group information interaction method and system based on community platform
CN105790944A (en) Wechat-based network authentication method and device
CN104301294B (en) A kind of response method, device and the network side equipment of DNS query request
CN103051484A (en) Method and system for processing session service and session border controller
CN103595711A (en) Adjusting safety access method and exchanger
CN106453693A (en) IP address allocation method and apparatus
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130213