CN106095597B - Client data processing method and processing device - Google Patents
Client data processing method and processing device Download PDFInfo
- Publication number
- CN106095597B CN106095597B CN201610370451.3A CN201610370451A CN106095597B CN 106095597 B CN106095597 B CN 106095597B CN 201610370451 A CN201610370451 A CN 201610370451A CN 106095597 B CN106095597 B CN 106095597B
- Authority
- CN
- China
- Prior art keywords
- data
- client
- layer
- pipeline
- extracted
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 26
- 230000003139 buffering effect Effects 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 36
- 230000005540 biological transmission Effects 0.000 claims abstract description 26
- 238000013500 data storage Methods 0.000 claims abstract description 22
- 239000000284 extract Substances 0.000 claims abstract description 21
- 238000010586 diagram Methods 0.000 description 8
- 230000004044 response Effects 0.000 description 6
- 238000000605 extraction Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 2
- 238000007493 shaping process Methods 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of client data processing method, the client data processing method comprises the following steps:The I O layer is when receiving the data of each client transmission, by the data storage received in default buffering area;The distributing layer extracts the data of storage from the default buffering area, and the data extracted are pressed into corresponding pipeline according to the classification for the data extracted;The process layer is handled the data in each pipeline accordingly.The invention also discloses a kind of client data processing unit.The present invention solves server when handling the request of client, the progress in same thread due to read requests and processing request, may result in the problem of confusion and data-handling efficiency in code logic are reduced.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of client data processing method and processing device.
Background technology
Most of server is to handle client request based on sequential iteration, that is, waits client request, then is read
Request, processing request, replys response.But when handling request, it is necessary to which the substantial amounts of cpu times, can cause to other clients
Not in time, this is accomplished by a kind of settling mode, and common settling mode is exactly concurrent for response.Specifically, it is exactly to be each
Client distributes a thread to handle, when there is new client request to come in, and is that it creates a thread, and need for this
Individual thread distributes a socket (commonly referred to as " socket ") and port (port) to carry out I/O operation.However, using this
Kind of mode is carried out during I/O operation, because read requests and processing request are carried out in same thread, when multiple client is same
When making requests on, the confusion in code logic may be caused, and then cause data-handling efficiency to reduce.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill
Art.
The content of the invention
It is a primary object of the present invention to provide a kind of client data processing method and processing device, it is intended to which settlement server exists
When handling the request of client, the progress in same thread due to read requests and processing request may result in code and patrol
The problem of confusion and data-handling efficiency on volume are reduced.
To achieve the above object, a kind of client data processing method that the present invention is provided, it is described applied in server
Server includes I O layer, distributing layer and process layer, and the client data processing method comprises the following steps:
The I O layer is when receiving the data of each client transmission, by the data storage received in default buffering
Qu Zhong;
The distributing layer extracts the data of storage from the default buffering area, and according to the classification for the data extracted
The data extracted are pressed into corresponding pipeline;
The process layer is handled the data in each pipeline accordingly.
Alternatively, the I O layer is when receiving the data of each client transmission, by the data storage received in pre-
If buffering area in step include:
The I O layer obtains the address for the client for sending the data when receiving the data of each client transmission
Information;
The address information is added to the head of the data received by the I O layer;
The I O layer will include the data storage of header information in default buffering area.
Alternatively, the distributing layer extracts the data of storage from the default buffering area, and according to the number extracted
According to classification the step that the data extracted are pressed into corresponding pipeline is included:
The distributing layer extracts the data of storage from the default buffering area, and according to the head for the data extracted
Information is classified to the data extracted;
The distributing layer sets up corresponding pipeline according to the classification for the data extracted;
The data extracted are pressed into corresponding pipeline by the distributing layer.
Alternatively, the data extracted are pressed into before the step in corresponding pipeline by the distributing layer, in addition to:
The distributing layer removes the header information for the data extracted.
Alternatively, the step of process layer is carried out and handled accordingly to the data in each pipeline includes:
The process layer be each pipeline distribute a worker thread, with by the worker thread to the data in pipeline
Handled accordingly.
In addition, to achieve the above object, the present invention also provides a kind of client data processing unit, the client data
Processing unit includes;
Memory module, for when receiving the data of each client transmission, by the data storage received in default
Buffering area in;
Press-in module, the data for extracting storage from the default buffering area, and according to the data extracted
The data extracted are pressed into corresponding pipeline by classification;
Processing module, for being handled accordingly the data in each pipeline.
Alternatively, the memory module includes:
Acquiring unit, for when receiving the data of each client transmission, obtaining the client for sending the data
Address information;
Adding device, the head for the address information to be added to the data received;
Memory cell, for the data storage by header information is included in default buffering area.
Alternatively, the press-in module includes:
Taxon, the data for extracting storage from the default buffering area, and according to the data extracted
Header information is classified to the data extracted;
Unit is set up, for setting up corresponding pipeline according to the classification for the data extracted;
Unit is pressed into, for the data extracted to be pressed into corresponding pipeline.
Alternatively, the press-in module also includes:
Unit is removed, for the header information for the data extracted to be removed.
Alternatively, the processing module, is additionally operable to distribute a worker thread for each pipeline, to pass through the active line
Journey is handled the data in pipeline accordingly.
Client data processing method and processing device proposed by the present invention, each client hair is being received by the I O layer
During the data sent, by the data storage received in default buffering area;The distributing layer is from the default buffering area
The data of storage are extracted, and the data extracted are pressed into corresponding pipeline according to the classification for the data extracted;Institute
Process layer is stated to handle the data in each pipeline accordingly.Request to client by the way of Multilevel method is carried out
Processing so that the read requests in client request and processing request no longer same layer are handled, it is to avoid when receiving
The code of the codes of the read requests of multiple client and processing request due within the same layer may caused by code logic
Confusion, while handled by multiple layers the data of client, improve the efficiency to client data processing.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the first embodiment of client data processing method of the present invention;
Fig. 2 be Fig. 1 of the present invention in I O layer receive each client send data when, the data received are deposited
It is stored in the step refinement schematic flow sheet in default buffering area;
Fig. 3 extracts the data of storage for the distributing layer in Fig. 1 from the default buffering area, and according to the number extracted
According to the step that is pressed into the data extracted in corresponding pipeline of classification refine schematic flow sheet;
Fig. 4 extracts the data of storage for the distributing layer in Fig. 1 of the present invention from the default buffering area, and according to extraction
To another steps for being pressed into the data extracted in corresponding pipeline of classification of data refine schematic flow sheet;
Fig. 5 is the high-level schematic functional block diagram of the first embodiment of client data processing unit of the present invention;
Fig. 6 be Fig. 5 of the present invention in memory module refinement high-level schematic functional block diagram;
Fig. 7 be Fig. 5 of the present invention in press-in module refinement high-level schematic functional block diagram;
Fig. 8 be Fig. 5 of the present invention in press-in module another refinement high-level schematic functional block diagram.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Based on above mentioned problem, the present invention provides a kind of client data processing method, applied in server, the service
Device includes I O layer, distributing layer and process layer.
Reference picture 1, Fig. 1 is the schematic flow sheet of the first embodiment of client data processing method of the present invention.
In the present embodiment, the client data processing method includes:
Step S10, the I O layer is when receiving the data of each client transmission, by the data storage received in pre-
If buffering area in;
The client data processing method that the present invention is provided, the difference with existing technical scheme is to use layered shaping
Mode the data of client are handled, the treatment effeciency to the data of client can be improved.Specifically, in the present invention
Server logic on can be divided into three layers, respectively I O layer, distributing layer and process layer.The I O layer is to be based on completing port
, IO completing ports are a kind of mechanism, by this mechanism, and application program can create a thread pool first on startup, so
The application program is asked using thread pool processing asynchronous I/O afterwards.The sole purpose that these threads are created is exactly to be used to handle I/O
Request.For handling the application program of a large amount of concurrent asynchronous I/O requests, thread is created compared to when I/O is asked and occurred
For, using completing port can just do faster and more efficiently.Due to the I O layer be based on completing port, therefore,
The I O layer, that is, can be at once when receiving the I/O requests of each client when receiving the data of each client transmission
The data sent using multiple thread reading clients in the I O layer, each thread reads the I/O requests of a client,
Receive the data storage for this being received after the data of client transmission in default buffering area.The default buffering area is
The storage at the end for the pipeline buffer that the worker thread of the I O layer is pre-established is interval.I.e. each I O layer will received
All it is that the storage of the interval most end of the remaining storage stored data in pipeline buffer is interval when in data deposit pipeline
In.In the present embodiment, the I O layer only receives the data of each client transmission, without the data sent to each client
Handled, i.e. I/O request of the worker thread in I O layer only to each client is read out, without to each client
Request is handled.
Step S20, the distributing layer extracts the data of storage from the default buffering area, and according to the number extracted
According to classification the data extracted are pressed into corresponding pipeline;
The distributing layer is real-time or checks at that time with the presence or absence of data in the default memory block in pipeline, if in the pipeline
Pre-set buffer area in there are data, then the distributing layer reads the data of storage from the default memory block of the pipeline.Specifically
, the distributing layer can extract the data in the pipeline pre-set buffer area by the worker thread in the floor, extract number
According to rear, it is determined that the classification for the data extracted, the i.e. data extracted are the data transmitted by which client, it is determined that carrying
After the classification for the data got, the data are pressed into corresponding pipeline.The distributing layer can be according to the data extracted
Classification is set up in pipeline, the other data press-in identical pipeline of same class, different classes of data press-in different pieces of information classification
In corresponding pipeline.When the distributing layer often determines a new classification according to the data of extraction, a pipeline is just newly created,
It can be pressed into corresponding pipeline for the data of the category.
Step S30, the process layer is handled the data in each pipeline accordingly.
Because each pipeline correspond to a long-range client, therefore, the process layer can be to each client
The data of transmission are handled.
Specifically, the step S30 includes:The process layer is that each pipeline distributes a worker thread, to pass through institute
Worker thread is stated to handle the data in pipeline accordingly.
The process layer is one worker thread of distribution in each pipeline, and the data in pipeline are entered by the worker thread
The operations such as row reading, storage, processing, and response.Simultaneously as a worker thread is all assigned with each pipeline, therefore right
Temporary transient interruption when data in each pipeline carry out processing operation does not interfere with the processing and response of the data of other clients.
The present embodiment by the I O layer receive each client send data when, by the data storage received
In default buffering area;The distributing layer extracts the data of storage from the default buffering area, and according to extracting
The data extracted are pressed into corresponding pipeline by the classification of data;The process layer is carried out to the data in each pipeline
Corresponding processing.Request to client by the way of Multilevel method is handled so as to the reading in client request
Request and processing request no longer same layer are handled, it is to avoid code and place when the read requests that receive multiple client
The code of request is managed due to confusion within the same layer caused by possibility in code logic, while by multiple layers to client
Data are handled, and improve the efficiency to client data processing.
Further, reference picture 2, Fig. 2 illustrates for the flow of the second embodiment of client data processing method of the present invention
Figure.Based on the first embodiment of above-mentioned client data processing method, the step S10 includes:
Step S11, the I O layer obtains the client for sending the data when receiving the data of each client transmission
The address information at end;
The address information is added to the head of the data received by step S12, the I O layer;
Step S13, the I O layer will include the data storage of header information in default buffering area.
Address information, that is, the data received are not included because the I O layer is received in the data of each client transmission
In do not include the address information of the client for sending the data, the local address of the address information including client and port
Number, for example, local address:192.168.1.99, port numbers:2400.Therefore, in order to which the data sent to each client are carried out
Classification difference, it is necessary to receive each client transmission data when, obtain send the data client address information,
The local address and port numbers for the client for sending the data are obtained, the I O layer can be carried out by client and server
Communicate the address information that the client for sending the data is obtained in the socket created.The I O layer is being got described in transmission
After the address information of the client of data, the address information is added to the head of the data received so that receive
To data all include the address information of data source, improved so as to receive data to this for distributing layer and carry out forward process
Necessary identification information.I O layer includes this institute on head after address information is added into the head of the data received
Data storage is stated in default buffering area.
The present embodiment, when receiving the data that each client is sent, is obtained by the I O layer and sends the data
The address information of client, and by the address information added to the head of the data received, so as to be the distribution
Layer to this receive data carry out forward process improve necessary identification information so that the distributing layer can accurately will respectively
The data distribution that individual client is sent is into each request processing thread.
Further, reference picture 3, Fig. 3 illustrates for the flow of the 3rd embodiment of client data processing method of the present invention
Figure.Based on the second embodiment of above-mentioned client data processing method, the step S20 includes:
Step S21, the distributing layer extracts the data of storage from the default buffering area, and according to the number extracted
According to header information the data extracted are classified;
Step S22, the distributing layer sets up corresponding pipeline according to the classification for the data extracted;
The data extracted are pressed into corresponding pipeline by step S23, the distributing layer.
The distributing layer from the default buffering area after the data of storage are extracted, to the data extracted
Classified.Specifically, the distributing layer is classified according to the header information for the data extracted, due to the data extracted
Header information be client address information, it is therefore when classifying to the data that each is extracted, header information is consistent
Data be divided into a class, the inconsistent data of header information are divided into different classifications.After the data extracted are classified,
The distributing layer sets up corresponding pipeline according to the classification of data, and the data of each class set up a pipeline, there are how many classes
Other data just set up how many pipelines, and the data for example extracted have 8 classes, then need to set up 8 pipelines altogether.Described point
Layer is sent out when setting up pipeline, can not find that the data of a new category just set up a new pipeline, however, it is determined that the extraction
Data be existing classification data, then need not resettle pipeline.Distributing layer is after pipeline is set up, you can by each classification
Data are respectively pressed into the pipeline corresponding with its classification.
The present embodiment for every class data by all setting up a corresponding pipeline so that the processing to each client data
Much sooner, accurately, will not confusion reigned.
Further, reference picture 4, Fig. 4 illustrates for the flow of the fourth embodiment of client data processing method of the present invention
Figure.Based on the 3rd embodiment of above-mentioned client data processing method, before the step S23, in addition to:
Step S24, the distributing layer removes the header information for the data extracted.
The distributing layer is set up after corresponding pipeline according to the classification for the data extracted, due to the data extracted
Header information be client address information, the effect of the information is only that distributing layer determines the number that will extract according to the information
Which according to being pressed into pipeline, therefore after it is determined that the data extracted need the pipeline that is pressed into, in order to save memory space, then exist
Before the data press-in pipeline that this is extracted, the header information for the data that can extract this is removed, so as to process layer pair
The data are handled.Further, the step of distributing layer removes the header information for the data extracted also may be used
To be performed by the process layer, i.e., before the process layer is to the data processing in pipeline, first by the head of pending data
Portion is removed, and then the data are handled accordingly again.
The present embodiment is by the way that before the data extracted are pressed into corresponding pipeline, the header information of the data is moved
Remove, so as to save memory space.
The present invention further provides a kind of client data processing unit.
Reference picture 5, Fig. 5 is the high-level schematic functional block diagram of the first embodiment of client data processing unit of the present invention.
In the present embodiment, the client data processing unit includes:Memory module 10, press-in module 20 and processing mould
Block 30.
The memory module 10, for when receiving the data of each client transmission, by the data storage received
In default buffering area;
The difference of technical scheme and existing technical scheme is by the way of layered shaping to client
Data handled, the treatment effeciency to the data of client can be improved.Specifically, in server logic in the present invention
Three layers, respectively I O layer, distributing layer and process layer can be divided into.The I O layer is that, based on completing port, IO completing ports are
A kind of mechanism, by this mechanism, application program can create a thread pool first on startup, and then the application program is used
Thread pool processing asynchronous I/O request.The sole purpose that these threads are created is exactly to be used to handle I/O requests.It is big for handling
For the application program of amount concurrent asynchronous I/O requests, for the establishment thread when I/O asks to occur, completion end is used
Mouth can just do faster and more efficiently.Because the I O layer is that therefore, the I O layer is being received based on completing port
During the data that each client is sent, that is, when receiving the I/O requests of each client, it can use in the I O layer many at once
The data that individual thread reading client is sent, each thread reads the I/O requests of a client, is sent receiving client
Data after the data storage that receives this in default buffering area.The default buffering area is the active line of the I O layer
The storage at the end for the pipeline buffer that journey is pre-established is interval.I.e. each I O layer is stored in pipeline by the data received
When, all it is to store data in the storage interval of the interval most end of the remaining storage in pipeline buffer.In the present embodiment
In, the I O layer only receives the data of each client transmission, without handling the data that each client is sent, i.e. IO
I/O request of the worker thread only to each client in layer is read out, and is handled without the request to each client.
The press-in module 20, data for extracting storage from the default buffering area, and according to extracting
The data extracted are pressed into corresponding pipeline by the classification of data;
The distributing layer is real-time or checks at that time with the presence or absence of data in the default memory block in pipeline, if in the pipeline
Pre-set buffer area in there are data, then the distributing layer reads the data of storage from the default memory block of the pipeline.Specifically
, the distributing layer can extract the data in the pipeline pre-set buffer area by the worker thread in the floor, extract number
According to rear, it is determined that the classification for the data extracted, the i.e. data extracted are the data transmitted by which client, it is determined that carrying
After the classification for the data got, the data are pressed into corresponding pipeline.The distributing layer can be according to the data extracted
Classification is set up in pipeline, the other data press-in identical pipeline of same class, different classes of data press-in different pieces of information classification
In corresponding pipeline.When the distributing layer often determines a new classification according to the data of extraction, a pipeline is just newly created,
It can be pressed into corresponding pipeline for the data of the category.
The processing module 30, for being handled accordingly the data in each pipeline.
Because each pipeline correspond to a long-range client, therefore, the process layer can be to each client
The data of transmission are handled.
Specifically, the processing module 30, is additionally operable to distribute a worker thread for each pipeline, to pass through the work
Thread is handled the data in pipeline accordingly.
The process layer is one worker thread of distribution in each pipeline, and the data in pipeline are entered by the worker thread
The operations such as row reading, storage, processing, and response.Simultaneously as a worker thread is all assigned with each pipeline, therefore right
Temporary transient interruption when data in each pipeline carry out processing operation does not interfere with the processing and response of the data of other clients.
The present embodiment by the I O layer receive each client send data when, by the data storage received
In default buffering area;The distributing layer extracts the data of storage from the default buffering area, and according to extracting
The data extracted are pressed into corresponding pipeline by the classification of data;The process layer is carried out to the data in each pipeline
Corresponding processing.Request to client by the way of Multilevel method is handled so as to the reading in client request
Request and processing request no longer same layer are handled, it is to avoid code and place when the read requests that receive multiple client
The code of request is managed due to confusion within the same layer caused by possibility in code logic, while by multiple layers to client
Data are handled, and improve the efficiency to client data processing.
Further, reference picture 6, Fig. 6 is the functional module of the second embodiment of client data processing unit of the present invention
Schematic diagram.Based on the first embodiment of above-mentioned client data processing unit, the memory module 10 includes:Acquiring unit 11,
Adding device 12 and memory cell 13.
The acquiring unit 11, for when receiving the data of each client transmission, obtaining and sending the data
The address information of client;
The adding device 12, the head for the address information to be added to the data received;
The memory cell 13, for the data storage by header information is included in default buffering area.
Address information, that is, the data received are not included because the I O layer is received in the data of each client transmission
In do not include the address information of the client for sending the data, the local address of the address information including client and port
Number, for example, local address:192.168.1.99, port numbers:2400.Therefore, in order to which the data sent to each client are carried out
Classification difference, it is necessary to receive each client transmission data when, obtain send the data client address information,
The local address and port numbers for the client for sending the data are obtained, the I O layer can be carried out by client and server
Communicate the address information that the client for sending the data is obtained in the socket created.The I O layer is being got described in transmission
After the address information of the client of data, the address information is added to the head of the data received so that receive
To data all include the address information of data source, improved so as to receive data to this for distributing layer and carry out forward process
Necessary identification information.I O layer includes this institute on head after address information is added into the head of the data received
Data storage is stated in default buffering area.
The present embodiment, when receiving the data that each client is sent, is obtained by the I O layer and sends the data
The address information of client, and by the address information added to the head of the data received, so as to be the distribution
Layer to this receive data carry out forward process improve necessary identification information so that the distributing layer can accurately will respectively
The data distribution that individual client is sent is into each request processing thread.
Further, reference picture 7, Fig. 7 is the functional module of the 3rd embodiment of client data processing unit of the present invention
Schematic diagram.Based on the second embodiment of above-mentioned client data processing unit, the press-in module 20 includes:Taxon 21,
Set up unit 22 and press-in unit 23.
The taxon 21, data for extracting storage from the default buffering area, and according to extracting
The header information of data is classified to the data extracted;
It is described to set up unit 22, for setting up corresponding pipeline according to the classification for the data extracted;
The press-in unit 23, for the data extracted to be pressed into corresponding pipeline.
The distributing layer from the default buffering area after the data of storage are extracted, to the data extracted
Classified.Specifically, the distributing layer is classified according to the header information for the data extracted, due to the data extracted
Header information be client address information, it is therefore when classifying to the data that each is extracted, header information is consistent
Data be divided into a class, the inconsistent data of header information are divided into different classifications.After the data extracted are classified,
The distributing layer sets up corresponding pipeline according to the classification of data, and the data of each class set up a pipeline, there are how many classes
Other data just set up how many pipelines, and the data for example extracted have 8 classes, then need to set up 8 pipelines altogether.Described point
Layer is sent out when setting up pipeline, can not find that the data of a new category just set up a new pipeline, however, it is determined that the extraction
Data be existing classification data, then need not resettle pipeline.Distributing layer is after pipeline is set up, you can by each classification
Data are respectively pressed into the pipeline corresponding with its classification.
The present embodiment for every class data by all setting up a corresponding pipeline so that the processing to each client data
Much sooner, accurately, will not confusion reigned.
Further, reference picture 8, Fig. 8 is the functional module of the fourth embodiment of client data processing unit of the present invention
Schematic diagram.Based on the 3rd embodiment of above-mentioned client data processing unit, the press-in module 20 also includes:Remove unit
24。
The removal unit 24, for the header information for the data extracted to be removed.
The distributing layer is set up after corresponding pipeline according to the classification for the data extracted, due to the data extracted
Header information be client address information, the effect of the information is only that distributing layer determines the number that will extract according to the information
Which according to being pressed into pipeline, therefore after it is determined that the data extracted need the pipeline that is pressed into, in order to save memory space, then exist
Before the data press-in pipeline that this is extracted, the header information for the data that can extract this is removed, so as to process layer pair
The data are handled.Further, the step of distributing layer removes the header information for the data extracted also may be used
To be performed by the process layer, i.e., before the process layer is to the data processing in pipeline, first by the head of pending data
Portion is removed, and then the data are handled accordingly again.
The present embodiment is by the way that before the data extracted are pressed into corresponding pipeline, the header information of the data is moved
Remove, so as to save memory space.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.Embodiment party more than
The description of formula, it is required general that those skilled in the art can be understood that above-described embodiment method can add by software
The mode of hardware platform is realized, naturally it is also possible to by hardware, but the former is more preferably embodiment in many cases.It is based on
Such to understand, the part that technical scheme substantially contributes to prior art in other words can be with software product
Form embody, the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, CD), including
Some instructions are to cause a station terminal equipment (can be mobile phone, computer, server, air conditioner, or network equipment etc.)
Perform the method described in each embodiment of the invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of client data processing method, applied in server, it is characterised in that the server includes I O layer, divided
Layer and process layer are sent out, the client data processing method comprises the following steps:
The I O layer is when receiving the data of each client transmission, by the data storage received in default buffering area
In;
The distributing layer extracts the data of storage from the default buffering area, and will be carried according to the classification for the data extracted
The data got are pressed into corresponding pipeline;
The process layer is handled the data in each pipeline accordingly;
Wherein, the address information of the classification index evidence of data, the address information includes IP address and the port of data.
2. client data processing method as claimed in claim 1, it is characterised in that the I O layer is receiving each client
When holding the data sent, step of the data storage received in default buffering area is included:
The I O layer obtains the address letter for the client for sending the data when receiving the data of each client transmission
Breath;
The address information is added to the head of the data received by the I O layer;
The I O layer will include the data storage of header information in default buffering area.
3. client data processing method as claimed in claim 2, it is characterised in that the distributing layer is from described default slow
Rush in area and extract the data of storage, and the data extracted are pressed into by corresponding pipeline according to the classifications of the data extracted
In step include:
The distributing layer extracts the data of storage from the default buffering area, and according to the header information for the data extracted
The data extracted are classified;
The distributing layer sets up corresponding pipeline according to the classification for the data extracted;
The data extracted are pressed into corresponding pipeline by the distributing layer.
4. client data processing method as claimed in claim 3, it is characterised in that described in the distributing layer will be extracted
Data are pressed into before the step in corresponding pipeline, in addition to:
The distributing layer removes the header information for the data extracted.
5. the client data processing method as described in any one of Claims 1-4, it is characterised in that the process layer is to each
Data in individual pipeline include the step of processing accordingly:
The process layer is that each pipeline distributes a worker thread, to be carried out by the worker thread to the data in pipeline
Corresponding processing.
6. a kind of client data processing unit, it is characterised in that the client data processing unit includes;
Memory module, for when receiving the data of each client transmission, by the data storage received in default slow
Rush in area;
Press-in module, the data for extracting storage from the default buffering area, and according to the classification for the data extracted
The data extracted are pressed into corresponding pipeline;
Processing module, for being handled accordingly the data in each pipeline;
Wherein, the address information of the classification index evidence of data, the address information includes IP address and the port of data.
7. client data processing unit as claimed in claim 6, it is characterised in that the memory module includes:
Acquiring unit, for when receiving the data of each client transmission, obtaining the ground for the client for sending the data
Location information;
Adding device, the head for the address information to be added to the data received;
Memory cell, for the data storage by header information is included in default buffering area.
8. client data processing unit as claimed in claim 7, it is characterised in that the press-in module includes:
Taxon, the data for extracting storage from the default buffering area, and according to the head for the data extracted
Information is classified to the data extracted;
Unit is set up, for setting up corresponding pipeline according to the classification for the data extracted;
Unit is pressed into, for the data extracted to be pressed into corresponding pipeline.
9. client data processing unit as claimed in claim 7, it is characterised in that the press-in module also includes:
Unit is removed, for the header information for the data extracted to be removed.
10. the client data processing unit as described in any one of claim 6 to 9, it is characterised in that the processing module,
It is additionally operable to distribute a worker thread for each pipeline, to locate the data in pipeline accordingly by the worker thread
Reason.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610370451.3A CN106095597B (en) | 2016-05-30 | 2016-05-30 | Client data processing method and processing device |
PCT/CN2017/080837 WO2017206601A1 (en) | 2016-05-30 | 2017-04-18 | Client data processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610370451.3A CN106095597B (en) | 2016-05-30 | 2016-05-30 | Client data processing method and processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106095597A CN106095597A (en) | 2016-11-09 |
CN106095597B true CN106095597B (en) | 2017-09-26 |
Family
ID=57229619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610370451.3A Active CN106095597B (en) | 2016-05-30 | 2016-05-30 | Client data processing method and processing device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106095597B (en) |
WO (1) | WO2017206601A1 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095597B (en) * | 2016-05-30 | 2017-09-26 | 深圳市鼎盛智能科技有限公司 | Client data processing method and processing device |
CN106790632B (en) * | 2017-01-03 | 2020-07-14 | 北京奇虎科技有限公司 | Streaming data concurrent transmission method and device |
CN108667505A (en) * | 2018-04-20 | 2018-10-16 | 广州亿航智能技术有限公司 | The data processing method and computer readable storage medium of UAV Communication link |
CN111061474B (en) * | 2018-10-16 | 2024-04-26 | 深圳市茁壮网络股份有限公司 | Lamda programming device and data processing method thereof |
CN110046040B (en) * | 2019-04-09 | 2021-11-16 | 厦门网宿有限公司 | Distributed task processing method and system and storage medium |
CN111901689A (en) * | 2020-06-17 | 2020-11-06 | 视联动力信息技术股份有限公司 | Streaming media data transmission method and device, terminal equipment and storage medium |
CN113965844B (en) * | 2021-12-22 | 2022-04-15 | 深圳市维海德技术股份有限公司 | Low-delay audio transmission method and device, driving equipment and readable storage medium |
CN117041304B (en) * | 2023-10-10 | 2023-12-19 | 南京翼辉信息技术有限公司 | Vehicle-mounted atomic service system and control method thereof |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571617A (en) * | 2012-03-22 | 2012-07-11 | 上海中科高等研究院 | Streaming data server, streaming media transmission method and data transmission system |
CN103338156A (en) * | 2013-06-17 | 2013-10-02 | 南京国电南自美卓控制系统有限公司 | Thread pool based named pipe server concurrent communication method |
CN104219286A (en) * | 2014-08-13 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Method and device for processing stream media, client, CDN (content delivery network) node server and terminal |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1684413A (en) * | 2004-04-12 | 2005-10-19 | 英业达股份有限公司 | Dynamic realizing method of network communication |
US7752123B2 (en) * | 2006-04-28 | 2010-07-06 | Townsend Analytics Ltd. | Order management system and method for electronic securities trading |
CN103036961A (en) * | 2012-12-07 | 2013-04-10 | 蓝盾信息安全技术股份有限公司 | Distributed collection and storage method of journal |
CN106095597B (en) * | 2016-05-30 | 2017-09-26 | 深圳市鼎盛智能科技有限公司 | Client data processing method and processing device |
-
2016
- 2016-05-30 CN CN201610370451.3A patent/CN106095597B/en active Active
-
2017
- 2017-04-18 WO PCT/CN2017/080837 patent/WO2017206601A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571617A (en) * | 2012-03-22 | 2012-07-11 | 上海中科高等研究院 | Streaming data server, streaming media transmission method and data transmission system |
CN103338156A (en) * | 2013-06-17 | 2013-10-02 | 南京国电南自美卓控制系统有限公司 | Thread pool based named pipe server concurrent communication method |
CN104219286A (en) * | 2014-08-13 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Method and device for processing stream media, client, CDN (content delivery network) node server and terminal |
Also Published As
Publication number | Publication date |
---|---|
WO2017206601A1 (en) | 2017-12-07 |
CN106095597A (en) | 2016-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106095597B (en) | Client data processing method and processing device | |
CN107634915A (en) | Data transmission method, device and storage medium | |
CN102957622B (en) | Method, device and system for data processing | |
CN102143088B (en) | Method and equipment for forwarding data based on security socket layer (SSL) virtual private network (VPN) | |
CN108876689A (en) | Order processing method, apparatus, equipment and computer readable storage medium | |
CN110838031A (en) | Data operation method and device based on ABtest | |
CN107315586A (en) | Using the methods, devices and systems of packing | |
CN105786941B (en) | Information mining method and device | |
CN107229628A (en) | The method and device of distributed data base pretreatment | |
CN101888303B (en) | Recording method of network traffic information and related device | |
CN108600564A (en) | The method and apparatus of customer service | |
CN104813610A (en) | Providing multiple content items for display on multiple devices | |
CN107168788A (en) | The dispatching method and device of resource in distributed system | |
CN103299298A (en) | Service processing method and system | |
KR101400499B1 (en) | Apparatus and method of parallel processing of linked big data | |
CN111210826B (en) | Voice information processing method and device, storage medium and intelligent terminal | |
CN110290226A (en) | A kind of general client and server-side mating interface protocol method | |
CN104331452B (en) | A kind of method and system for handling dirty data | |
CN109412898B (en) | Feature database generation method and device and corresponding flow sorting method and device | |
CN113269538A (en) | Method, device and equipment for forwarding parallel approval nodes and storage medium | |
CN112671845A (en) | Data processing method and device, electronic equipment, storage medium and cloud system | |
CN101261580A (en) | System and method for processing data | |
CN110597854A (en) | Data classification method based on FE industrial internet and related products | |
CN101741629A (en) | Communication encryption method supporting remote monitoring system | |
CN106254909B (en) | Distribution, operation method and the device of interaction content |
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 | ||
CB03 | Change of inventor or designer information |
Inventor after: Sheng Ge Inventor after: Sheng Zhangmei Inventor before: Xu Yongchang Inventor before: Sheng Ge |
|
CB03 | Change of inventor or designer information | ||
PP01 | Preservation of patent right |
Effective date of registration: 20210316 Granted publication date: 20170926 |
|
PP01 | Preservation of patent right | ||
PD01 | Discharge of preservation of patent |
Date of cancellation: 20240316 Granted publication date: 20170926 |
|
PD01 | Discharge of preservation of patent |