CN103023750B - Terminal obtains the method for message - Google Patents

Terminal obtains the method for message Download PDF

Info

Publication number
CN103023750B
CN103023750B CN201210273542.7A CN201210273542A CN103023750B CN 103023750 B CN103023750 B CN 103023750B CN 201210273542 A CN201210273542 A CN 201210273542A CN 103023750 B CN103023750 B CN 103023750B
Authority
CN
China
Prior art keywords
message
terminal
client
main
obtains
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.)
Active
Application number
CN201210273542.7A
Other languages
Chinese (zh)
Other versions
CN103023750A (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.)
Fujian Star Net eVideo Information Systems Co Ltd
Original Assignee
Fujian Star Net eVideo Information Systems 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 Fujian Star Net eVideo Information Systems Co Ltd filed Critical Fujian Star Net eVideo Information Systems Co Ltd
Priority to CN201210273542.7A priority Critical patent/CN103023750B/en
Publication of CN103023750A publication Critical patent/CN103023750A/en
Application granted granted Critical
Publication of CN103023750B publication Critical patent/CN103023750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of method that terminal obtains message, be included in service end and define a message transmission module, define a message read module and a message processing module in client, define a database at a server, this database has main message table and terminal message table; The method that described terminal obtains message comprises: the message transmission module in service end by message stores to be sent in the main message table of database; The message be stored in main message table reads in terminal message table by the message read module in client; Message in described terminal message table carries out processing and resolving by the message processing module in client.The present invention significantly reduces the complexity of communication, avoids message concurrent and because of the problem of the concurrent network congestion caused, greatly reduces the performance requirement to client.

Description

