CN106953857A - A kind of server end Multithread management method based on CS frameworks - Google Patents

A kind of server end Multithread management method based on CS frameworks Download PDF

Info

Publication number
CN106953857A
CN106953857A CN201710157658.7A CN201710157658A CN106953857A CN 106953857 A CN106953857 A CN 106953857A CN 201710157658 A CN201710157658 A CN 201710157658A CN 106953857 A CN106953857 A CN 106953857A
Authority
CN
China
Prior art keywords
solicited message
correspondence
server end
current
frameworks
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
CN201710157658.7A
Other languages
Chinese (zh)
Other versions
CN106953857B (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710157658.7A priority Critical patent/CN106953857B/en
Publication of CN106953857A publication Critical patent/CN106953857A/en
Application granted granted Critical
Publication of CN106953857B publication Critical patent/CN106953857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5015Service provider selection

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a kind of server end Multithread management method based on CS frameworks, including step:A, the solicited message that each client is sent is obtained in real time;B, the request method classification for judging current acquired each solicited message in simultaneously partiting step A;C, based in step B it is current divide obtained by request method classification, correspondence call its respective thread set in advance perform in corresponding service, correspondence obtaining step B it is current divide obtained by each request method classify each self-corresponding result;D, correspondingly to each client described in step A return to its each self-corresponding respective handling result.Described solicited message includes head protocols and packet.Head protocols of the step B based on current acquired each solicited message in step A, correspondence judges that request method corresponding with current acquired each solicited message in partiting step A is classified.The present invention can improve the operating rate of server end, moreover it is possible to improve the convenience of server service extension.

Description

A kind of server end Multithread management method based on CS frameworks
Technical field
The present invention relates to field of computer technology, specifically a kind of server end multiple line distance management side based on CS frameworks Method.
Background technology
In CS(Client/Server)Under framework, server end(Server ends)Different tasks are realized, then need to open Move multiple processes and correspond to respective service respectively, that is, there are multiple threads each mainly for the treatment of different clients in server end It is typically that different threads alignment processing different clients are respectively started to send from the solicited message sent, and in the prior art Request, there is a situation where to start the same request sent of multiple threads different clients, this influences clothes to a certain extent The operating rate at business device end, and then the response time of the request to client can be extended to a certain extent.
In addition, having the scheme of multiple line distance management in the prior art, but the service of server end is caused to be difficult to extend, i.e., If service end increase service, process is comparatively laborious, and extension gets up cumbersome, once extension, code is more too fat to move.
This is the deficiencies in the prior art part.
The content of the invention
The technical problems to be solved by the invention are that there is provided a kind of clothes based on CS frameworks in view of the shortcomings of the prior art Business device end Multithread management method, the operating rate for improving server end.The present invention is additionally operable to improve server service The convenience of extension.
In order to solve the above technical problems, the invention provides a kind of server end multiple line distance management side based on CS frameworks Method, including step;
A, the solicited message that each client is sent is obtained in real time;
B, the request method classification for judging current acquired each solicited message in simultaneously partiting step A;
C, based in step B it is current divide obtained by request method classification, correspondence calls its respective thread set in advance to perform phase Each self-corresponding result of each request method classification in the service answered, correspondence obtaining step B obtained by current division;
D, correspondingly to each client described in step A return in its each self-corresponding step C current acquired respective handling As a result.
Wherein, above-mentioned steps B is based on current acquired each solicited message in the step A, and correspondence judges to walk with dividing The corresponding request method classification of currently acquired each solicited message in rapid A.
Wherein, described solicited message includes head protocols and packet.
Wherein, the correspondence described in step B judges ask corresponding with each solicited message currently acquired in partiting step A The method and step for asking mode to classify includes:
Current acquired each solicited message in p1, real time parsing step A, correspondence obtains current acquired each solicited message Head protocols;
P2, each head protocols by correspondence acquisition in step p1, enter with each head protocols in head protocols group set in advance Row contrast, the request method classification of current acquired each solicited message in above-mentioned steps A is judged according to comparative result.
Wherein, described head protocols include:At least one in POST, GET, CMD.
Wherein, described packet includes the IP port values of requesting data information and current data packet correspondence client.
Above-mentioned steps D is based on the IP port values in each solicited message currently sent in step A, correspondence institute into step A Each client stated returns to current acquired respective handling result in its each self-corresponding step C.
Compared with prior art, the advantage of the invention is that:
(1) the server end Multithread management method of the present invention based on CS frameworks, by being connect to server end is current Each solicited message received makes requests on mode and classified processing, classifies afterwards to currently obtaining each request method, and correspondence is called pre- Its respective thread that first sets performs corresponding service, and this avoids need to start that multiple threads different clients send identical please Ask the occurrence of, so as to improve the operating rate of server end to a certain extent, and then can contract to a certain extent Subtract the response time to client request;
(2) solicited message that each client involved in the present invention is sent includes head protocols and packet, in use, logical The head protocols for the current acquired each solicited message for real time parsing are crossed, it is and each in head protocols group set in advance Head protocols are contrasted, and judge that the request method of above-mentioned current acquired each solicited message is classified according to comparative result, Afterwards based on each request method classification is currently obtained, correspondence calls its respective thread set in advance to perform corresponding service, and this is just In management of the server end to its multithreading, and it is easy to the new service of server end increase, it is more practical;
(3) present invention carries out the management of multithreading based on the solicited message that client is sent, and unrelated with design platform, this makes this Requirement to design platform has been broken in invention, be easy to it is cross-platform use, it is more practical.
As can be seen here, compared with prior art, with prominent substantive distinguishing features and significant progress, it is implemented the present invention Beneficial effect be also obvious.
Brief description of the drawings
Fig. 1 is the method flow diagram schematic diagram of the server end Multithread management method of the present invention based on CS frameworks;
Fig. 2 is a kind of specific corresponding to relation schematic diagram that solicited message of the present invention performs corresponding with service with its respective thread.
Embodiment
To make technical scheme and advantage clearer, below in conjunction with accompanying drawing, to technical scheme It is clearly and completely described.
Embodiment 1:
As shown in figure 1, a kind of server end Multithread management method based on CS frameworks of the present invention, including step;
A, the solicited message that each client is sent is obtained in real time;
B, the request method classification for judging current acquired each solicited message in simultaneously partiting step A;
C, based in step B it is current divide obtained by request method classification, correspondence calls its respective thread set in advance to perform phase Each self-corresponding result of each request method classification in the service answered, correspondence obtaining step B obtained by current division;
D, correspondingly to each client described in step A return in its each self-corresponding step C current acquired respective handling As a result.
Wherein, it is the apparent elaboration present invention, with 5 clients(Client 1, client 2, client 3, client End 4 and client 5)Send exemplified by 5 solicited messages, as shown in Fig. 2 each client sends a solicited message, correspondence is remembered For solicited message 1, solicited message 2, solicited message 3, solicited message 4 and solicited message 5, wherein the corresponding requests side of solicited message 1 3, request that 2, solicited message 3 is classified in formula classification 1, the corresponding requests mode of solicited message 2 and the corresponding requests mode of solicited message 5 is classified The corresponding requests mode of information 4 classifies 4, request method classification 1, request method classification 2, request method classification 3 and request method point The one corresponding threading service of respective correspondence of class 4;Request method classification 1, request method classification 2, request method classification 3 and requesting party Formula classification 4 is different, and its corresponding its respective thread service is different.Based on Fig. 2, the present invention to server end by working as Preceding received each solicited message 1,2,3,4 and 5 makes requests on mode and classified processing, afterwards each requesting party to currently obtaining Formula classification 1,2,3 and 4, correspondence calls its respective thread set in advance to perform service accordingly, and correspondence obtains current division gained Each request method classify 1,2,3 and 4 each self-corresponding results, finally corresponding result is returned to each corresponding Client.
In summary, the present invention makes requests on mode by each solicited message currently received to server end and classified Processing, classifies to currently obtaining each request method afterwards, and correspondence calls its respective thread set in advance to perform corresponding service, this Avoid need to start the same request that multiple threads different clients are sent the occurrence of, improve to a certain extent The operating rate of server end, and then the response time to client request is reduced to a certain extent.
Wherein, in the present embodiment, above-mentioned steps B is right based on current acquired each solicited message in the step A It should judge that request method corresponding with current acquired each solicited message in partiting step A is classified;Described request packet Include head protocols and packet.In the present embodiment, described head protocols include POST, GET, CMD, described packet IP port values including requesting data information and current data packet correspondence client.
Wherein, the correspondence described in step B judges ask corresponding with each solicited message currently acquired in partiting step A The method and step for asking mode to classify includes:Current acquired each solicited message in p1, real time parsing step A, correspondence is obtained should The head protocols of current acquired each solicited message;P2, each head protocols by correspondence acquisition in step p1, with presetting Head protocols group in each head protocols contrasted, judge current acquired each in above-mentioned steps A according to comparative result The request method classification of solicited message.Wherein, it is for comparative result, with the corresponding heads in head protocols group set in advance Each solicited message correspondence identical request method classification of agreement identical, and corresponding request method is categorized as the above-mentioned corresponding head Portion's agreement.
To sum up, each solicited message of the present invention is using head protocols and the data structure of packet are included, and it leads to The head protocols for the current acquired each solicited message for real time parsing are crossed, it is and each in head protocols group set in advance Head protocols are contrasted, and judge that the request method of above-mentioned current acquired each solicited message is classified according to comparative result, Afterwards based on each request method classification is currently obtained, correspondence calls its respective thread set in advance to perform corresponding service, and this is just In management of the server end to its multithreading, and it is easy to the new service of server end increase, it is more practical.
In addition, in the present embodiment, above-mentioned steps D is based on the IP ends in each solicited message currently sent in step A Mouth value, correspondence returns to current acquired respective handling knot in its each self-corresponding step C to each client described in step A Really.
To sum up, the present invention not only improves the operating rate of server end to a certain extent, also carries to a certain extent The high convenience of server service extension.And be easy to implement.It is more practical.
In addition, the present invention carries out the management of multithreading based on the solicited message that client is sent, it is unrelated with design platform, This makes the present invention break requirement to design platform, be easy to it is cross-platform use, it is more practical.
Embodiment of above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although implementing with reference to foregoing The present invention is described in detail mode, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent to which part technical characteristic;And these are repaiied Change or replace, the essence of appropriate technical solution is departed from the scope of each embodiment technical scheme of the invention.

Claims (7)

1. a kind of server end Multithread management method based on CS frameworks, it is characterised in that including step;
A, the solicited message that each client is sent is obtained in real time;
B, the request method classification for judging current acquired each solicited message in simultaneously partiting step A;
C, based in step B it is current divide obtained by request method classification, correspondence calls its respective thread set in advance to perform phase Each self-corresponding result of each request method classification in the service answered, correspondence obtaining step B obtained by current division;
D, correspondingly to each client described in step A return in its each self-corresponding step C current acquired respective handling As a result.
2. the server end Multithread management method according to claim 1 based on CS frameworks, it is characterised in that above-mentioned step Rapid B based on current acquired each solicited message in the step A, correspondence judge with it is current in partiting step A acquired in it is each The corresponding request method classification of solicited message.
3. the server end Multithread management method according to claim 2 based on CS frameworks, it is characterised in that described Solicited message includes head protocols and packet.
4. the server end Multithread management method according to claim 3 based on CS frameworks, it is characterised in that step B Described in correspondence judge the method step of request method classification corresponding with each solicited message current acquired in partiting step A Suddenly include:
Current acquired each solicited message in p1, real time parsing step A, correspondence obtains current acquired each solicited message Head protocols;
P2, each head protocols by correspondence acquisition in step p1, enter with each head protocols in head protocols group set in advance Row contrast, the request method classification of current acquired each solicited message in above-mentioned steps A is judged according to comparative result.
5. the server end Multithread management method based on CS frameworks according to after claim 34, it is characterised in that institute The head protocols stated include at least one in POST, GET, CMD.
6. the server end Multithread management method based on CS frameworks according to claim 3 or 4, it is characterised in that institute The packet stated includes the IP port values of requesting data information and current data packet correspondence client.
7. the server end Multithread management method according to claim 6 based on CS frameworks, it is characterised in that above-mentioned step Rapid D is returned based on the IP port values in each solicited message currently sent in step A, correspondence to each client described in step A Return current acquired respective handling result in its each self-corresponding step C.
CN201710157658.7A 2017-03-16 2017-03-16 Server-side multithread management method based on CS framework Active CN106953857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710157658.7A CN106953857B (en) 2017-03-16 2017-03-16 Server-side multithread management method based on CS framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710157658.7A CN106953857B (en) 2017-03-16 2017-03-16 Server-side multithread management method based on CS framework

Publications (2)

Publication Number Publication Date
CN106953857A true CN106953857A (en) 2017-07-14
CN106953857B CN106953857B (en) 2020-03-10

Family

ID=59472478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710157658.7A Active CN106953857B (en) 2017-03-16 2017-03-16 Server-side multithread management method based on CS framework

Country Status (1)

Country Link
CN (1) CN106953857B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN109375998A (en) * 2018-10-11 2019-02-22 上海瀚银信息技术有限公司 A kind of processing method in high concurrent request environment
CN112015494A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Third-party API tool calling method, system and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399843A (en) * 2007-09-27 2009-04-01 中兴通讯股份有限公司 Deepened filtering method for packet
CN101902484A (en) * 2009-05-25 2010-12-01 北京启明星辰信息技术股份有限公司 Method and system for classifying local area network http application services
CN102684988A (en) * 2006-04-26 2012-09-19 日本电信电话株式会社 Load control device and method thereof
CN103763343A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 Method and device for processing service access
CN104135445A (en) * 2014-07-29 2014-11-05 迈普通信技术股份有限公司 Stream-based link aggregation load balancing method and device
CN104468833A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Request information unified processing method and device
CN104572290A (en) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 Method and device for controlling message processing threads
CN104951357A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Parallel user state protocol stack management method and protocol stack system
CN105760234A (en) * 2016-03-17 2016-07-13 联动优势科技有限公司 Thread pool management method and device
CN106020954A (en) * 2016-05-13 2016-10-12 深圳市永兴元科技有限公司 Thread management method and device
US20160321104A1 (en) * 2014-04-03 2016-11-03 Tencent Technology (Shenzhen) Company Limited Method and apparatus for scheduling concurrent task

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684988A (en) * 2006-04-26 2012-09-19 日本电信电话株式会社 Load control device and method thereof
CN101399843A (en) * 2007-09-27 2009-04-01 中兴通讯股份有限公司 Deepened filtering method for packet
CN101902484A (en) * 2009-05-25 2010-12-01 北京启明星辰信息技术股份有限公司 Method and system for classifying local area network http application services
CN104572290A (en) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 Method and device for controlling message processing threads
CN103763343A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 Method and device for processing service access
CN104951357A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Parallel user state protocol stack management method and protocol stack system
US20160321104A1 (en) * 2014-04-03 2016-11-03 Tencent Technology (Shenzhen) Company Limited Method and apparatus for scheduling concurrent task
CN104135445A (en) * 2014-07-29 2014-11-05 迈普通信技术股份有限公司 Stream-based link aggregation load balancing method and device
CN104468833A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Request information unified processing method and device
CN105760234A (en) * 2016-03-17 2016-07-13 联动优势科技有限公司 Thread pool management method and device
CN106020954A (en) * 2016-05-13 2016-10-12 深圳市永兴元科技有限公司 Thread management method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN109375998A (en) * 2018-10-11 2019-02-22 上海瀚银信息技术有限公司 A kind of processing method in high concurrent request environment
CN109375998B (en) * 2018-10-11 2022-07-22 上海瀚银信息技术有限公司 Processing method in high-concurrency request environment
CN112015494A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Third-party API tool calling method, system and device
CN112015494B (en) * 2020-08-27 2024-09-17 中国平安财产保险股份有限公司 Third party API tool calling method, system and device

Also Published As

Publication number Publication date
CN106953857B (en) 2020-03-10

Similar Documents

Publication Publication Date Title
AU2018301643B2 (en) Fraud detection system and method
CN106953857A (en) A kind of server end Multithread management method based on CS frameworks
WO2019085405A1 (en) Customer service staff session allocation method, electronic device, and computer-readable storage medium
EP2654366B1 (en) Session-aware GTPv2 load balancing
CN107948317B (en) Debugging method and device of distributed service, storage medium and computer equipment
CN106331147B (en) A kind of REDIS distribution call method
CN109936517A (en) Adaptive dynamic traffic distribution method in mimicry defence
CN105592141B (en) A kind of connection number control method and device
EP2632083A1 (en) Intelligent and scalable network monitoring using a hierarchy of devices
CN114070707A (en) Internet performance monitoring method and system
CN110311938A (en) Request processing method, device, gateway and system based on redis
CN113162865A (en) Load balancing method, server and computer storage medium
WO2015169028A1 (en) On-line upgrade method and device for terminal software
CN107592554A (en) Live video retransmission method and device
CN113132477A (en) Real-time transmission interaction method and system for browser terminal and equipment
CN107864189A (en) A kind of application layer traffic load-balancing method based on DPI
CN103905484B (en) Handle the method and device of hypertext transfer protocol requests
CN102523107B (en) The method and device of balanced network management system service end and client computing pressure
CN113630418A (en) Network service identification method, device, equipment and medium
CN107454141A (en) Solve the method and computer-readable recording medium of port collision
CN104717184B (en) A kind of acquisition methods and device of terminal applies session five-tuple
RU2604983C2 (en) Service parsing method flexibly adapted to ims system service tag
CN111064729B (en) Message processing method and device, storage medium and electronic device
CN115865734B (en) Fault detection method, data generation method, device, equipment and medium
WO2016197851A1 (en) Method and apparatus for managing notification information

Legal Events

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