CN107018068A - The method and system that file is transmitted during a kind of instant messaging - Google Patents

The method and system that file is transmitted during a kind of instant messaging Download PDF

Info

Publication number
CN107018068A
CN107018068A CN201710378277.1A CN201710378277A CN107018068A CN 107018068 A CN107018068 A CN 107018068A CN 201710378277 A CN201710378277 A CN 201710378277A CN 107018068 A CN107018068 A CN 107018068A
Authority
CN
China
Prior art keywords
file
characteristic value
sent
terminal
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710378277.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.)
Shenzhen Protruly Electronic Co Ltd
Original Assignee
Shenzhen Protruly Electronic 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 Shenzhen Protruly Electronic Co Ltd filed Critical Shenzhen Protruly Electronic Co Ltd
Priority to CN201710378277.1A priority Critical patent/CN107018068A/en
Publication of CN107018068A publication Critical patent/CN107018068A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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]

Abstract

The present invention discloses a kind of method and system of file transmission during instant messaging, wherein, methods described includes step:First terminal is obtained file to be sent and the characteristic value of the file to be sent is calculated using digest algorithm, sets up file to be sent and the one-to-one relation of characteristic value;Inquire about and whether there is the characteristic value corresponding with file to be sent in server, if in the presence of server directly sends the characteristic value to second terminal;The second terminal is received after characteristic value, and inquiry in the local database whether there is the file corresponding with the characteristic value, if in the presence of directly calling the file from local data base and show;The present invention efficiently solves the problem of repeating to upload in existing instant messaging and download file, improves file transmission efficiency and reduces the waste of Internet resources, is brought convenience to user.

Description

