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

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

Info

Publication number
CN112968919B
CN112968919B CN201911275309.0A CN201911275309A CN112968919B CN 112968919 B CN112968919 B CN 112968919B CN 201911275309 A CN201911275309 A CN 201911275309A CN 112968919 B CN112968919 B CN 112968919B
Authority
CN
China
Prior art keywords
node
heartbeat message
slave node
processing
target 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.)
Active
Application number
CN201911275309.0A
Other languages
Chinese (zh)
Other versions
CN112968919A (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.)
Sino Telecom Technology Co inc
Original Assignee
Sino Telecom Technology Co inc
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 Sino Telecom Technology Co inc filed Critical Sino Telecom Technology Co inc
Priority to CN201911275309.0A priority Critical patent/CN112968919B/en
Publication of CN112968919A publication Critical patent/CN112968919A/en
Application granted granted Critical
Publication of CN112968919B publication Critical patent/CN112968919B/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/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention discloses a data processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: when target data is acquired, a first socket is established, and a first heartbeat message is sent to a main node; when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the response processing includes mirroring processing, redirection processing, or discard processing. According to the technical scheme provided by the embodiment of the invention, the slave node acquires the target data and then notifies the master node through the first heartbeat message, and mirror image processing, redirection processing or discarding processing is carried out on the target data according to the configuration information sent by the master node, so that the master node has the control and management of the target data in the slave node, the effective supervision of the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
Embodiments of the present invention relate to communications technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
With the continuous progress of computer and communication technologies, the types and numbers of node devices in a communication network, and interactions between node devices are increasing, which also puts higher demands on the interaction capability between node devices.
In the prior art, the slave node equipment and the master node equipment in the communication network are usually mainly circulated by unidirectional information, namely the slave node equipment actively reports the data information to the master node equipment, or the master node equipment actively initiates access to the slave node equipment to acquire the data information of the slave node equipment, but the master node equipment has poor control and management capability on the data information of the slave node equipment and lacks effective supervision on the data information of the slave node equipment.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device, equipment and a storage medium, which are used for realizing control and management of data information of a master node to a slave node in a communication network.
In a first aspect, an embodiment of the present invention provides a data processing method, applied to a slave node, including:
When target data is acquired, a first socket is established, and a first heartbeat message is sent to a main node;
when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing.
In a second aspect, an embodiment of the present invention provides a data processing method, applied to a master node, including:
when a first heartbeat message sent by a slave node is obtained, generating configuration information according to the first heartbeat message; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data;
transmitting the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message, so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, applied to a slave node, including:
the first heartbeat message sending module is used for establishing a first socket when the target data is acquired and sending a first heartbeat message to the main node;
the response processing execution module is used for responding to the acquired target data according to the configuration information of the second heartbeat message when the second heartbeat message which is matched with the first heartbeat message and is sent by the main node is acquired; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing.
In a fourth aspect, an embodiment of the present invention provides a data processing apparatus, applied to a master node, including:
the configuration information generation module is used for generating configuration information according to a first heartbeat message sent by a slave node when the first heartbeat message is acquired; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data;
the second heartbeat message sending module is used for sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data processing methods described in any of the embodiments of the present invention.
In a sixth aspect, embodiments of the present invention also provide a storage medium containing computer executable instructions which, when executed by a computer processor, implement the data processing method according to any of the embodiments of the present invention.
According to the technical scheme provided by the embodiment of the invention, when the target data is acquired by the slave node, the master node is notified through the first heartbeat message, and when the second heartbeat message sent by the master node is received, mirror image processing, redirection processing or discarding processing is carried out on the target data according to the acquired configuration information, so that the master node has the control and management of the target data in the slave node, the effective supervision of the target data in the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Drawings
FIG. 1 is a flow chart of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a data processing method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a data processing method according to a fourth embodiment of the present invention;
FIG. 5 is a flowchart of a data processing method according to a fifth embodiment of the present invention;
FIG. 6 is a block diagram of a data processing apparatus according to a sixth embodiment of the present invention;
FIG. 7 is a block diagram of a data processing apparatus according to a seventh embodiment of the present invention;
fig. 8 is a block diagram of an apparatus according to an eighth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a data processing method provided in a first embodiment of the present invention, where the method may be adapted to process acquired data information from a slave node, and the method may be performed by a data processing apparatus in a sixth embodiment of the present invention, where the apparatus may be implemented by software and/or hardware and integrated in a slave node device, and the method specifically includes the following steps:
S110, when the target data is acquired, a first socket is established, and a first heartbeat message is sent to the master node.
The smallest structure for communication using a communication protocol is called a node, which is a communication endpoint in a communication network, depending on the communication network and the protocol layers; the nodes may be data circuit termination equipment (Data Communication Equipment, DCE), such as modems, hubs, bridges and switches, or data termination equipment (Data Terminal Equipment, DTE), such as routers, workstations and servers. Optionally, in the embodiment of the present invention, the communication protocol, the communication network, and the device type of the node are not specifically limited.
By initiating a heartbeat message, the node with the local data flow encapsulation function is a slave node; responding to the heartbeat message of the slave nodes, and managing one or more nodes of the slave nodes as master nodes; the master node may control the slave node to send the obtained target data to the master node itself, or may control the slave node to send the target data to other slave nodes, for example, the master node is a server in a communication network, and the slave node is each terminal device, and optionally, in the embodiment of the present invention, the slave node includes a data collecting device, and the master node includes a data restoring and processing device, where the data restoring and processing device is used to restore and/or process the data information collected by the data collecting device.
The socket is a communication endpoint in the transmission layer and is used for realizing end-to-end communication in the transmission layer, and the socket can be opened, read-write, closed and the like; in the embodiment of the invention, the heartbeat message is sent or received between the slave node and the master node through the first socket.
The Message (Message) is a data unit for switching and transmitting in the network, namely, the data content to be transmitted between the nodes, the Message contains complete data information, the Message length is not fixed, and the Message length can be set according to the needs; the heartbeat message is a special message, the data content is represented in the form of character string information, and the data is sent according to a certain time interval, and the sending mode and the sending time interval can be set according to the needs.
S120, when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing.
The slave node inquires the processing mode of the target data from the master node through the first heartbeat message, and the master node determines the processing mode of the target data after acquiring the first heartbeat message; the mirror image processing, namely copying target data, wherein the copied target data is still stored in the slave node, and the original target data is sent to a corresponding data receiving end; redirecting is to redirect a network request to other locations, in the embodiment of the present invention, the redirecting is to assign a specific data receiving end to the target data, so that the target data is sent from the node to the specific data receiving end; and discarding the target data. The master node informs the slave node of how the target data should be processed through the second heartbeat message.
Optionally, in an embodiment of the present invention, the configuration information further includes a data receiving node and a second socket word; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket. If it is determined that the processing mode of the target data is mirror processing or redirection processing, the target data should have a corresponding data receiving node, where the data receiving node may be the master node itself, or may be other slave nodes, and the other slave nodes include two types, where the first type of slave node is a slave node that is not communicatively connected to the master node, and the second type of slave node is a slave node that is communicatively connected to the master node. The specific information of the data receiving node may include a network address and port information of the data receiving node. The second socket is a result of a response to the first socket, and the second socket indicates a type of socket that should be used when the target data is transmitted from the node to the data receiving node.
Optionally, in an embodiment of the present invention, communications between the slave node and the master node, that is, the first heartbeat packet and the second heartbeat packet, are used for control and management of the slave node by the master node, and are implemented based on a remote management message (Remote Management Message, RMM) protocol, where the RMM protocol belongs to an application layer protocol of the communication network, and as shown in table 1, a header structure of the RMM protocol includes at least one of version information, a message status, a slave node ID, a message type identifier, a message data byte number, and a message body. Version information, which represents a message version number used by the current message; a message state, representing the current state of the message, e.g., 1 for message valid, 0 for message invalid; a slave node ID representing a unique identification of the slave node, the master node distinguishing an identity of the currently communicating slave node through the field; in particular, when the slave node sends the heartbeat message to the master node for the first time, because the master node does not allocate the corresponding ID to the slave node, the field can be empty or replaced by a placeholder; the message type identification code is used for determining the current message and providing basis for analyzing the message body; message data byte number, representing the length of the message body; message body, representing specific message content, the size of its occupied bits is determined by the message content itself. In the embodiment of the present invention, the configuration information may be included in the message body; when the slave node receives the second heartbeat message, configuration information in the message body is extracted, so that the connection with the data receiving node is established.
TABLE 1
Name of the name Occupying bits Name of the name Occupying bits
Version information 8 Message status 1
Slave node ID 10 Message type identification code 16
Message data byte count 16 Message body Not fixed
Optionally, in an embodiment of the present invention, according to configuration information of the second heartbeat packet, the responding operation for the obtained target data includes: according to the second socket in the configuration information, a third heartbeat message is sent to the data receiving node; and if the fourth heartbeat message which is matched with the third heartbeat message and is sent by the data receiving node is obtained, the target data is sent to the data receiving node. The slave node inquires whether a transmission channel of target data can be established or not through the third heartbeat message to the data receiving node, if the data receiving node agrees to receive the target data, the slave node is informed through the fourth heartbeat message, and when the slave node receives the fourth heartbeat message, the availability of the transmission channel can be determined.
Optionally, in an embodiment of the present invention, communications between the slave node and the data receiving node, that is, the third heartbeat packet and the fourth heartbeat packet, are used for data transmission between the slave node and the data receiving node, and are implemented based on a remote data message (Remote Data Message, RDM) protocol, where the RDM protocol belongs to an application layer protocol of the communication network, and as shown in table 2, a header structure includes at least one of a slave node ID, a forwarding mode, a reservation, a direction, encryption, a heartbeat, and heartbeat related information; the forwarding mode represents a mode adopted by the current message information, such as forwarding from a node, proxy of a master node or remote concatenation; the reservation indicates whether the current message information is reserved after being sent out; the direction indicates whether the current message information is an uplink message or a downlink message; encrypting, which indicates whether the current message is encrypted; a heartbeat, which indicates whether the current message is a heartbeat message; when the message is a heartbeat message, the heartbeat related information is a hardware identifier of the slave node (for example, a serial number of the slave node equipment) and is used by the master node to confirm the sending end of the message; when the message is not a heartbeat message, the heartbeat related information is an Ethernet header with complete source message and is used for restoring the message information in a specific mode; the target data may be stored in a message body from which the data receiving node extracts the target data.
TABLE 2
Name of the name Occupying bits Name of the name Occupying bits
Slave node ID 10 Forwarding mode 2
Reservation of 1 Direction 1
Encryption 1 Heartbeat 1
Heartbeat related information 16 Message body Not fixed
According to the technical scheme provided by the embodiment of the invention, when the target data is acquired by the slave node, the master node is notified through the first heartbeat message, and when the second heartbeat message sent by the master node is received, mirror image processing, redirection processing or discarding processing is carried out on the target data according to the acquired configuration information, so that the master node has the control and management of the target data in the slave node, the effective supervision of the target data in the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Example two
Fig. 2 is a flowchart of a data processing method provided in a second embodiment of the present invention, where the method may be adapted to control and manage data information in a slave node by a master node, and the method may be performed by a data processing apparatus in a seventh embodiment of the present invention, where the apparatus may be implemented by software and/or hardware and integrated in a master node device, and the method specifically includes the following steps:
s210, when a first heartbeat message sent by a slave node is obtained, generating configuration information according to the first heartbeat message; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information includes a processing type of the target data.
When a first heartbeat message sent by a slave node is acquired, judging whether the slave node is registered in a master node, if not, indicating that the slave node communicates with the master node for the first time, and registering the slave node as an effective node, namely setting a slave node ID for the slave node, and distributing required communication resources; if registered, the slave node is not communicated with the master node for the first time, and the identity of the slave node is determined according to the slave node ID of the slave node.
S220, sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message, so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
Optionally, in an embodiment of the present invention, the configuration information further includes a data receiving node and a second socket word; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket.
Optionally, in an embodiment of the present invention, the responding processing of the obtained target data by the slave node according to the configuration information includes: and the slave node sends a third heartbeat message to the data receiving node according to the second socket in the configuration information. And then, when the slave node acquires a fourth heartbeat message which is matched with the third heartbeat message and is sent by the data receiving node, the target data is sent to the data receiving node.
According to the technical scheme provided by the embodiment of the invention, when the target data is acquired by the slave node, the master node is notified through the first heartbeat message, and when the second heartbeat message sent by the master node is received, mirror image processing, redirection processing or discarding processing is carried out on the target data according to the acquired configuration information, so that the master node has the control and management of the target data in the slave node, the effective supervision of the target data in the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Example III
Fig. 3 is a flowchart of a data processing method according to a third embodiment of the present invention, which is implemented based on the foregoing embodiment, in this embodiment, a data receiving node of target data is a master node itself; specifically, the method of the embodiment specifically includes the following steps:
When the slave node acquires target data, a first socket is established, and a first heartbeat message is sent to the master node; after the master node acquires a first heartbeat message sent by the slave node, generating configuration information according to the first heartbeat message, and sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message; when a slave node acquires a second heartbeat message which is matched with the first heartbeat message and is sent by a master node, sending a third heartbeat message to the master node according to a second socket in the configuration information;
when the master node receives the third heartbeat message sent by the slave node, if the master node agrees to receive the target data, a fourth heartbeat message is sent to the slave node; when the slave node receives the fourth heartbeat message, confirming that a transmission channel of the target data is available; the slave node encapsulates the target data and then sends the encapsulated target data to the master node; after receiving the target data, the master node continues to determine the subsequent flow direction of the target data.
According to the technical scheme provided by the embodiment of the invention, when the slave node acquires the target data, the master node is informed through the first heartbeat message, when the second heartbeat message sent by the master node is received, the data transmission channel is applied to the master node through the third heartbeat message according to the acquired configuration information, and when the fourth heartbeat message is acquired, the data transmission channel is determined to be available, and then the target data is sent to the master node, so that the master node realizes the control and management of the target data in the slave node, the data transmission between the master node and the slave node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Example IV
Fig. 4 is a flowchart of a data processing method according to a fourth embodiment of the present invention, which is implemented based on the foregoing embodiment, in which a data receiving node of target data is a first type slave node; specifically, the method of the embodiment specifically includes the following steps:
when the slave node acquires target data, a first socket is established, and a first heartbeat message is sent to the master node; after the master node acquires a first heartbeat message sent by the slave node, generating configuration information according to the first heartbeat message, and sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message; when the slave node acquires a second heartbeat message which is matched with the first heartbeat message and is sent by the master node, a third heartbeat message is sent to the slave node of the first type according to a second socket in the configuration information;
when the first type slave node receives a third heartbeat message sent by the slave node, if receiving the target data is agreed, a fourth heartbeat message is sent to the slave node; when the slave node receives the fourth heartbeat message, confirming that a transmission channel of the target data is available; the slave node encapsulates the target data and then sends the target data to the first type slave node; after the first type receives the target data from the node, the subsequent flow direction of the target data is continuously determined.
According to the technical scheme provided by the embodiment of the invention, when the slave node acquires the target data, the master node is informed through the first heartbeat message, when the second heartbeat message sent by the master node is received, the data transmission channel is applied to the first type slave node through the third heartbeat message according to the acquired configuration information, and when the fourth heartbeat message is acquired, the data transmission channel is determined to be available, and then the target data is sent to the first type slave node, so that the master node realizes the control and management of the target data in the slave node, the slave node can be controlled to transmit the target data to the first type slave node, and the interaction capability between the slave node and the master node in the communication network is improved.
Example five
Fig. 5 is a flowchart of a data processing method according to a fifth embodiment of the present invention, which is implemented based on the foregoing embodiment, in which a data receiving node of target data is a second type slave node; specifically, the method of the embodiment specifically includes the following steps:
when the slave node acquires target data, a first socket is established, and a first heartbeat message is sent to the master node; after the master node acquires a first heartbeat message sent by the slave node, generating configuration information according to the first heartbeat message, and sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message; the configuration information comprises the processing type of the target data, but does not comprise the data receiving node and the second socket; when the master node acquires a fifth heartbeat message sent by a data receiving node (namely a second type slave node), registering the second type slave node, and returning a sixth heartbeat message to inform the second type slave node that the registration is successful.
After the master node acquires the first heartbeat message sent by the slave node again, generating configuration information according to the first heartbeat message, and sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message; the configuration information comprises the processing type of target data, a data receiving node and a second socket; and when the slave node acquires a second heartbeat message which is matched with the first heartbeat message and is sent by the master node again, sending a third heartbeat message to the slave node of the second type according to a second socket in the configuration information.
When the second type slave node receives a third heartbeat message sent by the slave node, if receiving the target data is agreed, a fourth heartbeat message is sent to the slave node; when the slave node receives the fourth heartbeat message, confirming that a transmission channel of the target data is available; the slave node encapsulates the target data and then sends the target data to a second type slave node; after the second type receives the target data from the node, the subsequent flow direction of the target data is continuously determined.
According to the technical scheme provided by the embodiment of the invention, when the slave node acquires the target data, the master node is informed through the first heartbeat message, when the second heartbeat message sent by the master node is received, the data transmission channel is applied to the second type slave node through the third heartbeat message according to the acquired configuration information, and when the fourth heartbeat message is acquired, the data transmission channel is determined to be available, and then the target data is sent to the second type slave node, so that the master node realizes the control and management of the target data in the slave node, the slave node can be controlled to transmit the target data to the second type slave node, and the interaction capability between the slave node and the master node in the communication network is improved.
Example six
Fig. 6 is a block diagram of a data processing apparatus according to a sixth embodiment of the present invention, the apparatus specifically includes: a first heartbeat message sending module 610 and a response processing executing module 620.
A first heartbeat message sending module 610, configured to, when target data is acquired, establish a first socket, and send a first heartbeat message to a master node;
a response processing executing module 620, configured to, when a second heartbeat message that is sent by the master node and matches the first heartbeat message is obtained, perform response processing on the obtained target data according to configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing.
According to the technical scheme provided by the embodiment of the invention, when the target data is acquired by the slave node, the master node is notified through the first heartbeat message, and when the second heartbeat message sent by the master node is received, mirror image processing, redirection processing or discarding processing is carried out on the target data according to the acquired configuration information, so that the master node has the control and management of the target data in the slave node, the effective supervision of the target data in the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Optionally, on the basis of the above technical solution, the configuration information further includes a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket.
Optionally, based on the above technical solution, the response processing executing module 620 specifically includes:
a third heartbeat message sending unit, configured to send a third heartbeat message to the data receiving node according to the second socket in the configuration information;
and the target data sending unit is used for sending the target data to the data receiving node if the fourth heartbeat message which is matched with the third heartbeat message and sent by the data receiving node is obtained.
The device can execute the data processing method provided by the first embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the method provided by any embodiment of the present invention.
Example seven
Fig. 7 is a block diagram of a data processing apparatus according to a seventh embodiment of the present invention, the apparatus specifically including: a configuration information generation module 710 and a second heartbeat message transmission module 720.
The configuration information generating module 710 is configured to generate configuration information according to a first heartbeat message sent from a node when the first heartbeat message is acquired; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data;
the second heartbeat message sending module 720 is configured to send the configuration information to the slave node through a second heartbeat message that is matched with the first heartbeat message, so that the slave node responds to the obtained target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
According to the technical scheme provided by the embodiment of the invention, when the target data is acquired by the slave node, the master node is notified through the first heartbeat message, and when the second heartbeat message sent by the master node is received, mirror image processing, redirection processing or discarding processing is carried out on the target data according to the acquired configuration information, so that the master node has the control and management of the target data in the slave node, the effective supervision of the target data in the slave node by the master node is realized, and the interaction capability between the slave node and the master node in the communication network is improved.
Optionally, on the basis of the above technical solution, the configuration information further includes a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket.
Optionally, on the basis of the above technical solution, the responding processing of the obtained target data by the slave node according to the configuration information includes: and the slave node sends a third heartbeat message to the data receiving node according to the second socket in the configuration information.
The device can execute the data processing method provided by the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the method provided by any embodiment of the present invention.
Example eight
Fig. 8 is a schematic structural diagram of an apparatus according to an eighth embodiment of the present invention. Fig. 8 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media), may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with device 12, and/or any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, via network adapter 20. As shown, network adapter 20 communicates with other modules of device 12 over bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the data processing method provided by the embodiment of the present invention. Namely: when target data is acquired, a first socket is established, and a first heartbeat message is sent to a main node; when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing. Or when a first heartbeat message sent by a slave node is obtained, generating configuration information according to the first heartbeat message; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data; transmitting the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message, so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
Example nine
The ninth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a data processing method according to any embodiment of the present invention; the method comprises the following steps:
when target data is acquired, a first socket is established, and a first heartbeat message is sent to a main node;
when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing includes mirroring processing, redirection processing, or discard processing.
Or when a first heartbeat message sent by a slave node is obtained, generating configuration information according to the first heartbeat message; the first heartbeat message is sent after the slave node acquires target data and establishes a first set of word connection; the configuration information comprises the processing type of the target data;
transmitting the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message, so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing, or discard processing.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of numerous obvious changes, rearrangements and substitutions without departing from the scope of the present invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (6)

1. A data processing method, applied to a slave node, comprising:
when target data is acquired, a first socket is established, and a first heartbeat message is sent to a main node;
when a second heartbeat message which is matched with the first heartbeat message and is sent by the main node is obtained, responding the obtained target data according to the configuration information of the second heartbeat message; wherein the configuration information comprises a processing type of target data; the response processing comprises mirroring processing, redirection processing or discarding processing;
The redirection processing is to assign a specific data receiving end to the target data, so that the target data is sent to the specific data receiving end by the slave node;
the configuration information further comprises a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket;
responding to the acquired target data according to the configuration information of the second heartbeat message, wherein the responding comprises the following steps:
according to the second socket in the configuration information, a third heartbeat message is sent to the data receiving node;
and if the fourth heartbeat message which is matched with the third heartbeat message and is sent by the data receiving node is obtained, the target data is sent to the data receiving node.
2. A data processing method, applied to a master node, comprising:
when a first heartbeat message sent by a slave node is obtained, generating configuration information according to the first heartbeat message; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data;
Transmitting the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message, so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing or discarding processing;
the redirection processing is to assign a specific data receiving end to the target data, so that the target data is sent to the specific data receiving end by the slave node;
the configuration information further comprises a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket;
and enabling the slave node to respond to the acquired target data according to the configuration information, wherein the method comprises the following steps:
and the slave node sends a third heartbeat message to the data receiving node according to the second socket in the configuration information.
3. A data processing apparatus, for application to a slave node, comprising:
The first heartbeat message sending module is used for establishing a first socket when the target data is acquired and sending a first heartbeat message to the main node;
the response processing execution module is used for responding to the acquired target data according to the configuration information of the second heartbeat message when the second heartbeat message which is matched with the first heartbeat message and is sent by the main node is acquired; wherein the configuration information comprises a processing type of target data; the response processing comprises mirroring processing, redirection processing or discarding processing;
the redirection processing is to assign a specific data receiving end to the target data, so that the target data is sent to the specific data receiving end by the slave node;
the configuration information further comprises a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket;
the response processing execution module is specifically configured to:
According to the second socket in the configuration information, a third heartbeat message is sent to the data receiving node;
and if the fourth heartbeat message which is matched with the third heartbeat message and is sent by the data receiving node is obtained, the target data is sent to the data receiving node.
4. A data processing apparatus, for use in a master node, comprising:
the configuration information generation module is used for generating configuration information according to a first heartbeat message sent by a slave node when the first heartbeat message is acquired; the first heartbeat message is sent after the slave node acquires target data and establishes a first socket; the configuration information comprises the processing type of the target data;
the second heartbeat message sending module is used for sending the configuration information to the slave node through a second heartbeat message matched with the first heartbeat message so that the slave node responds to the acquired target data according to the configuration information; wherein the response processing includes mirroring processing, redirection processing or discarding processing;
the redirection processing is to assign a specific data receiving end to the target data, so that the target data is sent to the specific data receiving end by the slave node;
The configuration information further comprises a data receiving node and a second socket; the data receiving node is the master node, a first type slave node or a second type slave node; the first type slave node is not in communication connection with the master node, and the second type slave node is in communication connection with the master node; the second socket is associated with the first socket;
the second heartbeat message sending module is specifically configured to:
and the slave node sends a third heartbeat message to the data receiving node according to the second socket in the configuration information.
5. A data processing apparatus, the apparatus comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the data processing method of claim 1 or to implement the data processing method of any of claim 2.
6. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the data processing method of claim 1 or for performing the data processing method of claim 2.
CN201911275309.0A 2019-12-12 2019-12-12 Data processing method, device, equipment and storage medium Active CN112968919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911275309.0A CN112968919B (en) 2019-12-12 2019-12-12 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911275309.0A CN112968919B (en) 2019-12-12 2019-12-12 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112968919A CN112968919A (en) 2021-06-15
CN112968919B true CN112968919B (en) 2023-05-30

Family

ID=76270956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911275309.0A Active CN112968919B (en) 2019-12-12 2019-12-12 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112968919B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174447B (en) * 2022-06-27 2023-09-29 京东科技信息技术有限公司 Network communication method, device, system, equipment and storage medium
CN115208682B (en) * 2022-07-26 2023-12-12 上海欣诺通信技术股份有限公司 High-performance network attack feature detection method and device based on snort

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN105897507A (en) * 2016-03-31 2016-08-24 杭州数梦工场科技有限公司 Node equipment state detection method and node equipment state detection device
CN108549580A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 Methods and terminal device of the automatic deployment Kubernetes from node
CN108600378A (en) * 2018-04-28 2018-09-28 武汉斗鱼网络科技有限公司 A kind of document down loading method, device, terminal and storage medium
CN109995678A (en) * 2017-12-29 2019-07-09 迈普通信技术股份有限公司 Message transmitting method and device
CN113364610A (en) * 2018-03-30 2021-09-07 华为技术有限公司 Network equipment management method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN105897507A (en) * 2016-03-31 2016-08-24 杭州数梦工场科技有限公司 Node equipment state detection method and node equipment state detection device
CN109995678A (en) * 2017-12-29 2019-07-09 迈普通信技术股份有限公司 Message transmitting method and device
CN108549580A (en) * 2018-03-30 2018-09-18 平安科技(深圳)有限公司 Methods and terminal device of the automatic deployment Kubernetes from node
CN113364610A (en) * 2018-03-30 2021-09-07 华为技术有限公司 Network equipment management method, device and system
CN108600378A (en) * 2018-04-28 2018-09-28 武汉斗鱼网络科技有限公司 A kind of document down loading method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112968919A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112512090B (en) Communication processing method and device, computer readable medium and electronic equipment
US6799220B1 (en) Tunneling management messages over a channel architecture network
JP4624110B2 (en) Usage of direct memory access to perform database operations between two or more machines
US6522654B1 (en) Method for hosting the internet protocol suite on the IEEE-1394 high speed serial bus
US10735373B2 (en) Communications over multiple protocol interfaces in a computing environment
WO2021164316A1 (en) Communication method applied to edge computing scenario, storage medium, and electronic device
US9462089B1 (en) Communication channels
US8819125B2 (en) Method of transmitting data of USB device to server, and client terminal performing the method
CN109818917B (en) Communication method and device thereof
CN110198345B (en) Data request method, system and device and storage medium
CN110809026B (en) File processing method and device, electronic equipment and storage medium
CN112968919B (en) Data processing method, device, equipment and storage medium
US10862804B2 (en) Redirecting data packets between overlay network and underlay network
CN108989424A (en) A kind of method and system remotely controlled
CN110545230A (en) method and device for forwarding VXLAN message
CN108989157B (en) Method and device for controlling intelligent equipment
CN104683312A (en) Method and device for negotiating media multiplexing
CN113810349B (en) Data transmission method, device, computer equipment and storage medium
CN113452778A (en) Session keeping method, device, equipment, system and storage medium
CN110391922B (en) Version prompting method and device for service platform
CN101309154B (en) Datagram sending method, sending apparatus and transmission system
CN113301060B (en) Data transmission method, device, server and storage medium
CN111866100A (en) Method, device and system for controlling data transmission rate
Talpey et al. Remote direct memory access transport for remote procedure call
CN111865675B (en) Container receiving and dispatching speed limiting method, device and 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
GR01 Patent grant
GR01 Patent grant