CN110740131A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110740131A
CN110740131A CN201910944757.9A CN201910944757A CN110740131A CN 110740131 A CN110740131 A CN 110740131A CN 201910944757 A CN201910944757 A CN 201910944757A CN 110740131 A CN110740131 A CN 110740131A
Authority
CN
China
Prior art keywords
target
data
data packet
communication data
client
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.)
Granted
Application number
CN201910944757.9A
Other languages
Chinese (zh)
Other versions
CN110740131B (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910944757.9A priority Critical patent/CN110740131B/en
Publication of CN110740131A publication Critical patent/CN110740131A/en
Application granted granted Critical
Publication of CN110740131B publication Critical patent/CN110740131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The disclosure shows data processing methods, devices, electronic equipment and storage media, which are applied to a long connection agent tool built between a target client and a target server, and are characterized in that a communication data packet between the target client and the target server is firstly obtained, then a preset protocol is adopted to decode the communication data packet to obtain readable data, and finally the readable data is displayed on a display interface of the long connection agent tool.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to data processing methods and apparatuses, an electronic device, and a storage medium.
Background
The traditional HTTP is short connection, channels of connection are established each time data is requested, the connection is immediately disconnected after the data is sent, and only one-way request from the target client to the target server can be made.
In software development, many working scenarios require seeing or intercepting communication data between a target client and a target server. At present, a mature http request packet capturing tool Charles is used for capturing a data packet of an http protocol between a target client and a target server, and has functions of capturing a packet, simulating transmission, intercepting a message and the like, however, Charles is limited by the http protocol and cannot capture a data packet of a long connection. The WireShark can catch network packets of all protocols, including UDP protocol and TCP protocol, and has the functions of interception and filtering, however, the packets caught by the WireShark are in a message format of a network layer and have no readability.
Disclosure of Invention
The present disclosure provides data processing methods, apparatuses, electronic devices and storage media, to at least solve the problem in the related art that a long connection data packet cannot be intercepted or the intercepted data packet cannot be read, the technical solution of the present disclosure is as follows:
according to of the present disclosure, there are provided data processing methods applied to a long connection broker tool built between a target client and a target server, the method including:
acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
In alternative implementation, before the step of obtaining the communication data packet between the target client and the target server, the method further includes:
receiving a connection request sent by the target client;
sending the connection request to the target server;
and according to the response of the target server, establishing a long connection between the target client and the target server through the long connection agent tool.
In optional implementation manners, the step of decoding the communication data packet to obtain the readability data by using a preset protocol includes:
and decoding the communication data packet by adopting a preset protobuf protocol to obtain readable data.
In alternative implementation manners, the long-connection broker includes a proxy client and a proxy server based on a Netty framework, the proxy server is connected to the target client and the proxy server, respectively, and the proxy client is further connected to the target server.
In alternative implementation, after the step of presenting the readable data on the display interface of the long connection broker tool, the method further includes:
acquiring data to be issued;
converting the data to be issued into binary data;
and sending the binary data to the target client.
In optional implementation manners, after the step of decoding the communication data packet by using a preset protocol to obtain the readability data, the method further includes:
acquiring the message type of the communication data packet;
when the message type meets a preset condition, discarding the communication data packet;
and when the message type does not meet the preset condition, sending the communication data packet to the target client or the target server.
According to a second aspect of the present disclosure, there is provided data processing apparatus for use in a long connection broker tool built between a target client and a target server, the apparatus comprising:
, an obtaining module configured to obtain a communication data packet between the target client and the target server;
the decoding module is configured to decode the communication data packet by adopting a preset protocol to obtain readable data;
a presentation module configured to present the readability data on a display interface of the long-connection broker tool.
In alternative implementations, the apparatus further includes:
a receiving module configured to receive a connection request sent by the target client;
, a sending module configured to send the connection request to the target server;
a connection module configured to establish a long connection between the target client and the target server through the long connection broker according to a response of the target server.
In alternative implementations, the communication data packet is a binary data stream, and the decoding module is specifically configured to:
and decoding the communication data packet by adopting a preset protobuf protocol to obtain readable data.
In alternative implementation manners, the long-connection broker includes a proxy client and a proxy server based on a Netty framework, the proxy server is connected to the target client and the proxy server, respectively, and the proxy client is further connected to the target server.
In alternative implementations, the apparatus further includes:
the second acquisition module is configured to acquire the data to be issued;
the conversion module is configured to convert the data to be transmitted into binary data;
a second sending module configured to send the binary data to the target client.
In alternative implementations, the apparatus further includes:
a third obtaining module configured to obtain a message type of the communication data packet;
a discarding module configured to discard the communication data packet when the message type meets a preset condition;
and the third sending module is configured to send the communication data packet to the target client or the target server when the message type does not meet a preset condition.
According to a third aspect of the present disclosure, there is provided electronic devices, the electronic devices comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data processing method of aspect .
According to a fourth aspect of the present disclosure, storage media are provided, the instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of aspect .
According to a fifth aspect of the present disclosure computer program products are provided, the instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of aspect .
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the technical scheme includes that data processing methods, devices, electronic equipment and storage media are applied to a long connection agent tool set up between a target client and a target server, firstly, a communication data packet between the target client and the target server is obtained, then a preset protocol is adopted to decode the communication data packet to obtain readable data, and finally the readable data are displayed on a display interface of the long connection agent tool.
It is to be understood that both the foregoing -general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description , serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating data processing methods according to an exemplary embodiment of .
Fig. 2 is a flow chart illustrating the establishing long connections according to an exemplary embodiment of .
Fig. 3 is a flow chart of simulated transmission data according to an exemplary embodiment of .
Fig. 4 is a flow chart illustrating interception of communication packets according to an exemplary embodiment of .
Fig. 5 is a block diagram illustrating the structure of the long connection broker tool in accordance with an exemplary embodiment of .
Fig. 6 is a block diagram illustrating a variety of data processing apparatus according to an exemplary embodiment of .
Fig. 7 is a block diagram of the electronic devices shown in accordance with an exemplary embodiment of .
Fig. 8 is a block diagram of the electronic devices shown in accordance with an exemplary embodiment of .
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Fig. 1 is a flowchart of data processing methods according to an exemplary embodiment of , and the methods are applied to a long connection broker tool built between a target client and a target server, as shown in fig. 1, and may include the following steps.
In step S11, a communication packet between the target client and the target server is acquired.
The long connection agent tool can be realized based on a Netty framework, wherein Netty is model network communication framework developed based on non-blocking IO.
In a specific implementation, the long connection proxy tool may include a proxy client and a proxy server based on a Netty framework, the proxy server is connected with the target client and the proxy server, respectively, and the proxy client is further connected with the target server, as shown in fig. 5.
When the target client sends data to the proxy server, the proxy server sends the data to the proxy client first, and the proxy client forwards the data to the target server.
In step S12, the communication data packet is decoded by using a predetermined protocol, so as to obtain readability data.
In a specific implementation, when the communication data packet is a binary data stream, a preset protobuf protocol may be used to decode the communication data packet, so as to obtain readability data.
Each communication data packet transmitted between the target client and the target server passes through the long connection proxy tool, but the communication data packets are binary data streams and have no readability, the binary data streams (communication data packets) can be decoded through a protocol agreed in advance, and then the decoded data with readability are displayed on a display interface of the long connection proxy tool, so that a user can clearly know the data flow direction between the target client and the target server.
In step S13, the readable data is displayed on the display interface of the long-connection broker tool.
The display interface of the long connection agent tool may be, for example, a web page. The readability data is data readable by the user, and may be in the form of, for example, chinese, english, etc.
In the data processing method provided by this embodiment, a communication bridge between the target server and the target client is supported by the long connection proxy, all communication data packets pass through the proxy, and the proxy can acquire the communication data packets and decode the communication data packets to obtain readable data that can be presented on the display interface.
For example, long connection data messages are sent to a mobile phone end (target client) by the target server, but the client is not shown, if the long connection agent tool receives the message, the problem that the target client is most likely to be caused by the long connection agent tool, but if the long connection agent tool does not receive the message, the problem that the target server is probably caused by the long connection agent tool is solved.
In optional implementation manners of this embodiment, referring to fig. 2, before step S11, the method may further include:
in step S21, a connection request sent by the target client is received.
In step S22, the connection request is sent to the target server.
In step S23, a long connection is established between the target client and the target server through the long connection broker according to the response of the target server.
In the specific implementation, a mobile phone client (target client) is connected with a proxy server, when the proxy server receives a long connection request of the mobile phone client, proxy clients are created, the proxy client is connected with an actual server (target server), the proxy server sends the long connection request to the proxy client, and then the proxy client sends the long connection request to the target server, so that a long connection is established between the target client and the target server, and the target server and the target client can communicate through the long connection.
In optional implementation manners of this embodiment, after step S13, referring to fig. 3, the data processing method provided in this embodiment may further include:
in step S31, data to be issued is acquired.
The data to be issued can be readability data input by a user on a long connection agent tool display interface.
In step S32, the data to be transmitted is converted into binary data.
In a specific implementation, encoders may be encapsulated, and the encoders may convert, based on a preset protobuf protocol, readability data (data to be transmitted) input by a user on a display interface into binary data that can be transmitted at a network layer.
In step S33, the binary data is sent to the target client.
In a specific implementation, the binary data obtained by conversion can be directly issued to a target client through the proxy server. Therefore, a user using the long connection agent tool can easily input the analog communication data (to-be-issued data) to be issued on the display interface and then issue the analog communication data to the mobile phone client (target client).
In daily software development, a user needs to know the performance of a target client after receiving various messages under many conditions, but the messages are often difficult to realize through the target server, for example, at the initial stage of software development, the code of the target server is not ready, and under these conditions, the long-connection agent tool can be used for issuing simulation data to the target client, so that the development of the code of the target client is completed more smoothly, and the quality of a software product is ensured.
In optional implementation manners of this embodiment, after step S12, referring to fig. 4, the data processing method provided in this embodiment may further include:
in step S41, the message type of the communication packet is acquired.
In a specific implementation, after the protocol is used to decode the communication data packet, the message type of the communication data packet may be output.
In step S42, when the message type meets the preset condition, the communication data packet is discarded.
The preset condition may be a preset message type that the target server or the target client is not expected to receive, that is, a message type that the long connection broker tool is required to filter.
In a specific implementation, if the message type of the communication data packet obtained by the long connection proxy tool meets a preset condition, that is, the message type is a type to be filtered, the message data packet may be directly discarded and is not sent to the target client or the target server.
In step S43, when the message type does not meet the preset condition, the communication data packet is sent to the target client or the target server.
In a specific implementation, if the message type of the communication data packet acquired by the long connection proxy does not meet the preset condition, that is, the message type is not the type needing filtering, the communication data packet may be issued to the target client or the target server through the proxy.
In some scenarios, software development and testing personnel also need to observe the performance of the target client when a certain long connection message is not received, and the long connection agent tool is provided, so that the message can be intercepted, and the message cannot be issued to the target client.
According to the data processing method provided by the embodiment, the long connection packet capturing function is realized through the long connection agent tool arranged between the target server and the target client, the captured communication data packet can be converted into readable data, and the problem that no mature long connection packet capturing tool exists in the current software field is solved; in addition, the long connection agent tool also has the function of simulating the sending of long connection data and the function of intercepting the long connection data.
Fig. 6 is a block diagram of data processing apparatuses according to an exemplary embodiment of , and referring to fig. 6, the apparatuses, applied to a long connection broker tool built between a target client and a target server, may include:
, an obtaining module 61 configured to obtain the communication data packet between the target client and the target server;
a decoding module 62 configured to decode the communication data packet by using a preset protocol to obtain readable data;
a presentation module 63 configured to present the readable data on a display interface of the long-connection agent.
The long connection agent tool can be realized based on a Netty framework, wherein Netty is model network communication framework developed based on non-blocking IO.
In a specific implementation, the long connection proxy tool may include a proxy client and a proxy server based on a Netty framework, the proxy server is connected with the target client and the proxy server, respectively, and the proxy client is further connected with the target server, as shown in fig. 5.
When the target client sends data to the proxy server, the proxy server sends the data to the proxy client first, and the proxy client forwards the data to the target server, in turn, the target server sends data to the target client, the long-connection proxy tools are intermediate media, and play a role of transparent transmission messages between the target client and the target server, and the acquisition module 61 can acquire all long-connection communication data packets transmitted between the target client and the target server.
In a specific implementation, when the communication data packet is a binary data stream, the decoding module 62 may decode the communication data packet by using a preset protobuf protocol to obtain the readability data.
Each communication data packet transmitted between the target client and the target server passes through the long connection agent, but the communication data packets are binary data streams and have no readability, the decoding module 62 can decode the binary data streams (communication data packets) through a protocol agreed in advance, and then the decoded data with readability is presented on a display interface of the long connection agent, so that a user can clearly know the data flow direction between the target client and the target server.
The display interface of the long connection agent tool may be, for example, a web page. The readability data is data readable by the user, and may be in the form of, for example, chinese, english, etc.
The data processing apparatus provided in this embodiment accepts a communication bridge between the target server and the target client through the long connection proxy, and all communication data packets pass through the proxy, and the proxy can acquire the communication data packets and decode the communication data packets to obtain readable data that can be presented on the display interface.
In alternative implementations, the apparatus further includes:
a receiving module configured to receive a connection request sent by the target client;
, a sending module configured to send the connection request to the target server;
a connection module configured to establish a long connection between the target client and the target server through the long connection broker according to a response of the target server.
In the specific implementation, a mobile phone client (target client) is connected with a proxy server, when the proxy server (provided with a receiving module) receives a long connection request of the mobile phone client, proxy clients are created, the proxy client is connected with an actual server (target server), the proxy server sends the long connection request to the proxy client, and then the proxy client (provided with a sending module) sends the long connection request to the target server, so that the connecting module establishes a long connection between the target client and the target server, and the target server and the target client can communicate through the long connection.
In alternative implementations, the apparatus further includes:
the second acquisition module is configured to acquire the data to be issued;
the conversion module is configured to convert the data to be transmitted into binary data;
a second sending module configured to send the binary data to the target client.
The data to be issued acquired by the second acquisition module can be readability data input by a user on a long connection agent tool display interface.
In a specific implementation, the conversion module may encapsulate encoders, and the encoders may convert, based on a preset protobuf protocol, readability data (data to be transmitted) input on the display interface by a user into binary data that can be transmitted at a network layer.
In a specific implementation, the second sending module may directly send the converted binary data to the target client through the proxy server. Therefore, a user using the long connection agent tool can easily input the analog communication data (to-be-issued data) to be issued on the display interface and then issue the analog communication data to the mobile phone client (target client).
In alternative implementations, the apparatus further includes:
a third obtaining module configured to obtain a message type of the communication data packet;
a discarding module configured to discard the communication data packet when the message type meets a preset condition;
and the third sending module is configured to send the communication data packet to the target client or the target server when the message type does not meet a preset condition.
In a specific implementation, after the protocol is used to decode the communication data packet, the message type of the communication data packet may be output, and the third obtaining module may obtain the message type of the communication data packet.
The preset condition may be a preset message type that the target server or the target client is not expected to receive, that is, a message type that the long connection broker tool is required to filter.
In a specific implementation, if the message type of the communication data packet obtained by the long connection proxy tool meets a preset condition, that is, the message type is a type to be filtered, the discarding module may directly discard the message data packet and does not issue the message data packet to the target client or the target server.
If the message type of the communication data packet acquired by the long connection agent tool does not meet the preset condition, that is, the message type is not the type needing filtering, the third sending module can send the communication data packet to the target client or the target server through the agent tool.
The data processing apparatus provided in this embodiment implements a long connection packet capturing function through a long connection agent tool disposed between a target server and a target client, and can also convert captured communication data packets into readable data, thereby solving the problem that no mature long connection packet capturing tool exists in the current software field; in addition, the long connection agent tool also has the function of simulating the sending of long connection data and the function of intercepting the long connection data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram of electronic devices 800 shown in the present disclosure for example, the electronic devices 800 may be mobile phones, computers, digital cast terminals, messaging devices, game consoles, tablet devices, medical devices, exercise devices, personal digital assistants, and the like.
Referring to FIG. 7, electronic device 800 may include one or more components including a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communications component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations the processing component 802 may include or more processors 820 executing instructions to perform a data processing method as described in any embodiment.
Acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
Additionally, the processing component 802 can include or more modules that facilitate interaction between the processing component 802 and other components for example, the processing component 802 can include a multimedia module that facilitates interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power components 806 provide power to the various components of the electronic device 800 the power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and a user that provides output interfaces, in embodiments the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). if the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.A touch panel includes or more touch sensors to sense gestures on the touch, slide, and touch panel.
For example, audio component 810 includes Microphones (MICs) configured to receive external audio signals when electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes or more sensors to provide various aspects of state evaluation for the electronic device 800. for example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, the sensor assembly 814 may also detect changes in the position of the electronic device 800 or components of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and temperature changes of the electronic device 800. the sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof, in exemplary embodiments the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel, in exemplary embodiments the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communication.
In an exemplary embodiment, the electronic device 800 may be implemented by or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), field programmable arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the data processing method described in any of the embodiments.
Acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
In an exemplary embodiment, there is also provided non-transitory computer-readable storage media, such as memory 804, including instructions executable by processor 820 of electronic device 800 to perform the data processing method of any embodiment.
Acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there are also provided computer program products comprising readable program code executable by the processor 820 of the apparatus 800 to perform the data processing method of any embodiment.
Acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
Alternatively, the program code may be stored in a storage medium of the apparatus 800, which may be a non-transitory computer readable storage medium, for example, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
FIG. 8 is a block diagram of types of electronic devices 1900 shown in the present disclosure for example, an electronic device 1900 may be provided as a target server.
Referring to fig. 8, electronic device 1900 includes a processing component 1922 further including or more processors and memory resources represented by memory 1932 for storing instructions, e.g., applications, executable by processing component 1922 the applications stored in memory 1932 may include or more than modules each corresponding to sets of instructions.
Acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
The electronic device 1900 may further include power components 1926 configured to perform power management of the electronic device 1900, wired or wireless network interfaces 1950 configured to connect the electronic device 1900 to a network, and input output (I/O) interfaces 1958 the electronic device 1900 may operate based on an operating system stored in memory 1932, such as WindowsServerTM, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the -like principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
A1, data processing methods, which are applied to a long connection agent tool built between a target client and a target server, the method comprises:
acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
A2, according to the method in A1, before the step of obtaining the communication data packet between the target client and the target server, the method further comprises:
receiving a connection request sent by the target client;
sending the connection request to the target server;
and according to the response of the target server, establishing a long connection between the target client and the target server through the long connection agent tool.
A3, according to the method in a1, the communication data packet is a binary data stream, and the step of decoding the communication data packet by using a preset protocol to obtain readable data includes:
and decoding the communication data packet by adopting a preset protobuf protocol to obtain readable data.
A4, according to the method of A1, the long connection broker tool includes a proxy client and a proxy server based on a Netty framework, the proxy server is connected with the target client and the proxy server, respectively, and the proxy client is also connected with the target server.
A5, the method of any of A1 to A4 , further comprising, after said step of presenting said readability data on a display interface of said long connection broker tool:
acquiring data to be issued;
converting the data to be issued into binary data;
and sending the binary data to the target client.
A6, the method according to any of a1 to a4, further comprising, after the step of decoding the communication data packet by using a predetermined protocol to obtain readability data:
acquiring the message type of the communication data packet;
when the message type meets a preset condition, discarding the communication data packet;
and when the message type does not meet the preset condition, sending the communication data packet to the target client or the target server.
A7, kinds of data processing device, applied to a long connection agent tool built between a target client and a target server, the device comprises:
, an obtaining module configured to obtain a communication data packet between the target client and the target server;
the decoding module is configured to decode the communication data packet by adopting a preset protocol to obtain readable data;
a presentation module configured to present the readability data on a display interface of the long-connection broker tool.
A8, the apparatus of A7, further comprising:
a receiving module configured to receive a connection request sent by the target client;
, a sending module configured to send the connection request to the target server;
a connection module configured to establish a long connection between the target client and the target server through the long connection broker according to a response of the target server.
A9, the apparatus of A7, the communication data packet being a binary data stream, the decoding module being specifically configured to:
and decoding the communication data packet by adopting a preset protobuf protocol to obtain readable data.
A10, the device according to A7, wherein the long connection proxy tool comprises a proxy client and a proxy server based on a Netty framework, the proxy server is respectively connected with the target client and the proxy server, and the proxy client is also connected with the target server.
A11, the apparatus of any of a7 to a10, further comprising:
the second acquisition module is configured to acquire the data to be issued;
the conversion module is configured to convert the data to be transmitted into binary data;
a second sending module configured to send the binary data to the target client.
A12, the apparatus of any of a7 to a10, further comprising:
a third obtaining module configured to obtain a message type of the communication data packet;
a discarding module configured to discard the communication data packet when the message type meets a preset condition;
and the third sending module is configured to send the communication data packet to the target client or the target server when the message type does not meet a preset condition.

