WO2017041398A1 - 数据传输方法和装置 - Google Patents

数据传输方法和装置 Download PDF

Info

Publication number
WO2017041398A1
WO2017041398A1 PCT/CN2015/099895 CN2015099895W WO2017041398A1 WO 2017041398 A1 WO2017041398 A1 WO 2017041398A1 CN 2015099895 W CN2015099895 W CN 2015099895W WO 2017041398 A1 WO2017041398 A1 WO 2017041398A1
Authority
WO
WIPO (PCT)
Prior art keywords
service data
data processing
service
request
processing request
Prior art date
Application number
PCT/CN2015/099895
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 WO2017041398A1 publication Critical patent/WO2017041398A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present application relates to the field of computers, and in particular to the field of network technologies, and in particular, to a data transmission method and apparatus.
  • data transmission through a data transfer interface (such as application programming interface, socket) is a common communication method.
  • a data transfer interface such as application programming interface, socket
  • the process of data transmission through the data transmission interface is summarized as follows: each time a data transmission request is received, a transmission interface for transmitting data is created, and then, for each transmission interface, is created for processing.
  • the processing thread that sends the data transfer request to the transmission interface obtains the processed data, and finally transmits the processed data through the transmission interface for transmitting the data.
  • the present application provides a data transmission method and apparatus for solving the technical problems existing in the above background art.
  • the application provides a data transmission method, the method comprising: responding to a guest a connection request sent by the client, generating a transmission interface for transmitting service data with the client; receiving a service data processing request for the service data to be processed sent by the client, where the service data processing request includes a service type to which the service data to be processed belongs; Determining a service data processing thread for processing a service data processing request based on the service type; processing the service data processing request by the service data processing thread, and processing the service data processing request by the transmission data interface and the client through the service data processing thread Business data obtained after processing.
  • the present application provides a data transmission method, the method comprising: generating a connection request in response to an input processing instruction of the service data to be processed; transmitting a connection request to the server, and receiving a response request returned by the server The generated identifier for the transport interface for transmitting the service data with the server; generating a service data processing request, the service data processing request including the service type to which the service data to be processed belongs and the identifier of the transport interface; sending the service data processing request To the server, the service interface transmits the service data through the transmission interface corresponding to the identifier of the transmission interface, and the service data includes the service data processing thread corresponding to the service type to process the service data processing request to obtain the service data.
  • the present application provides a data transmission apparatus, the apparatus comprising: a response unit configured to generate a transmission interface for transmitting service data with a client in response to a connection request sent by a client; a receiving unit, configured Receiving, by the client, a service data processing request for processing the service data, the service data processing request includes a service type to which the service data to be processed belongs, and the determining unit is configured to determine, according to the service type, the service for processing the service data processing request a data processing thread; the communication unit configured to process the service data processing request by using the service data processing thread, and to transmit the service data obtained by processing the service data processing request by the service data processing thread through the transmission interface and the client.
  • the application provides a data transmission apparatus, the apparatus comprising: an instruction response unit configured to generate a connection request in response to the input processing instruction of the service data to be processed; and a sending unit configured to send the connection request to a server, and an identifier of a transmission interface generated by the server for responding to the connection request and used for transmitting the service data with the server; and a generating unit configured to generate a service data processing request, the service
  • the data processing request includes the service type to which the service data to be processed belongs and the identifier of the transmission interface;
  • the request sending unit is configured to send the service data processing request to the server, and the transmission interface and the server end corresponding to the identifier of the transmission interface
  • the service data is transmitted, and the service data includes the service data processing thread corresponding to the service type to process the service data processing request to obtain the service data.
  • the data transmission method and apparatus provided by the present application generates a transmission interface for transmitting service data with a client in response to a connection request sent by the client, and receives a service data processing request for processing the service data sent by the client; a service type, determining a business data processing thread for processing a business data processing request; processing the business data processing request by the business data processing thread, and transmitting the business data processing request via the service data processing thread through the transmission interface and the client transmission Business data obtained after processing. Therefore, when the data transmission through the transmission interface is performed, the system overhead caused by the synchronization operation between the threads corresponding to the transmission interface is required, and the system overhead when transmitting data is reduced.
  • FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
  • FIG. 2 shows a flow chart of one embodiment of a data transmission method in accordance with the present application
  • Figure 3 shows a schematic diagram of generating an interface for transmission
  • Figure 4 shows a schematic diagram of processing a service data processing request
  • FIG. 5 shows a flow chart of another embodiment of a data transmission method according to the present application.
  • Figure 6 is a block diagram showing the structure of an embodiment of a data transmission device according to the present application.
  • Figure 7 is a block diagram showing another embodiment of a data transmission device according to the present application.
  • FIG. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server of an embodiment of the present application.
  • FIG. 1 illustrates an exemplary system architecture 100 in which an embodiment of a data transmission method or data transmission device of the present application may be applied.
  • system architecture 100 can include terminal devices 101, 102, 103, network 104, and server 105.
  • the network 104 is used to provide a medium for the transmission link between the terminal devices 101, 102, 103 and the server 105.
  • Network 104 may include various types of connections, such as wired, wireless transmission links, or fiber optic cables, to name a few.
  • the user can interact with the server 105 over the network 104 using the terminal devices 101, 102, 103 to receive or transmit messages and the like.
  • Various communication applications such as network security applications, instant communication tools, and the like, can be installed on the terminal devices 101, 102, and 103.
  • the terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting network communication, including but not limited to smart phones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic The video specialist compresses the standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV) player, laptop portable computer and desktop computer, and the like.
  • MP3 players Motion Picture Experts Group Audio Layer III, dynamic The video specialist compresses the standard audio layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV
  • Server 105 may be a server that provides various services, such as a backend server that provides support for network security applications on terminal devices 101, 102, 103.
  • the background server may perform processing such as analyzing the received service data processing request and the like, and feed back the processing result (for example, the service data) to the terminal device.
  • the client and the server do not specifically refer to a certain type of device.
  • data transmission between multiple processes can be used to send data.
  • the process of requesting is called the client, and the process for processing the data processing request can be called the server.
  • the client and the server may run on the same terminal device 101, 102, 103 or the server 105, or may run on different terminal devices 101, 102, 103 or the server 105. Accordingly, the operation of issuing a data processing request and processing a data processing request can be performed by the client, the terminal device 101, 102, 103 or the server 105 on which the server is running.
  • terminal devices, networks, and servers in Figure 1 is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices, networks, and servers.
  • the transmission interface may be a communication interface for multiple inter-process communication.
  • the transport interface may be a local interface (eg, an application programming interface).
  • the transmission interface may be a network interface (such as a socket).
  • the data transmission method provided by this embodiment can be performed by the terminal device 101, 102, 103 or the server 105. The method includes the following steps:
  • Step 201 Generate a transmission interface for transmitting service data with the client in response to the connection request sent by the client.
  • connection request may be a connection request for triggering an operation of creating a transmission interface.
  • the connection request can be a socket connection request.
  • the electronic device on which the data transmission method operates (for example, the server or terminal shown in FIG. 1) can receive a connection request from the client through a wired connection or a wireless connection.
  • the above wireless connection manner may include but is not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods that are now known or developed in the future. .
  • FIG. 3 shows a schematic diagram of generating an interface for transmission.
  • FIG. 3 is an example of a transmission interface as a socket, and illustrates the principle of creating a transmission interface, that is, a transmission socket, in response to a connection request.
  • a listening socket 301 can receive the connection sent by the client. Created before the request.
  • the connection request sent by the client 303 can be monitored using the listening socket.
  • the transport socket 302 for transmitting the service data with the client may be further created in response to the client's connection request.
  • a transmission interface for example, an application programming interface
  • a transmission interface for example, an application programming interface for communication between local processes can be created based on the principle that a transmission interface is used as a socket for a socket.
  • data transmission can be performed with the client using the interface for transmission.
  • the data to be transmitted can be written to the transmission interface and then sent to the client, and for example, the data sent by the client can be read from the transmission interface.
  • a client connection list indicating a correspondence between the client and the transmission interface may be generated, and each additional client connection may create a transmission interface for use with Newly added clients for data transfer.
  • Step 202 Receive a service data processing request for the service data to be processed sent by the client.
  • the service data processing request includes a service type to which the service data to be processed belongs.
  • the service provided for the client can be referred to as a service.
  • the network security service provided to the client may include services such as finding a solution, updating a virus database, and the like, each type of service may correspond to a service type, and correspondingly, the data associated with the service type may be referred to as service data.
  • the service data processing request sent by the client may be further received.
  • the service data to be processed corresponding to the service data processing request is also different.
  • the service data processing request may send a request for the client to obtain the latest virus database data.
  • the business data to be processed may be the latest virus database data that the user desires to acquire.
  • the service data processing request may be a request sent by the client for processing (for example, receiving) the error data uploaded by the client.
  • the pending service data can be erroneous data uploaded by the client.
  • Step 203 Determine a service data processing thread for processing a service data processing request based on the service type.
  • the service data processing thread for processing the service data processing request may be determined based on the type of the service data in the service data processing request sent by the client. For example, when the client desires to obtain the latest virus database data to update the virus database in the network security application installed on it, the pending business data may be the latest virus database data that the user desires to obtain.
  • the service type to which the to-be-processed service data belongs may be a service type of the virus database data update, and the service data processing thread for processing the service data processing request may be determined based on the service type, that is, used to obtain the latest virus database data and A business data processing thread that sends the latest virus data to the client.
  • the method further includes: pre-creating a plurality of service data processing threads according to the quantity of the service type, where each service data processing thread corresponds to one service type.
  • a service data processing thread corresponding to the service type can be created for each service type.
  • a worker thread for processing a connection request, a service data processing request, or the like may be created in advance.
  • a transport interface is created.
  • the service data processing request may be sent to its corresponding service data processing thread for processing according to the type of the service data to be processed.
  • the worker thread may also receive a request to operate the interface for transmission (eg, a request to close the interface for transmission).
  • Step 204 The service data processing thread is processed by the service data processing thread, and the service data obtained by processing the service data processing request by the service data processing thread is transmitted through the transmission interface and the client.
  • the service data processing thread may be processed by the service data processing thread, and then the service data is transmitted to the client through the transmission interface.
  • the service data processing request is a request for acquiring the latest virus database data
  • the corresponding business data processing thread acquires the latest virus database data, and then writes it to the transmission interface and sends it to the client.
  • the service data processing request is a request for uploading the error data of the client
  • the corresponding service data processing thread reads the error data uploaded by the client from the transmission interface.
  • FIG. 4 shows a schematic diagram of processing a service data processing request.
  • a client 401, a service data processing thread 402, and a transmission interface 403 are shown.
  • the client 1 and the client 2 in the client 401 and the service data processing thread 1 in the service data processing thread 402 and the transmission interface 1 and the transmission interface 2 in the transmission interface 403 are taken as an example to describe the service data processing.
  • the service data processing request sent by the client 1 and the client 2 is a request for acquiring the latest virus database data.
  • the transmission interface 1 and the transmission interface 2 are for transmitting service data with the client 1 and the client 2. And the interface used for the transfer.
  • the service data processing thread 1 is configured to acquire the latest virus database data, and then transmit the data to the client 1 and the client 2 through the transmission interface 1 and the transmission interface 2, respectively.
  • the correspondence between the transmission interface 1 and the transmission interface 2 and the service data processing thread 1 can be stored, so that the service data processing request sent by the client 1 and the client 2 is an error for uploading to the client.
  • the service data processing request sent by the client 1 and the client 2 may be forwarded to the service data processing thread 1 according to the correspondence between the transmission interface 1 and the transmission interface 2 and the service data processing thread 1.
  • the service data processing thread 1 transmits the solution searched based on the error data to the client 1 and the client 2 through the transmission interface 1 and the transmission interface 2, respectively.
  • processing, by the service data processing thread, the service data processing request includes: processing, by the service data processing thread, the service data processing request according to the receiving time of the service data processing request.
  • the service data processing thread may receive the service data processing request sent by the multiple clients, and may add the service data processing request to the queue according to the time when the service data processing request is received, and may be in a first-in, first-out manner.
  • the business data processing requests in the queue are processed in turn.
  • the service data processing request further includes a weight value for characterizing an urgency corresponding to the service data to be processed; and processing the service data processing request by the service data processing thread includes: utilizing The business data processing thread determines the processing order of the business data processing request based on the weight value; and based on the processing The order, in turn, processes the business data processing request.
  • the service data processing request sent by the client may include the weight value of the urgency corresponding to the service data to be processed, and then the service data with the higher weight value is preferentially processed.
  • a higher weight value may be assigned, so that the service data processing thread preferentially processes the service data.
  • the processing order of the service data processing request may be determined based on the weight value of the urgency corresponding to the service data to be processed, and then the service data processing request is processed in sequence according to the processing order.
  • the data transmission method provided by the foregoing embodiment of the present application creates a transmission interface for transmitting data by processing a request for each service data, and then performs processing on a different service data processing thread according to the type of the service data to be processed. Therefore, the problem of increasing system overhead caused by the need for synchronous operation between threads corresponding to the interface for transmission when data transmission through the interface for transmission is avoided is avoided, and the system overhead when transmitting data is reduced.
  • FIG. 5 illustrates a flow 500 of another embodiment of a data transfer method in accordance with the present application.
  • the data transmission method provided by this embodiment can be performed by the terminal device 101, 102, 103 or the server 105.
  • the method includes the following steps:
  • Step 501 Generate a connection request in response to the input processing instruction of the service data to be processed.
  • the connection request may be a connection request for triggering an operation of creating a transmission interface.
  • the connection request can be a socket connection request.
  • the service provided by the server can be called a service.
  • the network security service provided by the server may include services such as finding a solution, updating a virus database, and the like, each type of service may correspond to a service type, and correspondingly, the data associated with the service type may be referred to as service data.
  • corresponding processing instructions are also different according to the type of service data to be processed.
  • the processing instruction may be an instruction for acquiring the latest virus database data from the server.
  • a connection request may be generated in response to the processing instruction.
  • Step 502 sending a connection request to the server, and receiving the response returned by the server.
  • the identifier of the transmission interface for transmitting the service data with the server generated by the server in response to the connection request may be received.
  • the transport interface corresponding to the identifier of the transport interface can be used to transmit service data to the server.
  • Step 503 generating a service data processing request.
  • the service data processing request includes the service type to which the service data to be processed belongs and the identifier of the interface for transmission.
  • the service data processing request further includes: a weight value used to represent an urgency corresponding to the service data to be processed.
  • a weight value used to represent an urgency corresponding to the service data to be processed.
  • different types of service data may be assigned different weight values indicating their urgency according to the urgency corresponding to the service data. For example, in the case of a network security application, traffic data associated with a bursty network security event can be assigned a higher weight value.
  • Step 504 Send the service data processing request to the server, and transmit the service data to the server through the transmission interface corresponding to the identifier of the transmission interface.
  • the service data includes the service data processing thread corresponding to the service type to which the service data to be processed belongs, and the service data processing request is processed to obtain the service data.
  • the service data processing thread corresponding to the service type to which the service data to be processed belongs on the server may be triggered to process the service data processing request to obtain the processed service data.
  • the processed service data can be transmitted with the server via the transmission interface corresponding to the identifier of the transmission interface in the service data processing request.
  • the apparatus 600 includes a response unit 601, a receiving unit 602, a determining unit 603, and a communication unit 604.
  • the response unit 601 is configured to generate a transmission interface for transmitting service data with the client in response to the connection request sent by the client
  • the receiving unit 602 is configured to receive the service data processing of the service data to be processed sent by the client.
  • the request, the service data processing request includes a service type to which the service data to be processed belongs; the determining unit 603 is configured to determine, according to the service type, the service data processing request for processing The service data processing thread; the communication unit 604 is configured to process the service data processing request by using the service data processing thread, and transmit the service obtained by processing the service data processing request via the service data processing thread through the transmission interface and the client data.
  • the communication unit 604 includes: a first processing subunit (not shown) configured to utilize the service data processing thread to sequentially process the service data based on the reception time of the service data processing request. Process the request for processing.
  • the service data processing request further includes a weight value for characterizing the urgency corresponding to the service data to be processed
  • the communication unit 604 includes: a second processing subunit (not shown)
  • the configuration is configured to use the service data processing thread to determine a processing order of the service data processing request based on the weight value, and sequentially process the service data processing request based on the processing order.
  • the apparatus 600 further includes: a thread quantity determining unit (not shown) configured to pre-create a plurality of service data processing threads based on the number of service types, wherein each The business data processing thread corresponds to a business type.
  • a thread quantity determining unit (not shown) configured to pre-create a plurality of service data processing threads based on the number of service types, wherein each The business data processing thread corresponds to a business type.
  • FIG. 7 shows a schematic structural diagram of another embodiment of a data transmission device according to the present application.
  • the apparatus 700 includes an instruction response unit 701, a transmitting unit 702, a generating unit 703, and a request transmitting unit 704.
  • the command response unit 701 is configured to generate a connection request in response to the input processing instruction of the service data to be processed;
  • the sending unit 702 is configured to send the connection request to the server, and receive the response returned by the server in response to the connection request.
  • the generated identifier for the transmission interface for transmitting the service data with the server is configured to generate a service data processing request, where the service data processing request includes the service type to which the service data to be processed belongs and the identifier of the transmission interface;
  • the sending unit 704 is configured to send the service data processing request to the server, and transmit the service data to the server through the transmission interface corresponding to the identifier of the transmission interface, where the service data includes processing the service data by the service data processing thread corresponding to the service type.
  • the business data is obtained after the request is processed.
  • the service data processing request further includes: a weight value used to represent an urgency corresponding to the service data to be processed.
  • FIG 8 there is shown a terminal device suitable for implementing the embodiments of the present application. Or a schematic diagram of the structure of the host computer system 800.
  • computer system 800 includes a central processing unit (CPU) 801 that can be loaded into a program in random access memory (RAM) 803 according to a program stored in read only memory (ROM) 802 or from storage portion 808. And perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • RAM 803 various programs and data required for the operation of the system 800 are also stored.
  • the CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804.
  • An input/output (I/O) interface 805 is also coupled to bus 804.
  • the following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 808 including a hard disk or the like. And a communication portion 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the Internet.
  • Driver 810 is also coupled to I/O interface 805 as needed.
  • a removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like, is mounted on the drive 810 as needed so that a computer program read therefrom is installed into the storage portion 808 as needed.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine readable medium, the computer program comprising program code for performing the methods of Figs. 2-7.
  • the computer program can be downloaded and installed from the network via communication portion 809, and/or installed from removable media 811.
  • each block of the flowchart or block diagrams can represent a module, a program segment, or a portion of code that includes one or more logic for implementing the specified.
  • Functional executable instructions can also occur in a different order than that illustrated in the drawings. For example, two successively represented blocks may in fact be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block in the block diagrams and/or flowcharts, as well as blocks in the block diagrams and/or flowcharts The combination may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented in a combination of dedicated hardware and computer instructions.
  • the unit or module involved in the embodiment of the present application may be implemented by software or by hardware.
  • the described unit or module may also be provided in the processor, for example, as a processor including a response unit, a receiving unit, a determining unit, and a communication unit.
  • the name of these units does not constitute a limitation on the unit itself in some cases.
  • the response unit may also be described as “generating a service request for transmitting service data with the client in response to a connection request sent by the client. Transmission interface”.
  • the present application further provides a non-volatile computer storage medium, which may be a non-volatile computer storage medium included in the apparatus described in the foregoing embodiments; It may be a non-volatile computer storage medium that exists alone and is not assembled into the terminal.
  • the non-volatile computer storage medium stores one or more programs, when the one or more programs are executed by a device, causing the device to generate, in response to a connection request sent by the client, An interface for transmitting a service data of the client; receiving a service data processing request for the service data to be processed sent by the client, where the service data processing request includes a service type to which the service data to be processed belongs; and determining, according to the service type, Processing a service data processing thread of the service data processing request; processing, by the service data processing thread, the service data processing request, and transmitting, by the transmission interface, the client with the service data processing thread Service data obtained after processing the service data processing request.

