[go: up one dir, main page]

CN105071976B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN105071976B
CN105071976B CN201510567996.9A CN201510567996A CN105071976B CN 105071976 B CN105071976 B CN 105071976B CN 201510567996 A CN201510567996 A CN 201510567996A CN 105071976 B CN105071976 B CN 105071976B
Authority
CN
China
Prior art keywords
data processing
business
service data
business data
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510567996.9A
Other languages
Chinese (zh)
Other versions
CN105071976A (en
Inventor
易鸿斌
聂科峰
陈唐晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Iyuntian Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Iyuntian Co ltd filed Critical Iyuntian Co ltd
Priority to CN201510567996.9A priority Critical patent/CN105071976B/en
Publication of CN105071976A publication Critical patent/CN105071976A/en
Priority to PCT/CN2015/099895 priority patent/WO2017041398A1/en
Application granted granted Critical
Publication of CN105071976B publication Critical patent/CN105071976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

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

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

The present application discloses a data transmission method and device. A specific implementation of the method includes: in response to a connection request sent by a client, generating a transmission interface for transmitting business data with the client; receiving a business data processing request for business data to be processed sent by the client, the business data processing request including the business type to which the business data to be processed belongs; based on the business type, determining a business data processing thread for processing the business data processing request; processing the business data processing request using the business data processing thread, and transmitting the business data obtained after the business data processing request is processed by the business data processing thread to the client through the transmission interface. This avoids the problem of increased system overhead caused by the need to perform synchronization operations between threads corresponding to the transmission interface when data is transmitted through the transmission interface, and reduces the system overhead when transmitting data.

Description

Data transmission method and device
Technical field
This application involves computer fields, and in particular to network technique field more particularly to data transmission method and device.
Background technique
In data transmission between process, pass through data transmission interface (such as application programming interface, socket) Carry out data transmission being a kind of common communication mode.In known technology, carried out data transmission by data transmission interface PROCESS OVERVIEW it is as follows: one data transfer request of every reception, the transmission interface that creation one is used for transmission data, then, For each transmission interface, creation is obtained for handling the processing thread for the data transfer request for being sent to transmission interface To data after processing, data after processing are transmitted finally by the transmission of data interface is used for transmission.
However, when being carried out data transmission using aforesaid way, since each is used for transmission the transmission interface of data It is both needed to a corresponding processing thread.On the one hand, cause number of threads more, increase system load.On the other hand, to avoid thread Between same type of transmission data are carried out handling caused access conflict, need to synchronizing behaviour between thread Make, further increases the overhead when carrying out data transmission using transmission interface.
Summary of the invention
This application provides data transmission methods and device, ask for solving technology existing for above-mentioned background technology part Topic.
In a first aspect, this application provides data transmission methods, this method comprises: the connection sent in response to client is asked It asks, generates for the transmission interface with client transmissions business datum;Receive client transmission treats processing business data Business data processing request, business data processing request include business datum to be processed belonging to type of service;Based on business Type determines the business data processing thread for being used for processing business data processing request;Using business data processing thread to industry Business data processing request is handled, and passes through transmission interface and client transmissions via business data processing thread to industry The business datum that business data processing request obtains after being handled.
Second aspect, this application provides data transmission methods, this method comprises: treating processing business in response to input The process instruction of data generates connection request;Connection request is sent to server-side, and receive that server-side returns in response to Connection request and generate for mark with the transmission interface of server-side transmission services data;Business data processing is generated to ask It asks, the mark of interface is used in business data processing request comprising type of service belonging to business datum to be processed and transmission;By industry Business data processing request is sent to server-side, transmits industry by the corresponding transmission interface of the mark of transmission interface and server-side Be engaged in data, business datum include via the corresponding business data processing thread of type of service to business data processing request at Business datum is obtained after reason.
The third aspect, this application provides data transmission device, which includes: response unit, be configured in response to The connection request that client is sent is generated for the transmission interface with client transmissions business datum;Receiving unit, configuration are used It is requested in receiving the business data processing for treating processing business data that client is sent, business data processing request includes wait locate Manage type of service belonging to business datum;Determination unit is configured to determine based on type of service at processing business data Manage the business data processing thread of request;Communication unit is configured to using business data processing thread to business data processing Request is handled, and passes through transmission interface and client transmissions via business data processing thread to business data processing The business datum that request obtains after being handled.
Fourth aspect, this application provides data transmission device, which includes: instruction response unit, is configured to ring Connection request should be generated in the process instruction for treating processing business data of input;Transmission unit is configured to connection request Be sent to server-side, and being generated in response to connection request of receiving that server-side returns be used for and server-side transmission services number According to transmission interface mark;Generation unit is configured to generate business data processing request, business data processing request packet Mark containing type of service belonging to business datum to be processed and transmission interface;Request transmitting unit is configured to industry Business data processing request is sent to server-side, transmits industry by the corresponding transmission interface of the mark of transmission interface and server-side Be engaged in data, business datum include via the corresponding business data processing thread of type of service to business data processing request at Business datum is obtained after reason.
Data transmission method and device provided by the present application are generated and are used by the connection request sent in response to client In the transmission interface with client transmissions business datum;Receive the business datum for treating processing business data that client is sent Processing request;Based on type of service, the business data processing thread for being used for processing business data processing request is determined;Utilize business Data processing threads handle business data processing request, and by transmission interface and client transmissions via business The business datum that data processing threads obtain after being handled business data processing request.So as to avoid passing through transmission When being carried out data transmission with interface, because needing to transmission increase caused by synchronizing operation between the corresponding thread of interface The problem of overhead, reduces the overhead when transmitting data.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 shows the flow charts according to one embodiment of the data transmission method of the application;
Fig. 3 shows the schematic diagram for generating transmission interface;
Fig. 4, which is shown, requests the schematic diagram handled to business data processing;
Fig. 5 shows the flow chart of another embodiment of the data transmission method according to the application;
Fig. 6 shows the structural schematic diagram of one embodiment of the data transmission device according to the application;
Fig. 7 shows the structural schematic diagram of another embodiment of the data transmission device according to the application;
Fig. 8 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application Figure.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the exemplary system of the embodiment of the data transmission method or data transmission device of the application System framework 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of transmission link.Network 104 can be with Including various connection types, such as wired, wireless transmission link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various communication applications can be installed, such as network security class is applied, immediately on terminal device 101,102,103 Means of communication etc..
Terminal device 101,102,103 can be with display screen and support the various electronic equipments of network communication, packet Include but be not limited to smart phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) it is player, on knee portable Computer and desktop computer etc..
Server 105 can be to provide the server of various services, such as to the network on terminal device 101,102,103 Security classes application provides the background server supported.Background server can be to data such as the business data processing requests received It carries out the processing such as analyzing, and processing result (such as business datum) is fed back into terminal device.
It should be noted that in the embodiment of the present application, client, server-side and the equipment for being not specific to a certain type.With more For carrying out data transmission between a process, the process for issuing data processing request can be referred to as client, can will used It is referred to as server-side in the process of processing data processing request.Above-mentioned client, server-side can run on identical terminal device 101,102,103 or server 105 on, can also run on different terminal device 101,102,103 or server 105 it On.Correspondingly, the terminal device 101,102,103 or server 105 that can be operated in by client, server-side execute sending Data processing request and the operation for handling data processing request.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Referring to FIG. 2, it illustrates the processes 200 according to one embodiment of the data transmission method of the application.It needs Illustrate, in the present embodiment, transmission interface can be the communication interface for multiple interprocess communications.When multiple processes When running on local positioned at same equipment (such as server shown in FIG. 1 or terminal) i.e. multiple processes, then transmitting can with interface Think local interface (such as application programming interface).When to be located at different equipment (such as shown in FIG. 1 for multiple processes Server or terminal) when, then transmission interface can be network interface (such as socket).Data provided by the present embodiment pass Transmission method can be executed by terminal device 101,102,103 or server 105.Method includes the following steps:
Step 201, the connection request sent in response to client is generated for the transmission with client transmissions business datum Use interface.
In the present embodiment, connection request can be the connection request of the operation for triggering creation transmission interface.Example Such as, when transmission is socket with interface, then the connection request can be socket connection request.Data transmission method is run on Electronic equipment (such as server shown in FIG. 1 or terminal) thereon can pass through wired connection mode or radio connection Connection request is received from client.It should be pointed out that above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other now The radio connection known or developed in the future.
Referring to FIG. 3, it illustrates the schematic diagrams for generating transmission interface.Fig. 3 is to be using transmission with interface as socket Example illustrates to create transmission interface, that is, transmission socket principle in response to connection request.In fig. 3 it is shown that monitoring set Connect word 301, transmission socket 302, client 303.Wherein, monitoring socket 301 can be in the company for receiving client transmission It is created before connecing request.It can use and monitor the connection request that socket monitoring client 303 is sent.By monitoring socket While being monitored to connection request, it can create further in response to the connection request of client for being passed with client The transmission of defeated business datum socket 302.In the present embodiment, creation transmission when with interface can be socket based on transmission With the principle of interface, creation for the communication between local process transmission with interface (such as application programming interface).
In the present embodiment, after creating transmission interface, it can use transmission interface and client carry out data Transmission.For example, transmission interface can be written in data to be transmitted, it is then forwarded to client, in another example, it can be used from transmission The data that reading client is sent in interface.In the present embodiment, when multiple client issues connection request, table can be generated Sign client connect list with the client of interface corresponding relationship with transmission, every to increase a client connection, can create One transmission interface is used for and newly increases client and carry out data transmission.
Step 202, the business data processing request for treating processing business data that client is sent is received.
In the present embodiment, business data processing request includes type of service belonging to business datum to be processed.In this reality It applies in example, can will be referred to as business for the service that client provides.For example, can to the network security class service that client provides A type of service can be corresponded to comprising searching solution, updating business, each business such as virus base, correspondingly, with The associated data of type of service can be referred to as business datum.In the present embodiment, in the connection request in response to client, After the transmission interface for creating transmission services data, the business data processing request of client transmission can be further received.
In the present embodiment, according to the difference of business data processing request type, business data processing request it is corresponding to Processing business data are also different.For example, when to obtain newest virus base data mounted thereto to update for client expectation When the virus base of network security class application, then what business data processing request can send for client is used to obtain newest disease The request of malicious library data, correspondingly, business datum to be processed can it is expected the newest virus base data obtained for user.Example again Such as, when client needs to upload wrong data it is expected to find out corresponding solution, then business data processing request can Think the request for being used to handle the wrong data that client uploads (such as reception) that client is sent, accordingly Ground, the wrong data that business datum to be processed can upload for client.
Step 203, it is based on type of service, determines the business data processing thread for being used for processing business data processing request.
In the present embodiment, the type of the business datum in being requested based on the business data processing of client transmission, Determine the business data processing thread for being used for processing business data processing request.For example, when client expectation obtains newest disease When malicious library data are to update the virus base in network security class application mounted thereto, business datum to be processed can be user It is expected that the newest virus base data obtained.Type of service belonging to the business datum to be processed can update for virus base data This type of service can be based on the type of service, determine the business data processing line for being used for processing business data processing request Journey, i.e., for obtaining newest virus base data and sending the business data processing line of newest viral data to client Journey.
In some optionally implementations of the present embodiment, further includes: the quantity based on type of service is pre-created more A business data processing thread, wherein the corresponding type of service of each business data processing thread.In the present embodiment, It can be directed to each type of service, create a business data processing thread corresponding with type of service.
In the present embodiment, the work for handling the requests such as connection request, business data processing request can be pre-created Make thread.When a connection request is received, then transmission interface is created.It, then can be with when receiving business data processing request According to the type of business datum to be processed, business data processing request is sent to its corresponding business data processing thread and is carried out Processing.In the present embodiment, worker thread can also receive the request that is operated with interface to transmission (such as closing transmission is used The request of interface).
Step 204, business data processing request is handled using business data processing thread, and is used by transmission The business that interface and client transmissions obtain after being handled via business data processing thread business data processing request Data.
In the present embodiment, it can use business data processing thread to handle business data processing request, then Pass through transmission interface and client transmissions business datum.For example, when business data processing request is the newest viral number of acquisition According to library data request when, then its correspond to business data processing thread can obtain newest virus database data, be then written Into transmission interface, it is sent to client.When request of the business data processing request for the wrong data of upload client, Then it corresponds to the wrong data that business data processing thread can be uploaded from transmission with client is read out in interface.
Referring to FIG. 4, it illustrates the schematic diagrams for requesting to be handled to business data processing.In fig. 4 it is shown that objective Family end 401, business data processing thread 402, transmission interface 403.Below with client 1, the client 2 in client 401 And business data processing thread 1, the transmission interface of the transmission in interface 403 1 and biography in business data processing thread 402 It is defeated with for interface 2, illustrating business data processing thread and request business data processing the process handled: client 1 with Client 2 corresponds to business data processing thread 1, i.e., handles client 1 using business data processing thread 1 and client 2 is sent out The business data processing request sent.It is newest for obtaining with client 1 and the business data processing request that client 2 is sent For the request of virus base data, transmission interface 1 and transmission interface 2 be in order to client 1 and 2 transmission services of client Data and the transmission interface created.Then business data processing thread 1 passes through respectively for obtaining most current virus library data Transmission interface 1 and transmission interface 2 send the data to client 1, client 2.Meanwhile can by transmission interface 1 with Transmission is stored with interface 2 and the corresponding relationship of business data processing thread 1, thus, when client 1 and client 2 are sent Business data processing request for request for being handled the wrong data that client uploads when, can be used according to transmission Interface 1 and the transmission corresponding relationship of interface 2 and business data processing thread 1, the business that client 1 and client 2 are sent Data processing request transfers to business data processing thread 1 to be handled, by business data processing thread 1 will based on wrong data and The solution of lookup passes through transmission interface 1 respectively and transmission interface 2 sends the data to client 1, client 2.
In some optionally implementations of the present embodiment, business data processing is asked using business data processing thread Asking and carrying out processing includes: the receiving time requested using business data processing thread based on business data processing, successively to business Data processing request is handled.
In the present embodiment, the business data processing that business data processing thread can receive multiple client transmission is asked It asks, business data processing request can be added in queue according to the time for receiving business data processing request, it can be with elder generation Successively the business data processing request in queue is handled into the mode first gone out.
In some optionally implementations of the present embodiment, business data processing request further includes to be processed for characterizing The weighted value of the corresponding urgency level of business datum;And business data processing is requested to carry out using business data processing thread Processing includes: to be based on weighted value using business data processing thread, determines the processing sequence requested business data processing;And Based on processing sequence, successively business data processing request is handled.
It in the present embodiment, may include that business datum to be processed is corresponding in the business data processing request that client is sent Urgency level weighted value, then, to the higher business datum priority processing of weighted value.For example, for happening suddenly in network The relevant business datum of network safety event, can assign higher weighted value, so that business data processing thread is to the industry Business high priority data is handled.In the present embodiment, can based on the weighted value of the corresponding urgency level of business datum to be processed, It determines the processing sequence requested business data processing, then according to processing sequence, successively business data processing is requested to carry out Processing.
The data transmission method provided by the above embodiment of the application, by being requested for each business data processing, The transmission interface that creation is used for transmission data transfers to different business datums then according to the type of business datum to be processed Processing thread is handled, so as to avoid when being carried out data transmission by transmission interface, because transmission interface is corresponding The problem of increasing overhead caused by simultaneously operating is needed between thread, reduces the overhead when transmitting data.
Referring to FIG. 5, it illustrates the processes 500 according to another embodiment of the data transmission method of the application.This Data transmission method provided by embodiment can be executed by terminal device 101,102,103 or server 105.This method includes Following steps:
Step 501, in response to the process instruction for treating processing business data of input, connection request is generated.
In the present embodiment, connection request can be the connection request of the operation for triggering creation transmission interface.Example Such as, when coffret is socket, then the connection request can be socket connection request.The clothes that server-side can be provided Business is referred to as business.It searches solution for example, the network security class service that server-side provides may include, update virus base etc. Business, each business can correspond to a type of service, and correspondingly, data associated with type of service can be referred to as industry Business data.In the present embodiment, according to the difference of the type of business datum to be processed, corresponding process instruction is also different. For example, then process instruction can be when business datum to be processed is the newest virus base data for needing to obtain from server-side For obtaining the instruction of newest virus base data from server-side.In the present embodiment, processing business data are treated receiving Process instruction after, can in response to process instruction, generate connection request.
Step 502, connection request is sent to server-side, and receives giving birth in response to connection request for server-side return At for mark with the transmission interface of server-side transmission services data.
In the present embodiment, after connection request is sent to server-side, it can receive the response of server-side return In the mark being used for the transmission interface of server-side transmission services data that connection request generates.It can use transmission use The corresponding transmission interface of the mark of interface and server-side transmission services data.
Step 503, business data processing request is generated.
In the present embodiment, business data processing request includes type of service and transmission belonging to business datum to be processed With the mark of interface.
In some optionally implementations of the present embodiment, business data processing request further include: for characterizing wait locate Manage the weighted value of the corresponding urgency level of business datum.It in the present embodiment, can be corresponding urgent previously according to business datum Degree assigns the different weighted values for characterizing its urgency level to different types of business datum.For example, being answered with network security class For, business datum associated with nonbursty network security incident can be assigned to higher weighted value.
Step 504, business data processing request is sent to server-side, passes through the corresponding transmission of the mark of transmission interface With interface and server-side transmission services data.
In the present embodiment, business datum includes via the corresponding business number of type of service belonging to business datum to be processed Business datum is obtained after being handled according to processing thread business data processing request.Business data processing is being requested to send To server-side, business data processing corresponding with type of service belonging to business datum to be processed in server-side can be triggered Thread handles business data processing request, obtains business datum after processing.It is then possible at via business datum The corresponding transmission interface of the mark of transmission interface in reason request, with the business datum of server-side transmission after processing.
Referring to FIG. 6, it illustrates the structural schematic diagrams according to one embodiment of the data transmission device of the application.Dress Setting 600 includes: response unit 601, receiving unit 602, determination unit 603, communication unit 604.Wherein, response unit 601 is matched The connection request for sending in response to client is set, is generated for the transmission interface with client transmissions business datum;It connects Unit 602 is received to be configured to receive the business data processing request for treating processing business data that client is sent, business datum Processing request includes type of service belonging to business datum to be processed;Determination unit 603 is configured to determine based on type of service Business data processing thread for processing business data processing request;Communication unit 604 is configured to using at business datum Lineation journey handles business data processing request, and by transmission interface and client transmissions via business datum at The business datum that lineation journey obtains after being handled business data processing request.
In some optionally implementations of the present embodiment, communication unit 604 includes: that the first processing subelement (does not show Out), it is configured to the receiving time requested using business data processing thread based on business data processing, successively to business datum Processing request is handled.
In some optionally implementations of the present embodiment, business data processing request further includes to be processed for characterizing The weighted value of the corresponding urgency level of business datum, communication unit 604 include: second processing subelement (not shown), and configuration is used In being based on weighted value using business data processing thread, the processing sequence requested business data processing is determined, and based on place It makes sequence in order, successively business data processing request is handled.
In some optionally implementations of the present embodiment, device 600 further include: number of threads determination unit (is not shown Out), it is configured to the quantity based on type of service, multiple business data processing threads are pre-created, wherein each business number According to the corresponding type of service of processing thread.
Referring to FIG. 7, it illustrates the structural schematic diagrams according to another embodiment of the data transmission device of the application. Device 700 includes: instruction response unit 701, transmission unit 702, generation unit 703, request transmitting unit 704.Wherein, it instructs Response unit 701 is configured to the process instruction for treating processing business data in response to input, generates connection request;It sends single Member 702 is configured to for connection request to be sent to server-side, and receives generating in response to connection request for server-side return For mark with the transmission interface of server-side transmission services data;Generation unit 703 is configured to generate business datum The mark of interface is used in processing request, business data processing request comprising type of service belonging to business datum to be processed and transmission Know;Request transmitting unit 704 is configured to request business data processing to be sent to server-side, passes through the mark of transmission interface Corresponding transmission interface and server-side transmission services data, business datum includes via at the corresponding business datum of type of service Lineation journey obtains business datum after being handled business data processing request.
In some optionally implementations of the present embodiment, business data processing request further include: for characterizing wait locate Manage the weighted value of the corresponding urgency level of business datum.
Below with reference to Fig. 8, it illustrates the terminal device for being suitable for being used to realize the embodiment of the present application or the computers of host The structural schematic diagram of system 800.
As shown in figure 8, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and Execute various movements appropriate and processing.In RAM 803, also it is stored with system 800 and operates required various programs and data. CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to always Line 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.; And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon Computer program be mounted into storage section 808 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of Fig. 2-Fig. 7 description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readable Computer program on medium, the computer program include the program code for executing the method for Fig. 2-Fig. 7.Such In embodiment, which can be downloaded and installed from network by communications portion 809, and/or is situated between from detachable Matter 811 is mounted.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer The combination of order is realized.
Involved unit or module can be realized by way of software in the embodiment of the present application, can also be by hard The mode of part is realized.Described unit or module also can be set in the processor, for example, can be described as: a kind of place Managing device includes response unit, receiving unit, determination unit, communication unit.Wherein, the title of these units is under certain conditions simultaneously The restriction to the unit itself is not constituted, for example, response unit is also described as, " connection sent in response to client is asked It asks, generates for the transmission interface with client transmissions business datum ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;It is also possible to Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited One or more program is contained, when one or more of programs are executed by an equipment, so that the equipment: response In the connection request that client is sent, generate for the transmission interface with the client transmissions business datum;Receive client The business data processing for treating processing business data that end is sent is requested, and the business data processing request includes business to be processed Type of service belonging to data;Based on the type of service, the business number for handling the business data processing request is determined According to processing thread;Business data processing request is handled using the business data processing thread, and passes through institute State transmission interface and the client transmissions via the business data processing thread to the business data processing request into The business datum obtained after row processing.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (8)

