CN102130844B - Method and system for acquiring Web chat logs - Google Patents

Method and system for acquiring Web chat logs Download PDF

Info

Publication number
CN102130844B
CN102130844B CN201010102036.2A CN201010102036A CN102130844B CN 102130844 B CN102130844 B CN 102130844B CN 201010102036 A CN201010102036 A CN 201010102036A CN 102130844 B CN102130844 B CN 102130844B
Authority
CN
China
Prior art keywords
chat record
browser
data
web server
web
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
CN201010102036.2A
Other languages
Chinese (zh)
Other versions
CN102130844A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010102036.2A priority Critical patent/CN102130844B/en
Priority to PCT/CN2010/080146 priority patent/WO2011088720A1/en
Publication of CN102130844A publication Critical patent/CN102130844A/en
Application granted granted Critical
Publication of CN102130844B publication Critical patent/CN102130844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/216Handling conversation history, e.g. grouping of messages in sessions or threads

Abstract

The invention discloses a method for acquiring Web chat logs, and belongs to the field of Web instant messaging. The method comprises the following steps that: a Web server responds to a saving request initiated by a browser and receives data which comprises the chat logs and is transmitted by the browser; and the Web server returns the data comprising the chat logs to the browser. In addition, the invention also relates to a system for acquiring Web chat logs, which comprises a Web server and a browser for implementing the method. A system that the Web server is matched with the browser, and a method for transferring the chat logs through the Web server and returning the chat logs to the browser are adopted, and all browsers can simply acquire the Web chat logs; therefore, the method has good cross-platform property.

Description

