CN101188570A - Instant message processing system and method - Google Patents

Instant message processing system and method Download PDF

Info

Publication number
CN101188570A
CN101188570A CNA2006101568972A CN200610156897A CN101188570A CN 101188570 A CN101188570 A CN 101188570A CN A2006101568972 A CNA2006101568972 A CN A2006101568972A CN 200610156897 A CN200610156897 A CN 200610156897A CN 101188570 A CN101188570 A CN 101188570A
Authority
CN
China
Prior art keywords
message
message processing
instant
buffer formation
server
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
CNA2006101568972A
Other languages
Chinese (zh)
Other versions
CN101188570B (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.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry 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 Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN2006101568972A priority Critical patent/CN101188570B/en
Publication of CN101188570A publication Critical patent/CN101188570A/en
Application granted granted Critical
Publication of CN101188570B publication Critical patent/CN101188570B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a treatment method for an instant message, and the method includes the steps as follows: a message buffer queue is generated; the message sent from a custom terminal computer is received, and all the messages received are stored temporally in the message buffer queue; real time monitor is implemented to judge whether the message is existed in the message buffer queue or not; if the message is existed in the message buffer queue, each message in the message buffer queue is read out; a plurality of message treatment threads are initiated to treat each message read out at the same time; a system resource occupied by the message treatment threads which are already treated is released; and the message treatment result is sent to a corresponding custom terminal computer. The invention provides further an instant message treatment system. The implement of the invention can cause a server to receive all messages sent out from the custom terminal computer and take instant treatment and response to all messages which are received under high load and without hardware cost increase.

Description

Instant message processing system and method
Technical field
The present invention relates to a kind of information processing system and method, especially a kind of instant message processing system and method.
Background technology
At client/server (Client/server, be C/S) in the system of structure system, following characteristics are all arranged: the quantity of client computer than the quantity of server Duo many, and server end is responsible for handling the message request of coordinating most client computers, and server end has very high operating right for all client computers.
Hence one can see that: server end has considerable effect in whole C/S architecture system, and therefore, the normal operation of server end is determining the normal operation of the whole C/S of having architecture system.For example: at a certain IPTV Play System of development, when ining succession 3 to 5 client computers below the station server, all are normal in the operation of this IPTV Play System at this moment, promptly this station server can normal process the message that sends of each client computer.But, when this IPTV Play System is really reached the standard grade, need below the station server to connect more than 100 client computer, at this moment this IPTV Play System just can not normally move.The message that client computer sends (for example: program downloading or renewal program etc.) just can not obtain handling at server end normally, thereby causes some client computers broadcast program normally.Trace it to its cause, most situations all is because the message that server end sends at the processing client computer has little time to handle server to take place to crash.Because when client computer sent message to server, this server was promptly transferred the message that all system resource goes to handle client computer transmission place.Yet, when server does not also dispose this message, receive the Messages-Waiting processing that other client computers send again, at this moment server just can not go to handle these message timely, thereby the message that causes these client computers to send can't meet with a response.For the exigent IPTV Play System of promptness, the phenomenon that the message of for a long time client computer being sent can't respond does not allow to take place.
Have under the system of high capacity, the message that sends out for customer in response end computer that can be instant, and guarantee that server end still can safely and steadily run, generally all consider from the angle of hardware, such as dispose hardware preferably to server end, more high performance server is set to guarantee the normal operation of whole system.Though this has improved the performance of whole system processing messages from certain aspect, has improved the hardware cost of whole system, and also have potential unsteadiness to exist to a certain extent.
Summary of the invention
In view of above content, be necessary to propose a kind of instant message processing system, it can make server under the situation of high capacity, need not to increase hardware cost and just can make this server all receive the message that client computer sends out, and can immediately handle and respond the message that all receive.
In view of above content, also be necessary to propose a kind of instant message processing method, it can make server under the situation of high capacity, need not to increase hardware cost and just can make this server all receive the message that client computer sends out, and can immediately handle and respond the message that all receive.
A kind of instant message processing system, this system comprises a station server and many client computers, these many client computers directly are connected with this station server by network.Described server comprises central processing unit, buffering area and communication engines.Described central processing unit is used to control communicating by letter between described buffering area and the communication engines, and carries out predefined program command produce a message buffer formation in described buffering area.Described communication engines comprises: the message sink module is used to receive the message that described client computer sends, and the message that all receive is temporary in the described message buffer formation; The message Coordination module, whether have message, when in this message buffer formation message being arranged, then obtain message from this message buffer formation by predefined monitoring instruction if being used for monitoring described message buffer formation in real time; Message processing module is used to be respectively the message initiated Message Processing thread process message of each bar, and the shared system resource of Message Processing thread that discharges the message that disposed; Message transmission module is used for the Message Processing result is sent to the clients corresponding computer.
A kind of instant message processing method, this method may further comprise the steps: (a) produce a message buffer formation; (b) receive the message that client computer sends, and the message that all receive is temporary in the described message buffer formation; (c) in the described message buffer formation of real-time listening whether message is arranged; (d) if in the described message buffer formation message is arranged, then read each the bar message in this message buffer formation; (e) start a plurality of Message Processing threads and handle the message that each bar reads simultaneously; And (f) discharge the shared system resource of Message Processing thread dispose.
Further, this instant message processing method comprises the steps: also whether the quantity of judging current Message Processing thread surpasses higher limit; If the quantity of current Message Processing thread equals higher limit, then this Messages-Waiting is handled; And if the quantity of current Message Processing thread less than higher limit, then the initiation message processing threads is handled this message.
Further, this instant message processing method also comprises the step that the Message Processing result is sent to the clients corresponding computer.
Compared to prior art, described instant message processing system and method can make server under the situation of high capacity, need not to increase hardware cost and just can make this server all receive the message that client computer sends out, and can immediately handle and respond the message that all receive.
Description of drawings
Fig. 1 is the system architecture diagram of instant message processing system preferred embodiment of the present invention.
Fig. 2 is the functional block diagram of server among Fig. 1.
Fig. 3 is the implementing procedure figure of instant message processing method of the present invention preferred embodiment.
Embodiment
With reference to shown in Figure 1, be the system architecture diagram of instant message processing system preferred embodiment of the present invention.This instant message processing system adopts a kind of client/server (Client/server, be C/S) architectural framework, it mainly comprises a station server 1 and many client computers (for example quantity is 100) 2, and these many client computers 2 directly are connected with server 1 by network 3.This server 1 can be the computer of typical hardware configuration, perhaps is the computer of higher hardware configuration.This client computer 2 can be general user's computer, and for example desktop computer or luggable computer can also be any computers that other is suitable for.Described network 3 can be intranet (Intranet), also can be the communication network of Internet (Internet) or other type.
With reference to shown in Figure 2, be the functional block diagram of server 1.Described server 1 comprises central processing unit (Center Processing Unit, i.e. CPU) 10, buffering area 11 and communication engines 12.Described central processing unit 10 is used to control the communication between described buffering area 11 and the communication engines 12, and (for example: set Q1:Queue instruction) produce a message buffer formation 110 in described buffering area 11 carries out predefined program command.Described buffered message queue 110 is used to store the message that each client computer 2 sends.This message buffer formation 110 is a kind of employing first in first out (First In and First Out, be FIFO) data structure of access information, it can guarantee that the message that receives earlier gives described communication engines 12 at first and handle, to guarantee the sequential of Message Processing.
Described communication engines 12 is used to receive and handle immediately the message that each client computer 2 sends, and the Message Processing result is sent to corresponding client computer 2.This communication engines 12 comprises 121, one message processing modules 122 of 120, one message Coordination module of a message sink module and a message transmission module 123.
Described message sink module 120 is used to receive the message that client computer 2 sends, and the message that all receive is temporary in the described message buffer formation 110.Described message Coordination module 121 by predefined monitoring instruction (for example: the Detect order instruction) message of real-time listening message buffer formation 110 is used for, judge in this message buffer formation 110 whether message is arranged, obtain the message in this message buffer formation 110, and handle to described message processing module 122 this distribution of messages.Described message processing module 122 is used to be respectively the message initiated Message Processing thread of each bar and handles separately message, produce corresponding Message Processing result, judge whether the quantity of initiation message processing threads surpasses higher limit, and discharge the system resource of the shared server 1 of Message Processing thread of having handled message.Described higher limit is a predefined numerical value of N (for example N=100), the Message Processing total number of threads that its expression message processing module 122 can be carried out at most at one time.In the present embodiment, if the Message Processing thread that message processing module 122 is started is not limited, when the sum of same time period Message Processing thread surpassed higher limit, the Message Processing thread will exhaust the system resource of described server 1, thereby causes this server 1 normally not move.Described message transmission module 123 is used for the Message Processing result that message processing module 122 is handled is sent to clients corresponding computer 2 by network 3.
Fig. 3 is the implementing procedure figure of instant message processing method of the present invention preferred embodiment.Communication engines 12 is loaded in the server 1 of described instant message processing system, and runs in this server 1.At first, central processing unit 10 (for example: set Q1:Queue instruction) produce a message buffer formation 110 (step S30) in described buffering area 11 is carried out predefined program command.Message sink module 120 receives the message that client computer 2 sends, and the message that all receive is temporary in the described message buffer formation 110 (step S31).Described message buffer formation 110 is a kind of employing first in first out (First In and First Out, be FIFO) data structure of access information, it can guarantee that the message that receives earlier gives described communication engines 12 at first and handle, to guarantee the sequential of Message Processing.
Message Coordination module 121 (for example: Detect order instruction) monitor the message (step S32) in the described message buffer formation 110 is in real time instructed by predefined monitoring.Message Coordination module 121 reads a piece of news from this message buffer formation 110, and handles (step S33) for message processing module 122 this distribution of messages.Message processing module 122 judges whether the quantity of current Message Processing thread surpasses higher limit (step S34).Described higher limit is a predefined numerical value of N (for example N=100), the Message Processing total number of threads that its expression message processing module 122 can be carried out at most at one time.If the quantity of current Message Processing thread equals higher limit, then this Messages-Waiting message processing module 122 is handled (step S35).If the quantity of current Message Processing thread is less than higher limit, then message processing module 122 starts the message (step S36) that the Message Processing thread is handled to read from this message buffer formation 110.
Message Coordination module 121 judges whether also have message (step S37) in this message buffer formation 110 by described monitoring instruction.If also have message in the described message buffer formation 110, then message Coordination module 121 reads another message from this message buffer formation 110, promptly returns step S33.If do not have message in the described message buffer formation 110, represent processed the finishing of message in the described message buffer formation, then message processing module 122 discharges the system resource of the shared server 1 of Message Processing thread of these message that dispose, so that utilize system resource (step S38) when handling other message.The Message Processing result that message transmission module 123 is handled message processing module 122 sends to clients corresponding computer 2 (step S39) by network 3.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.

Claims (10)

1. an instant message processing system comprises server and client computer, and this server comprises central processing unit, buffering area and communication engines, it is characterized in that:
Described central processing unit is used to control communicating by letter between described buffering area and the communication engines, and carries out predefined program command produce a message buffer formation in described buffering area;
Described communication engines comprises:
The message sink module is used to receive the message that described client computer sends, and the message that all receive is temporary in the described message buffer formation;
The message Coordination module, whether have message, when in this message buffer formation message being arranged, then obtain message from this message buffer formation by predefined monitoring instruction if being used for monitoring described message buffer formation in real time; And
Message processing module, be used to be respectively the message initiated Message Processing thread of each bar that obtains and handle the message of obtaining simultaneously, and for this message produces corresponding Message Processing result, and the shared system resource of Message Processing thread that discharges the message that disposed.
2. instant message processing system as claimed in claim 1 is characterized in that described client computer is connected with server by network.
3. instant message processing system as claimed in claim 1 is characterized in that described communication engines also comprises message transmission module, is used for described Message Processing result is sent to the clients corresponding computer.
4. instant message processing system as claimed in claim 1 is characterized in that, described buffered message queue is to adopt the mode of first in first out to come access information.
5. instant message processing system as claimed in claim 1 is characterized in that, described message processing module is used to also judge whether the quantity of the Message Processing thread that has started surpasses a higher limit.
6. an instant message processing method is characterized in that, this method comprises the steps:
Produce a message buffer formation;
Receive the message that client computer sends, and the message that all receive is temporary in the described message buffer formation;
In the described message buffer formation of real-time listening whether message is arranged;
If in the described message buffer formation message is arranged, then reads each the bar message in this message buffer formation;
Start a plurality of Message Processing threads and handle the message that each bar reads simultaneously; And
The dispose shared system resource of Message Processing thread of message of release.
7. instant message processing method as claimed in claim 6 is characterized in that, this method also comprises if do not have message in the described message buffer formation, then continues to monitor the message in this message buffer formation.
8. as claim 6 or 7 described instant message processing methods, it is characterized in that described buffered message queue is to adopt the mode of first in first out to come access information.
9. instant message processing method as claimed in claim 6 is characterized in that this method also comprises the steps:
Whether the quantity of judging current Message Processing thread surpasses higher limit;
If the quantity of current Message Processing thread equals higher limit, then this Messages-Waiting is handled; And
If the quantity of current Message Processing thread is less than higher limit, then the initiation message processing threads is handled the described message that reads.
10. instant message processing method as claimed in claim 6 is characterized in that this method also comprises the step that the Message Processing result is sent to the clients corresponding computer.
CN2006101568972A 2006-11-17 2006-11-17 Instant message processing system and method Expired - Fee Related CN101188570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101568972A CN101188570B (en) 2006-11-17 2006-11-17 Instant message processing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101568972A CN101188570B (en) 2006-11-17 2006-11-17 Instant message processing system and method

Publications (2)

Publication Number Publication Date
CN101188570A true CN101188570A (en) 2008-05-28
CN101188570B CN101188570B (en) 2011-05-04

Family

ID=39480765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101568972A Expired - Fee Related CN101188570B (en) 2006-11-17 2006-11-17 Instant message processing system and method

Country Status (1)

Country Link
CN (1) CN101188570B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296130B (en) * 2008-05-30 2011-04-06 北京同步科技有限公司 System and method for multi-process sharing port receiving network message
CN102594733A (en) * 2012-02-24 2012-07-18 腾讯科技(深圳)有限公司 Method, system and device for realizing anonymous speed-dating
CN102811154A (en) * 2011-05-31 2012-12-05 阿里巴巴集团控股有限公司 Resource acquisition method and network server system
CN106330750A (en) * 2016-08-17 2017-01-11 成都聚美优品科技有限公司 Controllable high-concurrency distributed message queue push method
CN106530084A (en) * 2016-10-27 2017-03-22 财付通支付科技有限公司 Information processing method and server
CN108052400A (en) * 2017-12-21 2018-05-18 深圳Tcl新技术有限公司 Message immediate processing method, intelligent terminal and computer readable storage medium
CN108984285A (en) * 2018-06-28 2018-12-11 上海数据交易中心有限公司 A kind of analysis of data collision flow point method and device, storage medium, terminal
CN109213579A (en) * 2017-07-06 2019-01-15 贵阳朗玛信息技术股份有限公司 A kind of method and device of asynchronous serial processing message
CN109246470A (en) * 2018-09-29 2019-01-18 武汉斗鱼网络科技有限公司 Barrage distribution method, device, equipment and the storage medium of Multi-thread synchronization
CN109309848A (en) * 2018-09-29 2019-02-05 武汉斗鱼网络科技有限公司 Barrage distribution method, device, equipment and storage medium based on retry mechanism
CN109413489A (en) * 2018-09-29 2019-03-01 武汉斗鱼网络科技有限公司 Multithreading barrage distribution method, device, equipment and the storage medium of string type
CN110808956A (en) * 2019-09-30 2020-02-18 林德(中国)叉车有限公司 Data interaction method and system
CN114595457A (en) * 2020-12-04 2022-06-07 腾讯科技(深圳)有限公司 Task processing method and device, computer equipment and storage medium
CN115134320A (en) * 2022-08-25 2022-09-30 四川汉唐云分布式存储技术有限公司 Transaction system for determining time sequence based on message distribution

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6298386B1 (en) * 1996-08-14 2001-10-02 Emc Corporation Network file server having a message collector queue for connection and connectionless oriented protocols
KR20010058725A (en) * 1999-12-30 2001-07-06 서평원 Method for message processing in a CTI system
CN1608252A (en) * 2001-12-28 2005-04-20 西姆德斯克技术公司 Instant messaging system
CN1225105C (en) * 2002-12-26 2005-10-26 北京邮电大学 Call processing system adapted for application server and its realizing method
CN100444566C (en) * 2004-02-20 2008-12-17 中兴通讯股份有限公司 Multi-user concurrent insertion device and its method

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296130B (en) * 2008-05-30 2011-04-06 北京同步科技有限公司 System and method for multi-process sharing port receiving network message
CN102811154A (en) * 2011-05-31 2012-12-05 阿里巴巴集团控股有限公司 Resource acquisition method and network server system
CN102811154B (en) * 2011-05-31 2015-01-07 阿里巴巴集团控股有限公司 Resource acquisition method and network server system
CN102594733A (en) * 2012-02-24 2012-07-18 腾讯科技(深圳)有限公司 Method, system and device for realizing anonymous speed-dating
CN102594733B (en) * 2012-02-24 2014-01-08 腾讯科技(深圳)有限公司 Method, system and device for realizing anonymous speed-dating
CN106330750A (en) * 2016-08-17 2017-01-11 成都聚美优品科技有限公司 Controllable high-concurrency distributed message queue push method
CN106530084A (en) * 2016-10-27 2017-03-22 财付通支付科技有限公司 Information processing method and server
CN109213579A (en) * 2017-07-06 2019-01-15 贵阳朗玛信息技术股份有限公司 A kind of method and device of asynchronous serial processing message
CN108052400A (en) * 2017-12-21 2018-05-18 深圳Tcl新技术有限公司 Message immediate processing method, intelligent terminal and computer readable storage medium
CN108984285B (en) * 2018-06-28 2021-10-15 上海数据交易中心有限公司 Data collision flow analysis method and device, storage medium and terminal
CN108984285A (en) * 2018-06-28 2018-12-11 上海数据交易中心有限公司 A kind of analysis of data collision flow point method and device, storage medium, terminal
CN109246470A (en) * 2018-09-29 2019-01-18 武汉斗鱼网络科技有限公司 Barrage distribution method, device, equipment and the storage medium of Multi-thread synchronization
CN109413489A (en) * 2018-09-29 2019-03-01 武汉斗鱼网络科技有限公司 Multithreading barrage distribution method, device, equipment and the storage medium of string type
CN109246470B (en) * 2018-09-29 2020-10-16 武汉斗鱼网络科技有限公司 Multi-thread synchronous bullet screen distribution method, device, equipment and storage medium
CN109309848B (en) * 2018-09-29 2021-02-02 武汉斗鱼网络科技有限公司 Bullet screen distribution method, device, equipment and storage medium based on retry mechanism
CN109309848A (en) * 2018-09-29 2019-02-05 武汉斗鱼网络科技有限公司 Barrage distribution method, device, equipment and storage medium based on retry mechanism
CN110808956A (en) * 2019-09-30 2020-02-18 林德(中国)叉车有限公司 Data interaction method and system
CN110808956B (en) * 2019-09-30 2021-09-17 林德(中国)叉车有限公司 Data interaction method and system
CN114595457A (en) * 2020-12-04 2022-06-07 腾讯科技(深圳)有限公司 Task processing method and device, computer equipment and storage medium
CN115134320A (en) * 2022-08-25 2022-09-30 四川汉唐云分布式存储技术有限公司 Transaction system for determining time sequence based on message distribution
CN115134320B (en) * 2022-08-25 2023-01-03 四川汉唐云分布式存储技术有限公司 Transaction system for determining time sequence based on message distribution

Also Published As

Publication number Publication date
CN101188570B (en) 2011-05-04

Similar Documents

Publication Publication Date Title
CN101188570B (en) Instant message processing system and method
US9591102B2 (en) Cloud server/thin client/gateway selective browser instantiation
CA2632676C (en) Message history display system and method
US7546355B2 (en) Network architecture for data transmission
US20150341425A1 (en) Managing access to digital content sources
US20030055969A1 (en) System and method for performing power management on a distributed system
CN108712422B (en) Method and device for creating transcoding task
GB2532834A (en) A method and system for scalable job processing
CN106791957B (en) Video live broadcast processing method and device
CN108243222A (en) Server network architecture method and device
CN111541555A (en) Group chat optimization method and related product
US8780708B2 (en) Transmission control system
CN101018152A (en) Software installation system and method
CN111427703A (en) Industrial data real-time display method and system
CN101753607B (en) Working device and method for server
JPH10326274A (en) Digital content edition method and device therefor and recording medium for recording digital content edition program
CN112994934B (en) Data interaction method, device and system
CN113703982A (en) Data consumption method, apparatus, terminal device and medium using KAFKA
Niyato et al. Load balancing algorithms for internet video and audio server
JP5655687B2 (en) Analysis processing apparatus, analysis processing program, and analysis processing method
JP2011198060A (en) Hardware and software cooperation filtering processing system
CN115348231B (en) Message processing method, device, server side and storage medium
JP2008282294A (en) Content distribution system and method thereof
JP2002278862A (en) Method, program and device for distributing push type information, and storage medium
CN113765886A (en) Multimedia playing method, device, storage medium and electronic equipment

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110504

Termination date: 20141117

EXPY Termination of patent right or utility model