Landscapes

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

Abstract

本申请公开了数据传输方法和装置。该方法的一具体实施方式包括:响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口;接收客户端发送的对待处理业务数据的业务数据处理请求,业务数据处理请求包括待处理业务数据所属的业务类型;基于业务类型,确定用于处理业务数据处理请求的业务数据处理线程;利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。从而避免了在通过传输用接口进行数据传输时,因需要对传输用接口对应的线程之间进行同步操作而引起的增加系统开销的问题,减少了在传输数据时的系统开销。

Description

数据传输方法和装置
相关申请的交叉引用
本申请要求于2015年09月08日提交的中国专利申请号为“201510567996.9”的优先权,其全部内容作为整体并入本申请中。
技术领域
本申请涉及计算机领域,具体涉及网络技术领域,尤其涉及数据传输方法和装置。
背景技术
在进程之间的数据传输中,通过数据传输接口(例如应用程序编程接口、套接字)进行数据传输是一种常用的通信方式。在已知的技术中,通过数据传输接口进行数据传输的过程概述如下:每接收一个数据传输请求,创建一个用于传输数据的传输用接口,然后,针对每一个传输用接口,创建用于处理发送至传输用接口的数据传输请求的处理线程,得到经处理后的数据,最后通过用于传输数据的传输用接口传输经处理后的数据。
然而,在采用上述方式进行数据传输时,由于每一个用于传输数据的传输用接口均需对应一个处理线程。一方面,导致线程数量较多,增加系统负载。另一方面,为避免线程之间的对同一类型的传输数据进行处理所造成的访问冲突,需要对线程之间进行同步操作,进一步增加了在利用传输用接口进行数据传输时的系统开销。
发明内容
本申请提供了数据传输方法和装置,用于解决上述背景技术部分存在的技术问题。
第一方面,本申请提供了数据传输方法,该方法包括:响应于客 户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口;接收客户端发送的对待处理业务数据的业务数据处理请求,业务数据处理请求包括待处理业务数据所属的业务类型;基于业务类型,确定用于处理业务数据处理请求的业务数据处理线程;利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。
第二方面,本申请提供了数据传输方法,该方法包括:响应于输入的对待处理业务数据的处理指令,生成连接请求;将连接请求发送至服务端,以及接收服务端返回的响应于连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;生成业务数据处理请求,业务数据处理请求包含待处理业务数据所属的业务类型以及传输用接口的标识;将业务数据处理请求发送至服务端,通过传输用接口的标识对应的传输用接口与服务端传输业务数据,业务数据包括经由业务类型对应的业务数据处理线程对业务数据处理请求进行处理之后得到业务数据。
第三方面,本申请提供了数据传输装置,该装置包括:响应单元,配置用于响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口;接收单元,配置用于接收客户端发送的对待处理业务数据的业务数据处理请求,业务数据处理请求包括待处理业务数据所属的业务类型;确定单元,配置用于基于业务类型,确定用于处理业务数据处理请求的业务数据处理线程;通信单元,配置用于利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。
第四方面,本申请提供了数据传输装置,该装置包括:指令响应单元,配置用于响应于输入的对待处理业务数据的处理指令,生成连接请求;发送单元,配置用于将连接请求发送至服务端,以及接收服务端返回的响应于连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;生成单元,配置用于生成业务数据处理请求,业务 数据处理请求包含待处理业务数据所属的业务类型以及传输用接口的标识;请求发送单元,配置用于将业务数据处理请求发送至服务端,通过传输用接口的标识对应的传输用接口与服务端传输业务数据,业务数据包括经由业务类型对应的业务数据处理线程对业务数据处理请求进行处理之后得到业务数据。
本申请提供的数据传输方法和装置,通过响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口;接收客户端发送的对待处理业务数据的业务数据处理请求;基于业务类型,确定用于处理业务数据处理请求的业务数据处理线程;利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。从而避免了在通过传输用接口进行数据传输时,因需要对传输用接口对应的线程之间进行同步操作而引起的增加系统开销的问题,减少了在传输数据时的系统开销。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请可以应用于其中的示例性系统架构图;
图2示出了根据本申请的数据传输方法的一个实施例的流程图;
图3示出了生成传输用接口的原理图;
图4示出了对业务数据处理请求进行处理的原理图;
图5示出了根据本申请的数据传输方法的另一个实施例的流程图;
图6示出了根据本申请的数据传输装置的一个实施例的结构示意图;
图7示出了根据本申请的数据传输装置的另一个实施例的结构示意图;
图8是适于用来实现本申请实施例的终端设备或服务器的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请的数据传输方法或数据传输装置的实施例的示例性系统架构100。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供传输链路的介质。网络104可以包括各种连接类型,例如有线、无线传输链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯应用,例如网络安全类应用、即时通信工具等。
终端设备101、102、103可以是具有显示屏并且支持网络通信的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上的网络安全类应用提供支持的后台服务器。后台服务器可以对接收到的业务数据处理请求等数据进行分析等处理,并将处理结果(例如业务数据)反馈给终端设备。
需要说明的是,本申请实施例中,客户端、服务端并不特指某一类型的设备。以多个进程之间进行数据传输为例,可以将发出数据处 理请求的进程称之为客户端,可以将用于处理数据处理请求的进程称之服务端。上述客户端、服务端可以运行于相同的终端设备101、102、103或服务器105之上,也可以运行于不同的终端设备101、102、103或服务器105之上。相应地,可以由客户端、服务端所运行在的终端设备101、102、103或服务器105执行发出数据处理请求以及处理数据处理请求的操作。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
请参考图2,其示出了根据本申请的数据传输方法的一个实施例的流程200。需要说明的是,在本实施例中,传输用接口可以为用于多个进程间通信的通信接口。当多个进程位于同一设备(例如图1所示的服务器或终端)即多个进程运行于本地时,则传输用接口可以为本地接口(例如应用程序编程接口)。当多个进程分别位于不同的设备(例如图1所示的服务器或终端)时,则传输用接口可以为网络接口(例如套接字)。本实施例所提供的数据传输方法可以由终端设备101、102、103或服务器105执行。该方法包括以下步骤:
步骤201,响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口。
在本实施例中,连接请求可以为用于触发创建传输用接口的操作的连接请求。例如,当传输用接口为套接字时,则该连接请求可以为套接字连接请求。数据传输方法运行于其上的电子设备(例如图1所示的服务器或终端)可以通过有线连接方式或者无线连接方式从客户端接收连接请求。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
请参考图3,其示出了生成传输用接口的原理图。图3是以传输用接口为套接字为例,说明响应于连接请求,创建传输用接口即传输用套接字的原理。在图3中,示出了监听套接字301,传输用套接字302,客户端303。其中,监听套接字301可以在接收客户端发送的连 接请求之前创建。可以利用监听套接字监测客户端303发送的连接请求。在通过监听套接字对连接请求进行监测的同时,可以进一步响应于客户端的连接请求,创建用于与客户端传输业务数据的传输用套接字302。在本实施例中,可以基于传输用接口为套接字时创建传输用接口的原理,创建用于本地的进程之间的通信的传输用接口(例如应用程序编程接口)。
在本实施例中,在创建传输用接口之后,可以利用传输用接口与客户端进行数据传输。例如,可以将待传输数据写入传输用接口,然后发送至客户端,又例如,可以从传输用接口中读取客户端发送的数据。在本实施例中,当多个客户端发出连接请求时,可以生成表征客户端与传输用接口对应关系的客户端连接列表,每增加一个客户端连接,均可以创建一个传输用接口用于与新增加客户端进行数据传输。
步骤202,接收客户端发送的对待处理业务数据的业务数据处理请求。
在本实施例中,业务数据处理请求包括待处理业务数据所属的业务类型。在本实施例中,可以将为客户端提供的服务称之为业务。例如,向客户端提供的网络安全类服务可以包含查找解决方案、更新病毒库等业务,每一种业务可以对应一个业务类型,相应地,与业务类型相关联的数据可以称之为业务数据。在本实施例中,在响应于客户端的连接请求,创建传输业务数据的传输用接口之后,可以进一步接收客户端发送的业务数据处理请求。
在本实施例中,根据业务数据处理请求类型的不同,业务数据处理请求对应的待处理业务数据也是不同的。例如,当客户端期望获最新的病毒库数据以更新安装在其上的网络安全类应用的病毒库时,则业务数据处理请求可以为客户端发送的用于获取最新的病毒库数据的请求,相应地,待处理业务数据可以为用户期望获取的最新的病毒库数据。又例如,当客户端需要上传错误数据以期望查找出相应的解决方案时,则业务数据处理请求可以为客户端发送的用于对客户端上传的错误数据进行处理(例如进行接收)的请求,相应地,待处理业务数据可以为客户端上传的错误数据。
步骤203,基于业务类型,确定用于处理业务数据处理请求的业务数据处理线程。
在本实施例中,可以基于客户端发送的业务数据处理请求中的业务数据的类型,确定用于处理业务数据处理请求的业务数据处理线程。例如,当客户端期望获取最新的病毒库数据以更新安装在其上的网络安全类应用中的病毒库时,待处理业务数据可以为用户期望获取的最新的病毒库数据。该待处理业务数据所属的业务类型可以为病毒库数据更新这一业务类型,可以基于该业务类型,确定用于处理业务数据处理请求的业务数据处理线程,即用于获取最新的病毒库数据以及向客户端发送最新的病毒数据的业务数据处理线程。
在本实施例的一些可选地实现方式中,还包括:基于业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。在本实施例中,可以针对每一个业务类型,创建一个与业务类型对应的业务数据处理线程。
在本实施例中,可以预先创建用于处理连接请求、业务数据处理请求等请求的工作线程。当接收到连接请求时,则创建传输用接口。当接收到业务数据处理请求时,则可以根据待处理业务数据的类型,将业务数据处理请求发送至其对应的业务数据处理线程进行处理。在本实施例中,工作线程还可以接收对传输用接口进行操作的请求(例如关闭传输用接口的请求)。
步骤204,利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。
在本实施例中,可以利用业务数据处理线程对业务数据处理请求进行处理,然后通过传输用接口与客户端传输业务数据。例如,当业务数据处理请求为获取最新的病毒数据库数据的请求时,则其对应业务数据处理线程会获取最新的病毒数据库数据,然后写入到传输用接口中,发送至客户端。当业务数据处理请求为上传客户端的错误数据的请求时,则其对应业务数据处理线程会从传输用接口中读取出客户端上传的错误数据。
请参考图4,其示出了对业务数据处理请求进行处理的原理图。在图4中,示出了客户端401,业务数据处理线程402,传输用接口403。下面以客户端401中的客户端1、客户端2以及业务数据处理线程402中的业务数据处理线程1、传输用接口403中的传输用接口1与传输用接口2为例,说明业务数据处理线程对业务数据处理请求进行处理的过程:客户端1与客户端2均对应业务数据处理线程1,即利用业务数据处理线程1处理客户端1与客户端2发送的业务数据处理请求。以客户端1与客户端2发送的业务数据处理请求为用于获取最新的病毒库数据的请求为例,传输用接口1与传输用接口2是为了与客户端1与客户端2传输业务数据而创建的传输用接口。业务数据处理线程1用于获取最新病毒库数据,然后,分别通过传输用接口1与传输用接口2将数据发送给客户端1、客户端2。同时,可以将传输用接口1与传输用接口2与业务数据处理线程1的对应关系进行存储,从而,当客户端1与客户端2发送的业务数据处理请求为用于对客户端上传的错误数据进行处理的请求时,可以根据传输用接口1与传输用接口2与业务数据处理线程1的对应关系,将客户端1与客户端2发送的业务数据处理请求交由业务数据处理线程1进行处理,由业务数据处理线程1将基于错误数据而查找的解决方案分别通过传输用接口1与传输用接口2将数据发送给客户端1、客户端2。
在本实施例的一些可选地实现方式中,利用业务数据处理线程对业务数据处理请求进行处理包括:利用业务数据处理线程基于业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。
在本实施例中,业务数据处理线程可以接收多个客户端发送的业务数据处理请求,可以按照接收业务数据处理请求的时间,将业务数据处理请求加入到队列中,可以以先进先出的方式依次对队列中的业务数据处理请求进行处理。
在本实施例的一些可选地实现方式中,业务数据处理请求还包括用于表征待处理业务数据对应的紧急程度的权重值;以及利用业务数据处理线程对业务数据处理请求进行处理包括:利用业务数据处理线程基于权重值,确定对业务数据处理请求的处理顺序;以及基于处理 顺序,依次对业务数据处理请求进行处理。
在本实施例中,客户端发送的业务数据处理请求中可以包括待处理业务数据对应的紧急程度的权重值,然后,对权重值较高的业务数据优先处理。例如,对于网络中突发的网络安全事件相关的业务数据,可以赋予较高的权重值,以使得业务数据处理线程对该业务数据优先进行处理。在本实施例中,可以基于待处理业务数据对应的紧急程度的权重值,确定对业务数据处理请求的处理顺序,然后按照处理顺序,依次对业务数据处理请求进行处理。
本申请的上述实施例提供的数据传输方法,通过针对每一个业务数据处理请求,创建用于传输数据的传输用接口,然后根据待处理业务数据的类型,交由不同的业务数据处理线程进行处理,从而避免了在通过传输用接口进行数据传输时,因传输用接口对应的线程之间需要同步操作而引起的增加系统开销的问题,减少了在传输数据时的系统开销。
请参考图5,其示出了根据本申请的数据传输方法的另一个实施例的流程500。本实施例所提供的数据传输方法可以由终端设备101、102、103或服务器105执行。该方法包括以下步骤:
步骤501,响应于输入的对待处理业务数据的处理指令,生成连接请求。
在本实施例中,连接请求可以为用于触发创建传输用接口的操作的连接请求。例如,当传输接口为套接字时,则该连接请求可以为套接字连接请求。可以将服务端提供的服务称之为业务。例如,服务端提供的网络安全类服务可以包含查找解决方案、更新病毒库等业务,每一种业务可以对应一个业务类型,相应地,与业务类型相关联的数据可以称之为业务数据。在本实施例中,根据待处理业务数据的类型的不同,对应的处理指令也是不同的。例如,当待处理业务数据为需要从服务端获取的最新的病毒库数据时,则处理指令可以为用于从服务端获取最新的病毒库数据的指令。在本实施例中,在接收到对待处理业务数据的处理指令之后,可以响应于处理指令,生成连接请求。
步骤502,将连接请求发送至服务端,以及接收服务端返回的响 应于连接请求而生成的用于与服务端传输业务数据的传输用接口的标识。
在本实施例中,在将连接请求发送至服务端之后,可以接收到服务端返回的响应于连接请求而生成的用于与服务端传输业务数据的传输用接口的标识。可以利用该传输用接口的标识对应的传输用接口与服务端传输业务数据。
步骤503,生成业务数据处理请求。
在本实施例中,业务数据处理请求包含待处理业务数据所属的业务类型以及传输用接口的标识。
在本实施例的一些可选地实现方式中,业务数据处理请求还包括:用于表征待处理业务数据对应的紧急程度的权重值。在本实施例中,可以预先根据业务数据对应的紧急程度,对不同类型的业务数据赋予不同的表征其紧急程度的权重值。例如,以网络安全类应用为例,可以将与突发网络安全事件相关联的业务数据赋予较高的权重值。
步骤504,将业务数据处理请求发送至服务端,通过传输用接口的标识对应的传输用接口与服务端传输业务数据。
在本实施例中,业务数据包括经由待处理业务数据所属的业务类型对应的业务数据处理线程对业务数据处理请求进行处理之后得到业务数据。在将业务数据处理请求发送至服务端之后,可以触发服务端上与待处理业务数据所属的业务类型对应的业务数据处理线程对业务数据处理请求进行处理,得到经处理后的业务数据。然后,可以经由业务数据处理请求中的传输用接口的标识对应的传输用接口,与服务端传输经处理后的业务数据。
请参考图6,其示出了根据本申请的数据传输装置的一个实施例的结构示意图。装置600包括:响应单元601,接收单元602,确定单元603,通信单元604。其中,响应单元601配置用于响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口;接收单元602配置用于接收客户端发送的对待处理业务数据的业务数据处理请求,业务数据处理请求包括待处理业务数据所属的业务类型;确定单元603配置用于基于业务类型,确定用于处理业务数据处理请求 的业务数据处理线程;通信单元604配置用于利用业务数据处理线程对业务数据处理请求进行处理,以及通过传输用接口与客户端传输经由业务数据处理线程对业务数据处理请求进行处理之后得到的业务数据。
在本实施例的一些可选地实现方式中,通信单元604包括:第一处理子单元(未示出),配置用于利用业务数据处理线程基于业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。
在本实施例的一些可选地实现方式中,业务数据处理请求还包括用于表征待处理业务数据对应的紧急程度的权重值,通信单元604包括:第二处理子单元(未示出),配置用于利用业务数据处理线程基于权重值,确定对业务数据处理请求的处理顺序,以及基于处理顺序,依次对业务数据处理请求进行处理。
在本实施例的一些可选地实现方式中,装置600还包括:线程数量确定单元(未示出),配置用于基于业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。
请参考图7,其示出了根据本申请的数据传输装置的另一个实施例的结构示意图。装置700包括:指令响应单元701,发送单元702,生成单元703,请求发送单元704。其中,指令响应单元701配置用于响应于输入的对待处理业务数据的处理指令,生成连接请求;发送单元702配置用于将连接请求发送至服务端,以及接收服务端返回的响应于连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;生成单元703配置用于生成业务数据处理请求,业务数据处理请求包含待处理业务数据所属的业务类型以及传输用接口的标识;请求发送单元704配置用于将业务数据处理请求发送至服务端,通过传输用接口的标识对应的传输用接口与服务端传输业务数据,业务数据包括经由业务类型对应的业务数据处理线程对业务数据处理请求进行处理之后得到业务数据。
在本实施例的一些可选地实现方式中,业务数据处理请求还包括:用于表征待处理业务数据对应的紧急程度的权重值。
下面参考图8,其示出了适于用来实现本申请实施例的终端设备 或主机的计算机系统800的结构示意图。
如图8所示,计算机系统800包括中央处理单元(CPU)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储部分808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有系统800操作所需的各种程序和数据。CPU 801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
以下部件连接至I/O接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至I/O接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。
特别地,根据本公开的实施例,上文参考图2-图7描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行图2-图7的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的 组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,可以描述为:一种处理器包括响应单元,接收单元,确定单元,通信单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,响应单元还可以被描述为“响应于客户端发送的连接请求,生成用于与客户端传输业务数据的传输用接口”。
作为另一方面,本申请还提供了一种非易失性计算机存储介质,该非易失性计算机存储介质可以是上述实施例中所述装置中所包含的非易失性计算机存储介质;也可以是单独存在,未装配入终端中的非易失性计算机存储介质。上述非易失性计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备:响应于客户端发送的连接请求,生成用于与所述客户端传输业务数据的传输用接口;接收客户端发送的对待处理业务数据的业务数据处理请求,所述业务数据处理请求包括待处理业务数据所属的业务类型;基于所述业务类型,确定用于处理所述业务数据处理请求的业务数据处理线程;利用所述业务数据处理线程对所述业务数据处理请求进行处理,以及通过所述传输用接口与所述客户端传输经由所述业务数据处理线程对所述业务数据处理请求进行处理之后得到的业务数据。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (14)

  1. 一种数据传输方法,其特征在于,所述方法包括:
    响应于客户端发送的连接请求,生成用于与所述客户端传输业务数据的传输用接口;
    接收客户端发送的对待处理业务数据的业务数据处理请求,所述业务数据处理请求包括待处理业务数据所属的业务类型;
    基于所述业务类型,确定用于处理所述业务数据处理请求的业务数据处理线程;
    利用所述业务数据处理线程对所述业务数据处理请求进行处理,以及通过所述传输用接口与所述客户端传输经由所述业务数据处理线程对所述业务数据处理请求进行处理之后得到的业务数据。
  2. 根据权利要求1所述的方法,其特征在于,所述利用所述业务数据处理线程对所述业务数据处理请求进行处理包括:
    利用所述业务数据处理线程基于所述业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。
  3. 根据权利要求1所述的方法,其特征在于,所述业务数据处理请求还包括用于表征待处理业务数据对应的紧急程度的权重值;以及
    所述利用所述业务数据处理线程对所述业务数据处理请求进行处理包括:
    利用所述业务数据处理线程基于所述权重值,确定对业务数据处理请求的处理顺序;以及基于所述处理顺序,依次对业务数据处理请求进行处理。
  4. 根据权利要求1-3之一所述的方法,其特征在于,所述方法还包括:基于所述业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。
  5. 一种数据传输方法,其特征在于,所述方法包括:
    响应于输入的对待处理业务数据的处理指令,生成连接请求;
    将所述连接请求发送至服务端,以及接收服务端返回的响应于所述连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;
    生成业务数据处理请求,所述业务数据处理请求包含所述待处理业务数据所属的业务类型以及所述传输用接口的标识;
    将所述业务数据处理请求发送至服务端,通过所述传输用接口的标识对应的传输用接口与服务端传输业务数据,所述业务数据包括经由所述业务类型对应的业务数据处理线程对所述业务数据处理请求进行处理之后得到业务数据。
  6. 根据权利要求5所述的方法,其特征在于,所述业务数据处理请求还包括:用于表征待处理业务数据对应的紧急程度的权重值。
  7. 一种数据传输装置,其特征在于,所述装置包括:
    响应单元,配置用于响应于客户端发送的连接请求,生成用于与所述客户端传输业务数据的传输用接口;
    接收单元,配置用于接收客户端发送的对待处理业务数据的业务数据处理请求,所述业务数据处理请求包括待处理业务数据所属的业务类型;
    确定单元,配置用于基于所述业务类型,确定用于处理所述业务数据处理请求的业务数据处理线程;
    通信单元,配置用于利用所述业务数据处理线程对所述业务数据处理请求进行处理,以及通过所述传输用接口与所述客户端传输经由所述业务数据处理线程对所述业务数据处理请求进行处理之后得到的业务数据。
  8. 根据权利要求7所述的装置,其特征在于,所述通信单元包括:
    第一处理子单元,配置用于利用所述业务数据处理线程基于所述 业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。
  9. 根据权利要求7所述的装置,其特征在于,所述业务数据处理请求还包括用于表征待处理业务数据对应的紧急程度的权重值,所述通信单元包括:
    第二处理子单元,配置用于利用所述业务数据处理线程基于所述权重值,确定对业务数据处理请求的处理顺序,以及基于所述处理顺序,依次对业务数据处理请求进行处理。
  10. 根据权利要求7-9之一所述的装置,其特征在于,所述装置还包括:
    线程数量确定单元,配置用于基于所述业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。
  11. 一种数据传输装置,其特征在于,所述装置包括:
    指令响应单元,配置用于响应于输入的对待处理业务数据的处理指令,生成连接请求;
    发送单元,配置用于将所述连接请求发送至服务端,以及接收服务端返回的响应于所述连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;
    生成单元,配置用于生成业务数据处理请求,所述业务数据处理请求包含所述待处理业务数据所属的业务类型以及所述传输用接口的标识;
    请求发送单元,配置用于将所述业务数据处理请求发送至服务端,通过所述传输用接口的标识对应的传输用接口与服务端传输业务数据,所述业务数据包括经由所述业务类型对应的业务数据处理线程对所述业务数据处理请求进行处理之后得到业务数据。
  12. 根据权利要求11所述的装置,其特征在于,所述业务数据处 理请求还包括:用于表征待处理业务数据对应的紧急程度的权重值。
  13. 一种设备,包括:
    处理器;和
    存储器,
    所述存储器中存储有能够被所述处理器执行的计算机可读指令,在所述计算机可读指令被执行时,所述处理器执行权利要求1至6中任一项所述的方法。
  14. 一种非易失性计算机存储介质,所述计算机存储介质存储有能够被处理器执行的计算机可读指令,当所述计算机可读指令被处理器执行时,所述处理器执行权利要求1至6中任一项所述的方法。