Preserve the method and system of Web chat record
[technical field]
The present invention relates to Web instant messaging, especially relate to a kind of method and system of the Web of preservation chat record.
[background technology]
Traditional instant messaging is generally to adopt in the method for client login to realize, and along with the continuous expansion of instant communication client function is with perfect, it is increasing that client becomes, and gives to download and installation brings inconvenience.
For this reason, produced the instant communication method based on Web.Adopt chat in this way, do not need to download and install client, directly open webpage and can chat.
The webpage that surfs the web just need to use browser, and the most conventional browser is generally the IE of Microsoft, or the many browsers taking IE as kernel.Along with the development of technology and the demand of different user, browser is also diversified trend, has occurred the browser of other kernels, as Firefox, and Safari, Chrome, Opera etc.
While adopting IE browser to carry out Web chat, if desired preserve chat record.Can directly call windows method, as the execCommand method of window.document, chat record be saved as to html file, backup in local disk, after waiting until, check.
The browser of other kernels cannot make in this way, has brought inconvenience to the preservation of Web chat record, and the professional platform independence that therefore in Web chat at present, chat record is preserved is poor.
[summary of the invention]
Based on this, being necessary, for traditional Web chat poor problem of professional platform independence in the time preserving chat record, provides a kind of method that makes the browser of multiple different kernels can both conveniently preserve Web chat record.
Preserve a method for Web chat record, comprise the steps: the preservation request that web server response browser is initiated, receive the data that comprise chat record that browser sends; The described data that comprise chat record are returned to browser by described Web server.
Preferably, described chat record also comprises historical chat record, before the step of the preservation request of initiating at web server response browser, also comprises step: browser obtains the data that comprise historical chat record from message transfer server.
Preferably, the step that the described data that comprise chat record is returned to browser at described Web server is specially: the described data that comprise chat record are processed and generated chat record file, described chat record file is returned to browser.
The step of the data that comprise chat record that preferably, Web server reception browser sends is specially: receive the data of browser to comprise chat record described in the transmission of list form; Obtain the title for the hidden object of the return messages effect of this list.
Preferably, to the data of described chat record process generate chat record file step specifically: the data of described chat record are processed to generating web page file.
Preferably, described in, return to the step of chat record file specifically: offer user using described chat record file as annex and download.
A kind of system of the Web of preservation chat record is also provided in addition.
A system of preserving Web chat record, comprising: Web server, for responding the request of preservation, receive the data that comprise chat record, and the described data that comprise chat record are returned to browser; Browser, send for initiating to preserve request Concurrency the data that comprise chat record, receives the data that comprise chat record that Web server returns.
Preferably, also comprise message transfer server, for transfer and preserve user's chat messages, the request that response browser obtains historical chat record data.
Preferably, described Web server also for: the described data that comprise chat record are processed and are generated chat record file, described chat record file is returned to browser.
Preferably, described browser is also sent to Web server by the data that comprise chat record with the form of list, and appointment is hidden object for the return messages of this list object pointed.
Preferably, the chat record file that described Web server is processed generation to described chat record is web page files.
Preferably, when Web server returns to described chat record file, offer user using described chat record file as annex and download.
Preferably, when described web server is returned to described chat record file, will act on described hidden object for the return messages of list.
Beneficial effect of the present invention is:
The system of utilizing Web server to coordinate with browser, adopts the method that then chat record is returned to browser by Web server transfer, and all browsers can simple realization obtain Web chat record, thereby have good professional platform independence.
[brief description of the drawings]
Fig. 1 is the flow chart of the method for obtaining Web chat record of an embodiment;
Fig. 2 is the flow chart of the method for obtaining Web chat record of another embodiment;
Fig. 3 is the structural representation of the system of obtaining Web chat record of an embodiment;
Fig. 4 is the structural representation of the system of obtaining Web chat record of another embodiment.
[embodiment]
Be further described below in conjunction with accompanying drawing.
As shown in Figure 1, in an embodiment, adopt following steps will obtain Web chat record:
The preservation request that S10:Web server response browser is initiated, receives the data that comprise chat record that browser sends.
In the time utilizing Web chat, as adopted Web QQ chat, in the Web page, have a chat window.Chat window generally comprises the prompt operation button (as sent message, expression and picture etc.) of message input field, message display field, chatting object's information demonstration and some commonly used commands, in these prompt operation buttons, also comprise the button of preserving chat record order for sending, as be shown as the button of " derivation chat record ".In the time that user presses the button of " derivation chat record ", just generate one and preserved request, this preservation request is sent to Web server by browser, the message (chat record) of temporarily preserving sent to Web server simultaneously.
In the present embodiment, browser sends with the form of list the data that comprise chat record.List is a kind of comparatively common webpage assembly that in Web communication, various browsers are all supported, user's registration, shopping online, the application function such as submit to, make comments is all based on list.
After browser submission form, Web server generally has the return messages for this list, and according to the difference arranging, return messages can be presented at the different pages.While sending list, specifically can adopt code as follows:
<form?method="post"action="/save_chatlog.php"target="chatlog">
<input?type="hidden"value="chatlog"name="chatlog"/>
<a href=" # " > keeping records </a>
</form>
Wherein:
The mode that method specifies browser to communicate by letter with Web server, according to the value of method, generally has two kinds of modes: if the value of method is for " get ", represent that browser will be to Web server active obtaining data; If the value of method is " post ", represent that browser will send data to Web server.In the present embodiment, to send list to Web server, thereby take the mode of " post ".
Action specifies the processing page of list on Web server.
Target specifies the object of the return messages processing of Web server.In the present embodiment, the value of target is " chatlog "." chatlog " is in id and the name value of hiding forms (iframe) of the chat page, makes target in the time quoting " chatlog ", can make return messages point to this iframe.Can make like this return messages of Web server act on above this iframe, can not impact the existing chat page.
Browser sends after chat record, preserves request described in web server response, receives described data, enters the processing page of appointment.
S30: the described data that comprise chat record are returned to browser by described Web server.Adopt and after Web server transfer, send to again the mode of browser to obtain chat record, script is kept in browser variable, i.e. chat record in internal memory, through Web server, transfer returns to browser again, can obtain easily chat record.
The data of passback can be resolved by viewed device, chat record are illustrated in the page of browser, allow user check.Then preserve by additive method, as separately deposited webpage, screen interception etc.
In the present embodiment, the data of passback are not resolved, but offer browser downloads as annex.
In the time of Web server passback data, browser ejects prompting user and preserves the prompting frame of these data.Can adopt following code to realize such scheme:
In returning to chat record file, on http header, add a line: Content-Disposition:attachment; Filename=" WebQQ_chatlog_filename.html ".This chat record file offers user's download with the form of annex, and file is presented to user with the filename of WebQQ_chatlog_filename.html in the prompting download frame ejecting, and in practical operation, user can according to circumstances change filename.
In another preferred embodiment, Fig. 2 shows the flow process of obtaining the method for Web chat record in this embodiment, further comprise the steps S20: the described data that comprise chat record are processed and generated chat record file, described chat record file is returned to browser.In the processing page of specifying, described above/save_chatlog.php, the data that comprise chat record in list are generated to chat record file after treatment, this chat record file can be generated as the file of any computer-readable form in theory after Web server is processed, as the compressed file of document, picture or above-mentioned file etc.Be Web chat due to what adopt, the content of chat record is to be all generally temporarily stored in the variable of browser with html form, and therefore for convenient communication, the chat record file generating after being processed by Web server is the html file of web page files type.Therefore this html file can return to browser resolves or offer browser downloads with the form of annex.
For the situation of only preserving current chat record, in above-described embodiment, the data of the transmission of browser are carried out transfer by Web server can be realized.But for the situation of wanting keeping track of history chat, also need to obtain the historical chat record being kept in message transfer server.Be before step S30, also carry out following steps:
Browser obtains the data that comprise historical chat record from message transfer server.When user utilizes Web chat, the message between user is transmitted by message transfer server, and in the time of pass-along message, this message is also preserved in message transfer server.In general, be to save server resource, saving as of message is temporary, i.e. persistence not.Will be deleted after certain hour.Therefore the present embodiment can provide user often at regular intervals chat record once to be concentrated the scheme of preservation.
In the time that user needs the chat record of disposable certain time period of preservation, browser sends the request of obtaining historical chat record to message transfer server, message transfer server responds this request, and the data that comprise historical chat record are sent to browser, checks for browser resolves, user.When browser initiates to preserve request, the data that comprise current chat record and historical chat record are sent to Web server, then return to browser by Web server.
Fig. 3 shows the system of obtaining Web chat record in an embodiment.This system comprises browser 10 and Web server 20.Web server 20, for responding the request of preservation, receives the data that comprise chat record, returns to the data that comprise chat record; Browser 10 send for initiating to preserve request Concurrency the data that comprise chat record, receives the data that comprise chat record that Web server 20 returns.
In a preferred embodiment, browser 10 is also sent to Web server 20 by data with the form of list, and appointment is hidden object for the return messages of this list object pointed.In one embodiment, the chat record file that Web server 20 is processed generation to described chat record is web page files.Web server 20, in the time returning to chat record file, offers user and downloads, and will act in above-mentioned hidden object for the return messages of this list, thereby can not impact the current chat page using chat record file as annex.
Fig. 4 illustrates the system of obtaining Web chat record in another embodiment.This system further comprises message transfer server 30.Message transfer server 30 is for transfer and preserve user's chat messages, the request that response browser obtains historical chat record.Utilize message transfer server 30 users can realize the concentrated preservation to the chat record in a period of time.
Utilize above-mentioned method and system, after chat record can being processed by Web server, return to user and preserve, all browsers can be realized, thereby realized simply cross-platform preservation Web chat record.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (4)

