WO2014101388A1 - 传送附件的方法、装置及系统 - Google Patents

传送附件的方法、装置及系统 Download PDF

Info

Publication number
WO2014101388A1
WO2014101388A1 PCT/CN2013/078907 CN2013078907W WO2014101388A1 WO 2014101388 A1 WO2014101388 A1 WO 2014101388A1 CN 2013078907 W CN2013078907 W CN 2013078907W WO 2014101388 A1 WO2014101388 A1 WO 2014101388A1
Authority
WO
WIPO (PCT)
Prior art keywords
attachment
message
mobile client
request
server
Prior art date
Application number
PCT/CN2013/078907
Other languages
English (en)
French (fr)
Inventor
陈静聪
王俊山
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2014101388A1 publication Critical patent/WO2014101388A1/zh
Priority to US14/750,751 priority Critical patent/US20150295865A1/en

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/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/08Annexed information, e.g. attachments
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the mobile client can transfer attachments to and from the server. For example, if the mobile client sends an attachment to the server, first request information about the file server from the message server through an instant messaging message, and send an attachment to the file media server based on the related information.
  • Embodiments of the present invention provide a method, apparatus, and system for transmitting an attachment to solve at least one of the above problems.
  • An embodiment of the present invention provides a method for transmitting an attachment, including: parsing a first attachment message from a first mobile client, and sending the parsed attachment to a file server; and extracting the attachment request message according to the second mobile client Sending a request to extract the attachment to the file server; and transmitting the attachment to the second mobile client.
  • the embodiment of the present invention provides a transmission accessory device, including: a parsing unit, configured to parse a first attachment message from the first mobile client; and a sending unit, configured to send the accessory parsed by the parsing unit to the file server;
  • the sending unit is further configured to be based on a request from the second mobile client
  • the request message of the attachment is sent, and the request for extracting the attachment is sent to the file server;
  • the sending unit is further configured to send the accessory to the second mobile client.
  • An embodiment of the present invention provides a transmission attachment system, including: a first mobile client, configured to send a first attachment message to a message server, where the first attachment message carries an attachment;
  • the message server is configured to receive the first attachment message sent by the first mobile client, parse the first attachment message, send the parsed identifier to the file server, and receive a second move Sending, by the client, a request message for extracting the attachment, sending a request for extracting the attachment to the file server according to the request message for extracting the attachment, and sending the attachment to the second mobile client;
  • the file server is configured to receive the attachment sent by the message server, and save the attachment; receive the request for extracting the attachment sent by the message server, and send according to the request for extracting the attachment The attachment to the message server;
  • the second mobile client is configured to send the request message for extracting the attachment to the message server, and receive the accessory sent by the message server.
  • Embodiments of the present invention provide a non-transitory computer readable storage medium having stored thereon computer executable instructions. When the executable instructions are executed in a computer, the following steps are performed:
  • the embodiment of the present invention has the following advantages: the message server sends the attachment sent by the first mobile client to the file server, and when the second mobile client requests to extract the attachment, sends the attachment to the file server according to the request of the second mobile client. Extracting the attachment request, sending the extracted attachment to the second mobile client, because the message server sends and extracts the attachment to the file server, and does not require the first mobile client and the second mobile client to interact with the file server, Streamlining the operation of the client, improving the efficiency of the client sending and extracting attachments, and because the first mobile client and the second mobile client do not need to interact with the file server, there is no need to transmit HTTP headers, which saves traffic.
  • FIG. 1 is a schematic structural diagram of a transmission accessory system according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a message supported by a message server according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for transmitting an attachment according to a first embodiment of the present invention
  • FIG. 4 is a schematic diagram showing an example of a method for transmitting an attachment according to a second embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a transmission accessory device according to a third embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a transmission accessory device according to a fourth embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a transmission accessory device according to a fifth embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a transmission accessory system according to a sixth embodiment of the present invention.
  • Embodiments of the present invention provide a method, apparatus, and system for transmitting an attachment, which are used to save traffic and improve transmission success rate in a mobile client when transmitting an accessory.
  • FIG. 1 is a schematic structural diagram of a transmission accessory system according to an embodiment of the present invention.
  • the system includes two types of servers, one is a message server, and the other is a file server.
  • the message server and the file server can be on the same local area network.
  • the message server needs to know the IP (Internet Protocol) address of the file server, or the Uniform I Universal Resource Locator (URL), and can connect through HTTP. The way is connected to the file server.
  • IP Internet Protocol
  • URL Uniform I Universal Resource Locator
  • a mobile client that initiates instant messaging can establish a TCP connection with the messaging server.
  • the message server can provide the mobile client account information related service, the mobile client login service, and a message forwarding service between the mobile client and other mobile clients. And the mobile client does not need to know the file service The existence of the server.
  • Figure 2 is a schematic diagram of the structure of a message supported by a message server, the message including message type and message data.
  • the message type may be a normal text message or an attachment message; the message data includes a data length and a data body, and the message data varies according to the message type, but messages of different message types may be serialized by a text message or an attachment message. Made.
  • the file server can communicate using the HTTP protocol, providing services for uploading and downloading attachments.
  • the method for transmitting an attachment provided by the first embodiment of the present invention includes steps 101 to 103.
  • step 101 parsing the first attachment message from the first mobile client, and sending the parsed attachment to the file server;
  • the message server may receive the first attachment message sent by the first mobile client by using a pre-established TCP connection, where the first attachment message carries an attachment, where the attachment is a file that is sent along with the first attachment message, Includes files such as pictures, voice files, video files, and more.
  • the message server connects to the file server by using the HTTP protocol, parses the received attachment message, and sends the extracted attachment to the file server, and the file server saves the attachment.
  • a request to extract the attachment is sent to the file server according to a request message from the second mobile client for extracting the attachment.
  • the message server receives the request message for extracting the attachment sent by the second mobile client, and the message server sends the extracted message to the file server according to the received request message for extracting the attachment. Attachment request.
  • step 103 the accessory is sent to the second mobile client.
  • the message server receives the extracted attachment sent by the file server, and may serialize the extracted attachment to a second attachment message and send the message to the second mobile client.
  • the first mobile client that sends the attachment and the second mobile client that extracts the attachment may be the same mobile client.
  • the message server sends the accessory from the first mobile client to the file server, and when the second mobile client requests to extract the accessory, sends the extracted attachment to the file server according to the request message of the second mobile client. Request to send the extracted attachment to the second mobile client. Since the message server sends and extracts attachments to the file server, the first mobile client is not needed The second mobile client interacts with the file server to refine the operation of the client, improve the efficiency of the client sending and extracting the attachment; and because the first client and the second client do not need to interact with the file server, Therefore, there is no need to transmit HTTP headers, which saves traffic.
  • a method for transmitting an accessory according to a second embodiment of the present invention includes steps 201 to 205.
  • step 201 the first attachment message sent by the first mobile client is received, and the first accessory message carries the accessory.
  • the first mobile client serializes the attachment, saves it to the "data body” field in the attachment message, and calculates the serialized data length, which is saved in the first attachment message.
  • the "data length” field, the "message type” field is stored in the “message type” field, and the first attachment message processed as described above is sent to the message server.
  • step 202 the first attachment message is parsed, the attachment carried in the first attachment message is obtained, and the file key value File Key of the attachment is generated, and the corresponding relationship exists between the attachment and the File Key.
  • the message server parses each field in the first attachment message to obtain an attachment carried in the first attachment message, and may generate a file key of the attachment by using a hash algorithm, for example, may perform a message digest algorithm on the attachment.
  • the fifth version (MD5, Message Digest Algorithm) operates to generate a unique File Key, and a correspondence exists between the attachment and the File Key. For example, you can number the attachments and record the number between the attachment and the File Key—the File Key is the unique identifier that identifies the attachment.
  • the message server can save all message fields except "data length” and "data body”.
  • step 203 the parsed identifier is sent to the file server.
  • the message server connects to the file server by using the HTTP protocol, and sends the attachment to the file server by using a POST request mode, where the POST request parameter includes a file key corresponding to the attachment, so that the file server saves the file server. Attaching the attachment and saving the correspondence between the attachment and the File Key.
  • the POST request is a submission method in a webpage form, and the request parameter is generally included in the HTTP BODY, and is often used to upload a file.
  • the message server may also send the correspondence between the accessory and the file key to the access The mobile client of the network.
  • the corresponding relationship between the number of the accessory and the file key is sent to the mobile client in the access network, so that the mobile client in the network only needs to carry the related information of the accessory in the request when requesting the attachment from the message server.
  • the message server can know the file key corresponding to the attachment requested by the mobile client according to the corresponding relationship.
  • a request for extracting the attachment is sent to the file server according to the received request message for extracting the attachment sent by the second mobile client.
  • the message server After receiving the request message for extracting the attachment sent by the second mobile client, the message server reads the request message, and learns the second mobile client according to the information about the accessory carried in the request message.
  • the attachment to be obtained by the terminal according to the correspondence between the attachment and the File Key, reversely finds the File Key corresponding to the attachment, and uses the File Key as a parameter of the GET request, and sends the GET to the file server. Request to extract the attachment.
  • a Get request is a submission method in a web form that submits data via a URL, and the request parameters are included in the URL.
  • step 205 the extracted attachment is serialized into a second attachment message and sent to the second mobile client.
  • the message server serializes the attachment extracted from the file server, and saves the serialized attachment to a "data body" field of the second attachment message, the second attachment message being used to send the attachment to the second mobile client Extracted attachments.
  • the message server may further calculate a data length in the second attachment message, save the data length to a "data length" field of the second attachment message, and send the second attachment message that has undergone the processing to the After the second mobile client receives the second attachment message, the second mobile client parses the second attachment message to obtain an attachment carried in the second attachment message.
  • the message server parses the attachment message sent by the first mobile client, acquires the attachment carried in the first attachment message, generates a file key value corresponding to the attachment, and sends the attachment through the POST request mode.
  • the POST request parameter includes the corresponding relationship between the two.
  • the server sends and extracts the attachment without the first mobile client and the second mobile client interacting with the file server, refining the operation of the client, improving the efficiency of the client sending and extracting the attachment, and because the first mobile client And the second mobile client does not need to interact with the file server, so there is no need to transmit HTTP headers, which can save traffic.
  • an apparatus for transmitting an attachment includes: a parsing unit 301, configured to parse a first attachment message from a first mobile client; and a sending unit 302, configured to: The attachment obtained by parsing 301 is sent to the file server;
  • the sending unit 302 is further configured to send, according to the request message for extracting the accessory from the second mobile client, a request for extracting the accessory to the file server;
  • the sending unit 302 is further configured to send the extracted accessory to the second mobile client.
  • the process of implementing the respective functions in the device for transmitting the accessory in the embodiment of the present invention refer to the specific content described in the foregoing embodiment shown in FIG. 3, and details are not described herein again.
  • the sending unit 302 sends the accessory from the first mobile client to the file server, and when the second mobile client requests to extract the accessory, according to the request message of the second mobile client for extracting the accessory, the sending unit 302 sends the request message to the file server.
  • the file server sends a request for extracting an attachment, and the sending unit 302 sends the extracted attachment to the second mobile client.
  • the message server sends and extracts the attachment to the file server
  • the first mobile client and the second mobile client do not need to interact with the file server
  • the operation of the client is enhanced, and the efficiency of sending and extracting the attachment by the client is improved, and because A mobile client and a second mobile client do not need to interact with the file server, so there is no need to transmit HTTP headers, which saves traffic.
  • a fourth embodiment of the present invention provides another apparatus for transmitting an attachment, which further includes a receiving unit 303 as compared with the apparatus for transmitting an attachment provided by the third embodiment.
  • the receiving unit 303 is configured to receive a first attachment message from the first mobile client, where the attachment message carries an attachment.
  • the parsing unit 301 can parse the first attachment message received by the receiving unit 303, and send the parsed attachment to the file server by the sending unit 302.
  • the receiving unit 303 is further configured to receive a request message for extracting the accessory from the second mobile client.
  • the sending unit 302 may send a request for extracting the attachment to the file server according to the request that the receiving unit receives the attachment.
  • a fifth embodiment of the present invention provides another apparatus for transmitting an attachment. Compared with the fourth embodiment, the method further includes:
  • the processing unit 304 is configured to acquire an accessory carried in the first attachment message.
  • the generating unit 305 is configured to generate, by the processing unit 303, the file key value File Key of the attachment, and the corresponding relationship exists between the attachment and the File Key.
  • the sending unit 302 is further configured to send the accessory to the file server by using a POST request, where the POST request parameter includes the File Key, so that the file server saves the accessory, and the accessory and the accessory Correspondence between the File Keys;
  • the receiving unit 303 is further configured to receive a request for extracting the accessory sent by the second mobile client, where the request of the second mobile client carries the information of the requested accessory.
  • the searching unit 306 is configured to search for the File Key according to the information about the accessory carried in the request for extracting the accessory received by the receiving unit 303 and the correspondence between the accessory and the File Key;
  • the sending unit 302 is further configured to send the GET request to the file server to extract the attachment by using the File Key as a parameter of a GET request;
  • the processing unit 304 is further configured to serialize the extracted attachment into a second attachment message, and calculate a data length in the second attachment message;
  • a saving unit 307 configured to save the attachment serialized by the processing unit 304 to a "data body" field of the second attachment message
  • the saving unit 307 is further configured to save the data length calculated by the processing unit 304 to a "data length" field of the second attachment message;
  • the sending unit 302 is further configured to send the second attachment message to the second mobile client.
  • the processing unit 403 acquires an attachment carried in the first attachment message, and the generating unit 305 generates a file key value corresponding to the attachment, and a file exists between the attachment and the File Key. a corresponding relationship, the sending unit 302 sends the accessory to the file server by using a POST request mode, where the POST request parameter includes the File Key, so that the file server saves the accessory and the accessory and the file The correspondence between the keys.
  • the request message of the second mobile client received by the receiving unit 303 according to the attachment information carried in the request message and the correspondence between the attachment and the file key, the searching unit 306 finds the File Key, and uses the File Key as The parameter of the GET request, the sending unit 302 sends the GET request to the file server to extract the attachment. Since the message server sends and extracts the attachment to the file server, the first mobile client and the second mobile client do not need to interact with the file server, and the operation of the client is improved, and the efficiency of sending and extracting the attachment by the client is improved, and because A mobile client and a second mobile client do not need to interact with the file server, so there is no need to transmit HTTP headers, which saves traffic.
  • a sixth embodiment of the present invention provides a system for transmitting an attachment, including: a first mobile client 401, configured to send a first attachment message to a message server 402, where the first attachment message carries an attachment ;
  • the message server 402 is configured to receive the first attachment message sent by the first mobile client 401, parse the first attachment message, send the parsed identifier to the file server 403, and receive the second Sending, by the mobile client 404, a request message for extracting the attachment, sending a request for extracting the attachment to the file server 403 according to the request message for extracting the attachment, and sending the extracted attachment to the first Two mobile client 404;
  • the file server 403 is configured to receive an attachment sent by the message server 402, and save the attachment; receive the request for extracting an attachment sent by the message server 402, and send the attachment according to the request for extracting an attachment. Giving the message server 402;
  • the second mobile client 404 is configured to send a request for extracting the accessory to the message server 402, and receive the accessory sent by the message server 402.
  • an embodiment of the present invention further provides a program product for storing an instruction code readable by a machine.
  • the above instruction code is read and executed by the machine, the method of transmitting the attachment of the above-described embodiment of the present invention can be executed.
  • a magnetic disk, an optical disk, a magneto-optical disk, and a semiconductor memory for carrying such a program product
  • Various storage media such as reservoirs are also included in the disclosure of the present invention.
  • Such machine readable storage media include, but are not limited to, various memories and storage units, semiconductor devices, disk units such as optical, magnetic and magneto-optical disks, and other media suitable for storing information and the like.