1.一种数据传输方法,其特征在于,所述方法包括:1. a data transmission method, is characterized in that, described method comprises: 响应于客户端发送的连接请求,生成用于与所述客户端传输业务数据的传输用接口;In response to the connection request sent by the client, generating a transmission interface for transmitting service data with the client; 接收客户端发送的对待处理业务数据的业务数据处理请求,所述业务数据处理请求包括待处理业务数据所属的业务类型和用于表征待处理业务数据对应的紧急程度的权重值;Receive a business data processing request for the business data to be processed sent by the client, where the business data processing request includes a business type to which the business data to be processed belongs and a weight value used to represent the urgency degree corresponding to the business data to be processed; 基于所述业务类型,确定用于处理所述业务数据处理请求的业务数据处理线程;determining a service data processing thread for processing the service data processing request based on the service type; 利用所述业务数据处理线程对所述业务数据处理请求进行处理,以及通过所述传输用接口与所述客户端传输经由所述业务数据处理线程对所述业务数据处理请求进行处理之后得到的业务数据;The service data processing request is processed by using the service data processing thread, and the service obtained after processing the service data processing request via the service data processing thread is transmitted to the client through the transmission interface data; 其中,所述利用所述业务数据处理线程对所述业务数据处理请求进行处理包括:利用所述业务数据处理线程基于所述权重值,确定对业务数据处理请求的处理顺序;以及基于所述处理顺序,依次对业务数据处理请求进行处理。Wherein, using the business data processing thread to process the business data processing request includes: using the business data processing thread to determine a processing order for the business data processing request based on the weight value; and based on the processing In order, the business data processing requests are processed in turn. 2.根据权利要求1所述的方法,其特征在于,所述利用所述业务数据处理线程对所述业务数据处理请求进行处理包括:2. The method according to claim 1, wherein the processing the service data processing request by using the service data processing thread comprises: 利用所述业务数据处理线程基于所述业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。The service data processing requests are sequentially processed by the service data processing threads based on the reception time of the service data processing requests. 3.根据权利要求1-2之一所述的方法,其特征在于,所述方法还包括:基于所述业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。3. The method according to one of claims 1-2, characterized in that the method further comprises: creating a plurality of service data processing threads in advance based on the number of the service types, wherein each service data processing thread Corresponds to a business type. 4.一种数据传输方法,其特征在于,所述方法包括:4. A data transmission method, characterized in that the method comprises: 响应于输入的对待处理业务数据的处理指令,生成连接请求;In response to the input processing instruction of the business data to be processed, a connection request is generated; 将所述连接请求发送至服务端,以及接收服务端返回的响应于所述连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;Sending the connection request to the server, and receiving the identifier of the interface for transmitting business data with the server and generated in response to the connection request returned by the server; 生成业务数据处理请求,所述业务数据处理请求包含所述待处理业务数据所属的业务类型、所述传输用接口的标识以及用于表征待处理业务数据对应的紧急程度的权重值;generating a service data processing request, where the service data processing request includes a service type to which the service data to be processed belongs, an identifier of the transmission interface, and a weight value used to characterize the urgency degree corresponding to the service data to be processed; 将所述业务数据处理请求发送至服务端,通过所述传输用接口的标识对应的传输用接口与服务端传输业务数据,所述业务数据包括经由所述业务类型对应的业务数据处理线程对所述业务数据处理请求进行处理之后得到业务数据。The service data processing request is sent to the server, and the service data is transmitted through the transmission interface corresponding to the identifier of the transmission interface and the server, and the service data includes the processing thread corresponding to the service type. The business data is obtained after processing the business data processing request. 5.一种数据传输装置,其特征在于,所述装置包括:5. A data transmission device, wherein the device comprises: 响应单元,配置用于响应于客户端发送的连接请求,生成用于与所述客户端传输业务数据的传输用接口;a response unit, configured to generate a transmission interface for transmitting service data with the client in response to the connection request sent by the client; 接收单元,配置用于接收客户端发送的对待处理业务数据的业务数据处理请求,所述业务数据处理请求包括待处理业务数据所属的业务类型和用于表征待处理业务数据对应的紧急程度的权重值;A receiving unit, configured to receive a business data processing request sent by the client for the business data to be processed, the business data processing request including the business type to which the business data to be processed belongs and a weight used to characterize the corresponding urgency of the business data to be processed value; 确定单元,配置用于基于所述业务类型,确定用于处理所述业务数据处理请求的业务数据处理线程;a determining unit, configured to determine a service data processing thread for processing the service data processing request based on the service type; 通信单元,配置用于利用所述业务数据处理线程对所述业务数据处理请求进行处理,以及通过所述传输用接口与所述客户端传输经由所述业务数据处理线程对所述业务数据处理请求进行处理之后得到的业务数据;a communication unit, configured to process the service data processing request by using the service data processing thread, and transmit the service data processing request via the service data processing thread with the client through the transmission interface Business data obtained after processing; 其中,所述通信单元包括:第二处理子单元,配置用于利用所述业务数据处理线程基于所述权重值,确定对业务数据处理请求的处理顺序,以及基于所述处理顺序,依次对业务数据处理请求进行处理。Wherein, the communication unit includes: a second processing sub-unit, configured to use the service data processing thread to determine a processing order for the service data processing request based on the weight value, and to sequentially process the service data based on the processing order Data processing requests are processed. 6.根据权利要求5所述的装置,其特征在于,所述通信单元包括:6. The apparatus according to claim 5, wherein the communication unit comprises: 第一处理子单元,配置用于利用所述业务数据处理线程基于所述业务数据处理请求的接收时间,依次对业务数据处理请求进行处理。The first processing subunit is configured to use the service data processing thread to sequentially process the service data processing requests based on the reception time of the service data processing requests. 7.根据权利要求5-6之一所述的装置,其特征在于,所述装置还包括:7. The device according to one of claims 5-6, wherein the device further comprises: 线程数量确定单元,配置用于基于所述业务类型的数量,预先创建多个业务数据处理线程,其中,每一个业务数据处理线程对应一个业务类型。The thread quantity determining unit is configured to create a plurality of service data processing threads in advance based on the quantity of the service types, wherein each service data processing thread corresponds to a service type. 8.一种数据传输装置,其特征在于,所述装置包括:8. A data transmission device, wherein the device comprises: 指令响应单元,配置用于响应于输入的对待处理业务数据的处理指令,生成连接请求;an instruction response unit, configured to generate a connection request in response to an input processing instruction of the business data to be processed; 发送单元,配置用于将所述连接请求发送至服务端,以及接收服务端返回的响应于所述连接请求而生成的用于与服务端传输业务数据的传输用接口的标识;a sending unit, configured to send the connection request to the server, and to receive the identifier of the interface for transmitting business data with the server and generated in response to the connection request returned by the server; 生成单元,配置用于生成业务数据处理请求,所述业务数据处理请求包含所述待处理业务数据所属的业务类型、所述传输用接口的标识以及用于表征待处理业务数据对应的紧急程度的权重值;The generating unit is configured to generate a business data processing request, where the business data processing request includes the business type to which the business data to be processed belongs, the identifier of the interface used for transmission, and an indicator used to characterize the corresponding urgency of the business data to be processed. Weights; 请求发送单元,配置用于将所述业务数据处理请求发送至服务端,通过所述传输用接口的标识对应的传输用接口与服务端传输业务数据,所述业务数据包括经由所述业务类型对应的业务数据处理线程对所述业务数据处理请求进行处理之后得到业务数据。A request sending unit, configured to send the service data processing request to a server, and transmit service data to the server through a transmission interface corresponding to the identifier of the transmission interface, where the service data includes corresponding to the service type via the service type The service data processing thread obtains service data after processing the service data processing request.
CN201510567996.9A 2015-09-08 2015-09-08 Data transmission method and device Active CN105071976B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510567996.9A CN105071976B (en) 2015-09-08 2015-09-08 Data transmission method and device
PCT/CN2015/099895 WO2017041398A1 (en) 2015-09-08 2015-12-30 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510567996.9A CN105071976B (en) 2015-09-08 2015-09-08 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN105071976A CN105071976A (en) 2015-11-18
CN105071976B true CN105071976B (en) 2019-05-03