PCT/CN2015/099895 2015-09-08 2015-12-30 数据传输方法和装置 WO2017041398A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510567996.9A CN105071976B (zh) 2015-09-08 2015-09-08 数据传输方法和装置
CN201510567996.9 2015-09-08

Publications (1)

Publication Number Publication Date
WO2017041398A1 true WO2017041398A1 (zh) 2017-03-16

Family

ID=54501263

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/099895 WO2017041398A1 (zh) 2015-09-08 2015-12-30 数据传输方法和装置

Country Status (2)

Country Link
CN (1) CN105071976B (zh)
WO (1) WO2017041398A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941498A (zh) * 2019-10-22 2020-03-31 贝壳技术有限公司 一种数据处理方法、装置和存储介质
CN111415263A (zh) * 2020-04-07 2020-07-14 中国建设银行股份有限公司 数据匹配方法和装置
CN111597057A (zh) * 2020-04-08 2020-08-28 视联动力信息技术股份有限公司 数据处理方法、装置及计算机可读存储介质
CN111767093A (zh) * 2020-06-29 2020-10-13 北京字节跳动网络技术有限公司 数据处理方法、设备和存储介质
CN111880743A (zh) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 一种数据存储方法、装置、设备及存储介质
CN113497783A (zh) * 2020-03-19 2021-10-12 北京沃东天骏信息技术有限公司 处理数据的方法和装置
CN113760561A (zh) * 2020-06-17 2021-12-07 北京沃东天骏信息技术有限公司 一种数据处理方法和装置
CN114090112A (zh) * 2021-10-27 2022-02-25 青岛海尔科技有限公司 配置文件的加载方法和装置、存储介质及电子装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105071976B (zh) * 2015-09-08 2019-05-03 安一恒通(北京)科技有限公司 数据传输方法和装置
WO2017113193A1 (zh) * 2015-12-30 2017-07-06 华为技术有限公司 报文处理方法、网关用户面实体、网关控制面实体及网关
CN107204908A (zh) 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 一种基于通信接口框架的消息发送、接收方法及装置
CN108230052A (zh) * 2016-12-22 2018-06-29 航天信息股份有限公司 一种发票开具及上传方法和系统
CN108279973B (zh) * 2017-01-05 2022-05-06 阿里巴巴集团控股有限公司 一种信息统计方法、装置及电子设备
CN107273190A (zh) * 2017-05-19 2017-10-20 武汉票据交易中心有限公司 一种批量定时业务处理方法和系统
CN109451035A (zh) * 2018-12-04 2019-03-08 宁波耘瑞智能科技有限公司 一种分离式集群代理与服务的方法、装置及系统
CN110177127B (zh) * 2019-04-15 2021-12-07 创新先进技术有限公司 基于grpc框架的数据传输方法、装置及设备
CN110891092B (zh) * 2019-12-09 2022-09-23 北京布袋森林科技有限责任公司 一种数据压缩传输方法及装置
CN111460129B (zh) * 2020-03-27 2023-08-22 泰康保险集团股份有限公司 标识生成的方法、装置、电子设备和存储介质
CN116828022B (zh) * 2023-08-30 2023-11-24 北京白龙马云行科技有限公司 管理与服务器的连接关系的方法、装置、设备和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001022215A1 (en) * 1999-09-24 2001-03-29 Sun Microsystems, Inc. Mechanism for implementing multiple thread pools in a computer system to optimize system performance
CN102916953A (zh) * 2012-10-12 2013-02-06 青岛海信传媒网络技术有限公司 基于tcp连接实现并发服务的方法及装置
CN104219231A (zh) * 2014-08-25 2014-12-17 华中科技大学 一种基于Android系统的多协议通讯框架及通讯方法
CN104572290A (zh) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 消息处理线程的控制方法及装置
CN105071976A (zh) * 2015-09-08 2015-11-18 安一恒通(北京)科技有限公司 数据传输方法和装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100359474C (zh) * 2005-06-24 2008-01-02 中国人民解放军国防科学技术大学 构建基于软流水结构的Web服务器的方法
US8205202B1 (en) * 2008-04-03 2012-06-19 Sprint Communications Company L.P. Management of processing threads
CN102510398B (zh) * 2011-10-26 2015-01-21 航天科工深圳(集团)有限公司 一种并发请求处理方法、装置及服务器
CN102447628B (zh) * 2011-12-22 2014-07-02 苏州阔地网络科技有限公司 一种数据包传输处理方法及系统
CN102868600B (zh) * 2012-09-10 2015-07-08 北京用友政务软件有限公司 一种多线程报文转发方法及系统
CN104519095B (zh) * 2013-09-29 2019-01-25 重庆新媒农信科技有限公司 一种动态消息推送方法及其系统、服务端、客户端
CN103826119A (zh) * 2014-02-27 2014-05-28 珠海迈越信息技术有限公司 一种机顶盒调试装置和方法
CN104133724B (zh) * 2014-04-03 2015-08-19 腾讯科技(深圳)有限公司 并发任务调度方法及装置
CN104519129A (zh) * 2014-12-16 2015-04-15 京信通信系统(中国)有限公司 一种数据传输方法、设备及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001022215A1 (en) * 1999-09-24 2001-03-29 Sun Microsystems, Inc. Mechanism for implementing multiple thread pools in a computer system to optimize system performance
CN102916953A (zh) * 2012-10-12 2013-02-06 青岛海信传媒网络技术有限公司 基于tcp连接实现并发服务的方法及装置
CN104572290A (zh) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 消息处理线程的控制方法及装置
CN104219231A (zh) * 2014-08-25 2014-12-17 华中科技大学 一种基于Android系统的多协议通讯框架及通讯方法
CN105071976A (zh) * 2015-09-08 2015-11-18 安一恒通(北京)科技有限公司 数据传输方法和装置

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941498B (zh) * 2019-10-22 2022-09-23 贝壳找房(北京)科技有限公司 一种数据处理方法、装置和存储介质
CN110941498A (zh) * 2019-10-22 2020-03-31 贝壳技术有限公司 一种数据处理方法、装置和存储介质
CN113497783B (zh) * 2020-03-19 2024-01-16 北京沃东天骏信息技术有限公司 处理数据的方法和装置
CN113497783A (zh) * 2020-03-19 2021-10-12 北京沃东天骏信息技术有限公司 处理数据的方法和装置
CN111415263A (zh) * 2020-04-07 2020-07-14 中国建设银行股份有限公司 数据匹配方法和装置
CN111597057A (zh) * 2020-04-08 2020-08-28 视联动力信息技术股份有限公司 数据处理方法、装置及计算机可读存储介质
CN111597057B (zh) * 2020-04-08 2023-05-02 视联动力信息技术股份有限公司 数据处理方法、装置及计算机可读存储介质
CN113760561A (zh) * 2020-06-17 2021-12-07 北京沃东天骏信息技术有限公司 一种数据处理方法和装置
CN111767093B (zh) * 2020-06-29 2023-08-08 抖音视界有限公司 数据处理方法、设备和存储介质
CN111767093A (zh) * 2020-06-29 2020-10-13 北京字节跳动网络技术有限公司 数据处理方法、设备和存储介质
CN111880743A (zh) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 一种数据存储方法、装置、设备及存储介质
CN114090112A (zh) * 2021-10-27 2022-02-25 青岛海尔科技有限公司 配置文件的加载方法和装置、存储介质及电子装置
CN114090112B (zh) * 2021-10-27 2023-06-16 青岛海尔科技有限公司 配置文件的加载方法和装置、存储介质及电子装置