Claims (10)

1, A data processing method, applied to a long connection broker tool built between a target client and a target server, the method comprising:
acquiring a communication data packet between the target client and the target server;
decoding the communication data packet by adopting a preset protocol to obtain readable data;
and displaying the readability data on a display interface of the long connection agency tool.
2. The method of claim 1, further comprising, prior to the step of obtaining the communication data packet between the target client and the target server:
receiving a connection request sent by the target client;
sending the connection request to the target server;
and according to the response of the target server, establishing a long connection between the target client and the target server through the long connection agent tool.
3. The method of claim 1, wherein the communication data packet is a binary data stream, and the step of decoding the communication data packet using a predetermined protocol to obtain the readability data comprises:
and decoding the communication data packet by adopting a preset protobuf protocol to obtain readable data.
4. The method of claim 1, wherein the long-connection agent comprises a proxy client and a proxy server based on a Netty framework, the proxy server being connected to the target client and the proxy server, respectively, the proxy client being further connected to the target server.
5. The method of any of claims 1-4 and , wherein after the step of presenting the readability data on the display interface of the long-connection broker tool, further comprising:
acquiring data to be issued;
converting the data to be issued into binary data;
and sending the binary data to the target client.
6. The method of any of claims 1 to 4 and , wherein after the step of decoding the communication data packet using the predetermined protocol to obtain the readability data, the method further comprises:
acquiring the message type of the communication data packet;
when the message type meets a preset condition, discarding the communication data packet;
and when the message type does not meet the preset condition, sending the communication data packet to the target client or the target server.
data processing apparatus for use in a long connection broker tool built between a target client and a target server, the apparatus comprising:
, an obtaining module configured to obtain a communication data packet between the target client and the target server;
the decoding module is configured to decode the communication data packet by adopting a preset protocol to obtain readable data;
a presentation module configured to present the readability data on a display interface of the long-connection broker tool.
8. The apparatus of claim 7, further comprising:
a receiving module configured to receive a connection request sent by the target client;
, a sending module configured to send the connection request to the target server;
a connection module configured to establish a long connection between the target client and the target server through the long connection broker according to a response of the target server.
An electronic device of the type 9, , comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data processing method of any of claims 1-6.
Storage media whose instructions, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of any of claims 1-6.
CN201910944757.9A 2019-09-30 2019-09-30 Data processing method and device, electronic equipment and storage medium Active CN110740131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910944757.9A CN110740131B (en) 2019-09-30 2019-09-30 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910944757.9A CN110740131B (en) 2019-09-30 2019-09-30 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110740131A true CN110740131A (en) 2020-01-31
CN110740131B CN110740131B (en) 2022-11-04

