CN107846319A - A kind of method and device for transmitting data - Google Patents
A kind of method and device for transmitting data Download PDFInfo
- Publication number
- CN107846319A CN107846319A CN201711145939.7A CN201711145939A CN107846319A CN 107846319 A CN107846319 A CN 107846319A CN 201711145939 A CN201711145939 A CN 201711145939A CN 107846319 A CN107846319 A CN 107846319A
- Authority
- CN
- China
- Prior art keywords
- client
- server
- sent
- daily record
- data
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention discloses a kind of method and device for transmitting data, client creates socket, linked server using the mark in configuration information one by one according to the configuration information preserved;To cause the information of message header of the server in communication protocol, the data collected are sent to the client by designated length one by one;The information received is saved in the file of corresponding Log Types name by the client.Company-data amount statistical information and data set statistics can be accurately shown, and each cluster running situation, processing speed and hardware resource occupancy situation can be monitored in real time.
Description
Technical field
The present embodiments relate to the technical field of data transfer, more particularly to a kind of method and dress for transmitting data
Put.
Background technology
In big data product O&M routine work, the situation of data exception often occurs, it is abnormal former analyzing these
Because when, it is found that data can malfunction in many links, such as YCL, kafka, storm, solr, Hadoop etc..And it is former to position these
Because often spending the very big energy of developer, even occur sometimes and search the feelings that a reason team owner sets out
Condition.More and more difficult by the method for investigating each node checks data exception item by item, efficiency is also very low.
The content of the invention
The purpose of the embodiment of the present invention is to propose a kind of method and device for transmitting data, it is intended to which solution needs to develop
Go out a set of O&M product efficiently, reliably, with conformability.
To use following technical scheme up to this purpose, the embodiment of the present invention:
In a first aspect, a kind of method for transmitting data, methods described include:
Client creates socket, link clothes using the mark in configuration information one by one according to the configuration information preserved
Business device;To cause the information of message header of the server in communication protocol, by the data collected by designated length by
Bar is sent to the client;
The information received is saved in the file of corresponding Log Types name by the client.
Alternatively, methods described also includes:
The user end to server triggers interaction flow;
The client is sent to the server receives response, and the reception response is used to notify described in the server
Client has been carried out reception and prepared;
The client is sent to the server terminates response, and the end response is used to represent that the client receives
Complete.
Second aspect, a kind of method for transmitting data, methods described include:
Server receives the link that client creates, and the link is the client according in the configuration information preserved
Mark create;
The information of message header of the server in communication protocol, the data collected are sent out one by one by designated length
The client is sent to, to cause the client that the information received is saved in the file of corresponding Log Types name.
Alternatively, methods described also includes:
The server is returned to the client and responded, described to return to response for notifying the client to receive day
Will;
The server sends log content line by line to the client;
The server sends ending message to the client, and the ending message is used to represent that the server is complete
Sent into data.
Alternatively, before the server receives the link that client creates, in addition to:
The server receives the interactive command that client is sent;
The server judge whether be the interactive command end order;
If the server judgement is the end order of the interactive command, the server is sent out according to the client
Log Types and log path in the communication protocol head sent, interact with the client, send daily record.
Alternatively, the server interacts with the client, sends daily record, including:
The server obtains the day under corresponding types or path according to the content of the message header, the server
Will.
Alternatively, the server interacts with the client, sends daily record, including:
, will according to data type after the collection of server to daily record if the message header is the message of real time type
Corresponding data transfer is sent to client.
The third aspect, a kind of system for transmitting data, the system include:
Client and server;
The client, for according to the configuration information preserved, creating socket using the mark in configuration information one by one
Word, link the server;The information received is saved in the file of corresponding Log Types name;
The server, for receiving the link of client establishment, the link client is according to having preserved
What the mark in configuration information created;The information of message header in communication protocol, by the data collected by designated length
The client is sent to one by one.
Alternatively, the server is additionally operable to:
Before the link that the server receives that client creates, the interactive command that client is sent is received;Judgement is
No is the end order of the interactive command;If the server judgement is the end order of the interactive command, according to institute
The Log Types and log path in the communication protocol head of client transmission are stated, interacted with the client, send daily record.
Alternatively, the server is additionally operable to:
The server obtains the daily record under corresponding types or path according to the content of the message header;
If the message header is the message of real time type, after collecting daily record, according to data type by corresponding data
Transmission is sent to client.
The embodiment of the present invention has the beneficial effect that:Company-data amount statistical information and data set statistics can accurately be shown
Data, and each cluster running situation, processing speed and hardware resource occupancy situation can be monitored in real time.As data
The essential auxiliary monitoring instrument of central platform, efficient, reliable data feedback can not only be provided for operation maintenance personnel, reduce collection
Troubleshooting time during mass-sending life problem, and made a good basis for gradually improving for later O&M function.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of method for transmitting data provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of method for transmitting data provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of method for transmitting data provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of system for transmitting data provided in an embodiment of the present invention.
Embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this
The specific embodiment of place description is used only for explaining the embodiment of the present invention, rather than the restriction to the embodiment of the present invention.In addition also
It should be noted that for the ease of describing, the part related to the embodiment of the present invention rather than entire infrastructure are illustrate only in accompanying drawing.
With reference to figure 1, Fig. 1 is a kind of schematic flow sheet of method for transmitting data provided in an embodiment of the present invention.Such as Fig. 1 institutes
Show, the method for the transmission data includes:
Step 110, client creates socket using the mark in configuration information one by one according to the configuration information preserved
Word, linked server;To cause the information of message header of the server in communication protocol, by the data collected by finger
Measured length is sent to the client one by one;
Step 120, the information received is saved in the file of corresponding Log Types name by the client.
Alternatively, methods described also includes:
The user end to server triggers interaction flow;
The client is sent to the server receives response, and the reception response is used to notify described in the server
Client has been carried out reception and prepared;
The client is sent to the server terminates response, and the end response is used to represent that the client receives
Complete.
Exemplary, this product uses tcp c/s modes, and client ends are according to the configuration information preserved, one by one
Go to create socket, link server ends using the ip in configuration information;Letter of the server ends in communication protocol message head
The data collected are sent to client ends by designated length, the information received is saved in accordingly by client by breath one by one
In the file of Log Types name.
Exemplary, as shown in Fig. 2 step 210, client (client) sends TYPE_ to service end (server ends)
NEED_LOG is asked, and triggers interaction flow;
Step 220, service end sends TYPE_FILE_START to client, represents that service end will start to send daily record;
Step 230, client sends TYPE_ACK_FILE_START to service end, represents that client is carried out reception and prepared;
Step 240, service end sends log content line by line to client;
Step 250, service end sends TYPE_FILE_END to client, represents that service end daily record has been sent completely;
Step 260, client sends TYPE_ACK_FILE_END to service end, represents that client finishes receiving.
The embodiment of the present invention has the beneficial effect that:Company-data amount statistical information and data set statistics can accurately be shown
Data, and each cluster running situation, processing speed and hardware resource occupancy situation can be monitored in real time.As data
The essential auxiliary monitoring instrument of central platform, efficient, reliable data feedback can not only be provided for operation maintenance personnel, reduce collection
Troubleshooting time during mass-sending life problem, and made a good basis for gradually improving for later O&M function.
With reference to figure 3, Fig. 3 is a kind of schematic flow sheet of method for transmitting data provided in an embodiment of the present invention.Such as Fig. 3 institutes
Show, the method for the transmission data includes:
Step 310, server receives the link that client creates, and the link is that the client is matched somebody with somebody according to what is preserved
What the mark in confidence breath created;
Step 320, the information of message header of the server in communication protocol, by the data collected by specified length
Degree is sent to the client one by one, to cause the client that the information received is saved in into corresponding Log Types name
In file.
Alternatively, methods described also includes:
The server is returned to the client and responded, described to return to response for notifying the client to receive day
Will;
The server sends log content line by line to the client;
The server sends ending message to the client, and the ending message is used to represent that the server is complete
Sent into data.
Alternatively, before the server receives the link that client creates, in addition to:
The server receives the interactive command that client is sent;
The server judge whether be the interactive command end order;
If the server judgement is the end order of the interactive command, the server is sent out according to the client
Log Types and log path in the communication protocol head sent, interact with the client, send daily record.
Alternatively, the server interacts with the client, sends daily record, including:
The server obtains the day under corresponding types or path according to the content of the message header, the server
Will.
Alternatively, the server interacts with the client, sends daily record, including:
, will according to data type after the collection of server to daily record if the message header is the message of real time type
Corresponding data transfer is sent to client.
With reference to figure 4, Fig. 4 is a kind of structural representation of system for transmitting data provided in an embodiment of the present invention.Such as Fig. 4 institutes
Show, the system includes:
Client 410 and server 420;
The client 410, for according to the configuration information preserved, creating set using the mark in configuration information one by one
Word is connect, links the server;The information received is saved in the file of corresponding Log Types name;
The server 420, for receiving the link of client establishment, the link is the client according to having preserved
Configuration information in mark create;The information of message header in communication protocol, by the data collected by specified length
Degree is sent to the client one by one.
Alternatively, the server 420 is additionally operable to:
Before the link that the server receives that client creates, the interactive command that client is sent is received;Judgement is
No is the end order of the interactive command;If the server judgement is the end order of the interactive command, according to institute
The Log Types and log path in the communication protocol head of client transmission are stated, interacted with the client, send daily record.
Alternatively, the server 420 is additionally operable to:
The server obtains the daily record under corresponding types or path according to the content of the message header;
If the message header is the message of real time type, after collecting daily record, according to data type by corresponding data
Transmission is sent to client.
The technical principle of the embodiment of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain this
The principle of inventive embodiments, and the limitation to protection domain of the embodiment of the present invention can not be construed in any way.Based on herein
Explanation, those skilled in the art, which would not require any inventive effort, can associate the other specific of the embodiment of the present invention
Embodiment, these modes are fallen within the protection domain of the embodiment of the present invention.
Claims (10)
- A kind of 1. method for transmitting data, it is characterised in that methods described includes:Client creates socket, linked server using the mark in configuration information one by one according to the configuration information preserved; To cause the information of message header of the server in communication protocol, the data collected are sent one by one by designated length To the client;The information received is saved in the file of corresponding Log Types name by the client.
- 2. according to the method for claim 1, it is characterised in that methods described also includes:The user end to server triggers interaction flow;The client is sent to the server receives response, and the reception response is used to notify client described in the server Reception is carried out and has prepared in end;The client is sent to the server terminates response, and the end response is used to represent that the client has received Into.
- A kind of 3. method for transmitting data, it is characterised in that methods described includes:Server receives the link that client creates, and the link is mark of the client in the configuration information preserved Know what is created;The information of message header of the server in communication protocol, the data collected are sent to one by one by designated length The client, to cause the client that the information received is saved in the file of corresponding Log Types name.
- 4. according to the method for claim 3, it is characterised in that methods described also includes:The server is returned to the client and responded, described to return to response for notifying the client to receive daily record;The server sends log content line by line to the client;The server sends ending message to the client, and the ending message is used to represent that the server has completed number According to transmission.
- 5. the method according to claim 3 or 4, it is characterised in that the server receive link that client creates it Before, in addition to:The server receives the interactive command that client is sent;The server judge whether be the interactive command end order;If the server judgement is the end order of the interactive command, the server is sent according to the client Log Types and log path in communication protocol head, interact with the client, send daily record.
- 6. according to the method for claim 5, it is characterised in that the server interacts with the client, sends daily record, Including:The server obtains the daily record under corresponding types or path according to the content of the message header, the server.
- 7. according to the method for claim 5, it is characterised in that the server interacts with the client, sends daily record, Including:, will be corresponding according to data type after the collection of server to daily record if the message header is the message of real time type Data transfer be sent to client.
- 8. a kind of system for transmitting data, it is characterised in that the system includes:Client and server;The client, for according to the configuration information preserved, creating socket, chain using the mark in configuration information one by one Connect the server;The information received is saved in the file of corresponding Log Types name;The server, for receiving the link of client establishment, the link is the client according to the configuration preserved What the mark in information created;The information of message header in communication protocol, by the data collected by designated length one by one It is sent to the client.
- 9. system according to claim 8, it is characterised in that the server is additionally operable to:Before the link that the server receives that client creates, the interactive command that client is sent is received;Judge whether be The end order of the interactive command;If the server judgement is the end order of the interactive command, according to the visitor Log Types and log path in the communication protocol head that family end is sent, interact with the client, send daily record.
- 10. system according to claim 8, it is characterised in that the server is additionally operable to:The server obtains the daily record under corresponding types or path according to the content of the message header;If the message header is the message of real time type, after collecting daily record, according to data type by corresponding data transfer It is sent to client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711145939.7A CN107846319A (en) | 2017-11-17 | 2017-11-17 | A kind of method and device for transmitting data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711145939.7A CN107846319A (en) | 2017-11-17 | 2017-11-17 | A kind of method and device for transmitting data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107846319A true CN107846319A (en) | 2018-03-27 |
Family
ID=61679857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711145939.7A Pending CN107846319A (en) | 2017-11-17 | 2017-11-17 | A kind of method and device for transmitting data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107846319A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101022375A (en) * | 2007-04-04 | 2007-08-22 | 杭州华为三康技术有限公司 | Centralizing automatic testing device and method for testing radio local network |
CN101815010A (en) * | 2009-02-25 | 2010-08-25 | 北京启明星辰信息技术股份有限公司 | Method and system for reporting system logs |
CN104539630A (en) * | 2015-01-19 | 2015-04-22 | 北京网秦天下科技有限公司 | Method and device for checking linux journal files at windows client |
US20170104764A1 (en) * | 2015-10-13 | 2017-04-13 | Yahoo!, Inc. | Fraud prevention |
-
2017
- 2017-11-17 CN CN201711145939.7A patent/CN107846319A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101022375A (en) * | 2007-04-04 | 2007-08-22 | 杭州华为三康技术有限公司 | Centralizing automatic testing device and method for testing radio local network |
CN101815010A (en) * | 2009-02-25 | 2010-08-25 | 北京启明星辰信息技术股份有限公司 | Method and system for reporting system logs |
CN104539630A (en) * | 2015-01-19 | 2015-04-22 | 北京网秦天下科技有限公司 | Method and device for checking linux journal files at windows client |
US20170104764A1 (en) * | 2015-10-13 | 2017-04-13 | Yahoo!, Inc. | Fraud prevention |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103019866B (en) | Distributed method and system based on message queue | |
CN103546343B (en) | The network traffics methods of exhibiting of network traffic analysis system and system | |
US20050216241A1 (en) | Method and apparatus for gathering statistical measures | |
CN103001809B (en) | Service node method for monitoring state for cloud storage system | |
CN103414916B (en) | Fault diagnosis system and method | |
CN104219091A (en) | System and method for network operation fault detection | |
CN103634359B (en) | A kind of proxy server identification method and device | |
CN108055148A (en) | The electric power wireless private network webmaster diagnostic method that a kind of automation can trace to the source | |
WO2021056793A1 (en) | Power transmission line distributed fault diagnosis system and method | |
CN107483409B (en) | A method of the operational order real-time monitoring echo towards industry control operating system | |
CN110247967A (en) | Intelligent networking gateway and its data intelligence processing method | |
CN106453541A (en) | Data synchronization method, server and data synchronization system | |
CN112637366A (en) | Vehicle network vehicle data acquisition method based on micro-service | |
CN103973484B (en) | A kind of operation management system based on network topology structure | |
CN106372513A (en) | Software fingerprint database-based software identification method and apparatus | |
CN112817828A (en) | GTP monitoring method, device and equipment | |
CN112260992A (en) | Method for exchanging message data between power supply monitoring system and equipment operation and maintenance system | |
US7996528B2 (en) | Network management system having agent controlled transmission of state variation notifying command based on manager load information | |
CN116302862B (en) | Monitoring alarm method and system under micro-service architecture | |
CN110968479A (en) | Business-level full-link monitoring method for application program and server | |
CN106682078A (en) | Industrial control computer data dump method and system | |
CN100359865C (en) | Detecting method | |
CN102869032A (en) | Device and method for monitoring and alarming power supply of base station | |
CN107846319A (en) | A kind of method and device for transmitting data | |
CN103957266A (en) | Device centralized control method for communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180327 |
|
RJ01 | Rejection of invention patent application after publication |