Abstract

本发明实施例公开了一种传送附件的方法、装置及系统,用于传送附件时,移动客户端节省流量以及提高传送效率。本发明实施例方法包括:解析来自第一移动客户端的第一附件消息,将解析得到的附件发送给文件服务器,根据来自第二移动客户端的提取所述附件的请求消息,向所述文件服务器发送提取附件的请求,以及,将所述附件发送给所述第二移动客户端。

Description

传送附件的方法、 装置及系统 本申请要求于 2012 年 12 月 26 日提交中国专利局、 申请号为 201210575966.9、 发明名称为"一种传送附件的方法、 装置及系统"的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及无线通信技术领域。 背景技术
移动客户端可与服务器之间传送附件。例如,如果移动客户端向服务器发 送附件, 首先通过即时通信消息向消息服务器请求文件服务器的相关信息,根 据该相关信息向文件媒体服务器发送附件。
由于 HTTP的文本特性, 移动客户端可与文件服务器之间传送附件, 需要 传输 HTTP数据报文头, 在移动客户端消耗流量较大, 并且, 由于移动客户端 与消息服务器之间, 以及与文件服务器之间进行数据双向交互,导致数据交互 效率低。 发明内容 本发明实施例提供了一种传送附件的方法、装置及系统, 以解决以上问题 之中的至少一个。
本发明实施例提供了一种传送附件方法, 包括: 解析来自第一移动客户端 的第一附件消息,将解析得到的附件发送给文件服务器; 根据来自第二移动客 户端的提取所述附件的请求消息, 向所述文件服务器发送提取所述附件的请 求; 以及将所述附件发送给所述第二移动客户端。
本发明实施例提供了一种传送附件装置, 包括: 解析单元, 用于解析来自 第一移动客户端的第一附件消息; 发送单元, 用于将所述解析单元解析得到的 附件发送给文件服务器; 所述发送单元,还用于根据来自第二移动客户端的提 取所述附件的请求消息, 向所述文件服务器发送提取所述附件的请求; 所述发 送单元, 还用于将所述附件发送给所述第二移动客户端。
本发明实施例提供了一种传送附件系统, 包括: 第一移动客户端, 用于向 消息服务器发送第一附件消息, 所述第一附件消息中携带附件;
所述消息服务器, 用于接收所述第一移动客户端发送的所述第一附件消 息, 解析所述第一附件消息, 将解析得到的所述附件发送给所述文件服务器, 接收第二移动客户端发送的提取所述附件的请求消息,根据所述提取所述附件 的请求消息, 向所述文件服务器发送提取所述附件的请求,将所述附件发送给 所述第二移动客户端;
所述文件服务器, 用于接收所述消息服务器发送的所述附件, 并保存所述 附件;接收所述消息服务器发送的所述提取所述附件的请求,根据所述提取所 述附件的请求发送所述附件给所述消息服务器; 以及
所述第二移动客户端,用于向所述消息服务器发送所述提取所述附件的请 求消息, 接收所述消息服务器发送的所述附件。
本发明实施例提供了一种非瞬时性的计算机可读存储介质,其上存储有计 算机可执行指令, 当计算机中运行这些可执行指令时, 执行如下步骤:
解析来自第一移动客户端的第一附件消息,将解析得到的附件发送给文件 服务器;
根据来自第二移动客户端的提取所述附件的请求消息,向所述文件服务器 发送提取所述附件的请求; 以及
将所述附件发送给所述第二移动客户端。
本发明实施例具有以下优点:消息服务器将第一移动客户端发送的附件发 送给文件服务器, 当第二移动客户端请求提取该附件时,根据第二移动客户端 的请求, 向所述文件服务器发送提取附件的请求,将提取的附件发送给所述第 二移动客户端, 由于消息服务器向文件服务器发送和提取附件, 而不需要第一 移动客户端和第二移动客户端与文件服务器进行交互, 筒化客户端的操作,提 高客户端发送和提取附件的效率,并且因为第一移动客户端和第二移动客户端 不需要与文件服务器之间进行交互, 因此不需要传输 HTTP头, 可节省流量。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创 造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例所提供的传送附件系统的结构示意图;
图 2为本发明实施例所提供的消息服务器所支持的消息的结构示意图; 图 3为本发明第一实施例所提供的传送附件方法流程示意图;
图 4为本发明第二实施例所提供的传送附件方法流程例示意图;
图 5为本发明第三实施例所提供的传送附件装置的结构示意图;
图 6为本发明第四实施例所提供的传送附件装置的结构示意图;
图 7为本发明第五实施例所提供的传送附件装置的结构示意图; 以及 图 8为本发明第六实施例所提供的传送附件系统的结构示意图。 具体实施方式 下面结合附图和具体实施例进一步说明本发明实施例的技术方案, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。基于本发 明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其 他实施例, 都属于本发明保护的范围。
本发明实施例提供了一种传送附件的方法、装置及系统, 用于在传送附件 时在移动客户端节省流量并提高传送成功率。
图 1为本发明实施例所提供的传送附件系统结构示意图,该系统包括两类 服务器, 一类是消息服务器, 另一类是文件服务器。 消息服务器和文件服务器 可处在同一局域网, 消息服务器需要知道文件服务器的内网网协(IP, Internet Protocol )地址, 或者统一资源定位符 (URL, Uniform I Universal Resource Locator ), 并可以通过 HTTP连接方式与文件服务器相连接。
发起即时通信的移动客户端可以和消息服务器建立 TCP连接。 消息服务 器可提供该移动客户端账户信息相关服务、该移动客户端登录服务及该移动客 户端与其他移动客户端之间的消息转发服务。且该移动客户端无需知道文件服 务器的存在。
图 2为消息服务器所支持的消息的结构示意图,该消息包括消息类型和消 息数据。 其中, 消息类型可以是普通文本消息或附件消息; 消息数据包括数据 长度和数据体, 消息数据因消息类型的不同而有所不同,但不同消息类型的消 息都可以由文本消息或附件消息序列化而成。
而文件服务器可以采用 HTTP协议通信, 提供上传及下载附件的服务。 请参阅图 3, 本发明第一实施例所提供的传送附件的方法包括步骤 101至 步骤 103。
步骤 101中,解析来自第一移动客户端的第一附件消息,将解析得到的附 件发送给文件服务器;
本实施例中, 消息服务器可以通过预先建立的 TCP连接接收第一移动客 户端发送的第一附件消息, 所述第一附件消息中携带附件, 其中附件为随同第 一附件消息发出的文件, 可包括图片、 语音文件、 视频文件等类型的文件。
消息服务器用 HTTP协议连接文件服务器,解析接收到的附件消息,将解 析得到的附件发送给该文件服务器, 由该文件服务器保存该附件。
步骤 102中,根据来自第二移动客户端的提取所述附件的请求消息, 向所 述文件服务器发送提取所述附件的请求。
本实施例中,消息服务器接收第二移动客户端发送的提取所述附件的请求 消息, 该消息服务器根据所接收到的所述提取所述附件的请求消息, 向所述文 件服务器发送提取所述附件的请求。
步骤 103中, 将所述附件发送给所述第二移动客户端。
本实施例中, 消息服务器接收该文件服务器发送的提取的附件, 并可将所 述提取的附件序列化为第二附件消息发送给所述第二移动客户端。
本实施例中,发送附件的第一移动客户端与提取附件的第二移动客户端可 以为同一个移动客户端。
本发明实施例中,消息服务器将来自第一移动客户端的附件发送给文件服 务器,当第二移动客户端请求提取该附件时,根据第二移动客户端的请求消息, 向所述文件服务器发送提取附件的请求,将提取的附件发送给所述第二移动客 户端。 由于消息服务器向文件服务器发送和提取附件, 而不需要第一移动客户 端和第二移动客户端与文件服务器进行交互, 筒化客户端的操作,提高客户端 发送和提取附件的效率;并且因为第一客户端和第二客户端不需要与文件服务 器之间进行交互, 因此不需要传输 HTTP头, 可节省流量。
请参阅图 4, 本发明第二实施例所提供的传送附件的方法包括步骤 201至 步骤 205。
步骤 201中,接收第一移动客户端发送的第一附件消息, 所述第一附件消 息中携带附件。
将该第一附件消息发送给消息服务器之前,第一移动客户端将该附件序列 化, 保存到附件消息中"数据体"字段, 计算序列化后的数据长度, 保存在第一 附件消息中的 "数据长度"字段, "消息类型"字段保存在"消息类型"字段, 将经 过上述处理的第一附件消息发送给所述消息服务器。
步骤 202中,解析所述第一附件消息, 获取所述第一附件消息中携带的附 件, 生成所述附件的文件键值 File Key , 所述附件和 File Key之间存在——对 应关系。
消息服务器解析所述第一附件消息中的各字段,获取所述第一附件消息中 携带的附件, 可以用散列算法生成该附件的 File Key, 例如, 可以是对该附件 做一次消息摘要算法第五版(MD5, Message Digest Algorithm )运算, 生成唯 一的 File Key, 所述附件和所述 File Key之间存在——对应关系。, 例如, 可 将附件进行编号, 记录附件的编号与 File Key之间——对应关系, 该 File Key 是标识该附件的唯一标识。
消息服务器可以保存除 "数据长度"及"数据体 "之外所有的消息字段。
步骤 203中, 将解析得到的所述附件发送给文件服务器。
本实施例中, 消息服务器用 HTTP协议连接文件服务器,将所述附件通过 POST请求方式发送到所述文件服务器, 所述 POST请求参数包含所述附件对 应的 File Key,使得所述文件服务器保存所述附件,并保存所述附件与所述 File Key之间的对应关系。
其中, POST请求是网页表单中的提交方式, 请求参数一般包含在 HTTP BODY中, 常用于上传文件。
消息服务器还可将所述附件与所述 File Key之间的对应关系发送给接入 网络的移动客户端。 例如,将附件的编号与 File Key的对应关系发送给接入网 络内的移动客户端, 使得网络内的移动客户端在向消息服务器请求获取附件 时, 只需在请求中携带附件的相关信息, 例如附件的编号, 则消息服务器便可 根据对应关系获知该移动客户端请求的附件对应的 File Key。
步骤 204 中, 根据接收的第二移动客户端发送的提取所述附件的请求消 息, 向所述文件服务器发送提取所述附件的请求。
消息服务器在接收到第二移动客户端发送的提取所述附件的请求消息后, 读取所述请求消息,根据所述请求消息中携带的所述的附件的信息, 获知所述 第二移动客户端所要获取的附件,根据该附件与 File Key之间的对应关系,反 向查找到该附件对应的 File Key, 并将所述 File Key作为 GET请求的参数, 向所述文件服务器发送所述 GET请求以提取所述附件。
Get请求是网页表单中的一种提交方式, 通过 URL提交数据, 请求参数 包含在该 URL中。
步骤 205中,将提取的附件序列化为第二附件消息发送给所述第二移动客 户端。
消息服务器将从文件服务器提取的附件序列化,并将序列化后的附件保存 到第二附件消息的 "数据体"字段, 该第二附件消息用于向所述第二移动客户 端发送所述提取的附件。
消息服务器还可计算所述第二附件消息中数据长度,将所述数据长度保存 到所述第二附件消息的 "数据长度"字段, 将经过上述处理的所述第二附件消 息发送给所述第二移动客户端, 该第二移动客户端接收到该第二附件消息后, 解析该第二附件消息, 得到第二附件消息中所携带的附件。
本发明实施例中, 消息服务器解析第一移动客户端发送的附件消息, 获取 所述第一附件消息中携带的附件, 生成该附件对应的文件键值 File Key, 将所 述附件通过 POST请求方式上传到文件服务器,所述 POST请求参数包含所述 间的对应关系。 当第二移动客户端请求提取该附件时,根据该附件以及所述对 应关系, 查找到所述 File Key , 将所述 File Key作为 GET请求的参数, 向所 述文件服务器发送所述 GET请求以提取所述附件。 由于消息服务器向文件服 务器发送和提取附件,而不需要第一移动客户端和第二移动客户端与文件服务 器进行交互, 筒化客户端的操作, 提高客户端发送和提取附件的效率, 并且因 为第一移动客户端和第二移动客户端不需要与文件服务器之间进行交互,因此 不需要传输 HTTP头, 可节省流量。
请参阅图 5 , 本发明第三实施例所提供的传送附件的装置包括: 解析单元 301 , 用于解析来自第一移动客户端的第一附件消息; 以及 发送单元 302, 用于将所述解析单元 301解析得到的附件发送给文件服务 器;
所述发送单元 302, 还用于根据来自第二移动客户端的提取所述附件的请 求消息, 向所述文件服务器发送提取所述附件的请求;
所述发送单元 302, 还用于将所提取的附件发送给所述第二移动客户端。 本发明实施例中传送附件的装置中各单元实现各自功能的过程,请参见前 述图 3所示实施例的中描述的具体内容, 此处不再赘述。
本实施例中,发送单元 302将来自第一移动客户端的附件发送给文件服务 器, 当第二移动客户端请求提取该附件时,根据第二移动客户端的提取该附件 的请求消息,发送单元 302向所述文件服务器发送提取附件的请求,发送单元 302将提取的附件发送给所述第二移动客户端。 由于消息服务器向文件服务器 发送和提取附件,而不需要第一移动客户端和第二移动客户端与文件服务器进 行交互, 筒化客户端的操作, 提高客户端发送和提取附件的效率, 并且因为第 一移动客户端和第二移动客户端不需要与文件服务器之间进行交互,因此不需 要传输 HTTP头, 可节省流量。
请参阅图 6, 本发明第四实施例所提供了另一种传送附件的装置, 与第三 实施例所提供的传送附件的装置相比较, 还包括接收单元 303。
所述接收单元 303 , 用于接收来自第一移动客户端的第一附件消息, 所述 附件消息中携带附件。
解析单元 301可解析所述接收单元 303所接收到的第一附件消息,并由发 送单元 302将解析得到的所述附件发送给文件服务器。
所述接收单元 303 , 还用于接收来自第二移动客户端的提取所述附件的请 求消息。 所述发送单元 302可根据所述接收单元所接收到的提取所述附件的请求, 向所述文件服务器发送提取所述附件的请求。
请参阅图 7, 本发明第五实施例所提供了另外一种的传送附件的装置, 与 第四实施例相比较, 还包括:
处理单元 304, 用于获取所述第一附件消息中携带的附件;
生成单元 305, 用于将所述处理单元 303获取的附件生成所述附件的文件 键值 File Key , 所述附件和和所述 File Key之间存在——对应关系。
所述发送单元 302, 还用于将所述附件通过 POST请求方式发送到所述文 件服务器, 所述 POST请求参数包含所述 File Key, 使得所述文件服务器保存 所述附件, 以及所述附件与所述 File Key之间的对应关系;
所述接收单元 303 , 还用于接收第二移动客户端发送的提取所述附件的请 求, 所述第二移动客户端的请求中携带请求的附件的信息。
查找单元 306, 用于根据所述接收单元 303接收的所述提取附件的请求中 携带的所述附件的信息及所述附件与所述 File Key之间的对应关系,查找到所 述 File Key;
所述发送单元 302, 还用于将所述 File Key作为 GET请求的参数, 向所 述文件服务器发送所述 GET请求以提取所述附件;
所述处理单元 304, 还用于将所述提取的附件序列化为第二附件消息, 以 及计算所述第二附件消息中数据长度;
保存单元 307, 用于将所述处理单元 304序列化后的附件保存到所述第二 附件消息的 "数据体" 字段;
所述保存单元 307, 还用于将所述处理单元 304计算的所述数据长度保存 到所述第二附件消息的 "数据长度" 字段;
所述发送单元 302, 还用于将所述第二附件消息发送给所述第二移动客户 端。
本发明实施例中传送附件的装置中各单元实现各自功能的过程,请参见前 述图 3和图 4所示实施例的中描述的具体内容, 此处不再赘述。
本实施例中, 处理单元 403获取所述第一附件消息中携带的附件, 生成单 元 305生成该附件对应的文件键值 File Key, 其该附件与 File Key之间存在一 一对应关系,发送单元 302将所述附件通过 POST请求方式发送到所述文件服 务器, 所述 POST请求参数包含所述 File Key, 使得所述文件服务器保存所述 附件以及所述附件与所述 File Key之间的对应关系。接收单元 303接收的第二 移动客户端的请求消息,根据该请求消息中携带的附件信息以及该附件与 File Key之间的对应关系, 查找单元 306查找到所述 File Key, 将所述 File Key作 为 GET请求的参数,发送单元 302向所述文件服务器发送所述 GET请求以提 取所述附件。 由于消息服务器向文件服务器发送和提取附件, 而不需要第一移 动客户端和第二移动客户端与文件服务器进行交互, 筒化客户端的操作,提高 客户端发送和提取附件的效率,并且因为第一移动客户端和第二移动客户端不 需要与文件服务器之间进行交互, 因此不需要传输 HTTP头, 可节省流量。
请参阅图 8, 本发明第六实施例提供了一种传送附件的系统, 包括: 第一移动客户端 401 , 用于向消息服务器 402发送第一附件消息, 所述第 一附件消息中携带附件;
所述消息服务器 402, 用于接收所述第一移动客户端 401发送的所述第一 附件消息,解析所述第一附件消息,将解析得到的所述附件发送给文件服务器 403, 接收第二移动客户端 404发送的提取所述附件的请求消息, 根据所述提 取所述附件的请求消息, 向所述文件服务器 403发送提取所述附件的请求,将 所述提取的附件发送给所述第二移动客户端 404;
所述文件服务器 403, 用于接收所述消息服务器 402发送的附件, 并保存 所述附件;接收所述消息服务器 402发送的所述提取附件的请求,根据所述提 取附件的请求发送所述附件给所述消息服务器 402;
所述第二移动客户端 404, 用于向所述消息服务器 402发送提取所述附件 的请求, 接收所述消息服务器 402发送的所述附件。
本发明实施例中传送附件的系统中各装置实现各自功能的过程,请参见前 述图 3、 图 4、 图 5、 图 6及图 7所示实施例的中描述的具体内容, 此处不再 赘述。
此外,本发明实施例还提供了一种存储有机器可读取的指令代码的程序产 品。上述指令代码由机器读取并执行时, 可执行上述本发明实施例的传送附件 方法。 相应地, 用于承载这种程序产品的例如磁盘、 光盘、 磁光盘、 半导体存 储器等的各种存储介质也包括在本发明的公开中。
上述这些机器可读存储介质包括但不限于: 各种存储器和存储单元, 半导 体设备, 磁盘单元例如光、 磁和磁光盘, 以及其他适于存储信息的介质等。
以上对本发明所提供的一种传送附件的方法、 装置及系统进行了详细介 绍, 对于本领域的技术人员, 依据本发明实施例的思想, 在具体实施方式及应 用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限 制。