Family

ID=69268483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910944757.9A Active CN110740131B (en) 2019-09-30 2019-09-30 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110740131B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111416855A (en) * 2020-03-16 2020-07-14 杭州涂鸦信息技术有限公司 Method and system for converting protocol data and object data
CN112491810A (en) * 2020-11-09 2021-03-12 珠海格力电器股份有限公司 Data connection method and mobile terminal
CN113704016A (en) * 2021-08-26 2021-11-26 北京百度网讯科技有限公司 Cloud function component diagnosis method, device, equipment, storage medium and program product
CN114025016A (en) * 2021-10-18 2022-02-08 中国联合网络通信集团有限公司 Data forwarding method and device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699612A (en) * 2015-03-25 2015-06-10 北京嘀嘀无限科技发展有限公司 Processing method, equipment and system used in software testing
CN106790683A (en) * 2017-02-10 2017-05-31 合网络技术(北京)有限公司 Network data display methods and device based on mobile terminal
CN106936875A (en) * 2015-12-30 2017-07-07 南京理工大学 Improvement TCP agent method based on wide area network data compression
CN108363662A (en) * 2018-01-29 2018-08-03 深圳壹账通智能科技有限公司 A kind of applied program testing method, storage medium and terminal device
CN109088844A (en) * 2017-06-13 2018-12-25 腾讯科技(深圳)有限公司 Information intercepting method, terminal, server and system
CN109120696A (en) * 2018-08-17 2019-01-01 百度在线网络技术(北京)有限公司 Method and apparatus for sending data
CN109474603A (en) * 2018-11-27 2019-03-15 平安科技(深圳)有限公司 Data packet capturing processing method and terminal device
CN109547567A (en) * 2018-12-25 2019-03-29 北京市天元网络技术股份有限公司 Act on behalf of connection method and device
CN109922053A (en) * 2019-02-22 2019-06-21 北京三快在线科技有限公司 Data transmission method, device, electronic equipment and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699612A (en) * 2015-03-25 2015-06-10 北京嘀嘀无限科技发展有限公司 Processing method, equipment and system used in software testing
CN106936875A (en) * 2015-12-30 2017-07-07 南京理工大学 Improvement TCP agent method based on wide area network data compression
CN106790683A (en) * 2017-02-10 2017-05-31 合网络技术(北京)有限公司 Network data display methods and device based on mobile terminal
CN109088844A (en) * 2017-06-13 2018-12-25 腾讯科技(深圳)有限公司 Information intercepting method, terminal, server and system
CN108363662A (en) * 2018-01-29 2018-08-03 深圳壹账通智能科技有限公司 A kind of applied program testing method, storage medium and terminal device
CN109120696A (en) * 2018-08-17 2019-01-01 百度在线网络技术(北京)有限公司 Method and apparatus for sending data
CN109474603A (en) * 2018-11-27 2019-03-15 平安科技(深圳)有限公司 Data packet capturing processing method and terminal device
CN109547567A (en) * 2018-12-25 2019-03-29 北京市天元网络技术股份有限公司 Act on behalf of connection method and device
CN109922053A (en) * 2019-02-22 2019-06-21 北京三快在线科技有限公司 Data transmission method, device, electronic equipment and readable storage medium storing program for executing

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111416855A (en) * 2020-03-16 2020-07-14 杭州涂鸦信息技术有限公司 Method and system for converting protocol data and object data
CN112491810A (en) * 2020-11-09 2021-03-12 珠海格力电器股份有限公司 Data connection method and mobile terminal
CN112491810B (en) * 2020-11-09 2021-09-21 珠海格力电器股份有限公司 Data connection method and mobile terminal
CN113704016A (en) * 2021-08-26 2021-11-26 北京百度网讯科技有限公司 Cloud function component diagnosis method, device, equipment, storage medium and program product
CN113704016B (en) * 2021-08-26 2023-07-28 北京百度网讯科技有限公司 Cloud function component diagnosis method, device, equipment and storage medium
CN114025016A (en) * 2021-10-18 2022-02-08 中国联合网络通信集团有限公司 Data forwarding method and device and storage medium
CN114025016B (en) * 2021-10-18 2024-03-15 中国联合网络通信集团有限公司 Data forwarding method, device and storage medium

