CN114363055B - Data transmission method and device, computer equipment and storage medium - Google Patents

Data transmission method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114363055B
CN114363055B CN202111676547.XA CN202111676547A CN114363055B CN 114363055 B CN114363055 B CN 114363055B CN 202111676547 A CN202111676547 A CN 202111676547A CN 114363055 B CN114363055 B CN 114363055B
Authority
CN
China
Prior art keywords
data
transmitted
variable
network node
data frame
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
CN202111676547.XA
Other languages
Chinese (zh)
Other versions
CN114363055A (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.)
Lingrui Lanxin Technology Beijing Co ltd
Original Assignee
Lingrui Lanxin Technology Beijing 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 Lingrui Lanxin Technology Beijing Co ltd filed Critical Lingrui Lanxin Technology Beijing Co ltd
Priority to CN202111676547.XA priority Critical patent/CN114363055B/en
Publication of CN114363055A publication Critical patent/CN114363055A/en
Application granted granted Critical
Publication of CN114363055B publication Critical patent/CN114363055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a data transmission method, a data transmission device, computer equipment and a storage medium, wherein a data frame after being packaged is obtained by obtaining data to be transmitted and an identifier of a target network node, storing the identifier of the target network node in a variable-length area and packaging the data to be transmitted, and then the packaged data frame is transmitted to the target network node. The data transmission method realizes network virtualization data encapsulation and transmission based on a network virtualization encapsulation protocol, and particularly realizes that more virtualization network identifications in the current virtualization network are supported by using a variable-length region defined by the network virtualization encapsulation protocol through storing the identification of a target network node in the variable-length region, so that the flexibility of data transmission of the whole virtualization network is improved, and the network data transmission efficiency among network nodes in the whole virtualization network can be greatly improved.

Description