Claims

权 利 要 求
1、 一种传送附件的方法, 其特征在于, 包括:
解析来自第一移动客户端的第一附件消息,将解析得到的附件发送给文件 服务器;
根据来自第二移动客户端的提取所述附件的请求消息,向所述文件服务器 发送提取所述附件的请求; 以及
将所述附件发送给所述第二移动客户端。
2、 根据权利要求 1所述的方法, 其特征在于, 所述解析来自第一移动客 户端的第一附件消息包括:
接收所述第一移动客户端发送的所述第一附件消息;
解析所述第一附件消息, 获取所述第一附件消息中携带的所述附件; 以及 生成所述附件的文件键值 File Key, 所述附件和所述 File Key之间存在一 一对应关系。
3、 根据权利要求 2所述的方法, 其特征在于, 所述将解析得到的所述附 件发送给文件服务器包括:
将所述附件通过 POST请求发送到所述文件服务器,所述 POST请求包含 所述 File Key, 使得所述文件服务器保存所述附件, 以及所述附件与所述 File Key之间的对应关系。
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述根据来自第二移 动客户端所述提取附件的请求消息,向所述文件服务器发送提取所述附件的请 求包括:
接收所述第二移动客户端发送的提取所述附件的请求消息;
根据所述提取所述附件的请求消息中携带的所述附件的信息及所述附件 与所述 File Key之间的对应关系, 查找到所述 File Key; 以及
将所述 File Key作为 GET请求的参数, 向所述文件服务器发送所述 GET 请求以提取所述附件。
5、 根据权利要求 1所述的方法, 其特征在于, 所述将所述附件发送给所 述第二移动客户端包括:
将所述附件序列化,并将序列化后的附件保存到第二附件消息的数据体字 段;
计算所述第二附件消息中数据长度,将所述数据长度保存到所述第二附件 消息的数据长度字段; 以及
将所述第二附件消息发送给所述第二移动客户端。
6、 一种传送附件的装置, 其特征在于, 包括:
解析单元, 用于解析来自第一移动客户端的第一附件消息; 以及 发送单元, 用于将所述解析单元解析得到的附件发送给文件服务器; 根据 来自第二移动客户端的提取所述附件的请求消息,向所述文件服务器发送提取 所述附件的请求; 以及将所述附件发送给所述第二移动客户端。
7、 根据权利要求 6所述的装置, 其特征在于, 还包括:
接收单元, 用于接收来自所述第一移动客户端的所述第一附件消息, 所述 附件消息中携带所述附件;以及接收来自第二移动客户端的所述提取所述附件 的请求消息。
8、 根据权利要求 7所述的装置, 其特征在于, 还包括:
处理单元, 用于获取所述第一附件消息中携带的所述附件; 以及
File Key, 所述附件和所述 File Key之间存在——对应关系。
9、 根据权利要求 8所述的装置, 其特征在于,
所述发送单元, 还用于将所述附件通过 POST请求发送到所述文件服务 器, 所述 POST请求包含所述 File Key。
10、 根据权利要求 8或 9所述的装置, 其特征在于, 还包括:
查找单元,用于根据所述接收单元接收到的所述提取所述附件的请求消息 中携带的所述的附件的信息及所述附件与所述 File Key之间的对应关系,查找 到所述 File Key。
11、 根据权利要求 10所述的装置, 其特征在于,
所述发送单元, 还用于将所述 File Key作为 GET请求的参数, 向所述文 件服务器发送所述 GET请求以提取所述附件。
12、 根据权利要求 6所述的装置, 其特征在于,
所述处理单元,还用于将所述附件序列化为第二附件消息, 以及计算所述 第二附件消息中数据长度。
13、 根据权利要求 12所述的装置, 其特征在于, 还包括:
保存单元,用于将所述处理单元序列化后的所述附件保存到所述第二附件 消息的数据体字段;还用于将所述处理单元计算的所述数据长度保存到所述第 二附件消息的数据长度字段。
14、 一种传送附件的系统, 其特征在于, 包括:
第一移动客户端, 用于向消息服务器发送第一附件消息, 所述第一附件消 息中携带附件;
所述消息服务器, 用于接收所述第一移动客户端发送的所述第一附件消 息, 解析所述第一附件消息, 将解析得到的所述附件发送给文件服务器, 接收 第二移动客户端发送的提取所述附件的请求消息,根据所述提取所述附件的请 求消息, 向所述文件服务器发送提取所述附件的请求,将所述附件发送给所述 第二移动客户端;
所述文件服务器, 用于接收所述消息服务器发送的所述附件, 并保存所述 附件;接收所述消息服务器发送的所述提取所述附件的请求,根据所述提取所 述附件的请求发送所述附件给所述消息服务器;
所述第二移动客户端,用于向所述消息服务器发送所述提取所述附件的请 求消息, 接收所述消息服务器发送的所述附件。
15、一种非瞬时性的计算机可读存储介质,其上存储有计算机可执行指令, 当计算机中运行这些可执行指令时, 执行如下步骤:
解析来自第一移动客户端的第一附件消息,将解析得到的附件发送给文件 服务器;
根据来自第二移动客户端的提取所述附件的请求消息,向所述文件服务器 发送提取所述附件的请求; 以及
将所述附件发送给所述第二移动客户端。
PCT/CN2013/078907 2012-12-26 2013-07-05 传送附件的方法、装置及系统 WO2014101388A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/750,751 US20150295865A1 (en) 2012-12-26 2015-06-25 Attachment transferring method, apparatus, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210575966.9A CN103906006A (zh) 2012-12-26 2012-12-26 一种传送附件的方法、装置及系统
CN201210575966.9 2012-12-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/750,751 Continuation US20150295865A1 (en) 2012-12-26 2015-06-25 Attachment transferring method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2014101388A1 true WO2014101388A1 (zh) 2014-07-03

Family

ID=50997117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/078907 WO2014101388A1 (zh) 2012-12-26 2013-07-05 传送附件的方法、装置及系统

Country Status (3)

Country Link
US (1) US20150295865A1 (zh)
CN (1) CN103906006A (zh)
WO (1) WO2014101388A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608529B (zh) * 2015-12-17 2021-02-26 金蝶软件(中国)有限公司 一种基于单据的附件管理方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276569A (zh) * 1999-06-04 2000-12-13 国际商业机器公司 具有自动文件附件存储的网络邮件传递代理
CN1378755A (zh) * 1999-08-12 2002-11-06 艾利森电话股份有限公司 无线通信系统中向文本消息发送多媒体附件的系统和方法
EP1892635A1 (en) * 2006-08-04 2008-02-27 Research In Motion Limited Method and system for retrieving a document associated with a message received on a mobile device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5781901A (en) * 1995-12-21 1998-07-14 Intel Corporation Transmitting electronic mail attachment over a network using a e-mail page
US7016937B1 (en) * 2000-05-04 2006-03-21 Bellsouth Intellectual Property Corporation Method and apparatus for generating reminders to transmit electronic mail attachments by parsing e-mail message text
US20020016818A1 (en) * 2000-05-11 2002-02-07 Shekhar Kirani System and methodology for optimizing delivery of email attachments for disparate devices
US20020059384A1 (en) * 2000-07-13 2002-05-16 Koninklijke Philips Electronics N.V. Substituting URL for attachment in forwarding electronic content
US20090222450A1 (en) * 2005-05-16 2009-09-03 Ron Zigelman System and a method for transferring email file attachments over a telecommunication network using a peer-to-peer connection
JP2008109381A (ja) * 2006-10-25 2008-05-08 Media Exchange Inc 電子メール送受信システム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276569A (zh) * 1999-06-04 2000-12-13 国际商业机器公司 具有自动文件附件存储的网络邮件传递代理
CN1378755A (zh) * 1999-08-12 2002-11-06 艾利森电话股份有限公司 无线通信系统中向文本消息发送多媒体附件的系统和方法
EP1892635A1 (en) * 2006-08-04 2008-02-27 Research In Motion Limited Method and system for retrieving a document associated with a message received on a mobile device