Also Published As

Publication number Publication date
CN110740131B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN110740131A (en) Data processing method and device, electronic equipment and storage medium
RU2628237C2 (en) Call method, device and system
EP3001661B1 (en) Information acquisition method,device and system thereof
KR20060136437A (en) Remote management and access of databases, services and devices associated with a mobile terminal
KR20150009186A (en) Method for operating an conversation service based on messenger, An user interface and An electronic device supporting the same
CN110493627B (en) Multimedia content synchronization method and device
CN110619097A (en) Two-dimensional code generation method and device, electronic equipment and storage medium
WO2023024435A1 (en) Device registration method and apparatus, electronic device, storage medium, and computer program product
CN111385349A (en) Communication processing method, communication processing device, terminal, server and storage medium
CN106790683B (en) Network data display method and device based on mobile terminal
JP6133460B1 (en) Operation support system, operation support program, and operation support method
CN110908904A (en) Method and device for debugging fast application and electronic equipment
CN107197088A (en) Screenshot method and device based on Android mobile device
CN104158851B (en) A kind of dissemination system of Network, method and apparatus
CN111079040A (en) Resource sniffing method, device, terminal, server and storage medium
CN114157520B (en) Project state acquisition method and device, electronic equipment and storage medium
US20160373504A1 (en) Method for sharing a digital content during communication
CN109947640B (en) Regression test-based core function coverage statistical method and device
CN114896165A (en) Testing method and device of conversation robot system, electronic equipment and storage medium
CN111131000B (en) Information transmission method, device, server and terminal
CN111143184B (en) Data processing method, device and system
CN106302646B (en) Remote operation method and device
CN113965476B (en) Inspection method, device and equipment based on application
CN110647351B (en) Source code map file restoration method, device and storage medium
CN114860358B (en) Object processing method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant