Movatterモバイル変換


[0]ホーム

URL:


CN113194026A - Message processing method and device - Google Patents

Message processing method and device
Download PDF

Info

Publication number
CN113194026A
CN113194026ACN202110426317.1ACN202110426317ACN113194026ACN 113194026 ACN113194026 ACN 113194026ACN 202110426317 ACN202110426317 ACN 202110426317ACN 113194026 ACN113194026 ACN 113194026A
Authority
CN
China
Prior art keywords
message
server
preset
processing method
notification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110426317.1A
Other languages
Chinese (zh)
Inventor
谭勇俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Foreign Travel Network Technology Co ltd
Original Assignee
Beijing Foreign Travel Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Foreign Travel Network Technology Co ltdfiledCriticalBeijing Foreign Travel Network Technology Co ltd
Priority to CN202110426317.1ApriorityCriticalpatent/CN113194026A/en
Publication of CN113194026ApublicationCriticalpatent/CN113194026A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The message processing method and the device of the embodiment of the disclosure firstly monitor the notification message sent by the IM server after establishing a preset communication mode with the IM server; then, after receiving the notification message, capturing the IM message stored by the IM server in a preset mode; and finally, after judging the type indicated by the IM message, storing the captured IM message according to a preset storage mode based on different types. And storing the messages according to different content types by receiving the notification messages of the IM server. Therefore, the technical problem that the IM server does not store the message for a long time is solved.

Description

Message processing method and device
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing a message.
Background
The third party IM server only provides the storage time of the history message for 30 days at most, and a certain fee must be paid if the storage time needs to be prolonged.
In the related art, if the historical IM message exceeding a certain period is desired to be acquired, a service fee for a certain period needs to be paid to the third party.
Disclosure of Invention
The present disclosure is mainly directed to provide a message processing method and device, so as to solve a problem that a third party IM server cannot store an instant messaging message for a long time.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided a message processing method, after a preset communication mode with an IM server is established, monitoring a notification message sent by the IM server; after receiving the notification message, capturing the IM message stored by the IM server in a preset mode; and after judging the type indicated by the IM message, storing the captured IM message according to a preset storage mode based on different types.
Optionally, after the preset communication mode with the IM server is established, monitoring the notification message sent by the IM server includes: and configuring a callback address to the IM server, so that after the user side establishes interactive communication with the IM server, a server indicated by the callback address monitors a notification message sent by the IM server.
Optionally, after the preset communication mode with the IM server is established, monitoring the notification message sent by the IM server includes: and configuring a callback address to the IM server, so that after the user side establishes interactive communication with the IM server, a server indicated by the callback address monitors a notification message sent by the IM server.
Optionally, after receiving the notification message, capturing the IM message stored by the IM server in a preset manner includes: and after receiving the notification message, capturing the IM message stored by the IM server based on the path indicated by the notification message.
Optionally, storing the captured content according to a preset storage manner includes: if the IM message is text information, storing the text information into a database; if the IM message is non-text information, the non-text information is unloaded in the file system.
Optionally, the method further comprises: in response to analyzing and counting the stored historical IM messages, recalling the non-text information in the file processing system to a database; and analyzing and counting the historical IM messages stored in the database so as to send the results obtained by analyzing and counting to a preset user side.
Optionally, the method further comprises: responding to the received historical IM message inquired by the target user terminal within the preset time, and inquiring the corresponding IM message from the database; and if the IM message comprises the non-text content, inquiring the non-text content corresponding to the IM message from the file system.
According to a second aspect of the present disclosure, there is provided a message processing apparatus including: the monitoring unit is configured to monitor the notification message sent by the IM server after a preset communication mode with the IM server is established; the grabbing unit is configured to grab the IM messages stored by the IM server in a preset mode after receiving the notification messages; and the storage unit is configured to store the captured IM message according to a preset storage mode based on different types after judging the type indicated by the IM message.
Optionally, the monitoring unit is further configured to include: and configuring a callback address to the IM server, so that after the user side establishes interactive communication with the IM server, a server indicated by the callback address monitors a notification message sent by the IM server.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium storing computer instructions for causing a computer to execute the message processing method according to any one of the embodiments of the first aspect.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the message processing method as described in any one of the embodiments of the first aspect.
In the embodiment of the disclosure, firstly, after a preset communication mode with an IM server is established, a notification message sent by the IM server is monitored; then, after receiving the notification message, capturing the IM message stored by the IM server in a preset mode; and finally, after judging the type indicated by the IM message, storing the captured IM message according to a preset storage mode based on different types. And storing the messages according to different content types by receiving the notification messages of the IM server. Therefore, the technical problem that the IM server does not store the message for a long time is solved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a message processing method according to an embodiment of the disclosure;
FIG. 2 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those skilled in the art, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure may be described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
The system architecture for implementing the present embodiment may include a terminal device, a network 104, an IM server, and a server. The network serves as a medium for providing communication links between the terminal device and the IM server, between the IM server and the server, and between the server and the terminal device. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user can use the terminal equipment network to interact with the server so as to realize instant messaging. Various communication client applications, such as instant messaging tools, social platform software and the like, can be installed on the terminal device.
The terminal device may be various electronic devices having a display screen and supporting shopping applications, including but not limited to a smart phone, a tablet computer, an electronic book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), a laptop portable computer, a desktop computer, and the like.
The IM server may be a server that establishes instant messaging with the terminal device.
The server may be a server that provides various services, such as a processing server that establishes communication interactions with the IM server. The processing server can analyze and process the interactive information of the terminal equipment and the IM server, and sends the processing result to the preset terminal equipment.
It should be noted that the information processing method provided in the embodiment of the present application is generally executed by a server, and accordingly, a message processing apparatus is generally disposed in the server.
It should be understood that the number of end devices, networks, IM servers, and servers. There may be any number, as desired for implementation.
According to an embodiment of the present disclosure, there is provided a message processing method, as shown in fig. 1, the method includes thefollowing steps 101 to 103:
step 101: and after a preset communication mode with the IM server is established, monitoring a notification message sent by the IM server.
In the implementation, the user sides can initiate chat through the IM server, and then instant communication is realized through the SDK of the third-party IM server. Because the time for storing the chat records on the IM server is limited and historical chat records cannot be stored for a long time, when statistical analysis is needed to be carried out based on chat data, abundant data sources do not exist, and multi-dimensional analysis of targeted data cannot be further realized.
Specifically, the preset communication mode is used for triggering the server to monitor whether the IM server sends the notification message, and the preset communication mode may be a mode capable of realizing transmission of the chat message in real time in the instant communication process, or a mode capable of realizing transmission of the completed chat message after the instant communication. The notification message may be used to notify the server that the client side has established instant messaging with the IM server.
As an optional implementation manner of this embodiment, after establishing a preset communication manner with an IM server, monitoring a notification message sent by the IM server includes: and configuring a callback address to the IM server, so that after the user side establishes interactive communication with the IM server, a server indicated by the callback address monitors a notification message sent by the IM server.
In this embodiment, a callback address may be configured in advance to the IM server, where the callback address is used for the IM server to send a notification message to a server (or a server target location) indicated by the callback address.
Step 102: and after receiving the notification message, capturing the IM message stored by the IM server in a preset mode.
In this embodiment, after receiving the notification message, the server may grab the IM message stored by the IM server. The capturing mode may include, based on a path indicated in the notification message, acquiring, from the path, an IM message stored by the IM server by a preset data acquisition means.
As an optional implementation manner of this embodiment, after receiving the notification message, based on the path indicated by the notification message, the IM message stored by the IM server is captured.
Step 103: and after judging the type indicated by the IM message, storing the captured IM message according to a preset storage mode based on different types.
In this embodiment, after acquiring the IM message instep 102, the server may determine the type indicated by the IM message. The type includes a text type, such as a word. Non-text types such as pictures, video, voice, and files are also included.
As an optional implementation manner of this embodiment, based on different types, storing the captured content according to a preset storage manner includes: if the IM message is text information, storing the text information into a database; if the IM message is non-text information, the non-text information is unloaded in the file system.
In this optional implementation manner, after determining the type of the IM message, the text-type message may be directly stored in a database, for example, a mysql, redis, DB, or other database. If the type of the IM message is a non-text type, the message can be dumped to a file system.
As an optional implementation manner of this embodiment, in response to performing analysis statistics on stored historical IM messages, non-text information in the file processing system is recalled to the database; and analyzing and counting the historical IM messages stored in the database so as to send the results obtained by analyzing and counting to a preset user side.
In this optional implementation manner, if it is necessary to perform data analysis statistics by using an IM message, the pre-established data analysis system may obtain the IM message from the database, and because the IM message has non-text content, the non-text content in the file system is recalled to the database during the data analysis statistics, so that the data analysis system performs analysis processing directly based on data in the database. After the analysis processing, the result can be sent to a preset user side.
For example, the content of the house source service related to the chat information between two clients is limited in the time for storing the chat information by the IM server, but the transaction period of the house source service is long, and if statistics of the house source renting service is required based on the historical chat information (for example, analysis and statistics of which house source characteristics are included in a house source easy to rent), all the IM information needs to be acquired, so that a final analysis and statistics result can be obtained. Therefore, after the embodiment is adopted, the data analysis system can be utilized to call the message in the database, and the analysis processing can be carried out based on the called message. And sending the analyzed and counted result to a preset user side.
As an optional implementation manner of this embodiment, the method further includes: responding to the received historical IM message inquired by the target user terminal within the preset time, and inquiring the corresponding IM message from the database; and if the IM message comprises the non-text content, inquiring the non-text content corresponding to the IM message from the file system.
In the optional implementation mode, the history chat records can be checked at any time by storing the history messages for a long time, so that the technical problem that the IM server cannot store the messages for a long time is solved.
From the above description, it can be seen that the present disclosure achieves the following technical effects: the method can realize the long-term storage of the instant messaging messages, and can analyze and count according to a target strategy based on the historical IM messages to obtain a target result.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present disclosure, there is also provided an apparatus for implementing the message processing method, as shown in fig. 2, the apparatus includes: the monitoringunit 201 is configured to monitor a notification message sent by an IM server after a preset communication mode with the IM server is established; a fetchingunit 202, configured to fetch, after receiving the notification message, an IM message stored by the IM server in a preset manner; thestorage unit 203 is configured to store the captured IM message according to a preset storage manner based on different types after judging the type indicated by the IM message.
As an optional implementation manner of this embodiment, the monitoring unit is further configured to include: and configuring a callback address to the IM server, so that after the user side establishes interactive communication with the IM server, a server indicated by the callback address monitors a notification message sent by the IM server.
The embodiment of the present disclosure provides an electronic device, as shown in fig. 3, the electronic device includes one ormore processors 31 and amemory 32, where oneprocessor 31 is taken as an example in fig. 3.
The controller may further include: aninput device 33 and anoutput device 34.
Theprocessor 31, thememory 32, theinput device 33 and theoutput device 34 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.
Theprocessor 31 may be a Central Processing Unit (CPU). Theprocessor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Thememory 32, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control methods in the embodiments of the present disclosure. Theprocessor 31 executes various functional applications of the server and data processing, i.e. implements the message processing method of the above-described method embodiment, by running non-transitory software programs, instructions and modules stored in thememory 32.
Thememory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a processing device operated by the server, and the like. Further, thememory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, thememory 32 may optionally include memory located remotely from theprocessor 31, which may be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Theinput device 33 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. Theoutput device 34 may include a display device such as a display screen.
One or more modules are stored in thememory 32, which when executed by the one ormore processors 31 perform the method as shown in fig. 1.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the motor control methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), a flash memory (FlashMemory), a hard disk (hard disk drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

CN202110426317.1A2021-04-202021-04-20Message processing method and devicePendingCN113194026A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110426317.1ACN113194026A (en)2021-04-202021-04-20Message processing method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110426317.1ACN113194026A (en)2021-04-202021-04-20Message processing method and device

Publications (1)

Publication NumberPublication Date
CN113194026Atrue CN113194026A (en)2021-07-30

Family

ID=76977646

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110426317.1APendingCN113194026A (en)2021-04-202021-04-20Message processing method and device

Country Status (1)

CountryLink
CN (1)CN113194026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114780538A (en)*2022-03-252022-07-22北京京东拓先科技有限公司 Information storage method and device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101110787A (en)*2006-07-212008-01-23中国移动通信集团公司 Method for historical session management and historical session forwarding system
CN101122920A (en)*2007-09-182008-02-13中兴通讯股份有限公司Database space automatic management method and system
US20090187612A1 (en)*2007-11-192009-07-23International Business Machines CorporationTechnique of controlling access to database
US20120259925A1 (en)*2011-04-052012-10-11Braudes Robert EIm continuation across sip sessions and across clients for point-to-point and multi-user chat
US20160224570A1 (en)*2015-01-312016-08-04Splunk Inc.Archiving indexed data
CN106533932A (en)*2017-01-172017-03-22百度在线网络技术(北京)有限公司Method and device for pushing instant message
CN107659493A (en)*2017-11-012018-02-02北京邦邦共赢网络科技有限公司A kind for the treatment of method and apparatus of instant communication message
CN110430126A (en)*2019-09-022019-11-08江苏满运软件科技有限公司Instant communication message processing method, device, system, equipment and storage medium
CN110716895A (en)*2019-09-172020-01-21平安科技(深圳)有限公司Target data archiving method and device, computer equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101110787A (en)*2006-07-212008-01-23中国移动通信集团公司 Method for historical session management and historical session forwarding system
CN101122920A (en)*2007-09-182008-02-13中兴通讯股份有限公司Database space automatic management method and system
US20090187612A1 (en)*2007-11-192009-07-23International Business Machines CorporationTechnique of controlling access to database
US20120259925A1 (en)*2011-04-052012-10-11Braudes Robert EIm continuation across sip sessions and across clients for point-to-point and multi-user chat
US20160224570A1 (en)*2015-01-312016-08-04Splunk Inc.Archiving indexed data
CN106533932A (en)*2017-01-172017-03-22百度在线网络技术(北京)有限公司Method and device for pushing instant message
CN107659493A (en)*2017-11-012018-02-02北京邦邦共赢网络科技有限公司A kind for the treatment of method and apparatus of instant communication message
CN110430126A (en)*2019-09-022019-11-08江苏满运软件科技有限公司Instant communication message processing method, device, system, equipment and storage medium
CN110716895A (en)*2019-09-172020-01-21平安科技(深圳)有限公司Target data archiving method and device, computer equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114780538A (en)*2022-03-252022-07-22北京京东拓先科技有限公司 Information storage method and device, and storage medium

Similar Documents

PublicationPublication DateTitle
CN110347716B (en)Log data processing method, device, terminal equipment and storage medium
CN110704582B (en)Information processing method, device and equipment
US20070124393A1 (en)Presence based notifications
CN111831875B (en)Data processing method, device, equipment and storage medium
CN111600772B (en)Network distribution content detection processing device, method, system and electronic equipment
CN113660380B (en)Information processing method and device
CN110727563B (en) Cloud service alarm method and device for preset customers
CN114401498A (en)RCS-based base station environment state alarm method, device and system
CN110515741A (en) A method and device for degrading processing based on local task queue
US20130198381A1 (en)Optimizing Data Extraction from Distributed Systems into a Unified Event Aggregator Using Time-Outs
CN105553770B (en) A data acquisition control method and device
CN113194026A (en)Message processing method and device
CN114006987A (en)Visual interaction method and device
US8964955B2 (en)Presence-based message waiting indicator and missed calls
CN111416833B (en)Method and device for judging session end, electronic equipment and readable medium
CN109831417B (en)Method, device, server and storage medium for processing account number for preventing harassment
CN112783677A (en)Method and device for monitoring service abnormity
CN112101810A (en)Risk event control method, device and system
CN108093377B (en) Method and system for automatic release of mobile service when billing system is abnormal
CN113364672B (en)Method, device, equipment and computer readable medium for determining media gateway information
CN111047229A (en)Order distribution information processing method and system
CN113206780A (en)Enterprise instant messaging method and device, computer equipment and readable storage medium
CN111290873B (en)Fault processing method and device
US9571644B2 (en)Contact advocate
CN114490130A (en)Message subscription method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20210730

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp