WO2020044091A1 - 近场数据传输方法及其装置 - Google Patents

近场数据传输方法及其装置 Download PDF

Info

Publication number
WO2020044091A1
WO2020044091A1 PCT/IB2018/057152 IB2018057152W WO2020044091A1 WO 2020044091 A1 WO2020044091 A1 WO 2020044091A1 IB 2018057152 W IB2018057152 W IB 2018057152W WO 2020044091 A1 WO2020044091 A1 WO 2020044091A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
transmission request
output thread
input
data transmission
Prior art date
Application number
PCT/IB2018/057152
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 WO2020044091A1 publication Critical patent/WO2020044091A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • 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

Definitions

  • This application relates to the field of Internet technologies, and in particular, to a near-field data transmission method, device, system, device / terminal / server, and computer-readable medium. Background technique
  • the purpose of this application is to propose a near-field data transmission method, device, system, device / terminal / server, and computer-readable medium, which is used to solve or alleviate the foregoing problems in the prior art.
  • this application provides a near-field data transmission method, including:
  • an embodiment of the present application provides a near-field data transmission device, including:
  • a first program unit configured to determine a data transmission request initiated by a data receiver in a local area network
  • a second program unit configured to start a network input / output thread and a disk input / output thread in parallel according to the data transmission request;
  • a third program unit is configured to receive data transmitted by a data sender in the local area network to the data receiver according to a network input / output thread and a disk input / output thread.
  • an embodiment of the present application provides a near field transmission system, including: a data sender and a data receiver, the data sender and the data receiver are located in a same local area network, and the data The receiver determines a data transmission request it initiated in the local area network, and starts a network input / output thread and a disk input / output thread in parallel according to the data transmission request, and according to the network input / output thread and the disk input / output thread, the The data pointed by the data transmission request is transmitted by the data sender in the local area network to the data receiver.
  • an embodiment of the present application provides a device / terminal / server, including:
  • a computer-readable medium configured to store one or more programs
  • an embodiment of the present application provides a computer-readable medium on which a computer program is stored, and the program is executed by a processor to implement a method as described in any one of the foregoing embodiments.
  • a data transmission request initiated by a data receiver in a local area network is determined; according to the data transmission request, parallel Start a network input / output thread and a disk input / output thread; and receive data transmitted by the data sender in the local area network to the data receiver according to the network input / output thread and the disk input / output thread, thereby avoiding the execution process of the disk 10
  • Blocking the network 10 improves the speed of data transmission and further optimizes User experience.
  • FIG. 1 is a schematic flowchart of a near-field data transmission method in Embodiment 1 of the present application;
  • FIG. 2 is a schematic flowchart of a near-field data transmission method in Embodiment 2 of the present application.
  • FIG. 3 is a schematic flowchart of a near-field data transmission method in Embodiment 3 of the present application.
  • FIG. 4 is a schematic structural diagram of a near-field data transmission device in Embodiment 4 of the present application.
  • FIG. 5 is a schematic structural diagram of a near-field data transmission device in Embodiment 5 of the present application.
  • FIG. 6 is a schematic structural diagram of a near-field data transmission device in Embodiment 6 of the present application.
  • FIG. 7 is a schematic structural diagram of a near-field transmission system in Embodiment 7 of the present application.
  • FIG. 8 is a schematic structural diagram of a device / terminal / server in Embodiment 8 of the present application.
  • FIG. 9 is a hardware structure of a device / terminal / server in Embodiment 9 of the present application. detailed description
  • FIG. 1 is a schematic flowchart of a near-field data transmission method in Embodiment 1 of the present application; as shown in FIG. 1, in this embodiment, it may include the following steps S101-S102:
  • S101 Determine a data transmission request initiated by a data receiver in a local area network
  • the local area network is established by self-built WIFI to implement the near-field transmission.
  • the local area network may include multiple user terminals, and the user terminals may be smart phones, smart tablets, smart watches, PCs, and the like.
  • This scenario is preferably suitable for scenarios where the hardware infrastructure such as the Internet is poor, there is no traffic and cloud operator WiFi, or there is no network or low network speed, so that different user terminals in the same local area network can achieve data sharing.
  • Biography Lose That is, different terminals (such as two mobile phones) are directly connected and do not depend on other networks (such as the Internet) and devices (such as routers), and the transmission rate is fast, so it is convenient to implement data interaction between different terminals, that is, near-field data transmission.
  • the data includes, but is not limited to, audio and video data, application installation packages, and the like.
  • a local area network construction method may enable a terminal to generate a hotspot and generate a random connection password, another terminal or multiple terminals search and discover the hotspot, and then the user enters Connection password.
  • the data sender turns on the hotspot and generates connection information, where the content of the connection information is used for the data receiver to establish a direct connection with the data sender through the hotspot.
  • Connect generate a two-dimensional code using the connection information and display the two-dimensional code; scan the two-dimensional code according to the data receiver to directly connect with the data sender, thereby avoiding manually entering a connection password, Simple operation, time consuming, and error-proof.
  • the content of the connection information may include an identification of the hotspot, that is, an SSID (Service Set Identifier) of the hotspot opened by the data sender, for the data receiver to determine the hotspot for direct connection.
  • the content of the connection information may also include the identifier of the data sender, that is, the unique device identifier of the data sender, such as the MAC address of its hotspot module, that is, the BSSID (Basic Service Setldentifier). Allows the data receiver to determine the data sender to which it is directly connected.
  • connection information may be different according to different connection modes. For example, if the hotspot opened by the data sender has been searched by the data receiver, the content of the connection information may only be the connection password and no hotspot identifier (of course, if any). As another example, if the data sender turns on the hotspot and hides the hotspot and does not allow the data receiver to search for it, the content of the connection information may only be the hotspot ID and no connection password (of course, if it is available). As another example, the identifiers of the above data senders may exist alone, or may exist simultaneously with other content as further verification of other content.
  • connection information may also include other known content, such as an identifier used to indicate that it is connection information, a separator used to separate different parts of it, and a verification bit used to indicate its length, format, etc. Wait.
  • the transmittable data on the data sender may be specifically presented in a list or in a better way, so that the data receiver with data needs can view it intuitively.
  • the data receiver accesses the data sender that can provide data through the established local area network, and views the data. According to the data that can be shared on the sender, also known as the shareable resource.
  • the resource displayed on the list is configured with a download or transmission button. When the event that the download or transmission button is operated is captured, the data receiver initiates a data transmission request.
  • the method may specifically include:
  • the network input and output threads and the disk input and output threads are started in parallel.
  • the network input / output thread is mainly used to control the transmission of data from the data sender to the data receiver, and the disk input / output thread is mainly used to control the writing of data to the local hard disk of the data receiver.
  • starting the network input / output thread and the disk input / output thread in parallel is equivalent to releasing the coupling relationship between the network input / output thread and the disk input / output thread, and the network input / output.
  • Threads and disk input / output threads do not have a strict serial relationship between the control of data transmission from the data sender to the data receiver and the control of data write to the local hard disk of the data receiver, or they can be understood as the realization of Decoupling and / or separation of network input / output threads and disk input / output threads.
  • S103 Receive data transmitted by the data sender in the local area network to the data receiver according to the network input / output thread and the disk input / output thread.
  • the data processed by the disk input / output thread is empty, and the network input / output thread obtains the data from the data receiver for the first time. Then, the started disk I / O thread processing is performed on the acquired data, the network I / O thread obtains data from the data receiver again, the started disk I / O thread processing is performed on the acquired data again, and so on, until the request is made. All data of the resource is transferred to the disk of the data receiver.
  • step S103 receiving data transmitted by the data sender in the local area network to the data receiver according to the network input and output thread and the disk input and output thread may specifically include:
  • a network input / output thread and a disk input / output thread are in control of transmitting data from a data sender to a buffer of the data receiver, and controlling writing of data in the buffer to The local hard disk of the data receiver.
  • the data processed by the disk input / output thread is empty, and the network input / output thread obtains data from the data receiver for the first time.
  • the disk input / output started The thread processing processes the acquired data to transmit to the buffer of the data receiver.
  • the network input / output thread acquires data from the data receiver again to transmit to the buffer of the data receiver.
  • the started disk input and output thread processing The received data is processed to write the buffer data to the local hard disk of the data receiver, and so on, until all the data requesting the resource is transmitted to the disk of the data receiver.
  • FIG. 2 is a schematic flowchart of a near-field data transmission method in Embodiment 2 of the present application; as shown in FIG. 2, in this embodiment, it may include the following steps:
  • S201 Determine a data transmission request initiated by a data receiver in a local area network
  • steps S201 and S202 refer to the related records in the first embodiment.
  • S203 According to the network input and output thread, add data pointed to by the data transmission request to a first data queue, and transmit the data according to the first data queue.
  • the data pointed to by the output request is stored in a buffer of the data receiver.
  • the network input-output thread is in a non-blocking state
  • S204 According to the disk input and output thread, add data read from the buffer to a second data queue, and according to the second queue, the data pointed to by the data transmission request is removed from the data.
  • the buffer is read into the disk of the data receiver.
  • the data storage (the first data queue and the second data queue) is established to control data storage to the data respectively.
  • the buffer of the data receiver is read from the buffer into the disk of the data receiver.
  • the disk input / output thread When the data pointed to by the data transmission request is read from the buffer into a disk of the data receiver, the disk input / output thread is in a non-blocking state.
  • the disk input and output threads can be controlled to be in a non-blocking state by using a latch signal.
  • the disk input and output threads are controlled by the latch signal and the disk input and output threads are blocked.
  • FIG. 3 is a schematic flowchart of a near-field data transmission method in Embodiment 3 of the present application; as shown in FIG. 3, in this embodiment, it may include the following steps:
  • S301 Determine a data transmission request initiated by a data receiver in a local area network
  • steps S301, S302, and S303 are similar to the foregoing first embodiment and second embodiment.
  • S304 Perform latch processing on the data stored in the buffer according to the latch signal
  • a latch process is performed on the data stored in the buffer area, and the latch process is specifically triggered by the latch signal.
  • S305 Read the data pointed by the data transmission request from the buffer to the magnetic disk of the data receiver according to the magnetic disk input and output thread.
  • the network input / output thread and the disk input / output thread can also be scheduled according to the latch signal, that is, the latch signal is used not only to control the latching of data, but also to control the network.
  • the latch signal is used not only to control the latching of data, but also to control the network.
  • FIG. 4 is a schematic structural diagram of a near-field data transmission device in Embodiment 4 of the present application; as shown in FIG. 4, in this embodiment, it may include:
  • a first program unit 401 configured to determine a data transmission request initiated by a data receiver in a local area network
  • a second program unit 402 configured to start a network input / output thread and a disk input / output thread in parallel according to the data transmission request;
  • a third program unit 403 is configured to receive data transmitted by the data sender in the local area network to the data receiver according to a network input / output thread and a disk input / output thread.
  • the second program unit 402 may be further configured as:
  • the network input and output threads and the disk input and output threads are started in parallel.
  • the third program unit 403 may be further configured as:
  • the third program unit 403 is further configured to: according to the network input and output thread, add data pointed to by the data transmission request to a first data queue, and according to the The first data queue stores data pointed by the data transmission request to a buffer of the data receiver. [0085] In this embodiment or other embodiments, the third program unit 403 is further configured to: according to the disk input / output thread, add data read from the buffer to a second data queue, and Reading data pointed by the data transmission request from the buffer to a disk of the data receiver according to the second queue.
  • the third program unit 403 is further configured to: when storing data pointed to by the data transmission request into a buffer of the data receiver, the network input / output thread It is in a non-blocking state; or, when data pointed to by the data transmission request is read from the buffer into a disk of the data receiver, the disk input / output thread is in a non-blocking state.
  • FIG. 5 is a schematic structural diagram of a near-field data transmission device in Embodiment 5 of the present application.
  • the third program unit 403 may further include: a fourth program unit 404, configured to store data pointed to by the data transmission request into a buffer of the data receiver, and further include: The stored data is latched.
  • FIG. 6 is a schematic structural diagram of a near-field data transmission device in Embodiment 6 of the present application.
  • FIG. 7 is a schematic structural diagram of a near-field transmission system in Embodiment 7 of the present application; as shown in FIG. 7, it may include: a data sender 701 and a data receiver 702, the data sender 701 and the data
  • the receiver 702 is located in the same local area network, and the data receiver 702 determines a data transmission request it initiates in the local area network, and starts a network input / output thread and a disk input / output thread in parallel according to the data transmission request, and according to the network
  • the input / output thread and the disk input / output thread transmit the data pointed by the data transmission request from the data sender 701 in the local area network to the data receiver 702.
  • the data sender 701 may also be referred to as a data center, which may specifically be a PC, and the other data receivers 702 may be smartphones, function machines, network printers, and the like.
  • 8 is a schematic structural diagram of a device / terminal / server in Embodiment 8 of the present application; the device / terminal / server may include:
  • processors 801 one or more processors 801;
  • the computer-readable medium 802 may be configured to store one or more programs
  • FIG. 9 is a hardware structure of a device / terminal / server in Embodiment 9 of the present application; as shown in FIG. 9, the hardware structure of the device / terminal / server may include: a processor 901, a communication interface 902, and a computer readable The medium 903 and the communication bus 904;
  • processor 901, the communication interface 902, and the computer-readable medium 903 complete communication with each other through a communication bus 904;
  • the communication interface 902 may be an interface of a communication module, such as an interface of a GSM module;
  • the processor 901 may be specifically configured to: determine a data transmission request initiated by a data receiver in a local area network; start a network input / output thread and a disk input / output thread in parallel according to the data transmission request; and according to the network input / output The thread and the disk input / output thread receive data transmitted by the data sender 701 in the local area network to the data receiver.
  • the processor 901 may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc .; it may also be a digital signal processor (DSP), a dedicated integration Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASICs dedicated integration Circuits
  • FPGAs off-the-shelf programmable gate arrays
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the computer-readable medium 903 may be, but is not limited to, a random access storage medium
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present application include a computer program product including a computer program borne on a computer-readable medium, the computer program containing program code configured to execute the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network through a communication section, and / or installed from a removable medium.
  • CPU central processing unit
  • the above functions defined in the method of the present application are executed.
  • the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access storage media (RAM), read-only storage media (ROM), erasable Type programmable read-only storage medium (EPROM or flash memory), optical fiber, portable compact disk read-only storage medium (CD-ROM), optical storage medium piece, magnetic storage medium piece, or any suitable combination of the foregoing.
  • RAM random access storage media
  • ROM read-only storage media
  • EPROM or flash memory erasable Type programmable read-only storage medium
  • CD-ROM portable compact disk read-only storage medium
  • magnetic storage medium piece or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal that is included in baseband or propagated as part of a carrier wave, and which carries computer-readable program code. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program configured to be used by or in combination with an instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • the computer program code configured to perform the operations of the present application may be written in one or more programming languages or a combination thereof, the programming languages including an object-oriented programming language such as Java, Smalltalk, C ++, Also includes regular procedural programming Design language-such as "c" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer, partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network: including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider) Connection).
  • LAN local area network
  • WAN wide area network
  • an external computer such as through the Internet using an Internet service provider
  • each block in the flowchart or block diagram may represent a module, a program segment, or a portion of a code, which module, program segment, or portion of the code contains one or more logic functions configured to implement a specified logic function.
  • Executable instructions In the above specific embodiments, there is a specific sequence relationship, but these sequence relationships are only exemplary. In specific implementation, these steps may be fewer, more or the execution order may be adjusted. That is, in some alternative implementations, the functions marked in the boxes may occur in a different order than those marked in the drawings.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts may be implemented in a dedicated hardware-based system that performs the specified function or operation. Or, it can be implemented by a combination of dedicated hardware and computer instructions.
  • a processor includes a request determining unit, a thread starting unit, and a receiving unit.
  • a request determining unit configured to determine a data transmission request initiated by a data receiver in a local area network
  • a thread starting unit configured to the data transmission request, starting a network input and output thread and a disk input and output thread in parallel;
  • the receiving unit is configured to receive data transmitted by the data sender in the local area network to the data receiver according to the network input / output thread and the disk input / output thread.
  • the names of these units do not in any way constitute a limitation on the unit itself.
  • the request determination unit may also be described as a "unit for determining a data transmission request initiated by a data receiver in a local area network.”
  • the present application also provides a computer-readable medium on which a computer program is stored, and the program is executed by a processor to implement a method as described in any one of the foregoing embodiments.
  • the present application further provides a computer-readable medium, which may be included in the device described in the foregoing embodiments; or may exist separately without being assembled into the device.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device causes the device to: determine a data transmission request initiated by a data receiver in a local area network; and according to the data transmission request, parallel Start a network input / output thread and a disk input / output thread; and receive data transmitted by the data sender 701 in the local area network to the data receiver according to the network input / output thread and the disk input / output thread.
  • the first or “the second” may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components.
  • the above expression is only configured for the purpose of distinguishing the element from other elements.
  • the first user equipment and the second user equipment represent different user equipments, although both are user equipments.
  • a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element.
  • an element eg, a first element
  • another element eg, a second element
  • another element for example, a second element
  • another element for example, a second element
  • the one element is directly connected to the other element or the one element is via another element (Eg, a third element) is indirectly connected to the other element.
  • an element for example, the first element
  • no element for example, the third element

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种近场数据传输方法、装置、系统、设备/终端/服务器、计算机可读介质。该方法的一具体实施方式包括: 确定局域网中数据接收方发起的数据传输请求;根据所述数据传输请求,并行启动网络输入输出线程以及磁盘输入输出线程;根据所述网络输入输出线程以及磁盘输入输出线程,接收由所述局域网中的数据发送方传输给所述数据接收方的数据。该具体实施方式有效地避免了磁盘 IO 执行过程对网络 IO 的阻塞,提高了数据传输的速度,进一步优化了用户体验。

Description

近场数据传输方法及其装置
本申请要求在 2018 年 8 月 27 日提交中国专利局、 申请号为 201810979497.4、 发明名称为 “近场数据传输方法及其装置” 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
[001]本申请涉及互联网技术领域, 尤其涉及一种近场数据传输方 法、 装置、 系统、 设备 /终端 /服务器、 计算机可读介质。 背景技术
[002]在一些应用环境中, 比如功能机的使用比例仍然远远大于智能 机的使用比例, 另外, 再加上移动互网联的发展程度仍然较慢, 以及互 联网等硬件设施的基础较差, 提供了跨平台传输技术方案, 以在没有流 量和运营商 WiFi的场景下, 或者无网或者低网速的状态, 实现数据的传 输。
[003]在上述跨平台传输方案中, 作为数据的接收方来说, 接受数据 同时要使用网络 10口和硬盘 10口, 但是, 对网络 10和硬盘 10口的控 制容易导致磁盘 10执行过程对网络 10的阻塞, 从而导致数据传输速度 较慢。 发明内容
[004]本申请的目的在于提出一种近场数据传输方法、 装置、 系统、 设备 /终端 /服务器、 计算机可读介质, 用于解决或者缓解现有技术中上述 问题。
[005]第一方面, 本申请提供了一种近场数据传输方法, 其包括:
[006]确定局域网中数据接收方发起的数据传输请求;
[007]根据所述数据传输请求, 并行启动网络输入输出线程以及磁盘 输入输出线程;
[008]根据所述网络输入输出线程以及磁盘输入输出线程, 接收由所 述局域网中的数据发送方传输给所述数据接收方的数据。 [009]第二方面, 本申请实施例提供了一种近场数据传输装置, 其包 括:
[0010]第一程序单元, 配置为确定局域网中数据接收方发起的数据 传输请求;
[0011]第二程序单元, 配置为根据所述数据传输请求, 并行启动网 络输入输出线程以及磁盘输入输出线程;
[0012]第三程序单元, 配置为根据网络输入输出线程以及磁盘输入 输出线程, 接收由所述局域网中的数据发送方传输给所述数据接收方的 数据。
[0013]第三方面, 本申请实施例提供了一种近场传输系统, 其包括: 数据发送方以及数据接收方, 所述数据发送方以及所述数据接收方位于 同一局域网内, 所述数据接收方确定其在所述局域网中发起的数据传输 请求, 并根据所述数据传输请求, 并行启动网络输入输出线程以及磁盘 输入输出线程, 以及根据网络输入输出线程以及磁盘输入输出线程, 将 所述数据传输请求指向的数据由所述局域网中的数据发送方传输给所述 数据接收方。
[0014]第四方面,本申请实施例提供了一种设备 /终端 /服务器,包括:
[0015]一个或多个处理器;
[0016]计算机可读介质, 配置为存储一个或多个程序,
[0017]当所述一个或多个程序被所述一个或多个处理器执行, 使得 所述一个或多个处理器实现如上述任一实施例中所述的方法。
[0018]第五方面, 本申请实施例提供了一种计算机可读介质, 其上 存储有计算机程序, 该程序被处理器执行时实现如上述任一实施例中所 述的方法。
[0019]本申请提供的近场数据传输方法、 装置、 系统、 设备 /终端 /服 务器、 计算机可读介质中, 通过确定局域网中数据接收方发起的数据传 输请求; 根据所述数据传输请求, 并行启动网络输入输出线程以及磁盘 输入输出线程; 根据所述网络输入输出线程以及磁盘输入输出线程, 接 收由所述局域网中的数据发送方传输给所述数据接收方的数据, 避免了 磁盘 10执行过程对网络 10的阻塞, 提高了数据传输的速度, 进一步优 化了用户体验。 附图说明
[0020]通过阅读参照以下附图所作的对非限制性实施例所作的详细 描述, 本申请的其它特征、 目的和优点将会变得更明显:
[0021]图 1为本申请实施例一中近场数据传输方法流程示意图;
[0022]图 2为本申请实施例二中近场数据传输方法流程示意图;
[0023]图 3为本申请实施例三中近场数据传输方法流程示意图;
[0024]图 4为本申请实施例四中近场数据传输装置的结构示意图;
[0025]图 5为本申请实施例五中近场数据传输装置的结构示意图;
[0026]图 6为本申请实施例六中近场数据传输装置的结构示意图;
[0027]图 7为本申请实施例七中近场传输系统的结构示意图;
[0028]图 8为本申请实施例八中设备 /终端 /服务器的结构示意图;
[0029]图 9为本申请实施例九中设备 /终端 /服务器的硬件结构。 具体实施方式
[0030]下面结合附图和实施例对本申请作进一步的详细说明。 可以 理解的是, 此处所描述的具体实施例仅仅配置为解释相关发明, 而非对 该发明的限定。 另外还需要说明的是, 为了便于描述, 附图中仅示出了 与有关发明相关的部分。
[0031]需要说明的是, 在不冲突的情况下, 本申请中的实施例及实 施例中的特征可以相互组合。 下面将参考附图并结合实施例来详细说明 本申请。
[0032]图 1 为本申请实施例一中近场数据传输方法流程示意图; 如 图 1所示, 本实施例中, 其可以包括如下步骤 S101-S102:
[0033] S101、 确定局域网中数据接收方发起的数据传输请求;
[0034]本实施例中,所述局域网通过自建 WIFI搭建以实现所述近场 传输。 所述局域网中可以包括多个用户终端, 该用户终端可以为智能手 机、 智能平板、 智能手表、 PC等。 这种场景优选适合于互联网等硬件设 施的基础较差、 没有流量和云运营商 WiFi的场景下, 或者无网或者低网 速的状态, 实现同一个局域网内不同用户终端之间为实现数据共享的传 输。 即不同终端(如两台手机)间直连且不依赖于其它网络(如互联网)和设 备(如路由器), 且传输速率快, 故可方便的实现不同终端间的数据交互即 近场数据传输, 获得了广泛应用。 该数据包括但不限于音视频数据、 应 用程序安装包等。
[0035]具体地, 在一种具体的应用场景中, 局域网的搭建方式可以 为一台终端开启热点并生成随机的连接密码, 另一台终端或多台终端搜 索并发现该热点, 之后用户输入连接密码。
[0036]可替代地, 在另外一种具体的应用场景中, 数据发送方开启 热点, 并生成连接信息, 其中, 所述连接信息的内容用于供数据接收方 通过热点与数据发送方建立直连; 用所述连接信息生成二维码, 并显示 所述二维码; 根据所述数据接收方扫描所述二维码以与所述数据发送方 直连, 从而避免了手动输入连接密码, 操作简单、 耗时段、 不易出错。
[0037]连接信息的内容可包括热点的标识, 即数据发送方开启的热 点的 SSID(Service Setldentifier), 以供数据接收方确定用于直连的热点。 再如, 连接信息的内容也可包括数据发送方的标识, 即数据发送方的唯 一的设备标识, 如为其热点模块的 MAC地址, 即 BSSID(Basic Service Setldentifier), 通过数据发送方的标识, 可使数据接收方确定要与其直连 的数据发送方。
[0038]应当理解, 根据连接方式的不同, 以上连接信息的具体内容 可以不同。 例如, 若数据发送方开启的热点已经被数据接收方搜索到, 则连接信息的内容可只有连接密码, 而没有热点的标识(当然若有也可 以)。 再如, 若数据发送方开启热点后将热点隐藏而不允许数据接收方搜 索到, 则连接信息的内容可只有热点的标识, 而没有连接密码(当然若有 也可以)。 再如, 以上数据发送方的标识可以是单独存在的, 也可与其它 内容同时存在, 作为对其它内容的进一步验证。
[0039]应当理解, 连接信息中还可包括其它已知的内容, 例如用于 表明其是连接信息的标识, 用于分割其不同部分的分隔符, 用于表明其 长度、 格式等的验证位等。
[0040]本实施例中, 数据发送方上的可传输数据具体可以以列表或 者更为有好的方式呈现, 以方便有数据需求的数据接收方直观地查看。 数据接收方通过搭建的局域网访问可提供数据的数据发送方, 查看该数 据发送方上可共享的数据或者又称为可共享的资源。 在列表上显示的资 源配置有下载或者传输按钮, 当该捕获到该下载或者传输按钮被操作的 事件, 即数据接收方发起了数据传输请求。
[0041] S102、 根据所述数据传输请求, 并行启动网络输入输出线程 以及磁盘输入输出线程;
[0042]本实施例中, 在步骤 S102中根据所述数据传输请求, 并行启 动网络输入输出线程以及磁盘输入输出线程时, 具体可以包括:
[0043]根据所述数据传输请求, 触发预先设定的缓冲交换机制;
[0044]根据缓冲交换机制, 并行启动网络输入输出线程以及磁盘输 入输出线程。
[0045]本实施例中, 网络输入输出线程主要用于控制从数据发送方 将数据传输到数据接收方, 而磁盘输入输出线程主要用于控制将数据写 入到数据接收方本地的硬盘中。
[0046]在实现本申请的过程中, 现有技术中控制从数据发送方将数 据传输到数据接收方、 控制将数据写入到数据接收方本地的硬盘中使用 的同一线程, 因此, 需要频繁使用锁存信号进行线程的使用切换, 由此 导致必须先控制从数据发送方将数据传输到数据接收方、 再控制将数据 写入到数据接收方本地的硬盘中, 其实质上可理解为一种串行处理方式, 由此会导致从数据发送方将数据传输到数据接收方、 将数据写入到数据 接收方本地的硬盘之间出现堵塞, 进而导致了数据传输的速度较慢, 用 户体验较差。
[0047]而相比之下, 本实施例中, 通过并行的启动网络输入输出线 程、 磁盘输入输出线程, 相当于解除了网络输入输出线程、 磁盘输入输 出线程之间的耦合关系, 网络输入输出线程、 磁盘输入输出线程在控制 从数据发送方将数据传输到数据接收方、 控制将数据写入到数据接收方 本地的硬盘之间并没有严格的串行关系, 或者, 又可以理解为实现了网 络输入输出线程、 磁盘输入输出线程的解耦和或者分立。
[0048] S103、 根据所述网络输入输出线程以及磁盘输入输出线程, 接收由所述局域网中的数据发送方传输给所述数据接收方的数据。
[0049]本实施例中, 在初始执行时, 磁盘输入输出线程处理的数据 为空, 而网络输入输出线程首次从数据接收方获取数据, 在获取到数据 后, 启动的磁盘输入输出线程处理针对获取到的数据进行处理, 网络输 入输出线程再次从数据接收方获取数据, 启动的磁盘输入输出线程处理 针对再次获取到的数据进行处理, 依次类推, 直至请求资源的所有数据 传输到数据接收方的磁盘中。
[0050]本实施例中, 在步骤 S103中根据所述网络输入输出线程以及 磁盘输入输出线程, 接收由所述局域网中的数据发送方传输给所述数据 接收方的数据时, 具体可以包括:
[0051]根据所述网络输入输出线程, 将所述数据传输请求指向的数 据存储到所述数据接收方的缓冲区;
[0052]根据所述磁盘输入输出线程, 将所述数据传输请求指向的数 据从所述缓冲区读入到所述数据接收方的磁盘中。
[0053]本实施例中, 在一具体应用场景中, 网络输入输出线程、 磁 盘输入输出线程在控制从数据发送方将数据传输到数据接收方的缓冲 区、 控制将缓冲区的数据写入到数据接收方本地的硬盘。
[0054]进一步地, 本实施例中, 在初始执行时, 磁盘输入输出线程 处理的数据为空, 而网络输入输出线程首次从数据接收方获取数据, 在 获取到数据后, 启动的磁盘输入输出线程处理针对获取到的数据进行处 理以传输到数据接收方的缓冲区, 网络输入输出线程再次从数据接收方 获取数据以传输到数据接收方的缓冲区, 启动的磁盘输入输出线程处理 针对再次获取到的数据进行处理以将缓冲区的数据写入到数据接收方本 地的硬盘, 依次类推, 直至请求资源的所有数据传输到数据接收方的磁 盘中。
[0055]图 2为本申请实施例二中近场数据传输方法流程示意图; 如 图 2所示, 本实施例中, 其可以包括如下步骤:
[0056] S201、 确定局域网中数据接收方发起的数据传输请求;
[0057] S202、 根据所述数据传输请求, 并行启动网络输入输出线程 以及磁盘输入输出线程;
[0058]本实施例中, 步骤 S201、 S202请参考上述实施例一中的相关 记载。
[0059] S203、 根据所述网络输入输出线程, 将所述数据传输请求指 向的数据加入到第一数据队列, 并根据所述第一数据队列将所述数据传 输请求指向的数据存储到所述数据接收方的缓冲区。
[0060]将所述数据传输请求指向的数据存储到所述数据接收方的缓 冲区时, 所述网络输入输出线程处于非阻塞状态;
[0061] S204、 根据所述磁盘输入输出线程, 将从所述缓冲区读出的 数据加入到第二数据队列中, 并根据所述第二队列将所述数据传输请求 指向的数据从所述缓冲区读入到所述数据接收方的磁盘中。
[0062]本实施例中, 与上述实施例不同的是, 为了实现数据的有序 快捷传输, 通过建立数据队列 (第一数据队列、 第二数据队列) 的方式, 分别控制数据存储到所述数据接收方的缓冲区、 从所述缓冲区读入到所 述数据接收方的磁盘中。
[0063]将所述数据传输请求指向的数据从所述缓冲区读入到所述数 据接收方的磁盘中时, 所述磁盘输入输出线程处于非阻塞状态。 本实施 例中, 具体可以通过锁存信号控制磁盘输入输出线程处于非阻塞状态。 当所述的数据从数据发送方传输到了数据接收方, 通过锁存信号控制磁 盘输入输出线程处于阻塞状态、 磁盘输入输出线程处于阻塞状态。
[0064]图 3 为本申请实施例三中近场数据传输方法流程示意图; 如 图 3所示, 本实施例中, 其可以包括如下步骤:
[0065] S301、 确定局域网中数据接收方发起的数据传输请求;
[0066] S302、 根据所述数据传输请求, 并行启动网络输入输出线程 以及磁盘输入输出线程;
[0067] S303、 根据所述网络输入输出线程, 将所述数据传输请求指 向的数据存储到所述数据接收方的缓冲区;
[0068]本实施例中, 步骤 S301、 S302、 S303类似上述实施例一、 实 施例二。
[0069] S304、根据锁存信号对所述缓冲区存储的数据进行锁存处理;
[0070]本实施例中, 为了保证数据的安全性, 对存储到缓存区的数 据进行锁存处理, 该锁存处理具体由所述锁存信号触发。
[0071] S305、 根据所述磁盘输入输出线程, 将所述数据传输请求指 向的数据从所述缓冲区读入到所述数据接收方的磁盘中。
[0072]本实施例中, 由于缓冲区的数据被锁存, 因此, 在要读入到 磁盘中时, 首先对锁存的数据进行解锁。
[0073]本实施例中, 还可以根据所述锁存信号对所述网络输入输出 线程和磁盘输入输出线程进行调度处理, 即锁存信号不但控制数据的锁 存, 还用于控制所述网络输入输出线程和磁盘输入输出线程的切换。 该 切换主要用于配合数据读取, 即在进行数据处理时对所述网络输入输出 线程和磁盘输入输出线程进行单独控制, 从而灵活控制数据的传输过程。
[0074]图 4为本申请实施例四中近场数据传输装置的结构示意图; 如图 4所示, 本实施例中, 其可以包括:
[0075]第一程序单元 401,配置为确定局域网中数据接收方发起的数 据传输请求;
[0076]第二程序单元 402, 配置为根据所述数据传输请求, 并行启动 网络输入输出线程以及磁盘输入输出线程;
[0077]第三程序单元 403 ,配置为根据网络输入输出线程以及磁盘输 入输出线程, 接收由所述局域网中的数据发送方传输给所述数据接收方 的数据。
[0078]本实施例或者其他实施例中, 所述第二程序单元 402可以进 一步配置为:
[0079]根据所述数据传输请求, 触发预先设定的缓冲交换机制;
[0080]根据缓冲交换机制, 并行启动网络输入输出线程以及磁盘输 入输出线程。
[0081]本实施例或者其他实施例中, 所述第三程序单元 403 可以进 一步配置为:
[0082]根据所述网络输入输出线程, 将所述数据传输请求指向的数 据存储到所述数据接收方的缓冲区;
[0083]根据所述磁盘输入输出线程, 将所述数据传输请求指向的数 据从所述缓冲区读入到所述数据接收方的磁盘中。
[0084]本实施例或者其他实施例中, 所述第三程序单元 403 进一步 配置为: 根据所述网络输入输出线程, 将所述数据传输请求指向的数据 加入到第一数据队列, 并根据所述第一数据队列将所述数据传输请求指 向的数据存储到所述数据接收方的缓冲区。 [0085]本实施例或者其他实施例中, 所述第三程序单元 403 进一步 配置为: 根据所述磁盘输入输出线程, 将从所述缓冲区读出的数据加入 到第二数据队列中, 并根据所述第二队列将所述数据传输请求指向的数 据从所述缓冲区读入到所述数据接收方的磁盘中。
[0086]本实施例或者其他实施例中, 所述第三程序单元 403 进一步 配置为: 将所述数据传输请求指向的数据存储到所述数据接收方的缓冲 区时, 所述网络输入输出线程处于非阻塞状态; 或者, 将所述数据传输 请求指向的数据从所述缓冲区读入到所述数据接收方的磁盘中时, 所述 磁盘输入输出线程处于非阻塞状态。
[0087]图 5 为本申请实施例五中近场数据传输装置的结构示意图; 如图 5所示, 本实施例中, 其除了可以包括上述第一程序单元 401、第二 程序单元 402、 第三程序单元 403外, 还可以包括: 第四程序单元 404, 配置为将所述数据传输请求指向的数据存储到所述数据接收方的缓冲区 之后还包括, 根据锁存信号对所述缓冲区存储的数据进行锁存处理。
[0088]图 6为本申请实施例六中近场数据传输装置的结构示意图; 如图 6所示, 本实施例中, 其除了可以包括上述第一程序单元 401、第二 程序单元 402、 第三程序单元 403外, 还可以包括: 第五程序单元 405 , 用于根据锁存信号对所述网络输入输出线程和磁盘输入输出线程进行调 度处理。
[0089]图 7为本申请实施例七中近场传输系统的结构示意图;如图 7 所示, 其可以包括: 数据发送方 701以及数据接收方 702, 所述数据发送 方 701以及所述数据接收方 702位于同一局域网内,所述数据接收方 702 确定其在所述局域网中发起的数据传输请求, 并根据所述数据传输请求, 并行启动网络输入输出线程以及磁盘输入输出线程, 以及根据网络输入 输出线程以及磁盘输入输出线程, 将所述数据传输请求指向的数据由所 述局域网中的数据发送方 701传输给所述数据接收方 702。
[0090]本实施例中, 数据发送方 701 又可以称之为数据中心, 其具 体可以为一 PC, 而且其他数据接收方 702可以为智能手机、 功能机、 网 络打印机等。 [0091]图 8为本申请实施例八中设备 /终端 /服务器的结构示意图; 该 设备 /终端 /服务器可以包括:
[0092]一个或多个处理器 801;
[0093]计算机可读介质 802, 可以配置为存储一个或多个程序,
[0094]当所述一个或多个程序被所述一个或多个处理器执行, 使得 所述一个或多个处理器实现如上述任一实施例中所述传输方法。
[0095]图 9为本申请实施例九中设备 /终端 /服务器的硬件结构; 如图 9所示, 该设备 /终端 /服务器的硬件结构可以包括: 处理器 901, 通信接 口 902, 计算机可读介质 903和通信总线 904;
[0096]其中处理器 901、 通信接口 902、 计算机可读介质 903通过通 信总线 904完成相互间的通信;
[0097]可选的, 通信接口 902可以为通信模块的接口, 如 GSM模块 的接口;
[0098]其中, 处理器 901 具体可以配置为: 确定局域网中数据接收 方发起的数据传输请求; 根据所述数据传输请求, 并行启动网络输入输 出线程以及磁盘输入输出线程; 根据所述网络输入输出线程以及磁盘输 入输出线程, 接收由所述局域网中的数据发送方 701 传输给所述数据接 收方的数据。
[0099]处理器 901 可以是通用处理器, 包括中央处理器 (Central Processing Unit, 简称 CPU)、 网络处理器 (Network Processor, 简称 NP) 等; 还可以是数字信号处理器 (DSP)、 专用集成电路 (ASIC)、 现成可编程 门阵列 (FPGA)或者其它可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件。 可以实现或者执行本申请实施例中的公开的各方法、 步 骤及逻辑框图。 通用处理器可以是微处理器或者该处理器也可以是任何 常规的处理器等。
[00100]计算机可读介质 903可以是, 但不限于, 随机存取存储介质
(Random Access Memory, RAM), 只读存储介质 (Read Only Memory, ROM ),可编程只读存储介质 ( Programmable Read-Only Memory, PROM ), 可擦除只读存储介质 ( Erasable Programmable Read-Only Memory, EPROM ) , 电可擦除只读存储介质 ( Electric Erasable Programmable Read-Only Memory, EEPROM) 等。 [00101]需要说明的是, 上述实施例数据接收方、 数据发送方只是相 对概念, 当数据接收方可向局域网中的其他终端提供数据时, 其角色又 可以变为数据发送方。
[00102]特别地, 根据本申请的实施例, 上文参考流程图描述的过程 可以被实现为计算机软件程序。 例如, 本申请的实施例包括一种计算机 程序产品, 其包括承载在计算机可读介质上的计算机程序, 该计算机程 序包含配置为执行流程图所示的方法的程序代码。 在这样的实施例中, 该计算机程序可以通过通信部分从网络上被下载和安装, 和 /或从可拆卸 介质被安装。 在该计算机程序被中央处理单元 (CPU) 执行时, 执行本 申请的方法中限定的上述功能。 需要说明的是, 本申请所述的计算机可 读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述 两者的任意组合。 计算机可读介质例如可以但不限于是电、 磁、 光、 电 磁、 红外线、 或半导体的系统、 装置或器件, 或者任意以上的组合。 计 算机可读存储介质的更具体的例子可以包括但不限于: 具有一个或多个 导线的电连接、 便携式计算机磁盘、 硬盘、 随机访问存储介质 (RAM) 、 只读存储介质(ROM)、可擦式可编程只读存储介质(EPROM或闪存)、 光纤、 便携式紧凑磁盘只读存储介质 (CD-ROM) 、 光存储介质件、 磁 存储介质件、 或者上述的任意合适的组合。 在本申请中, 计算机可读存 储介质可以是任何包含或存储程序的有形介质, 该程序可以被指令执行 系统、 装置或者器件使用或者与其结合使用。 而在本申请中, 计算机可 读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号, 其中承载了计算机可读的程序代码。 这种传播的数据信号可以采用多种 形式, 包括但不限于电磁信号、 光信号或上述的任意合适的组合。 计算 机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读 介质, 该计算机可读介质可以发送、 传播或者传输配置为由指令执行系 统、 装置或者器件使用或者与其结合使用的程序。 计算机可读介质上包 含的程序代码可以用任何适当的介质传输, 包括但不限于: 无线、 电线、 光缆、 RF等等, 或者上述的任意合适的组合。
[00103]可以以一种或多种程序设计语言或其组合来编写配置为执 行本申请的操作的计算机程序代码, 所述程序设计语言包括面向对象的 程序设计语言一诸如 Java、 Smalltalk, C++, 还包括常规的过程式程序设 计语言一诸如” c”语言或类似的程序设计语言。 程序代码可以完全地在 用户计算机上执行、 部分地在用户计算机上执行、 作为一个独立的软件 包执行、 部分在用户计算机上部分在远程计算机上执行、 或者完全在远 程计算机或服务器上执行。 在涉及远程计算机的情形中, 远程计算机可 以通过任意种类的网络:包括局域网 (LAN)或广域网 (WAN)—连接到用户 计算机, 或者, 可以连接到外部计算机 (例如利用因特网服务提供商来 通过因特网连接) 。
[00104]附图中的流程图和框图, 图示了按照本申请各种实施例的系 统、 方法和计算机程序产品的可能实现的体系架构、 功能和操作。 在这 点上, 流程图或框图中的每个方框可以代表一个模块、 程序段、 或代码 的一部分, 该模块、 程序段、 或代码的一部分包含一个或多个配置为实 现规定的逻辑功能的可执行指令。 上述具体实施例中有特定先后关系, 但这些先后关系只是示例性的, 在具体实现的时候, 这些步骤可能会更 少、 更多或执行顺序有调整。 即在有些作为替换的实现中, 方框中所标 注的功能也可以以不同于附图中所标注的顺序发生。 例如, 两个接连地 表示的方框实际上可以基本并行地执行, 它们有时也可以按相反的顺序 执行, 这依所涉及的功能而定。 也要注意的是, 框图和 /或流程图中的每 个方框、 以及框图和 /或流程图中的方框的组合, 可以用执行规定的功能 或操作的专用的基于硬件的系统来实现, 或者可以用专用硬件与计算机 指令的组合来实现。
[00105]描述于本申请实施例中所涉及到的单元可以通过软件的方 式实现, 也可以通过硬件的方式来实现。 所描述的单元也可以设置在处 理器中, 例如, 可以描述为: 一种处理器包括请求确定单元、 线程启动 单元、 接收单元。
[00106]请求确定单元, 配置为确定局域网中数据接收方发起的数据 传输请求;
[00107]线程启动单元, 配置为所述数据传输请求, 并行启动网络输 入输出线程以及磁盘输入输出线程;
[00108]接收单元, 配置为根据所述网络输入输出线程以及磁盘输入 输出线程, 接收由所述局域网中的数据发送方传输给所述数据接收方的 数据。 [00109]其中, 这些单元的名称在某种情况下并不构成对该单元本身 的限定, 例如, 请求确定单元还可以被描述为“确定局域网中数据接收 方发起的数据传输请求的单元” 。
[00110]作为另一方面, 本申请还提供了一种计算机可读介质, 其上 存储有计算机程序, 该程序被处理器执行时实现如上述任一实施例中所 描述的方法。
[00111]作为另一方面, 本申请还提供了一种计算机可读介质, 该计 算机可读介质可以是上述实施例中描述的装置中所包含的; 也可以是单 独存在, 而未装配入该装置中。 上述计算机可读介质承载有一个或者多 个程序, 当上述一个或者多个程序被该装置执行时, 使得该装置: 确定 局域网中数据接收方发起的数据传输请求; 根据所述数据传输请求, 并 行启动网络输入输出线程以及磁盘输入输出线程; 根据所述网络输入输 出线程以及磁盘输入输出线程, 接收由所述局域网中的数据发送方 701 传输给所述数据接收方的数据。
[00112]在本申请的各种实施方式中所使用的表述“第一”、“第二”、
“所述第一”或“所述第二”可修饰各种部件而与顺序和 /或重要性无关, 但是这些表述不限制相应部件。 以上表述仅配置为将元件与其它元件区 分开的目的。 例如, 第一用户设备和第二用户设备表示不同的用户设备, 虽然两者均是用户设备。 例如, 在不背离本申请的范围的前提下, 第一 元件可称作第二元件, 类似地, 第二元件可称作第一元件。
[00113]当一个元件(例如, 第一元件)称为与另一元件(例如, 第二元 件)“(可操作地或可通信地)联接”或“(可操作地或可通信地)联接至”另 一元件(例如, 第二元件)或“连接至”另一元件(例如, 第二元件)时, 应 理解为该一个元件直接连接至该另一元件或者该一个元件经由又一个元 件(例如, 第三元件)间接连接至该另一个元件。相反, 可理解, 当元件(例 如, 第一元件)称为“直接连接”或“直接联接”至另一元件(第二元件) 时, 则没有元件(例如, 第三元件)插入在这两者之间。
[00114]以上描述仅为本申请的较佳实施例以及对所运用技术原理 的说明。 本领域技术人员应当理解, 本申请中所涉及的发明范围, 并不 限于上述技术特征的特定组合而成的技术方案, 同时也应涵盖在不脱离 上述发明构思的情况下, 由上述技术特征或其等同特征进行任意组合而 形成的其它技术方案。 例如上述特征与本申请中公开的 (但不限于) 具 有类似功能的技术特征进行互相替换而形成的技术方案。

Claims

权 利 要 求 书
1.一种近场数据传输方法, 其特征在于, 包括:
确定局域网中数据接收方发起的数据传输请求;
根据所述数据传输请求, 并行启动网络输入输出线程以及磁盘输入 输出线程;
根据所述网络输入输出线程以及磁盘输入输出线程, 接收由所述局 域网中的数据发送方传输给所述数据接收方的数据。
2.根据权利要求 1 所述的方法, 其特征在于, 根据所述数据传输请 求, 并行启动网络输入输出线程以及磁盘输入输出线程, 包括:
根据所述数据传输请求, 触发预先设定的缓冲交换机制;
根据缓冲交换机制, 并行启动网络输入输出线程以及磁盘输入输出 线程。
3.根据权利要求 1 所述的方法, 其特征在于, 根据所述网络输入输 出线程以及磁盘输入输出线程, 接收由所述局域网中的数据发送方传输 给所述数据接收方的数据, 包括:
根据所述网络输入输出线程, 将所述数据传输请求指向的数据存储 到所述数据接收方的缓冲区;
根据所述磁盘输入输出线程, 将所述数据传输请求指向的数据从所 述缓冲区读入到所述数据接收方的磁盘中。
4.根据权利要求 3所述的方法, 其特征在于, 根据所述网络输入输 出线程, 将所述数据传输请求指向的数据存储到所述数据接收方的缓冲 区, 包括: 根据所述网络输入输出线程, 将所述数据传输请求指向的数 据加入到第一数据队列, 并根据所述第一数据队列将所述数据传输请求 指向的数据存储到所述数据接收方的缓冲区。
5.根据权利要求 3所述的方法, 其特征在于, 根据所述磁盘输入输 出线程, 将所述数据传输请求指向的数据从所述缓冲区读入到所述数据 接收方的磁盘中, 包括: 根据所述磁盘输入输出线程, 将从所述缓冲区 读出的数据加入到第二数据队列中, 并根据所述第二队列将所述数据传 输请求指向的数据从所述缓冲区读入到所述数据接收方的磁盘中。
6.根据权利要求 3所述的方法, 其特征在于, 将所述数据传输请求 指向的数据存储到所述数据接收方的缓冲区时, 所述网络输入输出线程 处于非阻塞状态; 或者, 将所述数据传输请求指向的数据从所述缓冲区 读入到所述数据接收方的磁盘中时, 所述磁盘输入输出线程处于非阻塞 状态。
7.根据权利要求 3所述的方法, 其特征在于, 将所述数据传输请求 指向的数据存储到所述数据接收方的缓冲区之后还包括, 根据锁存信号 对所述缓冲区存储的数据进行锁存处理。
8.根据权利要求 3所述的方法, 其特征在于, 还包括: 根据所述锁 存信号对所述网络输入输出线程和磁盘输入输出线程进行调度处理。
9.根据权利要求 1-8任一项所述的方法,其特征在于,所述局域网通 过自建 WIFI搭建以实现所述近场传输。
10. 一种近场数据传输装置, 其特征在于, 包括:
第一程序单元, 配置为确定局域网中数据接收方发起的数据传输请 求;
第二程序单元, 配置为根据所述数据传输请求, 并行启动网络输入 输出线程以及磁盘输入输出线程;
第三程序单元, 配置为根据网络输入输出线程以及磁盘输入输出线 程, 接收由所述局域网中的数据发送方传输给所述数据接收方的数据。
11. 根据权利要求 10所述的装置, 其特征在于, 所述第二程序单 元进一步配置为:
根据所述数据传输请求, 触发预先设定的缓冲交换机制;
根据缓冲交换机制, 并行启动网络输入输出线程以及磁盘输入输出 线程。
12. 根据权利要求 10所述的装置, 其特征在于, 所述第三程序单 元进一步配置为:
根据所述网络输入输出线程, 将所述数据传输请求指向的数据存储 到所述数据接收方的缓冲区;
根据所述磁盘输入输出线程, 将所述数据传输请求指向的数据从所 述缓冲区读入到所述数据接收方的磁盘中。
13. 根据权利要求 12所述的装置, 其特征在于, 所述第三程序单 元进一步配置为: 根据所述网络输入输出线程, 将所述数据传输请求指 向的数据加入到第一数据队列, 并根据所述第一数据队列将所述数据传 输请求指向的数据存储到所述数据接收方的缓冲区。
14. 根据权利要求 12所述的装置, 其特征在于, 所述第三程序单 元进一步配置为: 根据所述磁盘输入输出线程, 将从所述缓冲区读出的 数据加入到第二数据队列中, 并根据所述第二队列将所述数据传输请求 指向的数据从所述缓冲区读入到所述数据接收方的磁盘中。
15. 根据权利要求 12所述的装置, 其特征在于, 所述第三程序单 元进一步配置为: 将所述数据传输请求指向的数据存储到所述数据接收 方的缓冲区时, 所述网络输入输出线程处于非阻塞状态; 或者, 将所述 数据传输请求指向的数据从所述缓冲区读入到所述数据接收方的磁盘中 时, 所述磁盘输入输出线程处于非阻塞状态。
16. 根据权利要求 12所述的装置, 其特征在于, 还包括第四程序 单元, 配置为将所述数据传输请求指向的数据存储到所述数据接收方的 缓冲区之后还包括, 根据锁存信号对所述缓冲区存储的数据进行锁存处 理。
17. 根据权利要求 10所述的装置, 其特征在于, 还包括: 根据锁 存信号对所述网络输入输出线程和磁盘输入输出线程进行调度处理。
18. —种近场传输系统, 其特征在于, 包括: 数据发送方以及数据 接收方, 所述数据发送方以及所述数据接收方位于同一局域网内, 所述 数据接收方确定其在所述局域网中发起的数据传输请求, 并根据所述数 据传输请求, 并行启动网络输入输出线程以及磁盘输入输出线程, 以及 根据网络输入输出线程以及磁盘输入输出线程, 将所述数据传输请求指 向的数据由所述局域网中的数据发送方传输给所述数据接收方。
19. 一种设备 /终端 /服务器, 包括:
一个或多个处理器;
计算机可读介质, 配置为存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行, 使得所述一 个或多个处理器实现如权利要求 1-9中任一所述的方法。
20. 一种计算机可读介质, 其上存储有计算机程序, 其特征在于, 该程序被处理器执行时实现如权利要求 1-9中任一所述的方法。
PCT/IB2018/057152 2018-08-27 2018-09-18 近场数据传输方法及其装置 WO2020044091A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810979497.4A CN108809363A (zh) 2018-08-27 2018-08-27 近场数据传输方法及其装置
CN201810979497.4 2018-08-27