Also Published As

Publication number Publication date
CN105071976B (zh) 2019-05-03
CN105071976A (zh) 2015-11-18

Similar Documents

Publication Publication Date Title
WO2017041398A1 (zh) 数据传输方法和装置
EP3718008B1 (en) Provisioning using pre-fetched data in serverless computing environments
WO2015051690A1 (zh) 一种基于zookeeper的信息配置方法及装置
EP3562096B1 (en) Method and device for timeout monitoring
US9699276B2 (en) Data distribution method and system and data receiving apparatus
CN109218356B (zh) 管理服务器上有状态应用的方法和设备
US20130326502A1 (en) Installing applications remotely
US20120254204A1 (en) Techniques to manage file conversions
US20140250158A1 (en) Method and device for obtaining file
WO2019128357A1 (zh) 图片请求方法、响应图片请求的方法及客户端
US8856385B1 (en) Image display method and apparatus
WO2018049933A1 (zh) 数据迁移方法及相关产品
US10404797B2 (en) Supporting multiple clipboard items in a virtual desktop infrastructure environment
US9860307B2 (en) System and method for virtual desktop infrastructure user level virtual channel
CN110798495B (zh) 用于在集群架构模式下端到端的消息推送的方法和服务器
US10135752B2 (en) Expansion device for virtual interface and network server system thereof
US20230063599A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN115378937B (zh) 任务的分布式并发方法、装置、设备和可读存储介质
US9450906B2 (en) Managing a messaging queue in an asynchronous messaging system
US10250515B2 (en) Method and device for forwarding data messages
CN115454666A (zh) 消息队列集群间的数据同步方法和装置
CN112187916B (zh) 一种跨系统的数据同步方法与装置
CN115269063A (zh) 进程创建方法、系统、设备及介质
US11509562B1 (en) System and method for a system level data sharding analysis of information handling systems
CN115174588B (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: 15903500

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 05/07/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 15903500

Country of ref document: EP

Kind code of ref document: A1