The method and system that file is transmitted during a kind of instant messaging
Technical field
The present invention relates to the method and system that file during the communications field, more particularly to a kind of instant messaging is transmitted.
Background technology
Communication software is a kind of interpersonal software for sending information mutually, in existing instant messaging chat system In, when needing to send the fileinfos such as picture, video or voice, the step of generally using for:1st, fileinfo is uploaded to Server, obtains the website information of file on the server after uploading successfully;2nd, the website information is sent to server, taken The website information is sent to chatting object's terminal by business device;3rd, chatting object's terminal downloads file according to the website information, Then associated documents information is shown.
Obviously, in communication process, there is the process for repeating to upload and download in existing document transmission method, this is greatly Waste Internet resources.
Therefore, prior art has yet to be improved and developed.
The content of the invention
In view of above-mentioned the deficiencies in the prior art, are transmitted it is an object of the invention to provide file during a kind of instant messaging Method and system, it is intended in the presence of repeating upload and downloading the process of file when solving existing communication application chat, cause network to provide The problem of source is wasted.
Technical scheme is as follows:
A kind of method that file is transmitted during instant messaging, wherein, including step:
A, first terminal are obtained file to be sent and the characteristic value of the file to be sent are calculated using digest algorithm, set up pending Send file and the one-to-one relation of characteristic value;
It whether there is the characteristic value corresponding with file to be sent in B, inquiry server, if in the presence of server is directly by institute Characteristic value is stated to send to second terminal;
C, the second terminal are received after characteristic value, and inquiry is with the presence or absence of corresponding with the characteristic value in the local database File, if in the presence of directly calling the file from local data base and show.
The method that file is transmitted during described instant messaging, wherein, the step A is specifically included:
A1, using md5 algorithms file to be sent is carried out encoding and obtaining md5 values, using the md5 values as file to be sent spy Value indicative.
The method that file is transmitted during described instant messaging, wherein, the step B also includes:
If the characteristic value corresponding with file to be sent is not present in B1, server, first by the file to be sent and spy Value indicative uploads onto the server and preserved, and then server sends the characteristic value to second terminal.
The method that file is transmitted during described instant messaging, wherein, the step C also includes:
If file corresponding with the characteristic value is not present in C1, local data base, network request is sent, from server Download file corresponding with the characteristic value and show.
During described instant messaging file transmit method, wherein, the file to be sent be picture, text, One kind of video or voice.
The system that file is transmitted during a kind of instant messaging, wherein, including first terminal, second terminal and service Device, wherein,
The first terminal is used for the characteristic value for obtaining file to be sent and the file to be sent being calculated using digest algorithm, builds Found file to be sent and the one-to-one relation of characteristic value;And with the presence or absence of corresponding with file to be sent in inquiry server Characteristic value;
The server is used to send the characteristic value to second terminal;
The second terminal is used to receive after characteristic value, and inquiry is with the presence or absence of corresponding with the characteristic value in the local database File, if in the presence of directly calling the file from local data base and show.
The system that file is transmitted during described instant messaging, wherein, the first terminal specifically uses md5 algorithms pair File to be sent encode obtaining md5 values, using the md5 values as file to be sent characteristic value.
The system that file is transmitted during described instant messaging, wherein, the first terminal is additionally operable to work as in server During in the absence of the characteristic value corresponding with file to be sent, then the file to be sent is uploaded onto the server and protected with characteristic value Deposit.
The system that file is transmitted during described instant messaging, wherein, the second terminal is additionally operable to work as local data When file corresponding with the characteristic value is not present in storehouse, then network request is sent, downloaded and the characteristic value from server Corresponding file is simultaneously shown.
During described instant messaging file transmit system, wherein, the file to be sent be picture, text, One kind of video or voice.
Beneficial effect:The method that file is transmitted during the instant messaging that the present invention is provided, first by being treated described in calculating The characteristic value of file is sent, file to be sent and the one-to-one relation of characteristic value is set up;When inquiring and treat in the server The corresponding characteristic value of file is sent, then is directly sent the characteristic value to second terminal;The second terminal receives feature After value, inquiry in the local database whether there is the file corresponding with the characteristic value, if in the presence of directly from local number According to calling the file in storehouse and show.The present invention is efficiently solved to be repeated to upload and download asking for file in existing instant messaging Topic, improves file transmission efficiency and reduces the waste of Internet resources, brought convenience to user.
Brief description of the drawings
The flow chart for the method preferred embodiment that Fig. 1 transmits for file during a kind of instant messaging of the invention;
The structured flowchart for the system preferred embodiment that Fig. 2 transmits for file during a kind of instant messaging of the invention.
Embodiment
The present invention provides a kind of method and system of file transmission during instant messaging, to make the purpose of the present invention, skill Art scheme and effect are clearer, clear and definite, and the present invention is described in more detail below.It should be appreciated that tool described herein Body embodiment only to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is the flow of document transmission method preferred embodiment during a kind of instant messaging of the invention Figure, as shown in figure 1, wherein, including step:
S100, first terminal are obtained file to be sent and the characteristic value of the file to be sent are calculated using digest algorithm, are set up File to be sent and the one-to-one relation of characteristic value;
It whether there is the characteristic value corresponding with file to be sent in S200, inquiry server, if in the presence of server directly will The characteristic value is sent to second terminal;
S300, the second terminal are received after characteristic value, and inquiry is with the presence or absence of relative with the characteristic value in the local database The file answered, if in the presence of directly calling the file from local data base and show.
Specifically, the present invention sets up file to be sent and spy first by calculating the characteristic value of the file to be sent The one-to-one relation of value indicative;, then directly will be described when inquiring the characteristic value corresponding with file to be sent in the server Characteristic value is sent to second terminal;The second terminal is received after characteristic value, and inquiry in the local database whether there is and institute The corresponding file of characteristic value is stated, if in the presence of directly calling the file from local data base and show;It is of the invention effective The problem of repeating to upload in existing instant messaging and download file is solved, file transmission efficiency is improved and reduces network money The waste in source, brings convenience to user.
Further, in the step S100, conventional digest algorithm including Haval, Ripemd, sha-1 and md5 etc., Preferably md5 algorithms of the invention to file to be sent encode obtaining md5 values, using the md5 values as file to be sent spy Value indicative;Informative abstract(Message Digest 5, md5)Algorithm belongs to a kind of widely used hash letter of computer safety field Number, mainly to provide the integrity protection of message;Md5 algorithms can produce unique corresponding informative abstract to a certain file, from And prevent file to be tampered;Md5 algorithms have more advantages:The file data of random length, the md5 values length calculated is all solid Fixed, and the md5 values of file have uniqueness;File data is made any change, even if only changing 1 byte, gained To md5 values have very big difference;Therefore, the present invention using md5 values as file to be sent characteristic value, it is ensured that file it is unique Property.
Further, in the step S200, by inquiring about in server with the presence or absence of corresponding with file to be sent Characteristic value, if in the presence of server directly sends the characteristic value to second terminal;
If the characteristic value corresponding with file to be sent is not present in server, first by the file to be sent and characteristic value Upload onto the server and preserve, then server sends the characteristic value to second terminal.
Specifically, server is the connecting platform that communications applications carry out information transfer, possesses cloud storage function, can basis Immediately the setting applied preserves the file of all uploads within a certain period of time, and it is 15 days for example to set the holding time;When the first end File to be sent and its md5 value at end are set up after one-to-one relationship, can inquire about in the server first whether there is with it is pending File identical md5 values are sent, if in the presence of file to be sent need not uploading onto the server with md5 values, the server can Directly the md5 values inquired are sent to second terminal;Now, the process that a file is uploaded can be saved, network is also saved Resource.
Certainly, if be not present in server with file identical md5 values to be sent, need the text to be sent first Part uploads onto the server and preserved with its md5 value, is then sent the md5 values of the file to be sent to second by server Terminal.
Further, in the step S300, after the second terminal receives characteristic value, inquire about in the local database With the presence or absence of the file corresponding with the characteristic value, if in the presence of directly calling the file from local data base and show Show;Further, when file corresponding with the characteristic value is not present in local data base, then network request is sent, from clothes File corresponding with the characteristic value is downloaded in business device and is shown.
Specifically, first terminal and second terminal using instant messaging application when carrying out information communication, the text of communication Part can be automatically saved in local data base;Therefore after second terminal receives md5 values, second terminal can counted locally in advance According in storehouse inquiry whether there is the file corresponding with the md5 values, if in the presence of, directly called from local data base described in File is simultaneously shown;So as to avoid downloading the file again from server, Internet resources have been saved.
Certainly, if the file corresponding with the md5 values is can not find in local data storehouse, sending network please Ask, file corresponding with the md5 values is downloaded from server, and shown in the second terminal.
It is preferred that in the present invention, the file to be sent is one kind of picture, text, video or voice.
Based on the above method, the system that the present invention also provides file transmission during a kind of instant messaging, as shown in Fig. 2 Wherein, including first terminal 10, second terminal 20 and server 30, the first terminal passes through server with described second eventually Communication is realized at end, wherein,
The first terminal 10 is used for the characteristic value for obtaining file to be sent and the file to be sent being calculated using digest algorithm, Set up file to be sent and the one-to-one relation of characteristic value;And with the presence or absence of relative with file to be sent in inquiry server The characteristic value answered;
The server 30 is used to send the characteristic value to second terminal;
The second terminal 20 is used to receive after characteristic value, and inquiry is with the presence or absence of relative with the characteristic value in the local database The file answered, if in the presence of directly calling the file from local data base and show.
The system that file is transmitted during described instant messaging, wherein, the first terminal 10 specifically uses md5 algorithms File to be sent is carried out to encode and obtain md5 values, using the md5 values as file to be sent characteristic value.
The system that file is transmitted during described instant messaging, wherein, the first terminal 10 is additionally operable to work as server In when the characteristic value corresponding with file to be sent is not present, then the file to be sent and characteristic value are uploaded onto the server simultaneously Preserve.
The system that file is transmitted during described instant messaging, wherein, the second terminal 20 is additionally operable to locally to count During according to file corresponding with the characteristic value is not present in storehouse, then network request is sent, downloaded and the feature from server It is worth corresponding file and shows.
During described instant messaging file transmit system, wherein, the file to be sent be picture, text, One kind of video or voice.
In summary, the method that file is transmitted during the instant messaging that the present invention is provided, first by being treated described in calculating The characteristic value of file is sent, file to be sent and the one-to-one relation of characteristic value is set up;When inquiring and treat in the server The corresponding characteristic value of file is sent, then is directly sent the characteristic value to second terminal;The second terminal receives feature After value, inquiry in the local database whether there is the file corresponding with the characteristic value, if in the presence of directly from local number According to calling the file in storehouse and show;The present invention is efficiently solved to be repeated to upload and download asking for file in existing instant messaging Topic, improves file transmission efficiency and reduces the waste of Internet resources, brought convenience to user.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (10)