Data transmission method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a data transmission method and apparatus, a computer device, and a storage medium.
Background
Under the current digital and global network application environment, network data transmission among multiple points of an enterprise becomes a conventional layout mode of the current network. The stability, security, flexibility and efficiency of network data transmission among multiple points, especially the transmission of enterprise service data in various fields, are increasingly important.
With the development of digital networks, jitter, delay and packet loss of the networks, leakage prevention and interception prevention of data, and flexible change and requirements of services are challenges to be faced in network data transmission, and how to improve efficiency and security while meeting the stability of network transmission is a technical problem which is urgently needed to be solved in the development of digital networks. At present, network data transmission is based on a network virtualization protocol vLAN or VxLAN, and network virtualization data encapsulation and transmission are realized.
However, the above network data transmission method has a problem of low transmission efficiency.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a data transmission method, an apparatus, a computer device, and a storage medium capable of improving network data transmission efficiency.
In a first aspect, the present application provides a data transmission method. The method comprises the following steps:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length region and encapsulating the identifier of the target network node with the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
and transmitting the encapsulated data frame to the target network node.
In one embodiment, the method further comprises:
obtaining a hash value corresponding to the data to be transmitted;
the storing the identifier of the target network node in a variable-length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes:
and storing the identifier of the target network node and the hash value in a variable-length area, and encapsulating the hash value and the data to be transmitted to obtain an encapsulated data frame.
In one embodiment, the method further comprises:
acquiring metadata corresponding to the data to be transmitted;
the storing the identifier of the target network node in a variable length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes:
and storing the identifier of the target network node and the metadata in a variable-length region, and encapsulating the identifier and the metadata with the data to be transmitted to obtain an encapsulated data frame.
In one embodiment, the method further comprises:
encrypting the data to be transmitted to obtain encrypted data to be transmitted;
the storing the identifier of the target network node in a variable length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes:
and storing the identifier of the target network node in a variable-length area, and encapsulating the identifier and the encrypted data to be transmitted to obtain an encapsulated data frame.
In a second aspect, the present application further provides a data transmission method. The method comprises the following steps:
receiving a data frame sent by a sending network node; the data frame comprises a variable length area, and the variable length area comprises an identifier of a target network node;
and based on a network virtualization encapsulation protocol, decapsulating the data frame to obtain data to be received.
In one embodiment, the decapsulating the data frame to obtain data to be received includes:
decapsulating the data frame to obtain data to be transmitted sent by the sending network node and a hash value in the variable-length region;
calculating to obtain a preset hash value of the data to be transmitted;
and verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed.
In one embodiment, the method further comprises:
if the variable-length region in the data frame comprises metadata, extracting the metadata from the variable-length region, and sending the data to be received to a receiving system indicated by the metadata for data processing.
In one embodiment, the method further comprises:
and if the variable-length region in the data frame does not comprise metadata, performing data processing on the data to be received.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length region and encapsulating the identifier of the target network node with the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
and transmitting the encapsulated data frame to the target network node.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length area, and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
transmitting the encapsulated data frame to the target network node
According to the data transmission method, the data transmission device, the computer equipment and the storage medium, after the encapsulated data frame is obtained by acquiring the data to be transmitted and the identifier of the target network node, storing the identifier of the target network node in the variable-length area and encapsulating the data to be transmitted, the encapsulated data frame is transmitted to the target network node, wherein: the variable length area is a field area contained in a data transmission format of the data frame defined based on the network virtualization packaging protocol. The data transmission method realizes the network virtualization data encapsulation and transmission based on the network virtualization encapsulation protocol, and particularly stores the identification of the target network node in the variable-length area defined by the network virtualization encapsulation protocol, so that the variable-length area is utilized to support more virtualization network identifications in the current virtualization network, the current virtualization network can define more virtualization network identifications, the number of network nodes supporting and transmitting data by the virtualization network can be increased, the flexibility of the data transmission of the whole virtualization network is improved, and the network data transmission efficiency among the network nodes in the whole virtualization network can be greatly improved.
Drawings
FIG. 1 is a diagram of an exemplary data transmission method;
FIG. 2 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 3 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 4 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 5 is a flow chart illustrating a method of data transmission according to one embodiment;
FIG. 6 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 7 is a flow chart illustrating one implementation of S202 in one embodiment of FIG. 6;
FIG. 8 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 9 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 10 is a block diagram showing the construction of a data transmission device according to an embodiment;
FIG. 11 is a block diagram showing the structure of a data transmission device according to an embodiment;
FIG. 12 is a block diagram showing the structure of a data transmission device according to an embodiment;
FIG. 13 is a block diagram showing the structure of a data transmission device according to an embodiment;
FIG. 14 is a block diagram showing the structure of a data transmission device according to an embodiment;
FIG. 15 is a block diagram showing the construction of a data transmission device according to an embodiment;
FIG. 16 is a block diagram showing the structure of a data transmission device according to an embodiment;
FIG. 17 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The data transmission method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. The method comprises the following steps: a plurality of network nodes, each of which may be a transmitting network node 102 or a receiving network node 104. Each network node may be one or more network devices, and each network node may be communicatively connected to each other through a network. The sending network node 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The receiving network node 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like.
In one embodiment, as shown in fig. 2, a data transmission method is provided, which is described by taking the example that the method is applied to the sending network node in fig. 1, and includes the following steps:
s101, acquiring the data to be transmitted and the identification of the target network node.
The data to be transmitted is data sent by the sending network node to the at least one receiving network node. The target network node is one of the receiving network nodes, which may be one or more sets of network devices. The identification of the target network node is a virtualized network identification of the network device in the network.
In this embodiment, when the sending network node needs to send data to be sent to the target network node, the sending network node may first obtain data to be transmitted from the local or obtain data to be transmitted from the server; if the sending network node forwards the data of other network nodes to the target network node, the sending network node may receive the data to be transmitted from other network nodes. Correspondingly, when the sending network node needs to send data to be sent to the target network node, the sending network node may query the identifier of the target network node from the local or query the identifier of the target network node from a network node management database on the server; if the sending network node forwards the data of other network nodes to the target network node, the sending network node can extract the identifier of the target network node from the forwarding request information received from other network nodes, so as to accurately send the data to be transmitted to the target network node.
S102, storing the identification of the target network node in the variable-length area, and encapsulating the identification with the data to be transmitted to obtain an encapsulated data frame.
The variable length region is a field region included in a data transmission format of a data frame defined based on a network virtualization encapsulation protocol (GENEVE protocol), and optionally, the GENEVE protocol is used to encapsulate data transmitted between nodes. The GENEVE protocol provides a tunnel frame for network virtualization instead of stipulating the whole system, so that the problems that the flexibility is insufficient in the current virtualization and the flexibility requirement of a receiving network node is difficult to meet can be solved, for example: data transmission requirements of various control layers, safety, control and application combination and the like.
In this embodiment, after the sending network node obtains the identifier of the target network node, a data frame may be generated based on a data format defined by a GENEVE protocol, where the identifier of the target network node is stored in a variable-length region of the data frame, and then the data frame is encapsulated. It should be noted that, in this embodiment, the variable-length region in the GENEVE protocol is autonomously defined, and the variable-length region is utilized to implement support of more virtualized network identifiers (identifiers of target network nodes) in the network, that is, the network may define more virtualized network identifiers, and then the sending network node may send data to more target network nodes, so as to satisfy network data transmission among multiple nodes in the enterprise network.
And S103, transmitting the encapsulated data frame to a target network node.
When the sending network node encapsulates the data to be transmitted based on the steps to obtain the encapsulated data frame, the encapsulated data frame can be sent to the target network node corresponding to the identifier of the target network node, so that the target network node performs data processing on the encapsulated data frame. It should be noted that, in practical applications, the sending network node may perform the data transmission between the tunnel based on the GENEVE protocol and the target network node.
According to the data transmission method, the data transmission device, the computer equipment and the storage medium, after the encapsulated data frame is obtained by acquiring the data to be transmitted and the identifier of the target network node, storing the identifier of the target network node in the variable-length area and encapsulating the data to be transmitted, the encapsulated data frame is transmitted to the target network node, wherein: the variable length region is a field region contained in a data transmission format of the data frame defined based on the network virtualization encapsulation protocol. The data transmission method realizes network virtualization data encapsulation and transmission based on a network virtualization encapsulation protocol, and particularly realizes that more virtualization network identifications in the current virtualization network can be supported by using the variable-length region by storing the identification of the target network node in the variable-length region defined by the network virtualization encapsulation protocol, so that more virtualization network identifications can be defined by the current virtualization network, the number of network nodes supporting and transmitting data by the virtualization network can be increased, the flexibility of data transmission of the whole virtualization network is improved, and the network data transmission efficiency among network nodes in the whole virtualization network can be greatly improved.
In an embodiment, on the basis of the method in the embodiment in fig. 2, as shown in fig. 3, the provided data transmission method further includes:
and S104, acquiring a hash value corresponding to the data to be transmitted.
In this embodiment, after the sending network node obtains the data to be transmitted, hash calculation may be further performed on the data to be transmitted, a hash value corresponding to the data to be transmitted is obtained, and the obtained hash value corresponding to the data to be transmitted is packaged and then sent to the target network node.
Correspondingly, when the sending network node executes the step of S102, the following steps may be specifically executed: and storing the identifier and the hash value of the target network node in the variable-length region and encapsulating the identifier and the hash value with data to be transmitted to obtain an encapsulated data frame.
In this embodiment, after the sending network node obtains the hash value corresponding to the data to be transmitted, the data frame may be generated based on the data format defined by the GENEVE protocol, where the hash value corresponding to the data to be transmitted is stored in the variable-length region of the data frame, and then the data frame is encapsulated. It should be noted that, this embodiment implements the autonomous definition of the variable-length region in the GENEVE protocol, and implements the tamper-proof function of the data to be transmitted by using the variable-length region, so that the data to be transmitted can be obtained again if the data to be transmitted is tampered.
In an embodiment, on the basis of the method in the embodiment in fig. 2, as shown in fig. 4, the provided data transmission method further includes:
and S105, acquiring metadata corresponding to the data to be transmitted.
The metadata represents attributes of a receiving end or a receiving application in a network node receiving data to be transmitted, such as: the metadata may indicate that the data to be transmitted is data transmitted to a mail system, may indicate that the data to be transmitted is data transmitted to an enterprise office system, and the like. Before the sending network node sends the data to be transmitted to other network nodes, the attribute of a receiving end or receiving application on other network nodes can be further determined, metadata is generated according to the attribute, the sending network node can conveniently send the data to be transmitted to other network nodes according to the indication of the metadata, and then the data to be transmitted are processed by the receiving end or receiving application on other network nodes.
Correspondingly, when the sending network node executes the step of S102, the following steps may be specifically executed: and storing the identifier and the metadata of the target network node in the variable-length region and encapsulating the identifier and the metadata with the data to be transmitted to obtain an encapsulated data frame.
In this embodiment, after the sending network node obtains the metadata corresponding to the data to be transmitted, a data frame may be generated based on a data format defined by a GENEVE protocol, where the metadata corresponding to the data to be transmitted is stored in a variable-length region of the data frame, and then the data frame is encapsulated. It should be noted that, in this embodiment, a variable-length region in the GENEVE protocol is autonomously defined, and with the variable-length region, a receiving end in a network node that receives data to be transmitted may send the data to be transmitted to other network nodes according to an indication of metadata, and then perform data processing on the data to be transmitted by receiving ends or receiving applications on other network nodes.
In an embodiment, on the basis of the method in the embodiment in fig. 2, as shown in fig. 5, the provided data transmission method further includes:
s106, encrypting the data to be transmitted to obtain the encrypted data to be transmitted.
In this embodiment, after the sending network node obtains the data to be transmitted, the data to be transmitted may be encrypted, specifically, the data to be transmitted may be encrypted by using encryption methods such as a data packet Transport Layer Security protocol (DTLS), a national password, and the like, so as to improve the Security of data transmission; optionally, the sending network node may also calculate a hash value of the encrypted data to be transmitted after the data to be transmitted is encrypted, so that the encrypted data to be transmitted is checked according to the hash value, thereby improving the security of data transmission and preventing the data to be transmitted from being leaked.
Correspondingly, when the sending network node executes the step of S102, the following steps may be specifically executed: and storing the identifier of the target network node in the variable-length area, and encapsulating the identifier and the encrypted data to be transmitted to obtain an encapsulated data frame.
In this embodiment, after the sending network node obtains the encrypted data to be transmitted, a data frame may be generated based on a data format defined by a GENEVE protocol, where the encrypted data to be transmitted is stored in the data frame, and then the data frame is encapsulated. It should be noted that, in this embodiment, by encrypting the data to be transmitted, the secure transmission of the data to be transmitted is realized.
The embodiments of fig. 2 to 5 are data transmission methods of a sending network node, the embodiments of fig. 6 to 9 are data transmission methods of a receiving network node, and the following describes a data transmission method of a receiving network node in detail.
In an embodiment, as shown in fig. 6, a data transmission method is provided, which is described by taking an example that the method is applied to one of the receiving network nodes in fig. 1 (the corresponding target network node in the foregoing fig. 2 embodiment), and includes the following steps:
s201, receiving a data frame sent by a sending network node.
The method in this embodiment of the step corresponds to the data transmission method of the sending network node in the embodiment of fig. 2, and for a detailed description, reference is made to the foregoing description, which is not repeated herein.
S202, based on the network virtualization encapsulation protocol, the data frame is decapsulated to obtain the data to be received.
In this embodiment, after the receiving network node obtains the data frame sent by the sending network node, the data frame may be decapsulated and the data to be received may be obtained based on the data format defined by the GENEVE protocol, where it is to be noted that the data to be received corresponds to the data to be transmitted sent by the sending network node.
According to the data transmission method, the data transmission device, the computer equipment and the storage medium, the data frame sent by the network node is received and sent, and then the data frame is decapsulated based on the network virtualization encapsulation protocol to obtain the data to be received. The data transmission method realizes the network virtualization data encapsulation and transmission based on the network virtualization encapsulation protocol, and particularly stores the identification of the target network node in the variable-length area defined by the network virtualization encapsulation protocol, so that the variable-length area is utilized to support more virtualization network identifications in the current virtualization network, the current virtualization network can define more virtualization network identifications, the number of network nodes supporting and transmitting data by the virtualization network can be increased, the flexibility of the data transmission of the whole virtualization network is improved, and the network data transmission efficiency among the network nodes in the whole virtualization network can be greatly improved.
In an embodiment, the present application further provides a specific implementation manner of the foregoing "decapsulating a data frame to obtain data to be received", as shown in fig. 7, including:
s301, decapsulating the data frame to obtain the to-be-transmitted data sent by the sending network node and the hash value in the variable-length region.
In this embodiment, after the receiving network node acquires the data frame sent by the sending network node, the data frame may be decapsulated based on a data format defined by a GENEVE protocol, where the decapsulated data frame includes the data to be transmitted sent by the sending network node, and a hash value stored in a variable-length region of the data frame and corresponding to the data to be transmitted.
S302, a preset hash value of the data to be transmitted is obtained through calculation.
In this embodiment, when the receiving network node obtains the data to be transmitted, the hash value of the data to be transmitted may be further calculated according to a corresponding check algorithm, and is used as the preset hash value of the data to be transmitted, so as to be used later.
And S303, verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed.
After the receiving network node obtains the preset hash value of the data to be transmitted and the hash value obtained after the data to be transmitted is decapsulated, the two hash values can be compared, if the comparison result is consistent, the data to be transmitted is not tampered, the data to be transmitted is determined as the data to be received, and the receiving network node can receive the data. If the comparison result is inconsistent, it indicates that the data to be transmitted may be tampered in the transmission process, and the current receiving network node cannot receive the data, and then the current receiving network node may send a retransmission request for obtaining the data to be transmitted to the sending network node to re-receive the data to be transmitted.
In an embodiment, on the basis of the method in the embodiment in fig. 6, as shown in fig. 8, the provided data transmission method further includes:
s203, if the variable length region in the data frame includes metadata, step S204 is executed, and if the variable length region in the data frame does not include metadata, step S205 is executed.
And S204, extracting metadata from the variable-length region, and sending the data to be received to a receiving system indicated by the metadata for data processing.
And S205, performing data processing on the data to be received.
In this embodiment, when the receiving network node acquires the data frame, if the variable-length region in the data frame includes the metadata, the receiving network node may further analyze the metadata, determine a receiving end, a receiving application, or a receiving system in the receiving network node, then may correspondingly send the data to be received to the receiving end, the receiving application, or the receiving system indicated by the metadata, and complete processing of the data to be received by the receiving end, the receiving application, or the receiving system. If the variable-length region in the data frame does not contain metadata, the receiving network node directly processes the data to be received
With reference to all the above embodiments, the present application further provides a data transmission method, as shown in fig. 9, the method includes:
s401, the sending network node obtains the data to be transmitted and the identification of the target network node.
S402, the sending network node obtains the hash value corresponding to the data to be transmitted.
S403, the sending network node obtains metadata corresponding to the data to be transmitted.
S404, the sending network node encrypts the data to be transmitted to obtain encrypted data to be transmitted.
S405, the sending network node stores the identifier of the target network node, the hash value corresponding to the data to be transmitted and the metadata corresponding to the data to be transmitted in a variable-length area, and encapsulates the data to be transmitted and the encrypted data to obtain an encapsulated data frame.
S406, the sending network node transmits the encapsulated data frame to the target network node.
S407, the receiving network node receives the data frame sent by the sending network node.
S408, the receiving network node decapsulates the data frame to obtain the data to be transmitted sent by the sending network node and the hash value in the variable-length region.
And S409, receiving the preset hash value of the data to be transmitted calculated by the network node.
S410, the receiving network node verifies the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determines the data to be transmitted as the data to be received under the condition that the verification is passed.
S411, if the receiving network node judges that the variable-length area in the data frame comprises metadata, extracting the metadata from the variable-length area, and sending the data to be received to a receiving system indicated by the metadata for data processing.
S412, the receiving network node determines that if the variable-length region in the data frame does not include metadata, then performs data processing on the data to be received.
The above steps are all described in the foregoing embodiments, and for concrete content, refer to the foregoing content, which is not described herein again. The data transmission method of the embodiment combines the self-defined GENEVE protocol with DTLS, national password and other encryption methods, and stores the data hash value in the variable area, thereby enhancing the data security, preventing leakage and interception, and improving the data transmission efficiency of the virtualization network of the whole enterprise.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a data transmission apparatus for implementing the above-mentioned data transmission method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the data transmission device provided below can be referred to the limitations of the data transmission method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 10, there is provided a data transmission apparatus including: a first obtaining module 11, a first encapsulating module 12 and a transmitting module 13, wherein:
the first obtaining module 11 is configured to obtain the data to be transmitted and an identifier of a target network node.
And an encapsulating module 12, configured to store the identifier of the target network node in the variable length region, and encapsulate the identifier with the data to be transmitted, to obtain an encapsulated data frame.
And a transmission module 13, configured to transmit the encapsulated data frame to a target network node.
In one embodiment, as shown in fig. 11, the above apparatus further comprises:
the second obtaining module 14 is configured to obtain a hash value corresponding to the data to be transmitted.
In one embodiment, as shown in fig. 12, the apparatus further comprises:
and a third obtaining module 15, configured to obtain metadata corresponding to the data to be transmitted.
In one embodiment, as shown in fig. 13, the apparatus further comprises:
and the encryption module 16 is configured to encrypt data to be transmitted to obtain encrypted data to be transmitted.
In one embodiment, as shown in fig. 14, there is also provided a data transmission apparatus including:
a receiving module 20, configured to receive a data frame sent by a sending network node; the data frame comprises a variable-length area, and the variable-length area comprises the identification of the target network node.
And the decapsulation module 21 is configured to decapsulate the data frame based on a network virtualization encapsulation protocol to obtain data to be received.
In one embodiment, as shown in fig. 15, the decapsulation module 21 includes:
the decapsulation unit 211 is configured to decapsulate the data frame to obtain to-be-transmitted data sent by the sending network node and a hash value in the variable length region.
The calculating unit 212 is configured to calculate a preset hash value of the data to be transmitted.
The checking unit 213 is configured to check the data to be transmitted according to the preset hash value and the hash value in the variable length region, and determine the data to be transmitted as the data to be received when the check is passed.
In one embodiment, as shown in fig. 16, the above apparatus further comprises:
the first extracting module 22 is configured to, if the variable-length region in the data frame includes metadata, extract the metadata from the variable-length region, and send the data to be received to a receiving system indicated by the metadata for data processing.
The second extracting module 23 is configured to perform data processing on the data to be received if the variable-length region in the data frame does not include the metadata.
The modules in the data transmission device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a sending network node or a receiving network node, and the internal structure thereof may be as shown in fig. 17. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data to be transmitted. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data transmission method.
Those skilled in the art will appreciate that the architecture shown in fig. 17 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length region and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
and transmitting the encapsulated data frame to the target network node.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
receiving a data frame sent by a sending network node; the data frame comprises a variable length area, and the variable length area comprises an identifier of a target network node;
and based on a network virtualization encapsulation protocol, decapsulating the data frame to obtain the data to be received.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length region and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
and transmitting the encapsulated data frame to the target network node.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
receiving a data frame sent by a sending network node; the data frame comprises a variable-length area, and the variable-length area comprises an identifier of a target network node;
and based on a network virtualization encapsulation protocol, decapsulating the data frame to obtain the data to be received.
In one embodiment, a computer program product is provided, comprising a computer program which when executed by a processor performs the steps of:
acquiring data to be transmitted and an identifier of a target network node;
storing the identifier of the target network node in a variable-length region and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol;
and transmitting the encapsulated data frame to the target network node.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
receiving a data frame sent by a sending network node; the data frame comprises a variable length area, and the variable length area comprises an identifier of a target network node;
and based on a network virtualization encapsulation protocol, decapsulating the data frame to obtain the data to be received.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases involved in the embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data transmission, the method comprising:
acquiring data to be transmitted and an identifier of a target network node;
acquiring metadata and a hash value corresponding to the data to be transmitted; the metadata represents the attribute of a receiving end or a receiving application in the network node for receiving the data to be transmitted;
storing the identifier of the target network node in a variable-length area, and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol; the storing the identifier of the target network node in a variable-length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes: storing the identifier of the target network node, the hash value and the metadata in a variable-length region, and encapsulating the identifier, the hash value and the metadata with the data to be transmitted to obtain an encapsulated data frame;
transmitting the encapsulated data frame to the target network node, so that the target network node receives the encapsulated data frame, and decapsulating the data frame based on the network virtualization encapsulation protocol to obtain data to be received; if the variable-length region in the data frame comprises metadata, extracting the metadata from the variable-length region, and sending the data to be received to a receiving system indicated by the metadata for data processing;
the decapsulating the data frame to obtain data to be received includes:
decapsulating the data frame to obtain data to be transmitted sent by the sending network node and a hash value in the variable-length region;
calculating to obtain a preset hash value of the data to be transmitted;
and verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed.
2. The method of claim 1, further comprising:
encrypting the data to be transmitted to obtain encrypted data to be transmitted;
the storing the identifier of the target network node in a variable length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes:
and storing the identifier of the target network node in a variable-length area, and encapsulating the identifier and the encrypted data to be transmitted to obtain an encapsulated data frame.
3. A method of data transmission, the method comprising:
receiving a data frame sent by a sending network node; the data frame comprises a variable-length area, and the variable-length area comprises an identifier of a target network node;
based on a network virtualization encapsulation protocol, decapsulating the data frame to obtain data to be received;
the decapsulating the data frame to obtain data to be received includes:
decapsulating the data frame to obtain data to be transmitted sent by the sending network node and a hash value in the variable-length region;
calculating to obtain a preset hash value of the data to be transmitted;
verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed;
the method further comprises the following steps:
if the variable-length region in the data frame comprises metadata, extracting the metadata from the variable-length region, and sending the data to be received to a receiving system indicated by the metadata for data processing.
4. The method of claim 3, further comprising:
and if the variable-length region in the data frame does not comprise metadata, performing data processing on the data to be received.
5. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
the first acquisition module is used for acquiring the data to be transmitted and the identifier of the target network node;
the second acquisition module is used for acquiring a hash value corresponding to the data to be transmitted;
a third obtaining module, configured to obtain metadata corresponding to the data to be transmitted;
the encapsulation module is used for storing the identifier of the target network node in a variable-length region and encapsulating the identifier and the data to be transmitted to obtain an encapsulated data frame; the variable length area is a field area contained in a data transmission format of a data frame defined based on a network virtualization packaging protocol; the storing the identifier of the target network node in a variable-length region and encapsulating the identifier with the data to be transmitted to obtain an encapsulated data frame includes: storing the identifier of the target network node, the hash value and the metadata in a variable-length region and encapsulating the data to be transmitted to obtain an encapsulated data frame;
a transmission module, configured to transmit the encapsulated data frame to the target network node, so that the target network node receives the encapsulated data frame, and decapsulate the data frame based on the network virtualization encapsulation protocol to obtain data to be received; if the variable-length region in the data frame comprises metadata, extracting the metadata from the variable-length region, and sending the data to be received to a receiving system indicated by the metadata for data processing;
the decapsulating the data frame to obtain data to be received includes:
decapsulating the data frame to obtain data to be transmitted sent by the sending network node and a hash value in the variable-length region;
calculating to obtain a preset hash value of the data to be transmitted;
and verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed.
6. The apparatus of claim 5, further comprising:
the encryption module is used for encrypting the data to be transmitted to obtain encrypted data to be transmitted;
the encapsulation module is further configured to store the identifier of the target network node in a variable-length region, and encapsulate the identifier and the encrypted data to be transmitted, so as to obtain an encapsulated data frame.
7. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
a receiving module, configured to receive a data frame sent by a sending network node; the data frame comprises a variable length area, and the variable length area comprises an identifier of a target network node;
the decapsulation module is used for decapsulating the data frame based on a network virtualization encapsulation protocol to obtain data to be received;
wherein the decapsulation module comprises:
a decapsulation unit, configured to decapsulate the data frame to obtain to-be-transmitted data sent by the sending network node and a hash value in the variable-length region;
the calculation unit is used for calculating to obtain a preset hash value of the data to be transmitted;
the verification unit is used for verifying the data to be transmitted according to the preset hash value and the hash value in the variable-length region, and determining the data to be transmitted as the data to be received under the condition that the verification is passed;
the data transmission apparatus further includes:
the first extraction module is configured to, if a variable-length region in the data frame includes metadata, extract the metadata from the variable-length region, and send the data to be received to a receiving system indicated by the metadata for data processing.
8. The apparatus of claim 7, further comprising:
and the second extraction module is used for performing data processing on the data to be received if the variable-length region in the data frame does not comprise metadata.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 3 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
CN202111676547.XA 2021-12-31 2021-12-31 Data transmission method and device, computer equipment and storage medium Active CN114363055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111676547.XA CN114363055B (en) 2021-12-31 2021-12-31 Data transmission method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111676547.XA CN114363055B (en) 2021-12-31 2021-12-31 Data transmission method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114363055A CN114363055A (en) 2022-04-15
CN114363055B true CN114363055B (en) 2023-03-31