Family

ID=54501263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510567996.9A Active CN105071976B (en) 2015-09-08 2015-09-08 Data transmission method and device

Country Status (2)

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

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105071976B (en) * 2015-09-08 2019-05-03 安一恒通(北京)科技有限公司 Data transmission method and device
WO2017113193A1 (en) * 2015-12-30 2017-07-06 华为技术有限公司 Packet-processing method, gateway user plane entity, gateway control plane entity and gateway
CN107204908A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 A kind of message sending, receiving method and device based on interface communication protocol frame
CN108230052A (en) * 2016-12-22 2018-06-29 航天信息股份有限公司 A kind of invoice issuing and method for uploading and system
CN108279973B (en) * 2017-01-05 2022-05-06 阿里巴巴集团控股有限公司 Information statistical method and device and electronic equipment
CN107273190A (en) * 2017-05-19 2017-10-20 武汉票据交易中心有限公司 A kind of batch scheduled service processing method and system
CN109451035A (en) * 2018-12-04 2019-03-08 宁波耘瑞智能科技有限公司 A kind of method, apparatus and system of separate type collection group agent and service
CN110177127B (en) * 2019-04-15 2021-12-07 创新先进技术有限公司 Data transmission method, device and equipment based on grpc framework
CN110941498B (en) * 2019-10-22 2022-09-23 贝壳找房(北京)科技有限公司 Data processing method, device and storage medium
CN110891092B (en) * 2019-12-09 2022-09-23 北京布袋森林科技有限责任公司 Data compression transmission method and device
CN113497783B (en) * 2020-03-19 2024-01-16 北京沃东天骏信息技术有限公司 Method and device for processing data
CN111460129B (en) * 2020-03-27 2023-08-22 泰康保险集团股份有限公司 Method, device, electronic equipment and storage medium for generating identification
CN111415263A (en) * 2020-04-07 2020-07-14 中国建设银行股份有限公司 Data matching method and device
CN111597057B (en) * 2020-04-08 2023-05-02 视联动力信息技术股份有限公司 Data processing method, device and computer readable storage medium
CN113760561B (en) * 2020-06-17 2024-10-18 北京沃东天骏信息技术有限公司 Data processing method and device
CN111767093B (en) * 2020-06-29 2023-08-08 抖音视界有限公司 Data processing method, apparatus and storage medium
CN111880743B (en) * 2020-07-29 2022-07-05 北京浪潮数据技术有限公司 Data storage method, device, equipment and storage medium
CN114090112B (en) * 2021-10-27 2023-06-16 青岛海尔科技有限公司 Method and device for loading configuration file, storage medium and electronic device
CN116828022B (en) * 2023-08-30 2023-11-24 北京白龙马云行科技有限公司 Method, device, equipment and medium for managing connection relation with server
CN119293119B (en) * 2024-12-13 2025-05-13 杭银消费金融股份有限公司 Data trend integration display analysis method and system based on large model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700177A (en) * 2005-06-24 2005-11-23 中国人民解放军国防科学技术大学 Method and Server for Constructing Web Server Based on Soft Flow Structure
CN102868600A (en) * 2012-09-10 2013-01-09 北京用友政务软件有限公司 Method and system for multi-threaded packet forwarding
CN103826119A (en) * 2014-02-27 2014-05-28 珠海迈越信息技术有限公司 Set top box debugging device and method
CN104519129A (en) * 2014-12-16 2015-04-15 京信通信系统(中国)有限公司 Data transmission method, device and system
CN104519095A (en) * 2013-09-29 2015-04-15 重庆新媒农信科技有限公司 Dynamic message pushing method and system thereof, server-side, and client

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6542920B1 (en) * 1999-09-24 2003-04-01 Sun Microsystems, Inc. Mechanism for implementing multiple thread pools in a computer system to optimize system performance
US8205202B1 (en) * 2008-04-03 2012-06-19 Sprint Communications Company L.P. Management of processing threads
CN102510398B (en) * 2011-10-26 2015-01-21 航天科工深圳(集团)有限公司 Request concurrent processing method and device, and server
CN102447628B (en) * 2011-12-22 2014-07-02 苏州阔地网络科技有限公司 Data packet transmission processing method and system
CN102916953B (en) * 2012-10-12 2016-03-09 青岛海信传媒网络技术有限公司 The method and the device that realize concurrent services is connected based on TCP
CN104572290A (en) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 Method and device for controlling message processing threads
CN104133724B (en) * 2014-04-03 2015-08-19 腾讯科技(深圳)有限公司 Concurrent tasks dispatching method and device
CN104219231A (en) * 2014-08-25 2014-12-17 华中科技大学 Multi-protocol communication framework and communication method based on Android system
CN105071976B (en) * 2015-09-08 2019-05-03 安一恒通(北京)科技有限公司 Data transmission method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700177A (en) * 2005-06-24 2005-11-23 中国人民解放军国防科学技术大学 Method and Server for Constructing Web Server Based on Soft Flow Structure
CN102868600A (en) * 2012-09-10 2013-01-09 北京用友政务软件有限公司 Method and system for multi-threaded packet forwarding
CN104519095A (en) * 2013-09-29 2015-04-15 重庆新媒农信科技有限公司 Dynamic message pushing method and system thereof, server-side, and client
CN103826119A (en) * 2014-02-27 2014-05-28 珠海迈越信息技术有限公司 Set top box debugging device and method
CN104519129A (en) * 2014-12-16 2015-04-15 京信通信系统(中国)有限公司 Data transmission method, device and system

Also Published As

Publication number Publication date
CN105071976A (en) 2015-11-18
WO2017041398A1 (en) 2017-03-16

Similar Documents

Publication Publication Date Title
CN105071976B (en) Data transmission method and device
EP3667500B1 (en) Using a container orchestration service for dynamic routing
EP2682863B1 (en) Installing applications remotely
EP3764220B1 (en) Automatic application updates
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
CN105740048B (en) An image management method, device and system
CN108182111A (en) Task scheduling system, method and apparatus
CN113760638B (en) A log service method and device based on kubernetes cluster
CN114328130B (en) Server monitoring method, system, equipment and computer readable storage medium
JP7090131B2 (en) Methods and equipment for generating information
US11924295B2 (en) Serving assets in a networked environment
CN107045452B (en) Virtual machine scheduling method and device
CN114285784B (en) Data transmission and pipeline construction method, device, computing equipment and storage medium
CN114035861B (en) Cluster configuration method, device, electronic device and computer readable medium
CN115378937A (en) Distributed concurrency method, device and equipment for tasks and readable storage medium
CN112559001B (en) Method and device for updating application
CN113923167A (en) Data transmission optimization method in federal learning
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN110196832A (en) For obtaining the method and device of SNAPSHOT INFO
CN110069303A (en) A kind of screen layout's update method and server, electronic equipment and storage medium
US20240004682A1 (en) De-centralized workflow execution
CN111274067B (en) Method and device for executing computing task
EP4304154A1 (en) Information processing device, information processing method, program, and information processing system
CN109769030B (en) Method and apparatus for controlling access of applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190822

Address after: 100085 Beijing, Haidian District, No. ten on the ground floor, No. 10 Baidu building, layer 2

Patentee after: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

Address before: 100091 C, block, building No. 4, Zhongguancun Software Park, No. 8, West flourishing West Road, Beijing, China 1-03

Patentee before: Pacify a Heng Tong (Beijing) Science and Technology Ltd.