CN105357105A - Conversation speed increase device and method - Google Patents

Conversation speed increase device and method Download PDF

Info

Publication number
CN105357105A
CN105357105A CN201510746167.7A CN201510746167A CN105357105A CN 105357105 A CN105357105 A CN 105357105A CN 201510746167 A CN201510746167 A CN 201510746167A CN 105357105 A CN105357105 A CN 105357105A
Authority
CN
China
Prior art keywords
session
directory entry
physical address
good friend
storage physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510746167.7A
Other languages
Chinese (zh)
Other versions
CN105357105B (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.)
HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510746167.7A priority Critical patent/CN105357105B/en
Publication of CN105357105A publication Critical patent/CN105357105A/en
Application granted granted Critical
Publication of CN105357105B publication Critical patent/CN105357105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a conversation speed increase device and method. The device comprises a receiving module, a query module, an acquisition module and an operation module, wherein the receiving module is used for receiving a conversation operation request for a specific friend, wherein the conversation operation request comprises a user identifier of the specific friend; the query module is used for querying an index identifier corresponding to the user identifier in a mapping table; the acquisition module is used for acquiring an index entry corresponding to the index identifier, wherein the index entry comprises a storage physical address, and the storage physical address is used for storing historical messages in the conversation of the specific friend; the operation module is used for accessing the historical messages included in the conversation of the specific friend according to the storage physical address. Through the adoption of the conversation speed increase device and method disclosed by the invention, the conversation access speed can be increased when a large number of historical messages exist in the conversation.

Description

A kind of apparatus and method promoting session speed
Technical field
The present invention relates to computer network field, particularly relate to a kind of apparatus and method promoting session speed.
Background technology
Along with the universal of smart mobile phone and the develop rapidly of mobile Internet, instant messaging also enters a new stage, there is the various instant communication client based on mobile terminal, user can carry out instant messaging by mobile terminal and other multiple good friends, and in this locality or server, automatically preserve Message Record, again can see that when user opens client again user follows the history message record of other good friends.
In prior art, when user opens the session of a good friend by the session list point of client, thus during the history message record of access and this good friend, client will be inquired about within the storage system according to the user name of good friend and obtain the Message Record of this user.But along with the growth of service time, good friend's Message Record of user also increases gradually, the entering of session, to inquire about and renewal speed also can obviously reduce, namely session speed is slack-off.
Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of apparatus and method promoting session speed, can improve in session the speed of access session when having a large amount of history message.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: provide a kind of device promoting session speed, the mapping table between user ID and index mark had been generated before session operation, this device comprises receiver module, for receiving the session operation requests to specifying good friend, in described session operation requests, comprise the user ID of described appointment good friend; Enquiry module, in described mapping table, inquires about the index mark that described user ID is corresponding; Acquisition module, for obtaining directory entry corresponding to described index mark, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message; Operational module, for specifying according to described storage physical address access is described the history message comprised in the session of good friend.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: provide a kind of method promoting session speed, the mapping table between user ID and index mark had been generated before session operation, the method comprises: receive the session operation requests to specifying good friend, comprises the user ID of described appointment good friend in described session operation requests; In described mapping table, inquire about the index mark that described user ID is corresponding; Obtain the directory entry that described index mark is corresponding, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message; The history message comprised in session according to described storage physical address access described appointment good friend.
Being different from prior art, the device of lifting session speed of the present invention, receiving the session operation requests to specifying good friend, in described session operation requests, comprise the user ID of specifying good friend; In mapping table between the user ID generated in advance and index mark, inquire about the index mark that described user ID is corresponding; Obtain the directory entry that described index mark is corresponding, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message; The history message comprised in session according to described storage physical address access described appointment good friend; Thus realize the access speed can accelerating session when there being a large amount of history message in session.
Accompanying drawing explanation
Fig. 1 is a kind of structural representation promoting the device embodiments of session speed provided by the invention;
Fig. 2 is a kind of schematic flow sheet promoting the method execution mode of session speed provided by the invention;
Fig. 3 is the composition structural representation of directory entry under the first implementation in the corresponding embodiment of Fig. 2 of the present invention;
Fig. 4 is the first optional composition structural representation of directory entry under the second implementation in the corresponding embodiment of Fig. 2 of the present invention;
Fig. 5 is the second optional composition structural representation of directory entry under the second implementation in the corresponding embodiment of Fig. 2 of the present invention.
Embodiment
Below in conjunction with embodiment, more detailed description is further done to technical scheme of the present invention.Obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all should belong to the scope of protection of the invention.
Consult Fig. 1, Fig. 1 is a kind of execution mode structural representation promoting the device of session speed provided by the invention, the mapping table between user ID and index mark had been generated before session operation, user ID is character string type, index is designated integer type, an example of this mapping table is as shown in table 1, and described mapping table can be kept in the memory of this device.
Mapping table between table 1 user ID and index mark
User ID Ade morning in morning Like woods Angel Baby Purple light fairy maiden
Index identifies 1 2 3 4 ... 500
Common, it (can be Chinese and English character that contact name, i.e. user ID that user is arranged take at most 20-24 byte, a Chinese character needs 2 bytes, an English character needs 1 byte), and good friend's number of user generally can not more than 10,000, therefore, as long as the index mark of integer type type takies 2 bytes at most.
This device 100 comprises: receiver module 110, enquiry module 120, acquisition module 130, operational module 140.
Wherein, receiver module 110, for receiving the session operation requests to specifying good friend, comprises the user ID of described appointment good friend in described session operation requests.Concrete, the session operation requests that receiver module 110 receives can be enter session request, session inquiry request, more new session request or delete session request.
Enquiry module 120 connects receiver module 110, in described mapping table, and the index mark that the user ID that the request that inquire-receive module 110 receives comprises is corresponding.Such as, the user ID of specifying good friend is " Baby ", finds corresponding index be designated 4 according to table 1.
Acquisition module 130, for obtaining directory entry corresponding to described index mark, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message.
Optionally, when instant message client preserves good friend's history message, a directory entry can be all created for each history message of good friend, this directory entry only points to a history message, now, acquisition module 130 is specifically for obtaining multiple directory entries corresponding to described index mark, and each described directory entry comprises the storage physical address of a history message in the session of described appointment good friend, and the rise time of a described history message.Along with increasing gradually of user good friend history message, directory entry corresponding to this good friend's session also increases gradually, and each directory entry comprises the identification information of good friend, the index of the integer type type taking up room little mark is adopted to substitute the user ID of the large character string type that takes up room in the present embodiment, decrease the time obtained required for a large amount of directory entry, thus improve session access speed.
Optionally, when instant message client preserves good friend's history message, a directory entry can be only created for all history messages of good friend, this directory entry points to all history messages, now, acquisition module 130 is specifically for obtaining a directory entry corresponding to described index mark, and described directory entry comprises the storage physical address of each history message in the session of described appointment good friend, and the rise time of each history message described.Further, store the memory space of physical address and can be regular length for depositing, also can be variable-length in directory entry, when adopting variable-length, also comprising each in described directory entry and storing the memory space length of physical address in described directory entry.Share a directory entry in the present embodiment and point to all history messages, and adopt the index of the integer type type taking up room little mark to substitute the user ID of the large character string type that takes up room, even if along with increasing gradually of user good friend history message, repeated obtain directory entry is not needed yet, decrease the time obtained required for directory entry, thus improve session access speed.
Operational module 140, for specifying according to described storage physical address access is described the history message comprised in the session of good friend.
Be different from prior art, the device of lifting session speed of the present invention had generated the mapping table between the user ID of character string type and the index mark of integer type type before session operation, after receiving the session operation requests to appointment good friend, comprise the user ID of specifying good friend in described session operation requests, inquire about the index mark that this user ID is corresponding in the mapping table; Obtain the directory entry that described index mark is corresponding, described directory entry comprises the storage physical address of history message in the session for storing described appointment good friend; The history message comprised in session according to described storage physical address access described appointment good friend, thus achieve the access speed can accelerating session when there being a large amount of history message in session.
Consult Fig. 2, Fig. 2 is a kind of execution mode structural representation promoting the method for session speed provided by the invention, the mapping table between user ID and index mark had been generated before session operation, user ID is character string type, index is designated integer type, shown in the table 1 of the example embodiment as corresponding in Fig. 1 of this mapping table, described mapping table can be kept in the memory of instant message client place device, also can be kept in server of instant message.
Common, it (can be Chinese and English character that contact name, i.e. user ID that user is arranged take at most 20-24 byte, a Chinese character needs 2 bytes, an English character needs 1 byte), and good friend's number of user generally can not more than 10,000, therefore, as long as the index mark of integer type type takies 2 bytes at most.
The step of the method comprises:
S201: receive the session operation requests to specifying good friend, comprises the user ID of described appointment good friend in described session operation requests.
Concrete, the session operation requests received can be enter session request, session inquiry request, more new session request or delete session request.
S202: in the mapping table, inquires about the index mark that described user ID is corresponding.
Such as, in the present embodiment, the user ID of specifying good friend is " Baby ", finds corresponding index be designated 4 according to table 1.
S203: obtain the directory entry that described index mark is corresponding, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message.
Optionally, in the first implementation of the present embodiment, when instant message client preserves good friend's history message, each history message for good friend all creates a directory entry, and this directory entry only points to a history message.Now, this step is specially: obtain multiple directory entries that described index mark is corresponding, and each described directory entry comprises the storage physical address of a history message in the session of described appointment good friend, and the rise time of a described history message.
Fig. 3 gives the composition structure of directory entry under this first implementation, and this directory entry comprises three fields, respectively: index identifies, the message generation time, stores physical address; Wherein, index is designated integer type, takies 2 bytes, the message generation time is NTP time of integer type, and take 5 bytes, storage physical address is integer type, take 3 bytes, the total length of whole directory entry is 10 bytes, and the occupation proportion of index mark is 20%.If first character section adopts user ID (20-24 byte) in directory entry, then the total length of whole directory entry is 28-32 byte, and the occupation proportion of user ID is greater than 70%.
Increasing gradually along with user good friend history message in the first implementation of the present embodiment, directory entry corresponding to this good friend's session also increases gradually, and each directory entry comprises the identification information of good friend, because adopt the index of the integer type type taking up room little mark to substitute the user ID of the large character string type that takes up room, decrease the time obtained required for a large amount of directory entry, thus improve session access speed.
Optionally, in the second implementation of the present embodiment, when instant message client preserves good friend's history message, all history messages for good friend create a shared directory entry, this directory entry points to all history messages, and now, this step is specially: obtain the directory entry that described index mark is corresponding, described directory entry comprises the storage physical address of each history message in the session of described appointment good friend, and the rise time of each history message described.Further, store the memory space of physical address and can be regular length for depositing, also can be variable-length in directory entry, when adopting variable-length, in described directory entry, also comprise the memory space length of each storage physical address described in described directory entry.
Fig. 4 and Fig. 5 sets forth two kinds of optional composition structures of directory entry under this second implementation, Fig. 4 correspondence adopts regular length mode to store described storage physical address, this directory entry comprises multiple field, first field is index mark, and field is subsequently the message generation time of each history message successively and stores physical address; Wherein, index is designated integer type, takies 2 bytes, each message generation time is NTP time of integer type, and take 5 bytes, each storage physical address is integer type, be fixed as and take 3 bytes, along with the increased number of history message, the length of whole directory entry also increases.
Fig. 5 correspondence adopts variable-length mode to store described storage physical address, this directory entry comprises multiple field, first field is index mark, field be subsequently successively each history message the message generation time, store the space length that takies of physical address and store physical address; Wherein, index is designated integer type, take 2 bytes, each message generation time is NTP time of integer type, takies 5 bytes, and storing the space length that physical address takies is integer type, take 1 byte, each storage physical address is integer type, at least takies 1 byte, and the space length value taken by storing physical address judges.
Share a directory entry in the second implementation of the present embodiment and point to all history messages, and adopt the index of the integer type type taking up room little mark to substitute the user ID of the large character string type that takes up room, even if along with increasing gradually of user good friend history message, repeated obtain directory entry is not needed yet, decrease the time obtained required for directory entry, thus improve session access speed.
S204: the history message comprised in the session according to described storage physical address access described appointment good friend.
Be different from prior art, the method of lifting session speed of the present invention, the mapping table between the user ID of character string type and the index mark of integer type type had been generated before session operation, after receiving the session operation requests to appointment good friend, comprise the user ID of specifying good friend in described session operation requests, inquire about the index mark that this user ID is corresponding in the mapping table; Obtain the directory entry that described index mark is corresponding, described directory entry comprises the storage physical address of history message in the session for storing described appointment good friend; The history message comprised in session according to described storage physical address access described appointment good friend, thus achieve the access speed can accelerating session when there being a large amount of history message in session.
The foregoing is only embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. promote a device for session speed, before session operation, generated the mapping table between user ID and index mark, it is characterized in that, comprising:
Receiver module, for receiving the session operation requests to specifying good friend, comprises the user ID of described appointment good friend in described session operation requests;
Enquiry module, in described mapping table, inquires about the index mark that described user ID is corresponding;
Acquisition module, for obtaining directory entry corresponding to described index mark, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message;
Operational module, for specifying according to described storage physical address access is described the history message comprised in the session of good friend.
2. the device of lifting session speed according to claim 1, it is characterized in that, receiver module, for receiving specifying the session operation requests of good friend specifically to comprise: described receiver module, enters for receiving, inquire about, upgrades or delete the session request of described appointment good friend.
3. the device of lifting session speed according to claim 1, it is characterized in that, acquisition module, for obtaining directory entry corresponding to described index mark, described directory entry comprises storage physical address and specifically comprises: described acquisition module, for obtaining multiple directory entries corresponding to described index mark, each described directory entry comprises the storage physical address of a history message in the session of described appointment good friend, and the rise time of a described history message.
4. the device of lifting session speed according to claim 1, it is characterized in that, acquisition module, for obtaining directory entry corresponding to described index mark, described directory entry comprises storage physical address and specifically comprises: described acquisition module, for obtaining a directory entry corresponding to described index mark, described directory entry comprises the storage physical address of each history message in the session of described appointment good friend, and the rise time of each history message described.
5. the device of lifting session speed according to claim 4, it is characterized in that, described acquisition module, adopt variable-length space to store described storage physical address in the described directory entry obtained, in described directory entry, also comprise the memory space length of each storage physical address described in described directory entry.
6. promote a method for session speed, before session operation, generated the mapping table between user ID and index mark, it is characterized in that, comprising:
Receiving the session operation requests to specifying good friend, in described session operation requests, comprising the user ID of described appointment good friend;
In described mapping table, inquire about the index mark that described user ID is corresponding;
Obtain the directory entry that described index mark is corresponding, described directory entry comprises storage physical address, described storage physical address for store described appointment good friend session in history message;
The history message comprised in session according to described storage physical address access described appointment good friend.
7. the method for lifting session speed according to claim 6, is characterized in that, described to specifying the session of good friend operation to be specially: the session entering, inquire about, upgrade or delete described appointment good friend.
8. the method for lifting session speed according to claim 6, it is characterized in that, the directory entry that described acquisition described index mark is corresponding, described directory entry comprises storage physical address and is specially: obtain multiple directory entries that described index mark is corresponding, each described directory entry comprises the storage physical address of a history message in the session of described appointment good friend, and the rise time of a described history message.
9. the method for lifting session speed according to claim 6, it is characterized in that, the directory entry that described acquisition described index mark is corresponding, described directory entry comprises storage physical address and is specially: obtain the directory entry that described index mark is corresponding, described directory entry comprises the storage physical address of each history message in the session of described appointment good friend, and the rise time of each history message described.
10. the method for lifting session speed according to claim 9, it is characterized in that, adopt variable-length space to store described storage physical address in described directory entry, in described directory entry, also comprise the memory space length of each storage physical address described in described directory entry.
CN201510746167.7A 2015-11-06 2015-11-06 A kind of device and method promoting session speed Active CN105357105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510746167.7A CN105357105B (en) 2015-11-06 2015-11-06 A kind of device and method promoting session speed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510746167.7A CN105357105B (en) 2015-11-06 2015-11-06 A kind of device and method promoting session speed

Publications (2)

Publication Number Publication Date
CN105357105A true CN105357105A (en) 2016-02-24
CN105357105B CN105357105B (en) 2019-07-23

Family

ID=55332978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510746167.7A Active CN105357105B (en) 2015-11-06 2015-11-06 A kind of device and method promoting session speed

Country Status (1)

Country Link
CN (1) CN105357105B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769677A (en) * 2020-12-30 2021-05-07 北京达佳互联信息技术有限公司 Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN114706969A (en) * 2022-05-31 2022-07-05 深圳追一科技有限公司 Attention content acquisition method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102286A (en) * 2006-07-05 2008-01-09 阿里巴巴公司 A method and device for referring to user information in instant communication system
CN101917676B (en) * 2010-07-15 2013-06-05 雷毅 Dual mode client and method for smooth transition from short message service to instant message service
CN103457836B (en) * 2013-08-18 2018-08-28 苏州量跃信息科技有限公司 The implementation method and client of instant communication file folder

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769677A (en) * 2020-12-30 2021-05-07 北京达佳互联信息技术有限公司 Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN112769677B (en) * 2020-12-30 2023-05-23 北京达佳互联信息技术有限公司 Data synchronization method, apparatus, electronic device, storage medium, and program product
CN114706969A (en) * 2022-05-31 2022-07-05 深圳追一科技有限公司 Attention content acquisition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105357105B (en) 2019-07-23

Similar Documents

Publication Publication Date Title
CN101064630B (en) Data synchronization method and system
CN101216834B (en) File downloading method, system, device and server
CN103326925B (en) A kind of information push method and device
CN110781184A (en) Data table construction method, device, equipment and storage medium
CN103095853A (en) Cloud data center calculation capacity management system
CN111885216A (en) DNS query method, device, equipment and storage medium
CN105357105A (en) Conversation speed increase device and method
CN101483844B (en) Method and system for indexing mobile telephone number
CN100566344C (en) A kind of online user search method and system
US10327133B2 (en) Making subscriber data addressable as a device in a mobile data network
CN106302920A (en) A kind of method and apparatus updating contact person in address list phone number
CN103825922A (en) Data updating method and web server
CN106815334A (en) A kind of data query method and device for terminal
CN112148925B (en) User identification association query method, device, equipment and readable storage medium
KR20150013095A (en) Method and user device for code-based access to other device
CN107193851A (en) Data query method and device
CN106713581A (en) Communication number identification method, terminal and system
CN109246686B (en) Multi-card user address book updating method and device based on cloud technology
CN102546846A (en) Retrieving method, system and device of addresses of business servers
CN104270444A (en) Method capable of being used for configuring mobile phone application menu
US9473881B2 (en) Mobile terminals locating
CN103793417A (en) App collaboration system and method
CN104038523A (en) Method and device for storing information
EP3026843A1 (en) Code-based device access method and user device for code-based device access
CN108111329A (en) Mass users cut-in method and system based on TCP long links

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201210

Address after: 313028 Industrial Park, balidian Town, Huzhou City, Zhejiang Province

Patentee after: HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.

Address before: 201616 No. 3666 Sixian Road, Songjiang District, Shanghai

Patentee before: Phicomm (Shanghai) Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A device and method for improving session speed

Effective date of registration: 20211203

Granted publication date: 20190723

Pledgee: Zhejiang Tailong Commercial Bank Co.,Ltd. Huzhou Branch

Pledgor: HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.

Registration number: Y2021330002446

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230811

Granted publication date: 20190723

Pledgee: Zhejiang Tailong Commercial Bank Co.,Ltd. Huzhou Branch

Pledgor: HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.

Registration number: Y2021330002446