Family

ID=81106253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111676547.XA Active CN114363055B (en) 2021-12-31 2021-12-31 Data transmission method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114363055B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115051887A (en) * 2022-06-06 2022-09-13 国汽智控(北京)科技有限公司 Data conversion method, interface conversion device and vehicle
CN115334176A (en) * 2022-07-27 2022-11-11 广州安凯微电子股份有限公司 Data transmission method, data transmission device, computer equipment, storage medium and program product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9350657B2 (en) * 2013-07-08 2016-05-24 Nicira, Inc. Encapsulating data packets using an adaptive tunnelling protocol
CN106941437B (en) * 2016-01-04 2020-11-17 中兴通讯股份有限公司 Information transmission method and device
CN109246142A (en) * 2018-10-26 2019-01-18 深圳市通用互联科技有限责任公司 Data encapsulation method, router things-internet gateway and storage medium
CN111447131B (en) * 2019-01-16 2022-11-08 中兴通讯股份有限公司 Message de-encapsulation method and device and message encapsulation method and device

Also Published As

Publication number Publication date
CN114363055A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN114363055B (en) Data transmission method and device, computer equipment and storage medium
CN112468407A (en) Data subpackage transmission method and device, computer equipment and storage medium
US20110154015A1 (en) Method For Segmenting A Data File, Storing The File In A Separate Location, And Recreating The File
CN107729760B (en) CSP implementation method based on Android system and intelligent terminal
CN107872315B (en) Data processing method and intelligent terminal
US20140281536A1 (en) Secured embedded data encryption systems
CN114417362A (en) Data management method, device and system and storage medium
TW202321962A (en) Sample alignment method, device and equipment, and storage medium
CN108833500B (en) Service calling method, service providing method, data transmission method and server
CN107133517B (en) Data recovery method based on data encryption and calculation in memory
CN116684102A (en) Message transmission method, message verification method, device, equipment, medium and product
CN110557383A (en) Network security data processing method, device, equipment and medium for power monitoring system
CN114679299B (en) Communication protocol encryption method, device, computer equipment and storage medium
CN111262837B (en) Data encryption method, data decryption method, system, equipment and medium
CN114124440B (en) Secure transmission method, apparatus, computer device and storage medium
CN115348082A (en) Data desensitization method and device, computer equipment and storage medium
CN114996730A (en) Data encryption and decryption system, method, computer equipment and storage medium
CN110381034B (en) Message processing method, device, equipment and readable storage medium
CN107343001A (en) Data processing method and device
CN113556333A (en) Computer network data secure transmission method and device
CN114257424B (en) Data packet receiving and processing method and device based on power special chip
CN116318621B (en) Industrial Internet of things data privacy protection system based on homomorphic encryption
CN117010000B (en) Data security service method, device, computer equipment and storage medium
CN114567608B (en) Mirror image message transmission method and system
WO2023124530A1 (en) Data encryption system and related product

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