Publications (1)

Publication Number Publication Date
WO2020044091A1 true WO2020044091A1 (zh) 2020-03-05

Family

ID=64081277

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2018/057152 WO2020044091A1 (zh) 2018-08-27 2018-09-18 近场数据传输方法及其装置

Country Status (2)

Country Link
CN (1) CN108809363A (zh)
WO (1) WO2020044091A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367626A (zh) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 一种读写磁盘任务的处理方法和装置

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049655A1 (en) * 2001-10-12 2004-03-11 Allison David S. Method and apparatus for communication to threads of control through streams
CN101188544A (zh) * 2007-12-04 2008-05-28 浙江大学 分布式文件服务器基于缓冲区的文件传输方法
CN102656573A (zh) * 2009-10-27 2012-09-05 弗里塞恩公司 有效率的多个过滤器包统计生成
CN104333888A (zh) * 2014-10-27 2015-02-04 中央民族大学 一种基于Wi-Fi直连的自组织即时通信方法
CN105072702A (zh) * 2015-07-20 2015-11-18 上海摩软通讯技术有限公司 Wifi-Direct网络的数据传输方法及系统
CN105610836A (zh) * 2015-12-31 2016-05-25 浙江省公众信息产业有限公司 一种数据传输的方法及系统
CN107063981A (zh) * 2017-02-28 2017-08-18 赛雷纳(中国)医疗科技有限公司 一种基于流式细胞术的数据集中处理方法
CN107133092A (zh) * 2017-05-24 2017-09-05 努比亚技术有限公司 多线程同步处理方法、终端及计算机可读存储介质
CN107203637A (zh) * 2017-06-08 2017-09-26 恒生电子股份有限公司 一种数据分析方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9021491B2 (en) * 2010-03-15 2015-04-28 International Business Machines Corporation Dual mode reader writer lock
US8683099B1 (en) * 2012-06-14 2014-03-25 Emc Corporation Load balancing of read/write accesses on a single host device
CN103237059B (zh) * 2013-04-02 2016-04-20 西安翔迅科技有限责任公司 交通信息数据与命令交互方法
US9313266B2 (en) * 2014-08-08 2016-04-12 Sas Institute, Inc. Dynamic assignment of transfers of blocks of data
CN106658353A (zh) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 一种数据迁移方法及终端设备
US10244010B2 (en) * 2017-02-16 2019-03-26 Nokia Of America Corporation Data processing apparatus configured to recover a network connection, a method, a system and a non-transitory computer readable medium configured to perform same
CN107347178A (zh) * 2017-06-29 2017-11-14 福州汇思博信息技术有限公司 串口复用方法及电子设备

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049655A1 (en) * 2001-10-12 2004-03-11 Allison David S. Method and apparatus for communication to threads of control through streams
CN101188544A (zh) * 2007-12-04 2008-05-28 浙江大学 分布式文件服务器基于缓冲区的文件传输方法
CN102656573A (zh) * 2009-10-27 2012-09-05 弗里塞恩公司 有效率的多个过滤器包统计生成
CN104333888A (zh) * 2014-10-27 2015-02-04 中央民族大学 一种基于Wi-Fi直连的自组织即时通信方法
CN105072702A (zh) * 2015-07-20 2015-11-18 上海摩软通讯技术有限公司 Wifi-Direct网络的数据传输方法及系统
CN105610836A (zh) * 2015-12-31 2016-05-25 浙江省公众信息产业有限公司 一种数据传输的方法及系统
CN107063981A (zh) * 2017-02-28 2017-08-18 赛雷纳(中国)医疗科技有限公司 一种基于流式细胞术的数据集中处理方法
CN107133092A (zh) * 2017-05-24 2017-09-05 努比亚技术有限公司 多线程同步处理方法、终端及计算机可读存储介质
CN107203637A (zh) * 2017-06-08 2017-09-26 恒生电子股份有限公司 一种数据分析方法及系统

Also Published As

Publication number Publication date
CN108809363A (zh) 2018-11-13

Similar Documents

Publication Publication Date Title
US9094436B2 (en) Methods and systems for interfacing with a vehicle computing system over multiple data transport channels
US9712631B2 (en) Push notification via file sharing service synchronization
WO2017162043A1 (zh) 用于设备间服务的访问方法、配置方法及装置
WO2021254330A1 (zh) 内存管理方法、系统、客户端、服务器及存储介质
WO2012031436A1 (zh) 数据存储与鉴权并行的处理方法和终端
WO2017097128A1 (zh) 设备间任务接管的方法及装置
WO2017028399A1 (zh) 通信数据传输方法及系统
US10212259B2 (en) Management of transmission control blocks (TCBs) supporting TCP connection requests in multiprocessing environments
CN113420338B (zh) 一种数据处理方法、装置和用于数据处理的装置
US20230269596A1 (en) Audio stream identification by a wireless network controller
WO2020044092A9 (zh) 数据传输方法及其装置
US10785187B2 (en) Auto-attach signaling used as wireless local area network (WLAN) selection criterion
WO2020258782A1 (zh) 适用蓝牙读卡器的数据传输方法及电子设备
WO2022148231A1 (zh) 应用程序启动控制方法、装置、电子设备和存储介质
WO2020044091A1 (zh) 近场数据传输方法及其装置
WO2017173728A1 (zh) 一种广播消息发送方法及装置、移动终端
CN104468499A (zh) 在跨数据处理设备传送多媒体文件前确定格式兼容性
WO2020044088A1 (zh) 一种文件传输的方法及其装置、设备/终端/服务器
WO2020049352A1 (zh) 近场文件传输方法及其装置
WO2023083367A1 (zh) 文件后台续传方法、装置、存储介质及电子设备
WO2018010160A1 (zh) 移动数据共享方法和移动终端
JP2010146246A (ja) マルチエージェントシステム用フレームワークコンピュータプログラム、ネットワークシステム、及びエージェント間通信方法
JP7259099B2 (ja) マルチルート通信システムおよびルート選択システム
WO2024114065A1 (zh) 多媒体资源分享的方法、设备和计算机可读存储介质
CN114710755B (zh) 一种消息处理方法、车载通讯装置、电子设备及存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1