Terminal obtains the method for message
[technical field]
The present invention is specifically related to a kind of method that terminal obtains message.
[background technology]
The traditional method of traditional terminal receives message is generally that service end initiatively sends data to client by broadcast packet or point-to-point mode, after client completes data receiver, is presented on client end interface with various ways of presentation by resolution data.But there is following problem in traditional method:
1, the stability requirement of mode to network of direct communication is higher and complexity is also higher, once network environment occurs that unstable situation easily causes information dropout.
2, the mode of direct communication requires higher when information concurrency is larger to client performance, easily causes the situation of information dropout or deadlock in the unappeasable situation of client performance, easily causes network congestion simultaneously.
[summary of the invention]
Technical problem to be solved by this invention is to provide a kind of terminal to obtain the method for message, decreases network pressure, improves communication efficiency, reduce unnecessary communication, improve the utilance of network.
The present invention solves the problems of the technologies described above by the following technical programs: a kind of terminal obtains the method for message, be included in service end and define a message transmission module, a message read module and a message processing module is defined in client, in the server of service end, define a database, this database has main message table and terminal message table;
Described main message table comprises message id, type of message, message content, valid expiration date and message status; Described message id is the numbering of each message in main message table; There is form in what described type of message referred to each message in main message table;
Described terminal message table comprises terminal message ID, terminal unique identification, message id and process flag information; Described terminal message ID is the sequence number of the pieces of data record stored in terminal message table; Described terminal unique identification is the client identification for identifying the information that need obtain in terminal message table; Described client identification is the identity ID of client;
The method that described terminal obtains message specifically comprises the following steps:
Step 10: service end by message transmission module by message stores to be sent in the main message table of database, and assignment is carried out to the message id of this message, type of message, message content, valid expiration date and message status;
Step 20: the message id of message to be sent in main message table is read terminal message table from main message table by message read module by client, and the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 30: client obtains the message id that process is masked as " untreated " by message processing module from described terminal message table, the type of message corresponding to this message id and message content is obtained again from main message table, and according to described type of message, described message content is resolved, and show analysis result on the client, thus realize the message needed for client acquisition.
Further, described step 10 specifically comprises following content:
Step 101: attendant selects the type of message of message to be edited in main message table, then according to described type of message by importing external data or manual edit, obtaining message, in main message table, then filling in the valid expiration date of this message;
Step 102: the message that step 101 obtains by described message transmission module is saved to the message content place of described main message table; Then the message status of this message is defaulted as " transmission " by described database automatically, and automatically generates the message id of this message;
Step 103: attendant inquires about main message table, selects message status be " transmission " and prepares the message that will send, then judging whether to send, if so, then execution step 104; If not, then process ends;
Step 104: the message status of the message that step 103 is selected by described database upgrades " sending ", then process ends.
Further, described step 20 specifically comprises following content:
Step 201: described message read module inquires about main message table, obtains the message id that message status is the message of " sending ";
Step 202: described message read module inquiry terminal message table, terminal unique identification in terminal message table is mated with the client identification of active client, obtains message id terminal unique identification corresponding to identical with the client identification of active client;
Step 203: whether the message id that described message read module determining step 201 obtains has different message ids from the message id that step 202 obtains, and if so, then has new information, then performs step 204; If not, then without new information, and perform step 205;
Step 204: that step 201 obtains by described message read module and not identical with the message id that step 202 obtains message id is saved to terminal message table, then the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 205: judge whether message read module exits, if so, then process ends; If not, then step 201 is back to.
Further, described step 30 specifically comprises following content:
Step 301: described message processing module inquiry terminal message table, judge whether to exist: terminal unique identification is identical with the client identification of active client, and process is masked as the message id of " untreated "; If so, then there is untreated message in active client, and perform step 302; If not, then step 305 is performed;
Step 302: message processing module extraction step 301 from terminal message table inquires about the message id of gained and the terminal message ID corresponding to this message id;
Step 303: the main message table of message ID queries that message processing module extracts according to step 302, obtain the type of message corresponding to this message id and message content, and according to described type of message, described message content is resolved, and show analysis result on the client;
Step 304: the terminal message ID extracted according to step 302, the process mark of the message id in terminal message table corresponding to this terminal message ID is updated to " processed " by described message processing module;
Step 305: judge whether message processing module exits, if so, then process ends; If not, then step 301 is back to.
Further, described service end has also defined the expired processing module of a message, and described method also comprises step 40 after step 30: the expired message in described main message table and terminal message table is deleted by the expired processing module of the message in service end.
Further, described step 40 specifically comprises following content:
Step 401: the expired processing module of described message defines a temporary table in service end;
Step 402: message expired processing module initialization temporary table is to empty the data in temporary table;
Step 403: the expired processing module of message inquires about main message table, judges whether to exist: valid expiration date is less than the service end current shown time, and message status is the message of " sending "; If so, then the message id of this message is stored in described temporary table, and performs step 404; If not, then step 405 is performed;
Step 404: respectively message identical with the message id in described temporary table for the message id in the message id in main message table, terminal message table is deleted;
Step 405: judge whether the expired processing module of message exits, if so, then process ends; If not, then step 402 is back to.
Beneficial effect of the present invention is: adopt serve end program directly not communicate with client-side program, message receiving mode becomes the mode of active obtaining from original passive reception, and the mode of client active obtaining message can control each size of message read according to the situation of client, decrease network pressure, improve communication efficiency, reduce unnecessary communication, improve the utilance of network, avoid message concurrent and because of the problem of the concurrent network congestion caused, greatly reduce the performance requirement to client.
[accompanying drawing explanation]
The invention will be further described in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the frame diagram that in the present invention, terminal obtains message system.
[embodiment]
As shown in Figure 1, Fig. 1 is the frame diagram that terminal of the present invention obtains message system, a kind of terminal obtains the method for message, be included in service end and define a message transmission module and the expired processing module of a message, a message read module and a message processing module is defined in client, in the server of service end, define a database, this database has main message table and terminal message table;
Described main message table is used for the message that stores service end sends, and described main message table comprises message id, type of message, message content, valid expiration date and message status (being shown in Table 1); Described message id is the numbering of each message in main message table; There is form, if type of message is picture, word, enciphered digital or revolving horse lantern form in what described type of message referred to each message in main message table.
The main message table of table 1
Message id Type of message Message content Valid expiration date Message status
The message that described terminal message table reads from main message table for storing each client; Described terminal message table comprises terminal message ID, terminal unique identification, message id and process flag information (being shown in Table 2); Described terminal message ID is the sequence number of the pieces of data record stored in terminal message table; Described terminal unique identification is the client identification for identifying the information that need obtain in terminal message table; Described client identification is the identity ID of client, as the MAC Address of Network Card of client host can be adopted as the client identification of this client and terminal unique identification.
Table 2 terminal message table
Terminal message ID Terminal unique identification Message id Process mark
Refer to Fig. 1, the method that described terminal obtains message specifically comprises the following steps:
Step 10: service end by message transmission module by message stores to be sent in the main message table of database, and assignment is carried out to the message id of this message, type of message, message content, valid expiration date and message status;
Step 20: the message id of message to be sent in main message table is read terminal message table from main message table by message read module by client, and the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 30: client obtains the message id that process is masked as " untreated " by message processing module from described terminal message table, the type of message corresponding to this message id and message content is obtained again from main message table, and according to described type of message, described message content is resolved and processed, thus realize the message needed for client acquisition.
Step 40: the expired message in described main message table and terminal message table is deleted by the expired processing module of the message in service end.
Described step 10 specifically comprises following content:
Step 101: attendant selects the type of message of message to be edited in main message table, then according to described type of message by importing external data or manual edit, obtaining message, in main message table, then filling in the valid expiration date of this message;
Step 102: the message that step 101 obtains by described message transmission module is saved to the message content place of described main message table; Then the message status of this message is defaulted as " transmission " by described database automatically, and automatically generates the message id of this message;
Step 103: attendant inquires about main message table, selects message status be " transmission " and prepares the message that will send, then judging whether to send, if so, then execution step 104; If not, then process ends;
Described step 20 specifically comprises following content:
Step 201: described message read module inquires about main message table, obtains the message id that message status is the message of " sending ";
Step 202: described message read module inquiry terminal message table, terminal unique identification in terminal message table is mated with the client identification of active client, obtains message id terminal unique identification corresponding to identical with the client identification of active client;
Step 203: whether the message id that described message read module determining step 201 obtains has different message ids from the message id that step 202 obtains, and if so, then has new information, then performs step 204; If not, then without new information, and perform step 205;
Step 204: that step 201 obtains by described message read module and not identical with the message id that step 202 obtains message id is saved in terminal message table, generates a record by this message id by the client identification of active client; When there being multiple client need read this message id, this message id generates many records by the client identification of corresponding client, if any 3 clients, just generates 3 records (as shown in table 3) in terminal message table; Then the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 205: judge whether message read module exits, if so, then process ends; If not, then step 201 is back to.
Table 3 terminal message table
Terminal message ID Terminal unique identification Message id Process mark
01 Client 1 identifies 1 Untreated
02 Client 2 identifies 1 Untreated
03 Client 3 identifies 1 Untreated
04 Client 1 identifies 2 Untreated
05 Client 2 identifies 2 Untreated
06 Client 3 identifies 2 Untreated
Wherein, the each concrete numerical value of the terminal message ID in the terminal message table shown in table 3, terminal unique identification, message id and process mark is only exemplary, attendant can according to actual needs, the concrete numerical value of the terminal message ID in self-defined terminal message table, terminal unique identification, message id and process mark.
Described step 30 specifically comprises following content:
Step 301: described message processing module inquiry terminal message table, judge whether to exist: terminal unique identification is identical with the client identification of active client, and process is masked as the message id of " untreated "; If so, then there is untreated message in active client, and perform step 302; If not, then step 305 is performed;
Step 302: message processing module extraction step 301 from terminal message table inquires about the message id of gained and the terminal message ID corresponding to this message id;
Step 303: the main message table of message ID queries that message processing module extracts according to step 302, obtain the type of message corresponding to this message id and message content, and according to described type of message, described message content is resolved, and show analysis result on the client, such as: if type of message is picture format, just Show Picture, if type of message is revolving horse lantern, just press the mode display etc. of revolving horse lantern;
Step 304: the terminal message ID extracted according to step 302, the process mark of the message id in terminal message table corresponding to this terminal message ID is updated to " processed " by described message processing module;
Step 305: judge whether message processing module exits, if so, then process ends; If not, then step 301 is back to.
Described step 40 specifically comprises following content:
Step 401: the expired processing module of described message defines a temporary table in service end;
Step 402: message expired processing module initialization temporary table is to empty the data in temporary table;
Step 403: the expired processing module of message inquires about main message table, judges whether to exist: valid expiration date is less than the service end current shown time, and message status is the message of " sending "; If so, then the message id of this message is stored in described temporary table, and performs step 404; If not, then step 405 is performed;
Step 404: respectively message identical with the message id in described temporary table for the message id in the message id in main message table, terminal message table is deleted;
Step 405: judge whether the expired processing module of message exits, if so, then process ends; If not, then step 402 is back to.
The present invention adopts serve end program directly not communicate with client-side program, and message receiving mode becomes active obtaining from original passive reception, significantly reduces the complexity of communication, and message is no longer lost; The mode of client active obtaining message can control each size of message read according to the situation of client, decrease network pressure, improve communication efficiency, reduce unnecessary communication, improve the utilance of network, avoid message concurrent and because of the problem of the concurrent network congestion caused, greatly reduce the performance requirement to client.