1. a kind of method that file is transmitted during instant messaging, it is characterised in that including step:
A, first terminal are obtained file to be sent and the characteristic value of the file to be sent are calculated using digest algorithm, set up pending Send file and the one-to-one relation of characteristic value;
It whether there is the characteristic value corresponding with file to be sent in B, inquiry server, if in the presence of server is directly by institute Characteristic value is stated to send to second terminal;
C, the second terminal are received after characteristic value, and inquiry is with the presence or absence of corresponding with the characteristic value in the local database File, if in the presence of directly calling the file from local data base and show.
2. the method that file is transmitted during instant messaging according to claim 1, it is characterised in that the step A tools Body includes:
A1, using md5 algorithms file to be sent is carried out encoding and obtaining md5 values, using the md5 values as file to be sent spy Value indicative.
3. the method that file is transmitted during instant messaging according to claim 1, it is characterised in that the step B is also Including:
If the characteristic value corresponding with file to be sent is not present in B1, server, first by the file to be sent and spy Value indicative uploads onto the server and preserved, and then server sends the characteristic value to second terminal.
4. the method that file is transmitted during instant messaging according to claim 1, it is characterised in that the step C is also Including:
If file corresponding with the characteristic value is not present in C1, local data base, network request is sent, from server Download file corresponding with the characteristic value and show.
5. the method that file is transmitted during instant messaging according to claim 1, it is characterised in that described to be sent File is one kind of picture, text, video or voice.
6. the system that file is transmitted during a kind of instant messaging, it is characterised in that including first terminal, second terminal and clothes Business device, wherein,
The first terminal is used for the characteristic value for obtaining file to be sent and the file to be sent being calculated using digest algorithm, builds Found file to be sent and the one-to-one relation of characteristic value;And with the presence or absence of corresponding with file to be sent in inquiry server Characteristic value;
The server is used to send the characteristic value to second terminal;
The second terminal is used to receive after characteristic value, and inquiry is with the presence or absence of corresponding with the characteristic value in the local database File, if in the presence of directly calling the file from local data base and show.
7. the system that file is transmitted during instant messaging according to claim 6, it is characterised in that the first terminal It is specific that file to be sent encode using md5 algorithms to obtain md5 values, using the md5 values as file to be sent feature Value.
8. the system that file is transmitted during instant messaging according to claim 6, it is characterised in that the first terminal It is additionally operable to when the characteristic value corresponding with file to be sent is not present in server, then by the file to be sent and characteristic value Upload onto the server and preserve.
9. the system that file is transmitted during instant messaging according to claim 6, it is characterised in that the second terminal It is additionally operable to when file corresponding with the characteristic value is not present in local data base, then network request be sent, from server Download file corresponding with the characteristic value and show.
10. the system that file is transmitted during instant messaging according to claim 6, it is characterised in that described to be sent File be picture, text, one kind of video or voice.
CN201710378277.1A 2017-05-25 2017-05-25 The method and system that file is transmitted during a kind of instant messaging Pending CN107018068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710378277.1A CN107018068A (en) 2017-05-25 2017-05-25 The method and system that file is transmitted during a kind of instant messaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710378277.1A CN107018068A (en) 2017-05-25 2017-05-25 The method and system that file is transmitted during a kind of instant messaging

Publications (1)

Publication Number Publication Date
CN107018068A true CN107018068A (en) 2017-08-04

Family

ID=59452429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710378277.1A Pending CN107018068A (en) 2017-05-25 2017-05-25 The method and system that file is transmitted during a kind of instant messaging

Country Status (1)

Country Link
CN (1) CN107018068A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711687A (en) * 2020-06-15 2020-09-25 肖伟峰 File data transmission and storage method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350790A (en) * 2007-07-19 2009-01-21 阿里巴巴集团控股有限公司 Document transmission method and device base on instant communications system
CN102821057A (en) * 2011-06-09 2012-12-12 腾讯科技(深圳)有限公司 File sending method, device and system
CN103780633A (en) * 2012-10-17 2014-05-07 腾讯科技(深圳)有限公司 Method and device for mobile terminal to upload file, and method and device for network server to upload file
CN104462591A (en) * 2014-12-31 2015-03-25 上海斐讯数据通信技术有限公司 Method for avoiding repeated download and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350790A (en) * 2007-07-19 2009-01-21 阿里巴巴集团控股有限公司 Document transmission method and device base on instant communications system
CN102821057A (en) * 2011-06-09 2012-12-12 腾讯科技(深圳)有限公司 File sending method, device and system
CN103780633A (en) * 2012-10-17 2014-05-07 腾讯科技(深圳)有限公司 Method and device for mobile terminal to upload file, and method and device for network server to upload file
CN104462591A (en) * 2014-12-31 2015-03-25 上海斐讯数据通信技术有限公司 Method for avoiding repeated download and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711687A (en) * 2020-06-15 2020-09-25 肖伟峰 File data transmission and storage method
CN111711687B (en) * 2020-06-15 2023-03-24 肖伟峰 File data transmission and storage method

