WO2013097350A1 - File sending and receiving method and device, and file transfer method and system - Google Patents

File sending and receiving method and device, and file transfer method and system Download PDF

Info

Publication number
WO2013097350A1
WO2013097350A1 PCT/CN2012/072173 CN2012072173W WO2013097350A1 WO 2013097350 A1 WO2013097350 A1 WO 2013097350A1 CN 2012072173 W CN2012072173 W CN 2012072173W WO 2013097350 A1 WO2013097350 A1 WO 2013097350A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
transmitted
receiving end
space
value
Prior art date
Application number
PCT/CN2012/072173
Other languages
French (fr)
Chinese (zh)
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 WO2013097350A1 publication Critical patent/WO2013097350A1/en

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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • Bluetooth technology is a wireless communication technology for transmitting voice and data over short distances.
  • a chip incorporating Bluetooth technology in most digital mobile devices can replace the cable between the traditional electronic devices, and the personal digital assistant (Personal Digital Assistant, Referred to as PDA), wireless transmission of information between laptops and mobile phones is possible.
  • PDA Personal Digital Assistant
  • OBEX Object Exchange Protocol
  • OBEX protocol is an application-oriented session layer protocol.
  • Figure 1 is a schematic diagram of the location of the OBEX in the Bluetooth protocol stack according to the related art. The application principle is shown in Figure 1, and the OBEX protocol runs on At the top of the Bluetooth protocol, support for file transfer, object "push” operation, synchronization and many other applications.
  • the OBEX protocol provides a simple means of object exchange between devices.
  • the exchangeable object can be a file, an image, or any data unit supported by the application.
  • the object exchange uses a master/slave mode based on the query-response mode, and can be used between any two Bluetooth devices.
  • the master-slave relationship is formed.
  • the active originating method is the master device (Client), and the founder is the slave device (Server).
  • the OBEX related processes include: Connection establishment (Connect), connection disconnection (Disconnect ⁇ Sending files)
  • the object exchange involved in the OBEX protocol includes the exchange of files and directories.
  • the Client client can initialize various requests, such as sending and receiving files, and browsing the server object. Therefore, the Client client has the ability to interpret the format and size of the OBEX folder and its files; Server and Client clients
  • the Client client provides object exchange service and browsing function using OBEX folder format, server-side read-only folder and read-only file, which can restrict object issue and file/directory deletion and establishment.
  • the Bluetooth function is used more frequently in people's daily use of mobile phones, PCs and other terminals, such as file transfer, answering calls, playing audio and video files. In order to share useful files and software, friends often use Bluetooth.
  • the current Bluetooth transmission mode is to transfer the file first, and then prompt the user when the space is insufficient. Then the previously transmitted data is cleared.
  • the other party's storage space is 300M. In the case of unknown beforehand, a 400M file needs to be transmitted. The other party, when transmitting 300M of data, the other party will indicate that there is insufficient space, and then the previously transmitted data is cleared.
  • the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the lost data to be lost and the inconvenient use problem, and no effective solution has been proposed yet.
  • a file sending method is provided, which is applied to a Bluetooth transmission, and includes: determining, by a sending end, a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; The spatial values are sent to the receiving end.
  • the sending end sends the spatial value to the receiving end
  • the sending end includes: the sending end encapsulates the spatial value into the OBXE Obj ect AddHeader data packet; and the sending end sends the OBXE_Obj ect AddHeader data packet to the receiving end.
  • a file receiving method is provided, which is applied to a Bluetooth transmission, and includes: a receiving end receiving a space value of a file to be transmitted transmitted by the Bluetooth, wherein the space value is a storage space occupied by the file to be transmitted. The size of the local storage space and the space value are compared by the receiving end, and it is determined whether to receive the file to be transmitted according to the comparison result.
  • the receiving end determines whether to receive the file to be transmitted according to the comparison result, and the method includes: when the size of the local storage space is not less than the space value, the receiving end determines whether the size of the local unoccupied storage space is not less than a space value; If yes, the receiving end performs Bluetooth transmission to receive the file to be transmitted; if not, the receiving end deletes the file or application stored in the locally occupied storage space until the size of the unoccupied storage space is not less than the space value.
  • the receiving end deletes the file or the application stored in the locally occupied storage space, including: the receiving end prompts the user that there is not enough storage space for the current Bluetooth transmission; the receiving end receives the deletion instruction input by the user, where the deletion indication The file or application used to indicate the deletion; the receiving end deletes the file or application stored in the locally occupied storage space according to the deletion instruction.
  • the receiving end determines whether to receive the file to be transmitted according to the comparison result, and the method includes: when the size of the local storage space of the receiving end is smaller than the space value, the receiving end prompts the user that the current space cannot perform Bluetooth transmission of the file to be transmitted.
  • the receiving end determines the spatial value of the file to be transmitted that is currently transmitted by the Bluetooth, and includes: the receiving end receives the OBXE_ObjectAddHeader data packet encapsulating the spatial value; and the receiving end parses the OBXE_ObjectAddHeader data packet to obtain the spatial value.
  • a file transmission method which is applied to a Bluetooth transmission, and includes: a sending end determines a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; And the spatial value is sent to the receiving end; the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth; the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result.
  • a file sending apparatus which is applied to a Bluetooth transmission, and includes a determining module, configured to determine a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; a sending module is set to Send the file to be transferred and the space value to the receiving end.
  • a file receiving apparatus is provided, which is applied to a Bluetooth transmission, and includes a receiving module, configured to receive a spatial value of a file to be transmitted transmitted by the Bluetooth, wherein the space value is occupied by a file to be transmitted.
  • a file transmission system which is applied to a Bluetooth transmission, including a transmitting end and a receiving end: the transmitting end is set to determine a spatial value, wherein the spatial value is a size of a storage space occupied by a file to be transmitted.
  • the receiving end is set to determine the space value of the file to be transmitted transmitted by the Bluetooth, wherein the space value is the size of the storage space occupied by the file to be transmitted; The size and space value of the space, and whether or not to receive the file to be transmitted is determined according to the comparison result.
  • the transmitting end sends the file to be transmitted and the spatial value to the receiving end, and the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and obtains the size of the file to be transmitted, thereby comparing the size of the local storage space with The spatial value, the receiving end may determine whether to receive the file to be transmitted according to the comparison result.
  • the receiving end Before informing the receiving end of the size of the file to be transmitted, the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission, and solve the problem that the user receives the file by using Bluetooth.
  • the terminal only indicates that the space is insufficient after receiving a part of the file, thereby causing the previously transmitted data to be lost, and the inconvenient use problem improves the user experience.
  • FIG. 1 is a schematic diagram of a position of an OBEX in a Bluetooth protocol stack according to the related art
  • FIG. 2 is a flowchart of a file transmitting method according to an embodiment of the present invention
  • FIG. 3 is a file receiving method according to an embodiment of the present invention
  • Figure 4 is a flow chart of a file transmission method according to an embodiment of the present invention
  • Figure 5 is a flow chart of a Bluetooth transmitting end according to an embodiment of the present invention
  • Figure 6 is a flow chart of a Bluetooth receiving end according to an embodiment of the present invention
  • 7 is a block diagram of a header: OBEX ObjectAddHeader packet according to an embodiment of the present invention
  • FIG. 8 is a flow chart of a OBEX protocol packet of a sender and a receiver according to an embodiment of the present invention
  • FIG. 9 is a file transmission according to an embodiment of the present invention.
  • FIG. 10 is a block diagram showing the structure of a file receiving apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram showing the structure of a file receiving apparatus according to an embodiment of the present invention.
  • FIG. 11 is a block diagram showing the structure of a file transfer system according to an embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The invention will be described in detail below with reference to the drawings in conjunction with the embodiments.
  • the present invention provides a file sending method.
  • FIG. 2 is a flowchart of a file sending method according to an embodiment of the present invention. As shown in FIG. 2, the following steps S202 to S204 are included. Step S202, the sender determines a space value, where the space value is a size of a storage space occupied by the file to be transmitted.
  • Step S204 the sending end sends the file to be transmitted and the spatial value to the receiving end.
  • the sending end sends the file to be transmitted and the space value to the receiving end, that is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the to-be-transmitted before transmitting the file to be transmitted.
  • the size of the file in turn, can determine whether the local storage space is sufficient to support this Bluetooth transmission.
  • the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience.
  • the sending end may send a spatial value to the receiving end in multiple sending manners, for example, carrying a spatial value in a signaling or message that the transmitting end interacts with the receiving end, or may be in a data packet transmitted between the transmitting end and the receiving end.
  • FIG. 3 is a flowchart of a file receiving method according to an embodiment of the present invention. As shown in FIG. 3, the following steps S302 to S304 are included. Step S302: The receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and the space value is the size of the storage space occupied by the file to be transmitted.
  • Step S304 the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result.
  • the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and obtains the size of the file to be transmitted, and then compares the size and space value of the local storage space, and the receiving end may determine whether to receive according to the comparison result.
  • the file to be transferred That is, the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and can determine whether the local storage space is sufficient to support the Bluetooth transmission.
  • the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience.
  • the receiving end determines whether to receive the file to be transmitted according to the comparison result in step S304. When the size of the local storage space on the receiving end is not less than the space value, the receiving end determines whether the size of the unoccupied storage space is not less than the space value; The receiving end performs Bluetooth transmission and receives the file to be transmitted.
  • the receiving end needs to delete the file or application stored in the locally occupied storage space until the size of the unoccupied storage space is not less than the space value.
  • the Bluetooth transmission method used in the related art when the local storage space is insufficient, also mentions that the user needs to delete a part of the file and then re-transfer. Since there are many files stored, and the space occupied by each file is different, Therefore, the files that need to be deleted in order to satisfy the receiving of the other party's files need to be a difficult problem for the user.
  • the related technology provides a solution: After deleting a file, the user needs to check the memory space of the mobile phone.
  • the embodiment of the present invention provides another solution, that is, the receiving end deletes the file or application stored in the locally occupied storage space, and after receiving the deletion, the receiving end automatically calculates the size of the unoccupied storage space until the The size of the occupied storage space is not less than the space value. At this time, the receiving end can perform Bluetooth transmission and receive the file to be transmitted without performing the deletion operation. In order to avoid deletion of useful files or applications, for example, deleting the system file may cause the receiving end to fail to perform normal operations.
  • the receiving end may prompt the user that there is not enough storage space for the Bluetooth transmission, according to the user input.
  • the deletion indicates that the file or the application is deleted, and the receiving end receives the deletion indication input by the user, where the deletion indication is used to indicate the deleted file or the application, and the receiving end deletes the file or application stored in the locally occupied storage space according to the deletion instruction.
  • the receiving end if the size of the local storage space of the receiving end is smaller than the space value, the receiving end does not need to perform any operation, and directly prompts the user that the current space cannot transmit the Bluetooth transmission of the file to be transmitted.
  • the sending end may send a spatial value to the receiving end in multiple sending manners, for example, carrying a spatial value in a signaling or message that the transmitting end interacts with the receiving end, or may be between the transmitting end and the receiving end.
  • the spatial value is encapsulated in the transmitted data packet.
  • the OBXE_ObjectAddHeader data packet may be used.
  • the receiving end may receive the OBXE_ObjectAddHeader data packet encapsulating the spatial value. Further, the receiving end parses the OBXE_ObjectAddHeader packet to obtain a space value.
  • the embodiment of the present invention further provides a file transmission method. FIG.
  • Step S402 the transmitting end determines a spatial value, where the space value is a size of a storage space occupied by the file to be transmitted.
  • Step S404 the sending end sends the file to be transmitted and the space value to the receiving end.
  • Step S406 The receiving end receives the spatial value of the file to be transmitted that is currently transmitted by the Bluetooth.
  • Step S408 the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result.
  • the sending end sends the file to be transmitted and the spatial value to the receiving end, and the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and the size of the file to be transmitted is obtained, thereby comparing the local storage space.
  • the size and space value, the receiving end can determine whether to receive the file to be transmitted according to the comparison result. That is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission.
  • the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience.
  • the method, the device and the system provided by the embodiments of the present invention have achieved significant progress compared with the related technologies, and can determine whether the space satisfies the requirements before the file is received through the Bluetooth, and avoids the lack of space after receiving a piece of data. Waste, inconvenient problems.
  • the user can directly enter the file deletion or application uninstallation interface, and automatically determine whether the space meets the requirements after deleting the file, thereby exempting the user from manually calculating the space size.
  • the sender selects the file to send and gets the file size at the same time. 2. The sender sends the file size into the OBEX_ObjectAddHeader packet and sends it to the receiver.
  • the receiving end determines whether the capacity is sufficient to store the file to be received.
  • the file data packet is received according to the OBEX protocol. If the receiving end determines that the capacity is insufficient, the user is prompted to delete part of the file to free up part of the space for file reception, and the user selects to clear the file and directly enters the file selection interface. To select the file to delete, when the space is sufficient, enter the file transfer process.
  • FIG. 5 is a flowchart of a Bluetooth transmitting end according to an embodiment of the present invention.
  • the sending end performs the following processing, including the following steps S501 to S509.
  • Step S501 selecting a file to be sent.
  • Step S502 obtaining a file size to be sent.
  • Step S503, determining whether the Bluetooth is turned on, if yes, executing step S504; if not, executing step S505.
  • Step S504 searching for the receiving end, pairing, and connecting.
  • Step S505 turning on the Bluetooth.
  • Step S506 calling the OBEX initialization interface: OBEX-Init.
  • Step S507 adding a file size parameter to the header (header file) request packet format.
  • FIG. 6 is a flowchart of a Bluetooth receiving end according to an embodiment of the present invention. As shown in FIG. 6, the receiving end performs the following steps S601 to S610. Step S601, receiving an OBEX_Obj ectAddHeader data packet. Step S602, parsing the OBEX_Obj ectAddHeader data packet to obtain a file size to be received. Step S603, searching for a configuration file to obtain a remaining storage space size value. Step S604, comparing the size of the transmission file and the remaining storage space. In step S605, it is judged whether the space is sufficient.
  • Step S606 receiving a file.
  • step S607 it is determined whether to clean up the space. If yes, go to step S608; if no, go to step S610.
  • step S608 the files that can be deleted are automatically arranged according to the file size, and the file size value and the required cleaned space value are displayed.
  • step S609 after deleting the file, the space is sufficient to receive the file.
  • Step S610 ending the file transfer. According to the OBEX protocol shown in Figure 1, the following processing is performed:
  • FIG. 7 is a block diagram of an OBEX Obj ect AddHeader packet according to an embodiment of the present invention. As shown in FIG. 7, the OBEX_Obj ect AddHeader packet has the following functions.
  • the receiving end parses the size of the file to be received.
  • FIG. 8 is a flow chart of a OBEX protocol data packet of a transmitting end and a receiving end according to an embodiment of the present invention.
  • Step S801 the OBEX initialization interface: OBEX_Init.
  • Step S802 calling a Bluetooth transmission mode.
  • Step S803 adding information such as the length of the transmission packet to the header: OBEX_ObjectAddHeader.
  • Step S804 sending a header to the receiving end: OBEX Obj ect AddHeader
  • Step S805 the receiving end parses the header data structure.
  • Step S806 it is judged whether all the storage spaces (including the used space and the free space) of the terminal satisfy the requirement, and if yes, step S807 is performed; if no, step S813 is performed. In step S807, transmission is performed.
  • step S808 it is determined whether the transmission is finished. If yes, step S809 is performed; if not, step S810 is performed. Step S809, when the transmission ends, the underlying connection is released to release the resource: OBEX-Clrarup.
  • step S810 the data OBEX_Request is sent. Step S811, the processing server response: OBEX_Request. Step S812, calling an event processing function of the application layer. Step S813, whether the total storage space size of the terminal is satisfied. If yes, go to step S814; if no, go to step S816. In step S814, it is determined whether the user clears the storage space. If yes, step S815 is performed; if no, step S816 is performed.
  • step S816, the entire transmission process is ended.
  • the steps shown in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and, although the logical order is shown in the flowchart, in some cases, The steps shown or described may be performed in an order different than that herein.
  • the embodiment of the invention provides a file sending device, which can be used to implement the above file sending method.
  • FIG. 9 is a structural block diagram of a file transmitting apparatus including a determining module 92 and a transmitting module 94 according to an embodiment of the present invention.
  • the determining module 92 is configured to determine a spatial value, where the space value is the size of the storage space occupied by the file to be transmitted; the sending module 94 is connected to the determining module 92, and is configured to send the file to be transmitted and the spatial value to the receiving end.
  • the embodiment of the invention provides a file receiving device, which can be used to implement the above file receiving method.
  • FIG. 10 is a structural block diagram of a file receiving apparatus including a receiving module 102 and a comparing module 104 according to an embodiment of the present invention.
  • the receiving module 102 is configured to receive a space value of the file to be transmitted that is transmitted by the current Bluetooth, where the space value is the size of the storage space occupied by the file to be transmitted; the comparison module 104 is connected to the receiving module 102, and is set to compare the local storage. The size and space value of the space, and whether or not to receive the file to be transmitted is determined according to the comparison result.
  • the embodiment of the invention provides a file transmission system, which can be used to implement the above file transmission method.
  • 11 is a block diagram showing the structure of a file transmission system including a transmitting end 112 and a receiving end 114, in accordance with an embodiment of the present invention.
  • the sending end 112 is configured to determine a space value, where the space value is the size of the storage space occupied by the file to be transmitted; the file to be transmitted and the space value are all sent to the receiving end 114; the receiving end 114 is set to determine the current Bluetooth transmission waiting The space value of the file to be transferred, where the space value is the size of the storage space occupied by the file to be transmitted; comparing the size and space value of the local storage space, determining whether to receive the file to be transmitted according to the comparison result.
  • the transmitting end sends the file to be transmitted and the spatial value to the receiving end
  • the receiving end receives the spatial value of the file to be transmitted transmitted by the Bluetooth, and knows the size of the file to be transmitted, and then compares The size and space value of the local storage space, and the receiving end can determine whether to receive the file to be transmitted according to the comparison result. That is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission, and solve the user.
  • the terminal When receiving a file using Bluetooth, the terminal only indicates that the space is insufficient after receiving a part of the file, thereby causing the previously transmitted data to be lost, and the inconvenient use problem improves the user experience.
  • the file sending apparatus, the file receiving apparatus, and the file transmission system described in the device embodiments correspond to the foregoing file sending, receiving, and transmitting method embodiments, and the specific implementation process has been detailed in the method embodiment. Description, no longer repeat here.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed are file sending and receiving methods and devices, and a file transfer method and system. The file transfer method comprises: a sender determining a space value, the space value being the size of storage space occupied by a file to be transferred; the sender sending both the file to be transferred and the space value to a receiver; the receiver receiving the space value of the file to be transferred of the current Bluetooth transfer; and the receiver comparing the size of the local storage space with the space value, and according to a comparison result, determining whether to receive the file to be transferred. The present invention solves the problem of inconvenient use because, when a user receives a file by using Bluetooth, a terminal only prompts that the space is insufficient after a part of the file is received so as to result in the loss of the data that has already been transferred, thereby enhancing the user experience.

Description

文件发送、 接收方法及装置和文件传输方法及系统 技术领域 本发明涉及通信领域, 具体而言, 涉及一种文件发送、 接收方法及装置和文件传 输方法及系统。 背景技术 蓝牙技术是一种短距离传输语音和数据的无线通信技术, 在大多数数字移动设备 中加入蓝牙技术的芯片,可以取代传统电子设备间的电缆,使个人数字处理器 (Personal Digital Assistant, 简称为 PDA), 笔记本电脑, 移动电话间信息的无线传输成为可能。 其中对象交换协议 (Object Exchange, 简称为 OBEX) 是一种简单、 高效的高层 应用协议。 随着手机和各种便携式产品得到广泛的应用, 可以通过 OBEX协议的文件 传输, 可实现多种设备, 如个人电脑 (Personal Computer, 简称为 PC) 机、 PDA、 笔 记本、移动终端的文件共享、应用范围相当广泛。在层次结构的蓝牙协议栈中, OBEX 协议是一种面向应用的会话层协议, 图 1是根据相关技术的 OBEX在蓝牙协议栈中的 位置示意图, 其应用原理请参见图 1, OBEX协议运行于蓝牙协议的顶部, 支持文件 传输, 对象"推"操作, 同步等多种应用。 OBEX协议能够提供设备间简单易行的对象 交换手段。 可交换的对象可以是文件、 图像, 也可以是应用支持的任何数据单位, 对 象交换采用了基于查询 -应答方式的主设备 /从设备 (Client/Server) 模式, 任意两台蓝 牙设备间都可以组成主从关系, 主动发起方式是主设备 (Client), 被找到者是从设备 ( Server)。 OBEX相关的过程包括: 连接建立 (Connect)、 连接断开 (Disconnect^ 发文件 TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a file transmitting and receiving method and apparatus, and a file transmitting method and system. BACKGROUND OF THE INVENTION Bluetooth technology is a wireless communication technology for transmitting voice and data over short distances. A chip incorporating Bluetooth technology in most digital mobile devices can replace the cable between the traditional electronic devices, and the personal digital assistant (Personal Digital Assistant, Referred to as PDA), wireless transmission of information between laptops and mobile phones is possible. The Object Exchange Protocol (OBEX) is a simple and efficient high-level application protocol. With the wide application of mobile phones and various portable products, various devices can be realized through file transfer of OBEX protocol, such as personal computer (Personal Computer, PC for short), PDA, notebook, mobile terminal file sharing, The scope of application is quite extensive. In the hierarchical Bluetooth protocol stack, the OBEX protocol is an application-oriented session layer protocol. Figure 1 is a schematic diagram of the location of the OBEX in the Bluetooth protocol stack according to the related art. The application principle is shown in Figure 1, and the OBEX protocol runs on At the top of the Bluetooth protocol, support for file transfer, object "push" operation, synchronization and many other applications. The OBEX protocol provides a simple means of object exchange between devices. The exchangeable object can be a file, an image, or any data unit supported by the application. The object exchange uses a master/slave mode based on the query-response mode, and can be used between any two Bluetooth devices. The master-slave relationship is formed. The active originating method is the master device (Client), and the founder is the slave device (Server). The OBEX related processes include: Connection establishment (Connect), connection disconnection (Disconnect^ Sending files)
(Put)、 接收文件 (Get)、 操作放弃 (Abort) 和设置路径 ( Set Path)„ (Put), Receive File (Get), Operation Abandon (Abort) and Set Path (Set Path)
OBEX协议涉及的对象交换包括文件和目录的交换。 在应用过程中, Client客户 端能初始化各种请求, 如发送和接收文件, 浏览 Server端对象, 因此 Client客户端具 备解释 OBEX文件夹及其中文件的格式以及大小的能力; Server端与 Client客户端相 对应, 作为一种远程目标设备, 提供了对象交换的服务以及使用 OBEX文件夹格式的 浏览功能, Server端的只读文件夹以及只读文件, 可以限制对象的发出以及文件 /目录 的删除与建立。 目前, 蓝牙功能在人们日常使用手机、 PC机等终端时被用到的机会越来越频繁, 如文件传输、 接听电话、 播放音视频文件等。 好友之间为了共享好玩好用的文件、 软 件等, 也经常使用到蓝牙。 而目前的蓝牙传输模式, 是先传输文件, 当空间不足的时 候才提示用户, 然后之前传输的数据都被清除, 比如对方存储空间为 300M, 在事先 未知的情况下需要传输一个 400M的文件给对方, 当传输了 300M的数据后, 对方会 提示空间不足, 然后之前传输的数据被清除。 针对相关技术中用户使用蓝牙接收文件时, 终端只有在接收部分文件后才提示空 间不足, 从而导致之前传输的数据丢失, 使用不方便的问题, 目前尚未提出有效的解 决方案。 发明内容 本发明提供了一种文件发送、 接收方法及装置和文件传输方法及系统, 以至少解 决相关技术中的用户使用蓝牙接收文件时, 终端只有在接收部分文件后才提示空间不 足, 使用不方便的问题。 根据本发明的一个方面, 提供了一种文件发送方法, 应用于蓝牙传输, 包括: 发 送端确定空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 发送端将待传 输文件以及空间值均发送至接收端。 优选地, 发送端将空间值发送至接收端包括: 发送端将空间值封装到 OBXE Obj ect AddHeader数据包中; 发送端将 OBXE_Obj ect AddHeader数据包发送至 接收端。 根据本发明的另一个方面, 提供了一种文件接收方法, 应用于蓝牙传输, 包括: 接收端接收本次蓝牙传输的待传输文件的空间值, 其中, 空间值为待传输文件占用的 存储空间的大小; 接收端比较本地的存储空间的大小与空间值, 根据比较结果确定是 否接收待传输文件。 优选地, 接收端根据比较结果确定是否接收待传输文件, 包括: 在接收端本地的 存储空间的大小不小于空间值时, 接收端判断本地未被占用的存储空间的大小是否不 小于空间值; 若是, 接收端进行蓝牙传输, 接收待传输文件; 若否, 接收端删除本地 被占用的存储空间中存储的文件或应用, 直至未被占用的存储空间的大小不小于空间 值。 优选地, 接收端删除本地被占用的存储空间中存储的文件或应用, 包括: 接收端 提示用户本地没有足够的存储空间进行本次蓝牙传输; 接收端接收用户输入的删除指 示, 其中, 删除指示用于指示删除的文件或应用; 接收端根据删除指示删除本地被占 用的存储空间中存储的文件或应用。 优选地, 接收端根据比较结果确定是否接收待传输文件, 包括: 当接收端本地的 存储空间的大小小于空间值时, 接收端提示用户当前空间无法进行待传输文件的蓝牙 传输。 优选地, 接收端确定本次蓝牙传输的待传输文件的空间值, 包括: 接收端接收封 装有空间值的 OBXE_ObjectAddHeader数据包; 接收端解析 OBXE_ObjectAddHeader 数据包, 获取空间值。 根据本发明的再一个方面, 提供了一种文件传输方法, 应用于蓝牙传输, 包括: 发送端确定空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 发送端将待 传输文件以及空间值均发送至接收端; 接收端接收本次蓝牙传输的待传输文件的空间 值; 接收端比较本地的存储空间的大小与空间值, 根据比较结果确定是否接收待传输 文件。 根据本发明的一个方面, 提供了一种文件发送装置, 应用于蓝牙传输, 包括确定 模块, 设置为确定空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 发送 模块, 设置为将待传输文件以及空间值均发送至接收端。 根据本发明的另一个方面, 提供了一种文件接收装置, 应用于蓝牙传输, 包括接 收模块, 设置为接收本次蓝牙传输的待传输文件的空间值, 其中, 空间值为待传输文 件占用的存储空间的大小; 比较模块, 设置为比较本地的存储空间的大小与空间值, 根据比较结果确定是否接收待传输文件。 根据本发明的再一个方面, 提供了一种文件传输系统, 应用于蓝牙传输, 包括发 送端与接收端: 发送端设置为确定空间值, 其中, 空间值为待传输文件占用的存储空 间的大小; 将待传输文件以及空间值均发送至接收端; 接收端设置为确定本次蓝牙传 输的待传输文件的空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 比较 本地的存储空间的大小与空间值, 根据比较结果确定是否接收待传输文件。 通过本发明, 发送端将待传输文件以及空间值均发送至接收端, 接收端接收本次 蓝牙传输的待传输文件的空间值, 获知待传输文件的大小, 进而比较本地的存储空间 的大小与空间值, 接收端可以根据比较结果确定是否接收待传输文件。 即, 发送端提 前告知接收端待传输文件的大小, 保证接收端在传输待传输文件前就能够获知待传输 文件的大小, 进而可以判断出本地存储空间是否足够支持本次蓝牙传输, 解决了用户 使用蓝牙接收文件时, 终端只有在接收部分文件后才提示空间不足, 从而导致之前传 输的数据丢失, 使用不方便的问题, 提高了用户体验。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据相关技术的 OBEX在蓝牙协议栈中的位置示意图; 图 2是根据本发明实施例的文件发送方法的流程图; 图 3是根据本发明实施例的文件接收方法的流程图; 图 4是根据本发明实施例的文件传输方法的流程图; 图 5是根据本发明实施例的蓝牙发送端流程图; 图 6是根据本发明实施例的蓝牙接收端流程图; 图 7是根据本发明实施例的 header: OBEX ObjectAddHeader数据包结构图; 图 8是根据本发明实施例的发送端和接收端 OBEX协议数据包流程图; 图 9是根据本发明实施例的文件发送装置的结构框图; 图 10是根据本发明实施例的文件接收装置的结构框图; 图 11是根据本发明实施例的文件传输系统的结构框图。 具体实施方式 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相 互组合。 下面将参考附图并结合实施例来详细说明本发明。 本发明提供了一种文件发送方法, 图 2是根据本发明实施例的文件发送方法的流 程图, 如图 2所示, 包括如下的步骤 S202至步骤 S204。 步骤 S202, 发送端确定空间值, 其中, 空间值为待传输文件占用的存储空间的大 小。 步骤 S204, 发送端将待传输文件以及空间值均发送至接收端。 在本发明实施例中, 发送端将待传输文件以及空间值均发送至接收端, 即, 发送 端提前告知接收端待传输文件的大小, 保证接收端在传输待传输文件前就能够获知待 传输文件的大小, 进而可以判断出本地存储空间是否足够支持本次蓝牙传输。 由此可 见, 本发明实施例能够解决用户使用蓝牙接收文件时, 终端只有在接收部分文件后才 提示空间不足, 从而导致之前传输的数据丢失, 使用不方便的问题, 提高了用户体验。 发送端将空间值发送至接收端可以有多种发送方式, 例如, 在发送端与接收端交 互的信令或消息中携带空间值, 或者, 可以在发送端与接收端间传输的数据包中封装 该空间值, 优选地, 可以使用 OBXE_ObjectAddHeader (增加的对象头文件)数据包, 即, 发送端将空间值封装到 OBXE_ObjectAddHeader 数据包中, 之后, 发送端将 OBXE ObjectAddHeader数据包发送至接收端, 从而完成空间值的发送。 本发明还提供了一种文件接收方法, 图 3是根据本发明实施例的文件接收方法的 流程图, 如图 3所示, 包括如下的步骤 S302至步骤 S304。 步骤 S302, 接收端接收本次蓝牙传输的待传输文件的空间值, 其中, 空间值为待 传输文件占用的存储空间的大小。 步骤 S304, 接收端比较本地的存储空间的大小与空间值, 根据比较结果确定是否 接收待传输文件。 在本发明实施例中, 接收端接收本次蓝牙传输的待传输文件的空间值, 获知待传 输文件的大小, 进而比较本地的存储空间的大小与空间值, 接收端可以根据比较结果 确定是否接收待传输文件。 即, 接收端在传输待传输文件前就能够获知待传输文件的 大小, 进而可以判断出本地存储空间是否足够支持本次蓝牙传输。 由此可见, 本发明 实施例能够解决用户使用蓝牙接收文件时, 终端只有在接收部分文件后才提示空间不 足, 从而导致之前传输的数据丢失, 使用不方便的问题, 提高了用户体验。 接收端根据步骤 S304中的比较结果确定是否接收待传输文件,在接收端本地的存 储空间的大小不小于空间值时, 接收端判断本地未被占用的存储空间的大小是否不小 于空间值; 若是, 接收端进行蓝牙传输, 接收待传输文件。 若本地未被占用的存储空间的大小小于空间值, 接收端需要删除本地被占用的存 储空间中存储的文件或应用, 直至未被占用的存储空间的大小不小于空间值。 相关技术中使用的蓝牙传输方式, 在本地存储空间不足时, 也提及需要用户先删 除一部分文件然后再重新传输, 由于已存储的文件较多, 且每个文件占用的空间大小 也不相同, 因此, 需要删除哪些文件才能满足接收对方文件需要对用户也是一个比较 困难的问题, 为解决该技术问题, 相关技术提供了一种解决方式: 用户删除一个文件 之后需要再去查看一下手机的内存空间, 再与对方传输的文件进行大小比对, 如果空 间不足的话还要去删除其他文件, 用户会感觉到很不方便而且浪费时间。 因此, 本发明实施例提供了另外一种解决方式, 即, 接收端删除本地被占用的存 储空间中存储的文件或应用, 删除后接收端会自动计算未被占用的存储空间的大小, 直至未被占用的存储空间的大小不小于空间值, 此时, 接收端就能够进行蓝牙传输, 接收待传输文件, 不需要再进行删除操作。 为了避免删除操作删除有用的文件或应用, 例如, 删除了系统文件可能导致接收 端无法进行正常的操作, 因此, 接收端可以提示用户本地没有足够的存储空间进行本 次蓝牙传输, 按照用户输入的删除指示删除文件或应用, 接收端接收用户输入的删除 指示, 其中, 删除指示用于指示删除的文件或应用, 进而接收端根据删除指示删除本 地被占用的存储空间中存储的文件或应用。 在应用中, 若当接收端本地的存储空间的大小小于空间值时, 接收端不需要进行 任何操作, 直接提示用户当前空间无法进行待传输文件的蓝牙传输即可。 上文提及, 发送端将空间值发送至接收端可以有多种发送方式, 例如, 在发送端 与接收端交互的信令或消息中携带空间值, 或者, 可以在发送端与接收端间传输的数 据包中封装该空间值, 优选地, 可以使用 OBXE_ObjectAddHeader数据包, 对应的, 接收端可以接收封装有空间值的 OBXE_ObjectAddHeader数据包。 进一步, 接收端解 析 OBXE_ObjectAddHeader数据包, 获取空间值。 本发明实施例还提供了一种文件传输方法, 图 4是根据本发明实施例的文件传输 方法的流程图, 如图 4所示, 包括如下的步骤 S402至步骤 S408。 步骤 S402, 发送端确定空间值, 其中, 该空间值为待传输文件占用的存储空间的 大小。 步骤 S404, 发送端将待传输文件以及空间值均发送至接收端。 步骤 S406, 接收端接收本次蓝牙传输的待传输文件的空间值。 步骤 S408, 接收端比较本地的存储空间的大小与空间值, 根据比较结果确定是否 接收待传输文件。 在本发明实施例中, 发送端将待传输文件以及空间值均发送至接收端, 接收端接 收本次蓝牙传输的待传输文件的空间值, 获知待传输文件的大小, 进而比较本地的存 储空间的大小与空间值, 接收端可以根据比较结果确定是否接收待传输文件。 即, 发 送端提前告知接收端待传输文件的大小, 保证接收端在传输待传输文件前就能够获知 待传输文件的大小, 进而可以判断出本地存储空间是否足够支持本次蓝牙传输。 由此 可见, 本发明实施例能够解决用户使用蓝牙接收文件时, 终端只有在接收部分文件后 才提示空间不足, 从而导致之前传输的数据丢失, 使用不方便的问题, 提高了用户体 验。 采用本发明实施例提供的方法、装置和系统, 与相关技术相比, 取得了明显进步, 能够在文件通过蓝牙接收前提前判断空间是否满足要求, 避免了在接收了一段数据后 由于空间不足导致浪费, 使用不便的问题。 同时在空间不足的情况下, 用户可以直接 进入文件删除或应用卸载界面, 删除文件后自动判断空间是否满足要求, 免除用户手 动计算空间大小的不便。 下面将结合实例对本发明实施例的实现过程进行详细描述。 流程部分包括以下几个步骤: The object exchange involved in the OBEX protocol includes the exchange of files and directories. During the application process, the Client client can initialize various requests, such as sending and receiving files, and browsing the server object. Therefore, the Client client has the ability to interpret the format and size of the OBEX folder and its files; Server and Client clients Correspondingly, as a remote target device, it provides object exchange service and browsing function using OBEX folder format, server-side read-only folder and read-only file, which can restrict object issue and file/directory deletion and establishment. . At present, the Bluetooth function is used more frequently in people's daily use of mobile phones, PCs and other terminals, such as file transfer, answering calls, playing audio and video files. In order to share useful files and software, friends often use Bluetooth. The current Bluetooth transmission mode is to transfer the file first, and then prompt the user when the space is insufficient. Then the previously transmitted data is cleared. For example, the other party's storage space is 300M. In the case of unknown beforehand, a 400M file needs to be transmitted. The other party, when transmitting 300M of data, the other party will indicate that there is insufficient space, and then the previously transmitted data is cleared. When the user receives the file by using the Bluetooth in the related art, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the lost data to be lost and the inconvenient use problem, and no effective solution has been proposed yet. SUMMARY OF THE INVENTION The present invention provides a file transmitting and receiving method and apparatus, and a file transmitting method and system, so as to at least solve the problem that when a user receives a file using Bluetooth in a related art, the terminal only indicates that the space is insufficient after receiving a partial file, and the use is not Convenient problem. According to an aspect of the present invention, a file sending method is provided, which is applied to a Bluetooth transmission, and includes: determining, by a sending end, a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; The spatial values are sent to the receiving end. Preferably, the sending end sends the spatial value to the receiving end, the sending end includes: the sending end encapsulates the spatial value into the OBXE Obj ect AddHeader data packet; and the sending end sends the OBXE_Obj ect AddHeader data packet to the receiving end. According to another aspect of the present invention, a file receiving method is provided, which is applied to a Bluetooth transmission, and includes: a receiving end receiving a space value of a file to be transmitted transmitted by the Bluetooth, wherein the space value is a storage space occupied by the file to be transmitted. The size of the local storage space and the space value are compared by the receiving end, and it is determined whether to receive the file to be transmitted according to the comparison result. Preferably, the receiving end determines whether to receive the file to be transmitted according to the comparison result, and the method includes: when the size of the local storage space is not less than the space value, the receiving end determines whether the size of the local unoccupied storage space is not less than a space value; If yes, the receiving end performs Bluetooth transmission to receive the file to be transmitted; if not, the receiving end deletes the file or application stored in the locally occupied storage space until the size of the unoccupied storage space is not less than the space value. Preferably, the receiving end deletes the file or the application stored in the locally occupied storage space, including: the receiving end prompts the user that there is not enough storage space for the current Bluetooth transmission; the receiving end receives the deletion instruction input by the user, where the deletion indication The file or application used to indicate the deletion; the receiving end deletes the file or application stored in the locally occupied storage space according to the deletion instruction. Preferably, the receiving end determines whether to receive the file to be transmitted according to the comparison result, and the method includes: when the size of the local storage space of the receiving end is smaller than the space value, the receiving end prompts the user that the current space cannot perform Bluetooth transmission of the file to be transmitted. Preferably, the receiving end determines the spatial value of the file to be transmitted that is currently transmitted by the Bluetooth, and includes: the receiving end receives the OBXE_ObjectAddHeader data packet encapsulating the spatial value; and the receiving end parses the OBXE_ObjectAddHeader data packet to obtain the spatial value. According to still another aspect of the present invention, a file transmission method is provided, which is applied to a Bluetooth transmission, and includes: a sending end determines a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; And the spatial value is sent to the receiving end; the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth; the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result. According to an aspect of the present invention, a file sending apparatus is provided, which is applied to a Bluetooth transmission, and includes a determining module, configured to determine a spatial value, where a space value is a size of a storage space occupied by a file to be transmitted; a sending module is set to Send the file to be transferred and the space value to the receiving end. According to another aspect of the present invention, a file receiving apparatus is provided, which is applied to a Bluetooth transmission, and includes a receiving module, configured to receive a spatial value of a file to be transmitted transmitted by the Bluetooth, wherein the space value is occupied by a file to be transmitted. The size of the storage space; the comparison module, set to compare the size and space value of the local storage space, and determine whether to receive the file to be transmitted according to the comparison result. According to still another aspect of the present invention, a file transmission system is provided, which is applied to a Bluetooth transmission, including a transmitting end and a receiving end: the transmitting end is set to determine a spatial value, wherein the spatial value is a size of a storage space occupied by a file to be transmitted. Sending the file to be transmitted and the space value to the receiving end; the receiving end is set to determine the space value of the file to be transmitted transmitted by the Bluetooth, wherein the space value is the size of the storage space occupied by the file to be transmitted; The size and space value of the space, and whether or not to receive the file to be transmitted is determined according to the comparison result. According to the present invention, the transmitting end sends the file to be transmitted and the spatial value to the receiving end, and the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and obtains the size of the file to be transmitted, thereby comparing the size of the local storage space with The spatial value, the receiving end may determine whether to receive the file to be transmitted according to the comparison result. That is, the sender mentions Before informing the receiving end of the size of the file to be transmitted, the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission, and solve the problem that the user receives the file by using Bluetooth. At the same time, the terminal only indicates that the space is insufficient after receiving a part of the file, thereby causing the previously transmitted data to be lost, and the inconvenient use problem improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawings: FIG. 1 is a schematic diagram of a position of an OBEX in a Bluetooth protocol stack according to the related art; FIG. 2 is a flowchart of a file transmitting method according to an embodiment of the present invention; FIG. 3 is a file receiving method according to an embodiment of the present invention; Figure 4 is a flow chart of a file transmission method according to an embodiment of the present invention; Figure 5 is a flow chart of a Bluetooth transmitting end according to an embodiment of the present invention; Figure 6 is a flow chart of a Bluetooth receiving end according to an embodiment of the present invention; 7 is a block diagram of a header: OBEX ObjectAddHeader packet according to an embodiment of the present invention; FIG. 8 is a flow chart of a OBEX protocol packet of a sender and a receiver according to an embodiment of the present invention; FIG. 9 is a file transmission according to an embodiment of the present invention. FIG. 10 is a block diagram showing the structure of a file receiving apparatus according to an embodiment of the present invention. FIG. 11 is a block diagram showing the structure of a file transfer system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. The present invention provides a file sending method. FIG. 2 is a flowchart of a file sending method according to an embodiment of the present invention. As shown in FIG. 2, the following steps S202 to S204 are included. Step S202, the sender determines a space value, where the space value is a size of a storage space occupied by the file to be transmitted. Step S204, the sending end sends the file to be transmitted and the spatial value to the receiving end. In the embodiment of the present invention, the sending end sends the file to be transmitted and the space value to the receiving end, that is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the to-be-transmitted before transmitting the file to be transmitted. The size of the file, in turn, can determine whether the local storage space is sufficient to support this Bluetooth transmission. It can be seen that the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience. The sending end may send a spatial value to the receiving end in multiple sending manners, for example, carrying a spatial value in a signaling or message that the transmitting end interacts with the receiving end, or may be in a data packet transmitted between the transmitting end and the receiving end. Encapsulating the spatial value, preferably, an OBXE_ObjectAddHeader (added object header file) packet may be used, that is, the sender encapsulates the spatial value into the OBXE_ObjectAddHeader packet, and then the sender sends the OBXE ObjectAddHeader packet to the receiving end, thereby Complete the transmission of the space value. The present invention also provides a file receiving method. FIG. 3 is a flowchart of a file receiving method according to an embodiment of the present invention. As shown in FIG. 3, the following steps S302 to S304 are included. Step S302: The receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and the space value is the size of the storage space occupied by the file to be transmitted. Step S304, the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result. In the embodiment of the present invention, the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and obtains the size of the file to be transmitted, and then compares the size and space value of the local storage space, and the receiving end may determine whether to receive according to the comparison result. The file to be transferred. That is, the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and can determine whether the local storage space is sufficient to support the Bluetooth transmission. It can be seen that the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience. The receiving end determines whether to receive the file to be transmitted according to the comparison result in step S304. When the size of the local storage space on the receiving end is not less than the space value, the receiving end determines whether the size of the unoccupied storage space is not less than the space value; The receiving end performs Bluetooth transmission and receives the file to be transmitted. If the size of the unoccupied storage space is smaller than the space value, the receiving end needs to delete the file or application stored in the locally occupied storage space until the size of the unoccupied storage space is not less than the space value. The Bluetooth transmission method used in the related art, when the local storage space is insufficient, also mentions that the user needs to delete a part of the file and then re-transfer. Since there are many files stored, and the space occupied by each file is different, Therefore, the files that need to be deleted in order to satisfy the receiving of the other party's files need to be a difficult problem for the user. To solve the technical problem, the related technology provides a solution: After deleting a file, the user needs to check the memory space of the mobile phone. Then, compare the size of the files transmitted by the other party. If there is not enough space, delete other files, and the user will feel very inconvenient and waste time. Therefore, the embodiment of the present invention provides another solution, that is, the receiving end deletes the file or application stored in the locally occupied storage space, and after receiving the deletion, the receiving end automatically calculates the size of the unoccupied storage space until the The size of the occupied storage space is not less than the space value. At this time, the receiving end can perform Bluetooth transmission and receive the file to be transmitted without performing the deletion operation. In order to avoid deletion of useful files or applications, for example, deleting the system file may cause the receiving end to fail to perform normal operations. Therefore, the receiving end may prompt the user that there is not enough storage space for the Bluetooth transmission, according to the user input. The deletion indicates that the file or the application is deleted, and the receiving end receives the deletion indication input by the user, where the deletion indication is used to indicate the deleted file or the application, and the receiving end deletes the file or application stored in the locally occupied storage space according to the deletion instruction. In the application, if the size of the local storage space of the receiving end is smaller than the space value, the receiving end does not need to perform any operation, and directly prompts the user that the current space cannot transmit the Bluetooth transmission of the file to be transmitted. As mentioned above, the sending end may send a spatial value to the receiving end in multiple sending manners, for example, carrying a spatial value in a signaling or message that the transmitting end interacts with the receiving end, or may be between the transmitting end and the receiving end. The spatial value is encapsulated in the transmitted data packet. Preferably, the OBXE_ObjectAddHeader data packet may be used. Correspondingly, the receiving end may receive the OBXE_ObjectAddHeader data packet encapsulating the spatial value. Further, the receiving end parses the OBXE_ObjectAddHeader packet to obtain a space value. The embodiment of the present invention further provides a file transmission method. FIG. 4 is a flowchart of a file transmission method according to an embodiment of the present invention. As shown in FIG. 4, the following steps S402 to S408 are included. Step S402, the transmitting end determines a spatial value, where the space value is a size of a storage space occupied by the file to be transmitted. Step S404, the sending end sends the file to be transmitted and the space value to the receiving end. Step S406: The receiving end receives the spatial value of the file to be transmitted that is currently transmitted by the Bluetooth. Step S408, the receiving end compares the size and space value of the local storage space, and determines whether to receive the file to be transmitted according to the comparison result. In the embodiment of the present invention, the sending end sends the file to be transmitted and the spatial value to the receiving end, and the receiving end receives the space value of the file to be transmitted transmitted by the Bluetooth, and the size of the file to be transmitted is obtained, thereby comparing the local storage space. The size and space value, the receiving end can determine whether to receive the file to be transmitted according to the comparison result. That is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission. It can be seen that the embodiment of the present invention can solve the problem that when the user receives the file by using the Bluetooth, the terminal only indicates that the space is insufficient after receiving the partial file, thereby causing the previously transmitted data to be lost, and the use is inconvenient, thereby improving the user experience. The method, the device and the system provided by the embodiments of the present invention have achieved significant progress compared with the related technologies, and can determine whether the space satisfies the requirements before the file is received through the Bluetooth, and avoids the lack of space after receiving a piece of data. Waste, inconvenient problems. At the same time, in the case of insufficient space, the user can directly enter the file deletion or application uninstallation interface, and automatically determine whether the space meets the requirements after deleting the file, thereby exempting the user from manually calculating the space size. The implementation process of the embodiment of the present invention will be described in detail below with reference to examples. The process section includes the following steps:
1.发送端选择文件发送, 同时得到文件大小。 2.发送端将发送文件大小放入 OBEX_ObjectAddHeader数据包发送给接收端。 1. The sender selects the file to send and gets the file size at the same time. 2. The sender sends the file size into the OBEX_ObjectAddHeader packet and sends it to the receiver.
3.接收端收到 OBEX_ObjectAddHeader数据包后判断容量是否足够存储待接收的 文件。 3. After receiving the OBEX_ObjectAddHeader packet, the receiving end determines whether the capacity is sufficient to store the file to be received.
4.如果接收端判断容量足够, 则根据 OBEX协议接收文件数据包, 如果接收端判 断容量不足, 则提示用户删除部分文件以腾出部分空间供文件接收, 用户选择清除文 件则直接进入文件选择界面去选择文件删除, 待空间足够则进入文件传输过程。 4. If the receiving end determines that the capacity is sufficient, the file data packet is received according to the OBEX protocol. If the receiving end determines that the capacity is insufficient, the user is prompted to delete part of the file to free up part of the space for file reception, and the user selects to clear the file and directly enters the file selection interface. To select the file to delete, when the space is sufficient, enter the file transfer process.
5.关闭底层连接释放资源。 图 5是根据本发明实施例的蓝牙发送端流程图, 如图 5所示, 发送端进行如下的 处理, 包括如下的步骤 S501至步骤 S509。 步骤 S501, 选择需要发送的文件。 步骤 S502, 得到待发送文件大小。 步骤 S503 ,判断蓝牙是否打开,如果是,执行步骤 S504;如果否,执行步骤 S505。 步骤 S504, 搜索接收端, 配对, 连接。 步骤 S505 , 打开蓝牙。 步骤 S506, 调用 OBEX初始化接口: OBEX-Init。 步骤 S507, 向 Header (头文件) 请求包格式中加入文件大小参数。 步骤 S508, 向待发送队列中加入 Header。 步骤 S509, 向接收端发送传输请求。 图 6是根据本发明实施例的蓝牙接收端流程图, 如图 6所示, 接收端进行如下的 步骤 S601至步骤 S610。 步骤 S601, 接收 OBEX_Obj ectAddHeader数据包。 步骤 S602, 解析 OBEX_Obj ectAddHeader数据包, 得到待接收文件大小。 步骤 S603 , 搜索配置文件, 获得剩余存储空间大小值。 步骤 S604, 比较传输文件与剩余存储空间大小。 步骤 S605 ,判断空间是否足够。如果是,执行步骤 S606;如果否,执行步骤 S608。 步骤 S606, 接收文件。 步骤 S607,判断是否清理空间。如果是,执行步骤 S608;如果否,执行步骤 S610。 步骤 S608, 自动将可删除的文件按文件大小排列, 且显示文件大小值以及需要的 清理的空间值。 步骤 S609, 删除文件后, 空间足够, 接收文件。 步骤 S610, 结束文件传输。 根据图 1所示的 OBEX协议进行如下处理: 5. Close the underlying connection to release the resource. FIG. 5 is a flowchart of a Bluetooth transmitting end according to an embodiment of the present invention. As shown in FIG. 5, the sending end performs the following processing, including the following steps S501 to S509. Step S501, selecting a file to be sent. Step S502, obtaining a file size to be sent. Step S503, determining whether the Bluetooth is turned on, if yes, executing step S504; if not, executing step S505. Step S504, searching for the receiving end, pairing, and connecting. Step S505, turning on the Bluetooth. Step S506, calling the OBEX initialization interface: OBEX-Init. Step S507, adding a file size parameter to the header (header file) request packet format. Step S508, adding a Header to the queue to be sent. Step S509, sending a transmission request to the receiving end. FIG. 6 is a flowchart of a Bluetooth receiving end according to an embodiment of the present invention. As shown in FIG. 6, the receiving end performs the following steps S601 to S610. Step S601, receiving an OBEX_Obj ectAddHeader data packet. Step S602, parsing the OBEX_Obj ectAddHeader data packet to obtain a file size to be received. Step S603, searching for a configuration file to obtain a remaining storage space size value. Step S604, comparing the size of the transmission file and the remaining storage space. In step S605, it is judged whether the space is sufficient. If yes, go to step S606; if no, go to step S608. Step S606, receiving a file. In step S607, it is determined whether to clean up the space. If yes, go to step S608; if no, go to step S610. In step S608, the files that can be deleted are automatically arranged according to the file size, and the file size value and the required cleaned space value are displayed. Step S609, after deleting the file, the space is sufficient to receive the file. Step S610, ending the file transfer. According to the OBEX protocol shown in Figure 1, the following processing is performed:
1 ) 将待发送的文件大小封装到 OBEX_ObjectAddHeader数据包中。 1) Encapsulate the file size to be sent into the OBEX_ObjectAddHeader packet.
2)处理文件发送和接收流程, 过程如图 8所示, 在蓝牙协议栈中所处的位置如图 1所示。 图 7是根据本发明实施例的 header: OBEX Obj ect AddHeader数据包结构图, 如 图 7所示, OBEX_Obj ect AddHeader数据包具有了如下功能。 2) Process the file sending and receiving process. The process is shown in Figure 8. The location in the Bluetooth protocol stack is shown in Figure 1. 7 is a block diagram of an OBEX Obj ect AddHeader packet according to an embodiment of the present invention. As shown in FIG. 7, the OBEX_Obj ect AddHeader packet has the following functions.
1 ) 封装了发送文件大小参数。 1) Encapsulate the send file size parameter.
2) 供接收端解析待接收文件大小。 2) The receiving end parses the size of the file to be received.
3 ) 包含应答码, 供接收端反馈给发送端用来进行文件传输。 图 8是根据本发明实施例的发送端和接收端 OBEX协议数据包流程图, 现结合图3) Contains a response code for the receiver to feed back to the sender for file transfer. 8 is a flow chart of a OBEX protocol data packet of a transmitting end and a receiving end according to an embodiment of the present invention.
8举例说明, 如图 8所示, 包括如下的步骤 S801至步骤 S816。 步骤 S801, OBEX初始化接口: OBEX— Init。 步骤 S802, 调用蓝牙传输方式。 步骤 S803 , 向 header: OBEX_ObjectAddHeader中加入发送包长度等信息。 步骤 S804, 向接收端发送 header: OBEX Obj ect AddHeader 步骤 S805, 接收端解析 header数据结构。 步骤 S806,判断终端所有的存储空间(包括已用空间和空闲空间)是否满足要求, 如果是, 执行步骤 S807; 如果否, 执行步骤 S813。 步骤 S807, 进行传输。 步骤 S808,判断传输是否结束,如果是,执行步骤 S809;如果否,执行步骤 S810。 步骤 S809, 当传输结束, 关闭底层连接释放资源: OBEX— Clrarup。 步骤 S810, 发送数据 OBEX_Request。 步骤 S811, 处理服务器响应: OBEX— Request。 步骤 S812, 调用应用层的事件处理函数。 步骤 S813 , 终端总存储空间大小是否满足。 如果是, 执行步骤 S814; 如果否, 执行步骤 S816。 步骤 S814, 判断用户是否清理存储空间, 如果是, 执行步骤 S815 ; 如果否, 执 行步骤 S816。 步骤 S815, 清理空间。 步骤 S816, 结束整个传输程序。 需要说明的是, 在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的 计算机系统中执行, 并且, 虽然在流程图中示出了逻辑顺序, 但是在某些情况下, 可 以以不同于此处的顺序执行所示出或描述的步骤。 本发明实施例提供了一种文件发送装置,该装置可以用于实现上述文件发送方法。 图 9是根据本发明实施例的文件发送装置的结构框图, 文件发送装置包括确定模块 92 和发送模块 94。 确定模块 92, 设置为确定空间值, 其中, 空间值为待传输文件占用的 存储空间的大小; 发送模块 94, 连接至确定模块 92, 设置为将待传输文件以及空间值 均发送至接收端。 本发明实施例提供了一种文件接收装置,该装置可以用于实现上述文件接收方法。 图 10是根据本发明实施例的文件接收装置的结构框图,包括接收模块 102和比较模块 104。 接收模块 102, 设置为接收本次蓝牙传输的待传输文件的空间值, 其中, 空间值 为待传输文件占用的存储空间的大小; 比较模块 104, 连接至接收模块 102, 设置为比 较本地的存储空间的大小与空间值, 根据比较结果确定是否接收待传输文件。 本发明实施例提供了一种文件传输系统,该系统可以用于实现上述文件传输方法。 图 11是根据本发明实施例的文件传输系统的结构框图,包括发送端 112和接收端 114。 发送端 112设置为确定空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 将待传输文件以及空间值均发送至接收端 114; 接收端 114设置为确定本次蓝牙传输 的待传输文件的空间值, 其中, 空间值为待传输文件占用的存储空间的大小; 比较本 地的存储空间的大小与空间值, 根据比较结果确定是否接收待传输文件。 综上所述, 根据本发明的上述实施例, 提供了一种文件发送、 接收方法及装置和 文件传输方法及系统。通过本发明, 发送端将待传输文件以及空间值均发送至接收端, 接收端接收本次蓝牙传输的待传输文件的空间值, 获知待传输文件的大小, 进而比较 本地的存储空间的大小与空间值,接收端可以根据比较结果确定是否接收待传输文件。 即, 发送端提前告知接收端待传输文件的大小, 保证接收端在传输待传输文件前就能 够获知待传输文件的大小,进而可以判断出本地存储空间是否足够支持本次蓝牙传输, 解决了用户使用蓝牙接收文件时, 终端只有在接收部分文件后才提示空间不足, 从而 导致之前传输的数据丢失, 使用不方便的问题, 提高了用户体验。 需要说明的是, 装置实施例中描述的文件发送装置、 文件接收装置和文件传输系 统对应于上述的文件发送、 接收和传输方法实施例, 其具体的实现过程在方法实施例 中已经进行过详细说明, 在此不再赘述。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 或者将它们分别制作成各个集成电路模 块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明 不限制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 As an example, as shown in FIG. 8, the following steps S801 to S816 are included. Step S801, the OBEX initialization interface: OBEX_Init. Step S802, calling a Bluetooth transmission mode. Step S803, adding information such as the length of the transmission packet to the header: OBEX_ObjectAddHeader. Step S804, sending a header to the receiving end: OBEX Obj ect AddHeader Step S805, the receiving end parses the header data structure. Step S806, it is judged whether all the storage spaces (including the used space and the free space) of the terminal satisfy the requirement, and if yes, step S807 is performed; if no, step S813 is performed. In step S807, transmission is performed. In step S808, it is determined whether the transmission is finished. If yes, step S809 is performed; if not, step S810 is performed. Step S809, when the transmission ends, the underlying connection is released to release the resource: OBEX-Clrarup. In step S810, the data OBEX_Request is sent. Step S811, the processing server response: OBEX_Request. Step S812, calling an event processing function of the application layer. Step S813, whether the total storage space size of the terminal is satisfied. If yes, go to step S814; if no, go to step S816. In step S814, it is determined whether the user clears the storage space. If yes, step S815 is performed; if no, step S816 is performed. Step S815, clearing the space. In step S816, the entire transmission process is ended. It should be noted that the steps shown in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and, although the logical order is shown in the flowchart, in some cases, The steps shown or described may be performed in an order different than that herein. The embodiment of the invention provides a file sending device, which can be used to implement the above file sending method. FIG. 9 is a structural block diagram of a file transmitting apparatus including a determining module 92 and a transmitting module 94 according to an embodiment of the present invention. The determining module 92 is configured to determine a spatial value, where the space value is the size of the storage space occupied by the file to be transmitted; the sending module 94 is connected to the determining module 92, and is configured to send the file to be transmitted and the spatial value to the receiving end. The embodiment of the invention provides a file receiving device, which can be used to implement the above file receiving method. FIG. 10 is a structural block diagram of a file receiving apparatus including a receiving module 102 and a comparing module 104 according to an embodiment of the present invention. The receiving module 102 is configured to receive a space value of the file to be transmitted that is transmitted by the current Bluetooth, where the space value is the size of the storage space occupied by the file to be transmitted; the comparison module 104 is connected to the receiving module 102, and is set to compare the local storage. The size and space value of the space, and whether or not to receive the file to be transmitted is determined according to the comparison result. The embodiment of the invention provides a file transmission system, which can be used to implement the above file transmission method. 11 is a block diagram showing the structure of a file transmission system including a transmitting end 112 and a receiving end 114, in accordance with an embodiment of the present invention. The sending end 112 is configured to determine a space value, where the space value is the size of the storage space occupied by the file to be transmitted; the file to be transmitted and the space value are all sent to the receiving end 114; the receiving end 114 is set to determine the current Bluetooth transmission waiting The space value of the file to be transferred, where the space value is the size of the storage space occupied by the file to be transmitted; comparing the size and space value of the local storage space, determining whether to receive the file to be transmitted according to the comparison result. In summary, according to the above embodiments of the present invention, a file transmitting and receiving method and apparatus, and a file transmitting method and system are provided. According to the present invention, the transmitting end sends the file to be transmitted and the spatial value to the receiving end, and the receiving end receives the spatial value of the file to be transmitted transmitted by the Bluetooth, and knows the size of the file to be transmitted, and then compares The size and space value of the local storage space, and the receiving end can determine whether to receive the file to be transmitted according to the comparison result. That is, the sending end informs the receiving end of the size of the file to be transmitted in advance, and ensures that the receiving end can know the size of the file to be transmitted before transmitting the file to be transmitted, and then can determine whether the local storage space is sufficient to support the Bluetooth transmission, and solve the user. When receiving a file using Bluetooth, the terminal only indicates that the space is insufficient after receiving a part of the file, thereby causing the previously transmitted data to be lost, and the inconvenient use problem improves the user experience. It should be noted that the file sending apparatus, the file receiving apparatus, and the file transmission system described in the device embodiments correspond to the foregoing file sending, receiving, and transmitting method embodiments, and the specific implementation process has been detailed in the method embodiment. Description, no longer repeat here. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or they may be Multiple modules or steps are made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claim
1. 一种文件发送方法, 应用于蓝牙传输, 包括: 1. A file sending method, applied to Bluetooth transmission, comprising:
发送端确定空间值, 其中, 所述空间值为待传输文件占用的存储空间的大 小;  The sending end determines a space value, where the space value is a size of a storage space occupied by the file to be transmitted;
所述发送端将所述待传输文件以及所述空间值均发送至接收端。  The sending end sends the file to be transmitted and the space value to the receiving end.
2. 根据权利要求 1所述的方法, 其中, 所述发送端将所述空间值发送至接收端, 包括: The method according to claim 1, wherein the sending end sends the space value to the receiving end, including:
所述发送端将所述空间值封装到对象交换协议中增加的对象头文件 OBXE Obj ect AddHeader数据包中;  Transmitting, by the sending end, the space value into an object header file OBXE Obj ect AddHeader data packet added in the object exchange protocol;
所述发送端将所述 OBXE_ObjectAddHeader数据包发送至所述接收端。  The transmitting end sends the OBXE_ObjectAddHeader data packet to the receiving end.
3. 一种文件接收方法, 应用于蓝牙传输, 包括: 3. A file receiving method, applied to Bluetooth transmission, comprising:
接收端接收本次蓝牙传输的待传输文件的空间值, 其中, 所述空间值为所 述待传输文件占用的存储空间的大小;  Receiving, by the receiving end, a space value of the file to be transmitted that is transmitted by the Bluetooth, wherein the space value is a size of a storage space occupied by the file to be transmitted;
所述接收端比较本地的存储空间的大小与所述空间值, 根据比较结果确定 是否接收所述待传输文件。  The receiving end compares the size of the local storage space with the space value, and determines whether to receive the file to be transmitted according to the comparison result.
4. 根据权利要求 3所述的方法, 其中, 所述接收端根据比较结果确定是否接收所 述待传输文件, 包括: The method according to claim 3, wherein the receiving end determines whether to receive the file to be transmitted according to the comparison result, including:
在所述接收端本地的存储空间的大小不小于所述空间值时, 所述接收端判 断本地未被占用的存储空间的大小是否不小于所述空间值;  When the size of the local storage space is not less than the space value, the receiving end determines whether the size of the local unoccupied storage space is not less than the space value;
若是, 所述接收端进行蓝牙传输, 接收所述待传输文件;  If yes, the receiving end performs Bluetooth transmission, and receives the file to be transmitted;
若否, 所述接收端删除本地被占用的存储空间中存储的文件或应用, 直至 所述未被占用的存储空间的大小不小于所述空间值。  If not, the receiving end deletes the file or application stored in the locally occupied storage space until the size of the unoccupied storage space is not less than the space value.
5. 根据权利要求 4所述的方法, 其中, 所述接收端删除本地被占用的存储空间中 存储的文件或应用, 包括: The method of claim 4, wherein the receiving end deletes a file or an application stored in a locally occupied storage space, including:
所述接收端提示用户本地没有足够的存储空间进行本次蓝牙传输; 所述接收端接收用户输入的删除指示, 其中, 所述删除指示用于指示删除 的文件或应用; 所述接收端根据所述删除指示删除所述本地被占用的存储空间中存储的文 件或应用。 The receiving end prompts the user that there is not enough storage space for the current Bluetooth transmission; the receiving end receives the deletion indication input by the user, where the deletion indication is used to indicate the deleted file or application; And the receiving end deletes the file or application stored in the locally occupied storage space according to the deletion indication.
6. 根据权利要求 3所述的方法, 其中, 所述接收端根据比较结果确定是否接收所 述待传输文件, 包括: The method according to claim 3, wherein the receiving end determines whether to receive the file to be transmitted according to the comparison result, including:
当所述接收端本地的存储空间的大小小于所述空间值时, 所述接收端提示 用户当前空间无法进行所述待传输文件的蓝牙传输。  When the size of the local storage space of the receiving end is smaller than the space value, the receiving end prompts the user that the current space cannot perform Bluetooth transmission of the file to be transmitted.
7. 根据权利要求 3至 6任一项所述的方法, 其中, 所述接收端确定本次蓝牙传输 的待传输文件的空间值, 包括: The method according to any one of claims 3 to 6, wherein the receiving end determines the spatial value of the file to be transmitted that is currently transmitted by the Bluetooth, and includes:
所述接收端接收封装有所述空间值的 OBXE_ObjectAddHeader数据包; 所述接收端解析所述 OBXE_ObjectAddHeader数据包, 获取所述空间值。  The receiving end receives an OBXE_ObjectAddHeader data packet encapsulating the spatial value; the receiving end parses the OBXE_ObjectAddHeader data packet to obtain the spatial value.
8. 一种文件传输方法, 应用于蓝牙传输, 包括: 8. A file transfer method for Bluetooth transmission, including:
发送端确定空间值, 其中, 所述空间值为待传输文件占用的存储空间的大 小;  The sending end determines a space value, where the space value is a size of a storage space occupied by the file to be transmitted;
所述发送端将所述待传输文件以及所述空间值均发送至接收端; 所述接收端接收本次蓝牙传输的待传输文件的空间值;  The sending end sends the file to be transmitted and the space value to the receiving end; the receiving end receives the spatial value of the file to be transmitted transmitted by the Bluetooth.
所述接收端比较本地的存储空间的大小与所述空间值, 根据比较结果确定 是否接收所述待传输文件。  The receiving end compares the size of the local storage space with the space value, and determines whether to receive the file to be transmitted according to the comparison result.
9. 一种文件发送装置, 应用于蓝牙传输, 包括: 9. A file transmitting device for Bluetooth transmission, comprising:
确定模块, 设置为确定空间值, 其中, 所述空间值为待传输文件占用的存 储空间的大小;  Determining a module, configured to determine a spatial value, where the space value is a size of a storage space occupied by a file to be transmitted;
发送模块, 设置为将所述待传输文件以及所述空间值均发送至接收端。  And a sending module, configured to send the file to be transmitted and the space value to the receiving end.
10. 一种文件接收装置, 应用于蓝牙传输, 包括: 10. A file receiving device for use in Bluetooth transmission, comprising:
接收模块, 设置为接收本次蓝牙传输的待传输文件的空间值, 其中, 所述 空间值为所述待传输文件占用的存储空间的大小;  a receiving module, configured to receive a space value of the to-be-transmitted file of the Bluetooth transmission, where the space value is a size of a storage space occupied by the file to be transmitted;
比较模块, 设置为比较本地的存储空间的大小与所述空间值, 根据比较结 果确定是否接收所述待传输文件。  The comparison module is configured to compare the size of the local storage space with the space value, and determine whether to receive the file to be transmitted according to the comparison result.
11. 一种文件传输系统, 应用于蓝牙传输, 包括发送端与接收端: 所述发送端设置为确定空间值, 其中, 所述空间值为待传输文件占用的存 储空间的大小; 将所述待传输文件以及所述空间值均发送至所述接收端; 所述接收端设置为确定本次蓝牙传输的待传输文件的空间值, 其中, 所述 空间值为所述待传输文件占用的存储空间的大小; 比较本地的存储空间的大小 与所述空间值, 根据比较结果确定是否接收所述待传输文件。 11. A file transfer system for Bluetooth transmission, including sender and receiver: The sending end is configured to determine a spatial value, where the space value is a size of a storage space occupied by the file to be transmitted; and the file to be transmitted and the space value are both sent to the receiving end; Set to determine a spatial value of the file to be transmitted that is transmitted by the Bluetooth, wherein the space value is a size of a storage space occupied by the file to be transmitted; comparing a size of the local storage space with the space value, according to the comparison result Determining whether to receive the file to be transmitted.
PCT/CN2012/072173 2011-12-26 2012-03-12 File sending and receiving method and device, and file transfer method and system WO2013097350A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110441163.XA CN102412875B (en) 2011-12-26 2011-12-26 File sending and receiving method and device as well as file transmission method and system
CN201110441163.X 2011-12-26

Publications (1)

Publication Number Publication Date
WO2013097350A1 true WO2013097350A1 (en) 2013-07-04

Family

ID=45914753

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072173 WO2013097350A1 (en) 2011-12-26 2012-03-12 File sending and receiving method and device, and file transfer method and system

Country Status (2)

Country Link
CN (1) CN102412875B (en)
WO (1) WO2013097350A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102037256B1 (en) * 2012-08-08 2019-10-29 삼성전자주식회사 Apparatus and method for connecting service reflected in user intent
EP2696643B1 (en) 2012-08-08 2020-09-30 Samsung Electronics Co., Ltd Apparatus and method of connecting service, according to user intention
CN104980194B (en) * 2015-05-13 2018-04-27 深圳市金立通信设备有限公司 A kind of document transmission method and terminal
CN108234798A (en) * 2016-12-21 2018-06-29 乐视汽车(北京)有限公司 Image transmission control method and device
CN110022189B (en) * 2019-04-02 2021-09-28 惠州Tcl移动通信有限公司 Data transmission method, device, terminal and storage medium
CN113271324A (en) * 2020-02-14 2021-08-17 深圳市万普拉斯科技有限公司 File transmission method and device, electronic equipment and readable storage medium
CN111447118B (en) * 2020-03-27 2022-04-15 中国工商银行股份有限公司 Data transmission method and device based on data transmission stream

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996844A (en) * 2005-12-31 2007-07-11 华为技术有限公司 A local download method and system
CN101730290A (en) * 2008-10-31 2010-06-09 国际商业机器公司 Wireless terminal and communication method
CN101877604A (en) * 2010-06-22 2010-11-03 中兴通讯股份有限公司 Method and system for transmitting files

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2006046445A1 (en) * 2004-10-29 2008-05-22 松下電器産業株式会社 File transfer system, transmitter and receiver
KR100692922B1 (en) * 2006-02-08 2007-03-12 주식회사 이노와이어리스 Method for remotely logging diagnostic monitoring data for mobile telecommunication network
CN101547161B (en) * 2008-03-28 2012-09-26 阿里巴巴集团控股有限公司 Folder transmission system, folder transmission device and folder transmission method
CN102209085B (en) * 2010-03-30 2013-10-09 腾讯科技(深圳)有限公司 Method and system for transmitting multiple files

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996844A (en) * 2005-12-31 2007-07-11 华为技术有限公司 A local download method and system
CN101730290A (en) * 2008-10-31 2010-06-09 国际商业机器公司 Wireless terminal and communication method
CN101877604A (en) * 2010-06-22 2010-11-03 中兴通讯股份有限公司 Method and system for transmitting files

Also Published As

Publication number Publication date
CN102412875A (en) 2012-04-11
CN102412875B (en) 2017-05-10

Similar Documents

Publication Publication Date Title
WO2013097350A1 (en) File sending and receiving method and device, and file transfer method and system
KR102056416B1 (en) Methods and apparatus for establishing a tunneled direct link setup (tdls) session between devices in a wireless network
US7779077B2 (en) File transmission method in instant messaging service and mobile communications terminal for supporting the same
JP6456391B2 (en) Tunneling VOIP call control in cellular networks
CN102201846B (en) Wireless data transmission system and method based on soft AP (access point) technology
WO2011017931A1 (en) Bluetooth mobile terminal and pairing and bonding method thereof
WO2014067311A1 (en) Resource subscription method and device
KR20080097154A (en) Universal browsing system
WO2008105106A1 (en) Communication quality control system
WO2012088906A1 (en) Intercommunication method and system for internet of things terminals
TW201215060A (en) Mobile communication device, mobile network sharing method and electronic device
WO2011140754A1 (en) Method and system for realizing wireless usb flash disk
WO2009152699A1 (en) Sip terminal and the status reporting method, system and sip server thereof
WO2014179950A1 (en) File uploading method, client, and server
JP4225743B2 (en) Wireless terminal and communication control method
JP3791504B2 (en) Information processing system and information processing method
KR100498361B1 (en) Synchronization method for wireless internet in mobile communication device
JP3830037B2 (en) Session transfer system and method
JPH11122388A (en) Internet telephone system and connecting method
JP3800531B2 (en) State information sharing / processing method and system for communication applications
JP4445302B2 (en) Wireless terminal device and service search method
JP4201184B2 (en) How to establish a communication session
WO2017185368A1 (en) Signalling transmission method and device
WO2012113303A1 (en) Video interaction method and system
WO2019029297A1 (en) Method and device for establishing data channel, and non-volatile computer readable storage medium

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: 12861674

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12861674

Country of ref document: EP

Kind code of ref document: A1