Claims (6)

1. the method for a terminal acquisition message, it is characterized in that: be included in service end and define a message transmission module, define a message read module and a message processing module in client, define a database in the server of service end, this database has main message table and terminal message table;
Described main message table comprises message id, type of message, message content, valid expiration date and message status; Described message id is the numbering of each message in main message table; There is form in what described type of message referred to each message in main message table;
Described terminal message table comprises terminal message ID, terminal unique identification, message id and process flag information; Described terminal message ID is the sequence number of the pieces of data record stored in terminal message table; Described terminal unique identification is the client identification for identifying the information that need obtain in terminal message table; Described client identification is the identity ID of client;
The method that described terminal obtains message specifically comprises the following steps:
Step 10: service end by message transmission module by message stores to be sent in the main message table of database, and assignment is carried out to the message id of this message, type of message, message content, valid expiration date and message status;
Step 20: the message id of message to be sent in main message table is read terminal message table from main message table by message read module by client, and the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 30: client obtains the message id that process is masked as " untreated " by message processing module from described terminal message table, the type of message corresponding to this message id and message content is obtained again from main message table, and according to described type of message, described message content is resolved, and show analysis result on the client, thus realize the message needed for client acquisition.
2. terminal as claimed in claim 1 obtains the method for message, it is characterized in that: described step 10 specifically comprises following content:
Step 101: attendant selects the type of message of message to be edited in main message table, then according to described type of message by importing external data or manual edit, obtaining message, in main message table, then filling in the valid expiration date of this message;
Step 102: the message that step 101 obtains by described message transmission module is saved to the message content place of described main message table; Then the message status of this message is defaulted as " transmission " by described database automatically, and automatically generates the message id of this message;
Step 103: attendant inquires about main message table, selects message status be " transmission " and prepares the message that will send, then judging whether to send, if so, then execution step 104; If not, then process ends;
Step 104: the message status of the message that step 103 is selected by described database upgrades " sending ", then process ends.
3. terminal as claimed in claim 1 obtains the method for message, it is characterized in that: described step 20 specifically comprises following content:
Step 201: described message read module inquires about main message table, obtains the message id that message status is the message of " sending ";
Step 202: described message read module inquiry terminal message table, terminal unique identification in terminal message table is mated with the client identification of active client, obtains message id terminal unique identification corresponding to identical with the client identification of active client;
Step 203: whether the message id that described message read module determining step 201 obtains has different message ids from the message id that step 202 obtains, and if so, then has new information, then performs step 204; If not, then without new information, and perform step 205;
Step 204: that step 201 obtains by described message read module and not identical with the message id that step 202 obtains message id is saved to terminal message table, then the process mark of this message id is defaulted as " untreated " by described database automatically;
Step 205: judge whether message read module exits, if so, then process ends; If not, then step 201 is back to.
4. terminal as claimed in claim 1 obtains the method for message, it is characterized in that: described step 30 specifically comprises following content:
Step 301: described message processing module inquiry terminal message table, judge whether to exist: terminal unique identification is identical with the client identification of active client, and process is masked as the message id of " untreated "; If so, then there is untreated message in active client, and perform step 302; If not, then step 305 is performed;
Step 302: message processing module extraction step 301 from terminal message table inquires about the message id of gained and the terminal message ID corresponding to this message id;
Step 303: the main message table of message ID queries that message processing module extracts according to step 302, obtain the type of message corresponding to this message id and message content, and according to described type of message, described message content is resolved, and show analysis result on the client;
Step 304: the terminal message ID extracted according to step 302, the process mark of the message id in terminal message table corresponding to this terminal message ID is updated to " processed " by described message processing module;
Step 305: judge whether message processing module exits, if so, then process ends; If not, then step 301 is back to.
5. terminal as claimed in claim 1 obtains the method for message, it is characterized in that: described service end has also defined the expired processing module of a message, and described method also comprises step 40 after step 30: the expired message in described main message table and terminal message table is deleted by the expired processing module of the message in service end.
6. terminal as claimed in claim 5 obtains the method for message, it is characterized in that: described step 40 specifically comprises following content:
Step 401: the expired processing module of described message defines a temporary table in service end;
Step 402: message expired processing module initialization temporary table is to empty the data in temporary table;
Step 403: the expired processing module of message inquires about main message table, judges whether to exist: valid expiration date is less than the service end current shown time, and message status is the message of " sending "; If so, then the message id of this message is stored in described temporary table, and performs step 404; If not, then step 405 is performed;
Step 404: respectively message identical with the message id in described temporary table for the message id in the message id in main message table, terminal message table is deleted;
Step 405: judge whether the expired processing module of message exits, if so, then process ends; If not, then step 402 is back to.
CN201210273542.7A 2012-08-01 2012-08-01 Terminal obtains the method for message Active CN103023750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210273542.7A CN103023750B (en) 2012-08-01 2012-08-01 Terminal obtains the method for message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210273542.7A CN103023750B (en) 2012-08-01 2012-08-01 Terminal obtains the method for message

Publications (2)

Publication Number Publication Date
CN103023750A CN103023750A (en) 2013-04-03
CN103023750B true CN103023750B (en) 2016-04-20

Family

ID=47971900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210273542.7A Active CN103023750B (en) 2012-08-01 2012-08-01 Terminal obtains the method for message

Country Status (1)

Country Link
CN (1) CN103023750B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209115A (en) * 2013-04-07 2013-07-17 北京京东世纪贸易有限公司 Message sending system
CN107135258B (en) * 2017-05-04 2020-09-18 浙江数链科技有限公司 Message pushing method and server
CN108766547A (en) * 2018-04-08 2018-11-06 广州市海升信息科技有限责任公司 A kind of endowment service of street reports, processing method and client, processing system
CN110311855B (en) * 2019-06-25 2022-05-31 广州虎牙科技有限公司 User message processing method and device, electronic equipment and storage medium
CN111556086B (en) * 2020-01-02 2022-04-29 阿里巴巴集团控股有限公司 Object storage management method and device, electronic equipment and computer storage medium
CN111309744A (en) * 2020-02-10 2020-06-19 北京星选科技有限公司 Object processing method and device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801814A (en) * 2005-10-11 2006-07-12 华为技术有限公司 Off-line message transmitting and receiving method
CN101106543A (en) * 2007-08-20 2008-01-16 北京亿企通信息技术有限公司 A method for processing offline data in instant communication tool
CN101184055A (en) * 2007-12-11 2008-05-21 腾讯科技(深圳)有限公司 Method and device of delivering, receiving, transmitting off-line files
CN101299731A (en) * 2008-05-09 2008-11-05 国网信息通信有限公司 Instant communication method and apparatus based on Web

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231443B2 (en) * 2003-04-10 2007-06-12 International Business Machines Corporation System allowing user associating user off-line status messages of selectable content with participants on user's authorized access lists

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801814A (en) * 2005-10-11 2006-07-12 华为技术有限公司 Off-line message transmitting and receiving method
CN101106543A (en) * 2007-08-20 2008-01-16 北京亿企通信息技术有限公司 A method for processing offline data in instant communication tool
CN101184055A (en) * 2007-12-11 2008-05-21 腾讯科技(深圳)有限公司 Method and device of delivering, receiving, transmitting off-line files
CN101299731A (en) * 2008-05-09 2008-11-05 国网信息通信有限公司 Instant communication method and apparatus based on Web