1. a method of preserving Web chat record, comprises the steps:
Browser sends the request of obtaining historical chat record to message transfer server, message transfer server responds this request, and the data that comprise historical chat record are sent to browser;
The preservation request that described in web server response, browser is initiated, receives the data that comprise chat record that described browser sends, and described chat record comprises current chat record and historical chat record;
After described Web server transfer, described chat record is returned to described browser and preserve, the described data that comprise chat record are processed and generated chat record file, described chat record file is returned to described browser and preserve;
Described chat record file is generated as the file of computer-readable form after Web server is processed;
The step of the data that comprise chat record that Web server reception browser sends is specially:
Receive the data of browser to comprise chat record described in the transmission of list form;
Obtain the title for the hidden object of the return messages effect of this list;
The described step of returning to chat record file is specifically:
Offer user downloads described chat record file as annex.
2. the method for preservation as claimed in claim 1 Web chat record, is characterized in that, the step that the described data that comprise chat record are processed to generation chat record file specifically:
The described data that comprise chat record are processed to generating web page file.
3. a system of preserving Web chat record, is characterized in that, comprising:
Message transfer server, for transfer and preserve user's chat messages, the request that response browser obtains historical chat record data, sends to browser by the data that comprise historical chat record;
Web server, for responding the request of preservation, receives the data that comprise chat record, preserves returning to described browser after described chat record transfer, and described chat record comprises current chat record and historical chat record;
Browser, send for initiate to preserve request Concurrency to described Web server the data that comprise chat record, receives the data that comprise chat record that described Web server returns;
Described Web server also for: the described data that comprise chat record are processed and are generated chat record file, described chat record file is returned to browser;
Described browser is also sent to Web server by the data that comprise chat record with the form of list, and appointment is hidden object for the return messages of this list object pointed;
When Web server returns to described chat record file, offer user using described chat record file as annex and download.
4. the system of preservation Web chat record as claimed in claim 3, is characterized in that, it is web page files that described Web server processes to described chat record the chat record file generating.
CN201010102036.2A 2010-01-20 2010-01-20 Method and system for acquiring Web chat logs Active CN102130844B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201010102036.2A CN102130844B (en) 2010-01-20 2010-01-20 Method and system for acquiring Web chat logs
PCT/CN2010/080146 WO2011088720A1 (en) 2010-01-20 2010-12-22 Method and system for obtaining web chat logs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010102036.2A CN102130844B (en) 2010-01-20 2010-01-20 Method and system for acquiring Web chat logs

Publications (2)

Publication Number Publication Date
CN102130844A CN102130844A (en) 2011-07-20
CN102130844B true CN102130844B (en) 2014-11-05

Family

ID=44268738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010102036.2A Active CN102130844B (en) 2010-01-20 2010-01-20 Method and system for acquiring Web chat logs

Country Status (2)

Country Link
CN (1) CN102130844B (en)
WO (1) WO2011088720A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580986B (en) 2012-07-30 2016-12-21 华为终端有限公司 A kind of real-time communication method, terminal unit, real-time communication server and system
CN104125135B (en) * 2013-04-28 2016-10-05 腾讯科技(深圳)有限公司 The management method of a kind of instant messaging application chat record and terminal
CN104184771B (en) * 2013-05-23 2017-12-15 华为终端有限公司 Message registration call method and equipment
CN103473295A (en) * 2013-09-04 2013-12-25 厦门亿联网络技术股份有限公司 Method for reading set-quantity of chat records in XML (extensive markup language) files
KR101622871B1 (en) * 2015-02-03 2016-05-19 라인 가부시키가이샤 Method, system and recording medium for managing conversation contents in messenger
CN105260269A (en) * 2015-11-02 2016-01-20 广东欧珀移动通信有限公司 Backup method and device as well as terminal for chatting records
CN108600087B (en) * 2018-04-12 2021-08-20 北京五八信息技术有限公司 Method, device, electronic equipment and storage medium for processing chat records
CN115086264B (en) * 2022-08-23 2022-12-13 北京普华恒信技术服务有限公司 Data set generation method, equipment and computer system
CN117150168A (en) * 2023-10-09 2023-12-01 深圳麦风科技有限公司 Chat record output method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863058A (en) * 2005-05-12 2006-11-15 华为技术有限公司 Method for user to obtain historical record in chat chamber and chat chamber service system
CN101034455A (en) * 2006-03-06 2007-09-12 腾讯科技(深圳)有限公司 Method and system for implementing online advertisement
CN101119327A (en) * 2006-08-04 2008-02-06 陆悦 Instant chatting implementation system and method thereof
CN101136873A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method and system for transmitting advertisement to users on instant communication platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BRPI0410362B1 (en) * 2003-05-16 2017-06-20 Google Inc. SYSTEMS AND METHODS OF SHARING NETWORK AND NETWORK MEDIA
CN101072168B (en) * 2007-06-22 2011-11-02 腾讯科技(深圳)有限公司 Multi-language instant communication terminal and its system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863058A (en) * 2005-05-12 2006-11-15 华为技术有限公司 Method for user to obtain historical record in chat chamber and chat chamber service system
CN101034455A (en) * 2006-03-06 2007-09-12 腾讯科技(深圳)有限公司 Method and system for implementing online advertisement
CN101119327A (en) * 2006-08-04 2008-02-06 陆悦 Instant chatting implementation system and method thereof
CN101136873A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method and system for transmitting advertisement to users on instant communication platform

Also Published As

Publication number Publication date
CN102130844A (en) 2011-07-20
WO2011088720A1 (en) 2011-07-28

Similar Documents

Publication Publication Date Title
CN102130844B (en) Method and system for acquiring Web chat logs
US10834031B2 (en) Information exchange method, client, and apparatus
WO2017125051A1 (en) Message sending method and device, computer terminal and storage medium
US11711434B2 (en) Information transmission method and device
US8024400B2 (en) Method and system for transferring content from the web to mobile devices
EP3300311A1 (en) Interaction method and apparatus for smart watch and wechat platform, and smart watch
CN103001860A (en) Achieving system for converged communication Web instant messages
WO2006013403A3 (en) Method and system for instant message using http url technology
EP2302870A3 (en) Session sharing system, session sharing method, session sharing program, and user terminal
CN102413436A (en) Method and system for transmitting information, and browser on mobile terminal
WO2010019000A3 (en) Method and system for providing input in home network using upnp
CN102137126B (en) System and method for updating web data
WO2013097740A1 (en) Method and device for prompting dynamic information about contact person
CN108989179B (en) Message processing method and device and storage medium
WO2017045190A1 (en) Method, apparatus and device for instructing operations on terminal device
EP2605460A1 (en) Method, apparatus, and system for transferring file to user of instant message system
CN101202716A (en) Method for storing information and communication system and related devices
US20140254788A1 (en) Communication between a mobile device and a call center
WO2017000572A1 (en) Internet content adaptation protocol-based communication method, client and server
CN103259771A (en) Method and device of interaction of network applications
CN102236676A (en) Method and device for acquiring picture information by session window
KR20140009581A (en) Method, system, and device for switching between network applications, and computer storage medium
CN103312750A (en) Method and system for uploading webpage picture to network album
CN104104575B (en) A kind of means of communication and system of instant communication group
WO2008039635A3 (en) Semantic image analysis

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