Similar Documents

Publication Publication Date Title
CN103535004B (en) Method for promoting anonymity audio and video communication and system based on web
GB2581037A (en) Cloud-based image access systems and methods
US20150215400A1 (en) File Upload Method And System
CN107258098B (en) Method and apparatus for sharing rich information associated with a call
CN104158816A (en) Authentication method and device as well as server
PH12018501972A1 (en) Third party sponsored short messaging service
CN101291300B (en) Implementing method, apparatus and user equipment for document transmission in message service
US20120014321A1 (en) Messaging activity feed
CN110753315B (en) Video short message issuing processing method and device
KR100977188B1 (en) Deleting mechanism in SIP multimedia services
CN101150593A (en) A method and system for data upload
KR100842868B1 (en) Spam short message blocking system using call back short message and spam short message blocking method using the same
CN107018068A (en) The method and system that file is transmitted during a kind of instant messaging
US20140101272A1 (en) Method and system for group number-based microblog aggregation
CN110324302B (en) IOT equipment communication method
CN1601960A (en) Safety authentication method of cell phone bank system
CN106412893A (en) Rapid Portal authentication method, system, and WIFI device
CN108173807B (en) Unified message sending and processing method and device
CN105471818B (en) Method and system for information transmission between application software
KR20070030323A (en) A method and apparatus for delivering keys
CN103716199B (en) Cross protocol P2P security content monitoring method
CN104796311B (en) A kind of method, client, server and the system for sending information of transmission information
CN109962962B (en) Socket connection method and device
US20140019588A1 (en) Distributed Local Text, Audio and Video And Application-Specific Messaging Service With Video Recording In A Battery-Operated Wireless Mobile Data Server With Removable Solid-State Memory Modules
RU2378786C2 (en) Method, system device and program for transmitting multimedia data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170804