Also Published As

Publication number Publication date
CN103906006A (zh) 2014-07-02
US20150295865A1 (en) 2015-10-15

Similar Documents

Publication Publication Date Title
US11729294B2 (en) Processing DNS queries to identify pre-processing information
JP5792850B2 (ja) ネットワーク上でのファイルフォルダ送信
EP1783954B1 (en) System and method for discovering network resources
WO2013097401A1 (zh) 浏览器客户端与后端服务器直通的方法、网关和通信系统
WO2018049730A1 (zh) 302跳转方法、url生成方法及系统、域名解析方法及系统
CN112311774B (zh) 一种数据处理方法、装置、电子设备及存储介质
CN103401946B (zh) Http上传加速方法和系统
US10084884B2 (en) Facilitation of efficient web site page loading
TWI510272B (zh) 應用平台與應用共用登錄態的方法、代理伺服器及系統
WO2014044103A1 (zh) 离线缓存方法及装置
KR20080042819A (ko) I m p s 시스템과 s i m p l e i m 시스템의 연동시스템에서 그룹 관리 방법 및 시스템
WO2010133097A1 (zh) 微技系统的数据共享方法、服务器以及数据共享系统
WO2016177121A1 (zh) 一种文件传输方法、装置及应用服务器
WO2016086755A1 (zh) 一种报文处理的方法和透明代理服务器
BRPI0710719A2 (pt) método para deletar um item de uma conta de usuário em um ambiente multimìdea sip; produto de programa de computador e dispositivo eletrÈnico
WO2014166078A1 (zh) 数据发送处理方法及路由器
WO2015024373A1 (zh) 一种虚拟机通信方法及装置
WO2012173899A2 (en) Remotely retrieving information from consumer devices
JP2017010388A (ja) Httpサーバとその制御方法、画像形成装置およびプログラム
WO2014117727A1 (zh) 一种媒体转移的方法、装置及系统
WO2016180137A1 (zh) 一种消息处理方法和装置
US8301781B1 (en) Methods and systems for browser file transfer
WO2014101388A1 (zh) 传送附件的方法、装置及系统
US20160182504A1 (en) Method and apparatus for processing a rtcweb authentication
US20130024543A1 (en) Methods for generating multiple responses to a single request message and devices thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13868561

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 02-11-2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13868561

Country of ref document: EP

Kind code of ref document: A1