Also Published As

Publication number Publication date
CN103023750A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103023750B (en) Terminal obtains the method for message
CN103379140B (en) A kind of log processing rule synchronization method and relevant device and system
JP2012510120A (en) Device management server, device management client, and method of locating a target operation object
CN102624700A (en) Method and system for user identification based on specific information
CN101695157A (en) Self-adapting method of display of mobile terminal screen in network application and system thereof
CN107786559B (en) Terminal registration method and system
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
CA2931525C (en) Data stream identifying method and device
CN108228625B (en) Push message processing method and device
CN104243610A (en) Distributed file transmission service method
CN102118451B (en) Method and device for handling uploaded user resources
CN102546218A (en) Configuration management method and system
CA2778178C (en) Constructing a combined tracking address
CN110995566A (en) Message data pushing method, system and device
CN102185917A (en) Method and system for adaptation between server and mobile terminal, and server adaptation device
CN107368334B (en) Business plug-in interaction system and method
CN108959278B (en) Data synchronization method and device, electronic equipment and storage medium
CN105656643B (en) Method and equipment for performing compatible management based on network configuration protocol
CN114745284A (en) Configuration method and device of industrial Internet of things and computer readable storage medium
CN102118709B (en) Method and system for increasing format conversion efficiency in group multimedia message sending service
CN102487500A (en) Subscriber identification module card, terminal management method and platform
CN104768076B (en) Video broadcasting method and device
CN105635337A (en) Method for binding iOS device, iOS device and auxiliary device
CN105635182B (en) A kind of data compression transmission method and system
CN103957230A (en) Client user number determination method, server and system, and 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
C14 Grant of patent or utility model
GR01 Patent grant