CN114697388B - Data transmission method and device - Google Patents
Data transmission method and device Download PDFInfo
- Publication number
- CN114697388B CN114697388B CN202011447370.1A CN202011447370A CN114697388B CN 114697388 B CN114697388 B CN 114697388B CN 202011447370 A CN202011447370 A CN 202011447370A CN 114697388 B CN114697388 B CN 114697388B
- Authority
- CN
- China
- Prior art keywords
- address information
- service data
- forwarding
- target
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000013507 mapping Methods 0.000 claims abstract description 46
- 238000006243 chemical reaction Methods 0.000 claims description 16
- 238000013519 translation Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006855 networking Effects 0.000 abstract description 4
- 238000004891 communication Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000011664 signaling Effects 0.000 description 3
- 101100048435 Caenorhabditis elegans unc-18 gene Proteins 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a data transmission method and device, wherein the method comprises the following steps: receiving service data sent by network equipment; determining target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information; and sending the service data to the target equipment according to the target address information corresponding to the service data. Compared with the prior art, the method and the device have the advantages that the target device is determined through the mapping relation between the address information, the service data is forwarded to the target device, and the data transmission between the network device and the target device is realized, so that the problem that the data transmission between the core network and the device cannot be performed under the distributed networking is solved.
Description
Technical Field
The present disclosure relates to the field of trunking communication technologies, and in particular, to a data transmission method and apparatus.
Background
Private network communication refers to emergency communication, command scheduling, and wireless technologies for private network communication provided by government and public security, public utilities, industry and commerce, etc., and mainly includes narrowband digital trunking (TETRA) technology, police digital trunking (Police Digital Trunking, PDT), broadband trunking (Broadband Trunking Communication, B-trunk), etc.
The channel machine in the existing private network communication system only supports the post-route transmission mode. In the post-route transmission mode, the channelizer transmits an internet protocol (Internet Protocol, IP) address of the device under the local area network to the core network, so as to realize data transmission between the device and the core network.
However, in the distributed network, data transmission is realized between core networks through the wide area network IP address. The existing device based on the post-route transmission mode of the channel machine can realize data transmission through the local area network IP under the corresponding core network to carry out corresponding service, but the data sent by other core networks under the distributed network can not be transmitted to the device. Therefore, in the existing technical scheme, under the distributed network, there is a problem that data sent by the core network cannot be transmitted to the device side.
Disclosure of Invention
The embodiment of the application provides a data transmission method and device, which can solve the problem that data sent by a core network under a distributed network cannot be transmitted to a device side in the prior art.
A first aspect of the present application provides a data transmission method, the method including:
receiving service data sent by network equipment;
determining target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information;
and sending the service data to target equipment according to the target address information corresponding to the service data.
In an alternative embodiment, the address information includes internet protocol address information and port address information.
In an alternative embodiment, the forwarding address information and the destination address information are determined according to a traffic type of the traffic data.
In an alternative embodiment, before the receiving the service data sent by the network device, the method further includes:
receiving target address information corresponding to the service data sent by the target equipment;
and establishing the mapping relation according to the target address information corresponding to the service data and the forwarding address information of the forwarding equipment.
In an alternative embodiment, before the receiving the service data sent by the network device, the method further includes:
receiving a mode setting request sent by the target equipment;
and setting the forwarding device into a network address conversion mode according to the mode setting request, wherein the network address conversion mode is used for indicating to forward the service data received by the forwarding device to the target device.
In an alternative embodiment, the method further comprises:
the network address translation mode is further used for indicating to send forwarding address information corresponding to the target address information of the target device to the network device.
A second aspect of the present application provides a data transmission apparatus, the apparatus comprising:
the receiving device is used for receiving the service data sent by the network equipment;
the processing device is used for determining the target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information;
and the sending device is used for sending the service data to the target equipment according to the target address information corresponding to the service data.
In an alternative embodiment, the address information includes internet protocol address information and port address information.
In an alternative embodiment, the forwarding address information and the destination address information are determined according to a traffic type of the traffic data.
In an optional implementation manner, the receiving device is further configured to receive target address information corresponding to the service data sent by the target device;
the processing device is further configured to establish the mapping relationship according to the destination address information corresponding to the service data and the forwarding address information of the forwarding device.
In an optional implementation manner, the receiving device is further configured to receive a mode setting request sent by the target device;
the processing device is further configured to set the forwarding device to a network address conversion mode according to the mode setting request, where the network address conversion mode is used to instruct forwarding of the service data received by the forwarding device to the target device.
In an alternative embodiment, the network address translation mode is further used for indicating to send forwarding address information corresponding to the target address information of the target device to the network device.
A third aspect of the present application provides a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform a method as in the first aspect.
A fourth aspect of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a method as in the first aspect.
A fifth aspect of the present application provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method as in the first aspect.
According to the data transmission method and device, firstly, service data sent by network equipment are received, then target address information corresponding to the service data is determined according to forwarding address information corresponding to the service data and a mapping relation between the forwarding address information and the target address information, and finally the service data is sent to the target equipment according to the target address information corresponding to the service data. Compared with the prior art, the method and the device have the advantages that the target device is determined through the mapping relation between the address information, then the service data is forwarded to the target device, and the data transmission between the network device and the target device is realized, so that the problem that the data transmission between the wireless core network and the device cannot be performed under the distributed networking is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario schematic diagram of a data transmission method provided in an embodiment of the present application;
fig. 2 is a logic schematic diagram of implementing data transmission by a vehicle-mounted station through a channel machine according to an embodiment of the present application;
fig. 3 is a flow chart of a data transmission method according to an embodiment of the present application;
fig. 4 is a flow chart of another data transmission method according to an embodiment of the present application;
fig. 5 is a flowchart of another data transmission method according to an embodiment of the present application;
fig. 6 is a signaling interaction diagram of a data transmission method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, based on the embodiments herein, which would be apparent to one of ordinary skill in the art without making any inventive effort, are intended to be within the scope of the present application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In the description of this application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The channel machine in the existing private network communication system only supports the post-route transmission mode. In the post-route transmission mode, the channelizer transmits an internet protocol (Internet Protocol, IP) address of the device under the local area network to the core network, so as to realize data transmission between the device and the core network.
However, in the distributed network, data transmission is realized between core networks through the wide area network IP address. The existing device based on the post-route transmission mode of the channel machine can realize data transmission through the local area network IP under the corresponding core network to carry out corresponding service, but under the distributed network, the data sent by other core networks can not find out the corresponding device according to the local area network IP address and transmit the service data to the device. Therefore, in the existing technical scheme, under the distributed network, there is a problem that data sent by the core network cannot be transmitted to the device side.
In order to solve the above problems, embodiments of the present application provide a data transmission method and apparatus, which solve the problem in the prior art that data sent by a core network under a distributed network cannot be transmitted to a device side. The inventive concept of the present application is: and adding the forwarding mapping relation between the wide area network IP address information and the port address information and the local area network IP address information and the port address information in the channel machine so as to realize that the data received by the channel machine can be forwarded to corresponding equipment, thereby realizing the data transmission between the core network and the equipment under the distributed network.
The application scenario of the embodiment of the present application is described below.
Fig. 1 is an application scenario schematic diagram of a data transmission method provided in an embodiment of the present application, where, as shown in fig. 1, the method includes: network device 010, forwarding device 011, terminal device 012, wherein network device 010 comprises a plurality of core networks, illustratively core network 001, core network 002, core network 003, etc. When the terminal device 012 performs a corresponding service, firstly, a corresponding function on the forwarding device 011 is called by a service software development kit (Software Development Kit, SDK), a request of which the data transmission mode is a network address conversion mode is sent to the forwarding device 011, the forwarding device 011 sets the forwarding mode to be a network address conversion (Network Address Translation, NAT) mode after receiving the request, then the terminal device 012 sends the IP address information and the port address information allocated according to the service type of the service data to the forwarding device 011, the forwarding device 011 replaces the local area network IP address information and the port address information of the terminal device 012 with the wide area network IP address information and the port address information of the forwarding device 011, and stores the mapping relationship, and finally the forwarding device 011 transfers the wide area network IP and the port address information to the network device. Further, the service data sent by the network device 010 can find the forwarding device 011 through the wide area network IP address of the forwarding device 011, and send the service data to the forwarding device 011, the forwarding device 011 finds the corresponding terminal device 012 according to the stored mapping relationship, and forwards the service data to the terminal device 012, so that the data transmission between the network device 010 and the terminal device 012 is realized under the distributed network.
The type of forwarding device is not limited in this application, and may be, for example, a B-trunk channel machine, a PDT channel machine, or the like.
The following describes an application scenario of the embodiment of the present application by taking a channel machine in a vehicle-mounted station host as an example.
Fig. 2 is a logic schematic diagram of implementing data transmission by a vehicle-mounted station through a channel machine according to an embodiment of the present application. As shown in fig. 2, the vehicle-mounted station host includes a channel machine and an internal switch, the vehicle-mounted station control box is connected with the vehicle-mounted station host through a network cable, the wireless network is connected with the vehicle-mounted station host through a network, wherein the internal switch is provided with four connectors, namely LAN1, LAN2, LAN3 and LAN4, the LAN1 is connected with the channel machine through the network cable, and the LAN2 is connected with the vehicle-mounted station control box through the network cable. Taking a B-trunk C service channel machine-EV 751 as an example, after a three-party application of a vehicle-mounted platform control box invokes related functions on the channel machine through a service SDK, the channel machine judges the software version of the current three-party application in a network attached storage (Network Attached Storage, NAS) related signaling establishment stage, if the software version is the channel machine version, whether the transmission mode is an NAT mode is continuously judged, if the software version is the NAT mode, IP address and port address information sent by the vehicle-mounted platform control box is received, the IP address and the port address information of the vehicle-mounted platform control box are mapped with the IP address and the port address information of the channel machine, the mapping relation is stored in the channel machine, and the IP address of the channel machine is transmitted to a wireless network when the wireless network transmits service data. The IP address of the vehicle-mounted platform control box is a private network IP address, can be set arbitrarily, is fixed after being set, and port address information is distributed through the type of service data; the IP address of the channel machine is a public network IP address, the port address information is determined by the mapping relation between the port address information and the port address information of the vehicle-mounted platform control box after the channel machine is connected with the network each time. The private network IP address of the console control box provided by the present application is 192.0.1.231, and the port address information is 22000-40000; the public network (Wide Area Network, WAN) IP address of the channel machine is 131.131.1.28, and the port address information is 22000-40000. The port address information provided by the application is a port address range allocated to the vehicle-mounted platform control box for use, and the single port address required to be used by the service data of the three-party application is allocated through a specific service type.
The terminal device may be a wireless terminal in industrial control (industrial control), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a mobile phone (mobile phone), a tablet computer (pad), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in smart home (smart home), etc.
In this embodiment of the present application, the means for implementing the function of the forwarding device may be the forwarding device, or may be a means capable of supporting the forwarding device to implement the function, for example, a chip system, and the means may be installed in the forwarding device. In the embodiment of the application, the chip system may be formed by a chip, and may also include a chip and other discrete devices.
It should be noted that, the application scenario is not limited in this embodiment, and the data transmission method provided in this embodiment of the present application may also be applied to any other scenario of data transmission.
It may be understood that the above data transmission method may be implemented by a data transmission apparatus provided in the embodiments of the present application, where the data transmission apparatus may be part or all of a certain device, for example, a processor of the forwarding device.
The following takes forwarding devices as an example, and specific embodiments are used to describe the technical solutions of the embodiments of the present application in detail. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 3 is a flow chart of a data transmission method according to an embodiment of the present application. The method comprises the following steps:
s101, receiving service data sent by network equipment.
In this step, the forwarding device receives service data sent by the network device.
And the network equipment sends the service data to the forwarding equipment according to the forwarding address information.
S102, determining the target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information.
In this step, after the forwarding device receives the service data sent by the network device, the destination address information corresponding to the service data is determined according to the forwarding address information corresponding to the service data and the mapping relationship between the forwarding address information and the destination address information.
Wherein the forwarding address information and the destination address information are determined according to a service type of the service data. The address information includes internet protocol address information and port address information.
It should be noted that the internet protocol address information in the forwarding address information is wide area network IP address information, and the internet protocol address information in the destination address information is local area network IP address information.
The method for determining the target address information corresponding to the service data is not limited in terms of how to correspond to the forwarding address information and the mapping relation between the forwarding address information and the target address information according to the service data, can be specifically set according to the forwarding address information and the target address information, and can be exemplified by a method for establishing a mapping table.
The following describes a case where a mapping relationship is established based on the forwarding address information and the destination address information.
In some optional embodiments, the forwarding device receives the target address information corresponding to the service data sent by the target device, and then establishes a mapping relationship according to the target address information corresponding to the service data and the forwarding address information of the forwarding device.
Each forwarding device can be connected with a plurality of target devices, the local area network IP addresses of each target device are different, the port address information of the service data distribution is also different, and the mapping relationship established by the forwarding device comprises the local area network IP address of each target device and the corresponding port address information thereof, and the corresponding relationship between the local area network IP address of each target device and the port address information thereof. If the port address range of the forwarding device is the same as the port address range of the target device, the corresponding relationship of the port addresses may be the same as the port address of the forwarding device, and a mapping relationship may be established.
And, the forwarding device needs to be set to a corresponding mode according to the mode setting request of the target device. In some alternative embodiments, the forwarding device receives the mode setting request sent by the target device, and then sets the forwarding device to a network address conversion mode according to the mode setting request, where the network address conversion mode is used to instruct forwarding of service data received by the forwarding device to the target device.
In addition, the network address translation mode is further used for indicating forwarding address information corresponding to the target address information of the target device to the network device.
S103, according to the target address information corresponding to the service data, the service data is sent to the target equipment.
In this step, when the forwarding device determines the destination address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relationship between the forwarding address information and the destination address information, the forwarding device sends the service data to the destination device according to the destination address information corresponding to the service data.
In the data transmission method provided by the embodiment of the application, firstly, service data sent by network equipment is received, then, target address information corresponding to the service data is determined according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information, and finally, the service data is sent to the target equipment according to the target address information corresponding to the service data. Compared with the prior art, the method and the device have the advantages that the target device is determined through the mapping relation between the address information, the service data is forwarded to the target device, and the data transmission between the network device and the target device is realized, so that the problem that the data transmission between the core network and the device cannot be performed under the distributed networking is solved.
On the basis of the above implementation, a description will be given below of how the mapping relationship is established in the present application with reference to fig. 4. Fig. 4 is a flowchart of another data transmission method according to an embodiment of the present application. The method comprises the following steps:
s201, receiving target address information corresponding to service data sent by target equipment.
S202, establishing a mapping relation according to target address information corresponding to the service data and forwarding address information of forwarding equipment.
The technical terms, effects, features, and alternative embodiments of S201-204 may be understood with reference to S102 shown in fig. 3, and will not be described in detail herein for repeated content.
On the basis of the above implementation, a case of data transmission between the network device and the target device in the present application will be described below with reference to fig. 5. Fig. 5 is a flowchart of another data transmission method according to an embodiment of the present application. The method comprises the following steps:
s301, receiving a mode setting request sent by the target device.
S302, according to the mode setting request, the forwarding device is set to be in a network address conversion mode.
S303, receiving target address information corresponding to the service data sent by the target equipment.
S304, establishing a mapping relation according to the target address information corresponding to the service data and the forwarding address information of the forwarding equipment.
S305, transmitting forwarding address information corresponding to the target address information of the target device to the network device.
S306, receiving service data sent by the network equipment.
S307, according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information, the target address information corresponding to the service data is determined.
And S308, sending the service data to the target equipment according to the target address information corresponding to the service data.
The technical terms, effects, features, and alternative embodiments of S301-308 may be understood with reference to S101-S103 shown in fig. 3, and will not be further described herein for repeated matters.
On the basis of the above-described embodiments, a process of implementing data transmission between the network device and the target device through the mapping relationship in the present application will be specifically described below with reference to fig. 6. Fig. 6 is a signaling interaction diagram of a data transmission method according to an embodiment of the present application. As shown in fig. 6, the method includes:
s401, the target device sends a mode setting request to the forwarding device.
In this step, the target device calls a corresponding functional interface in the forwarding device according to the service SDK, and sends a mode setting request to the forwarding device.
S402, the forwarding device sets the forwarding device to be in a network address conversion mode according to the mode setting request.
In this step, after the target device sends the mode setting request to the forwarding device, the forwarding device receives the mode setting request and sets the forwarding device to the network address translation mode according to the mode setting request.
S403, the forwarding device sends indication information to the target device, wherein the indication information is used for indicating that the network address translation mode setting is completed.
In this step, when the forwarding device sets the forwarding device to the network address translation mode according to the mode setting request, the forwarding device transmits indication information to the target device, the indication information being used to indicate that the network address translation mode setting has been completed.
S404, the target device sends target address information to the forwarding device.
In this step, after the forwarding device is set to the network address translation mode, the target device transmits target address information to the forwarding device.
S405, the forwarding device establishes a mapping relation according to the target address information corresponding to the service data and the forwarding address information of the forwarding device.
In this step, after the target device sends the target address information to the forwarding device, the forwarding device establishes a mapping relationship according to the target address information corresponding to the service data and the forwarding address information of the forwarding device.
Wherein the mapping relationship is stored in the forwarding device.
And S406, the forwarding device sends the forwarding address information to the network device.
In this step, when the forwarding device establishes a mapping relationship according to the destination address information corresponding to the service data and the forwarding address information of the forwarding device, and the destination device performs the corresponding service, the forwarding device sends the forwarding address information to the network device.
S407, the network device sends service data to the forwarding device.
In this step, after the forwarding device sends the forwarding address information to the network device, the network device sends service data to the forwarding device.
After receiving the forwarding address information, the network device sends corresponding service data to the forwarding device according to the service data type.
S408, the forwarding device determines the target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information.
In this step, after the network device sends the service data to the forwarding device, the forwarding device determines the destination address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relationship between the forwarding address information and the destination address information.
S409, the forwarding device sends the service data to the target device.
In this step, when the forwarding device determines the destination address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relationship between the forwarding address information and the destination address information, the forwarding device sends the service data to the destination device.
In the data transmission method provided by the embodiment of the application, firstly, service data sent by network equipment is received, then, target address information corresponding to the service data is determined according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information, and finally, the service data is sent to the target equipment according to the target address information corresponding to the service data. Compared with the prior art, the method and the device have the advantages that the target device is determined through the mapping relation between the address information, the service data is forwarded to the target device, and the data transmission between the network device and the target device is realized, so that the problem that the data transmission between the core network and the device cannot be performed under the distributed networking is solved.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application. The data transmission means may be implemented in software, hardware or a combination of both. As shown in fig. 7, the data transmission apparatus 500 includes:
a receiving module 501, configured to receive service data sent by a network device;
the processing module 502 is configured to determine target address information corresponding to the service data according to the forwarding address information corresponding to the service data and a mapping relationship between the forwarding address information and the target address information;
and the sending module 503 is configured to send the service data to the target device according to the target address information corresponding to the service data.
In an alternative embodiment, the address information includes internet protocol address information and port address information.
In an alternative embodiment, the forwarding address information and the destination address information are determined based on the traffic type of the traffic data.
In an optional implementation manner, the receiving module 501 is further configured to receive target address information corresponding to service data sent by a target device;
the processing module 502 is further configured to establish a mapping relationship according to the destination address information corresponding to the service data and the forwarding address information of the forwarding device.
In an alternative embodiment, the receiving module 501 is further configured to receive a mode setting request sent by the target device;
the processing module 502 is further configured to set the forwarding device to a network address conversion mode according to the mode setting request, where the network address conversion mode is used to instruct forwarding of service data received by the forwarding device to the target device.
In an alternative embodiment, the network address translation mode is further used for indicating to send forwarding address information corresponding to the destination address information of the destination device to the network device.
The principle and technical effects of the data transmission device provided in this embodiment are similar to those of the implementation of the data transmission method described above, and are not described herein.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 8, the electronic device may include: at least one processor 601 and a memory 602. Fig. 8 shows an electronic device using one processor as an example.
A memory 602 for storing programs. In particular, the program may include program code including computer-operating instructions.
The memory 602 may include high-speed RAM memory or may further include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 601 is configured to execute computer-executable instructions stored in the memory 602 to implement the data transmission method described above;
the processor 601 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Alternatively, in a specific implementation, if the communication interface, the memory 602, and the processor 601 are implemented independently, the communication interface, the memory 602, and the processor 601 may be connected to each other through a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface, the memory 602, and the processor 601 are integrated on a chip, the communication interface, the memory 602, and the processor 601 may complete communication through an internal interface.
The embodiment of the application also provides a chip, which comprises a processor and an interface. Wherein the interface is used for inputting and outputting data or instructions processed by the processor. The processor is configured to perform the methods provided in the method embodiments above. The chip can be applied to a data transmission device.
The present application also provides a computer-readable storage medium, which may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random-access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, etc., in which program codes can be stored, and specifically, the computer-readable storage medium stores therein program information for the above-described data transmission method.
The present application also provides a program which, when executed by a processor, is configured to perform the data transmission method provided in the above method embodiment.
The present application also provides a program product, such as a computer readable storage medium, having instructions stored therein, which when run on a computer, cause the computer to perform the data transmission method provided by the above-described method embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present invention are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (8)
1. A method of data transmission, the method comprising:
receiving service data sent by network equipment;
determining target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information;
according to the target address information corresponding to the service data, the service data is sent to target equipment;
before receiving the service data sent by the network device, the method further includes:
receiving a mode setting request sent by the target equipment;
according to the mode setting request, setting the forwarding device into a network address conversion mode, wherein the network address conversion mode is used for indicating to forward the service data received by the forwarding device to the target device;
the forwarding address information and the target address information are determined according to the service type of the service data;
before receiving the service data sent by the network device, the method further includes:
receiving target address information corresponding to the service data sent by the target equipment;
establishing the mapping relation according to the target address information corresponding to the service data and the forwarding address information of the forwarding equipment; the established mapping relation comprises the local area network IP address of each target device and the corresponding port address information thereof, and the corresponding relation between the local area network IP address of the forwarding device and the port address information thereof.
2. The method of claim 1, wherein the address information comprises internet protocol address information and port address information.
3. The method according to claim 1, wherein the method further comprises:
the network address translation mode is further used for indicating to send forwarding address information corresponding to the target address information of the target device to the network device.
4. A data transmission apparatus, the apparatus comprising:
the receiving module is used for receiving service data sent by the network equipment;
the processing module is used for determining the target address information corresponding to the service data according to the forwarding address information corresponding to the service data and the mapping relation between the forwarding address information and the target address information;
the sending module is used for sending the service data to target equipment according to the target address information corresponding to the service data;
the receiving module is further configured to receive a mode setting request sent by the target device;
the processing module is further configured to set the forwarding device to a network address conversion mode according to the mode setting request, where the network address conversion mode is used to instruct forwarding of the service data received by the forwarding device to the target device;
the forwarding address information and the target address information are determined according to the service type of the service data;
the receiving module is further configured to receive target address information corresponding to the service data sent by the target device;
the processing module is further configured to establish the mapping relationship according to the destination address information corresponding to the service data and the forwarding address information of the forwarding device; the established mapping relation comprises the local area network IP address of each target device and the corresponding port address information thereof, and the corresponding relation between the local area network IP address of the forwarding device and the port address information thereof.
5. The apparatus of claim 4, wherein the address information comprises internet protocol address information and port address information.
6. The apparatus of claim 4, wherein the network address translation mode is further configured to instruct forwarding address information corresponding to destination address information of the destination device to be sent to the network device.
7. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 1-3.
8. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011447370.1A CN114697388B (en) | 2020-12-11 | 2020-12-11 | Data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011447370.1A CN114697388B (en) | 2020-12-11 | 2020-12-11 | Data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114697388A CN114697388A (en) | 2022-07-01 |
CN114697388B true CN114697388B (en) | 2024-01-30 |
Family
ID=82130488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011447370.1A Active CN114697388B (en) | 2020-12-11 | 2020-12-11 | Data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114697388B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116132385A (en) * | 2022-08-18 | 2023-05-16 | 马上消费金融股份有限公司 | Data forwarding method, device, computer equipment and storage medium |
CN115734201A (en) * | 2022-11-18 | 2023-03-03 | 中国联合网络通信集团有限公司 | Method and device for acquiring user service data, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877728A (en) * | 2010-06-25 | 2010-11-03 | 中兴通讯股份有限公司 | Method and device for converting and forwarding network addresses |
EP2262185A1 (en) * | 2008-04-30 | 2010-12-15 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method and system for forwarding data among private networks |
CN103023787A (en) * | 2011-09-26 | 2013-04-03 | 百度在线网络技术(北京)有限公司 | Data center system, data center device and method for providing service |
CN106982270A (en) * | 2016-01-19 | 2017-07-25 | 华为技术有限公司 | A kind of method, device and network system distributed and map public network address |
CN107959613A (en) * | 2016-10-18 | 2018-04-24 | 华为技术有限公司 | Message forwarding method and device |
CN110662259A (en) * | 2019-12-02 | 2020-01-07 | 武汉慧联无限科技有限公司 | Message processing method and device and computer storage medium |
CN111147425A (en) * | 2018-11-05 | 2020-05-12 | 成都鼎桥通信技术有限公司 | Data access processing method, device, equipment and storage medium |
CN111432040A (en) * | 2019-01-09 | 2020-07-17 | 成都鼎桥通信技术有限公司 | Data packet sending method and device for multi-system terminal |
CN111711705A (en) * | 2020-04-21 | 2020-09-25 | 北京天维信通科技有限公司 | Method and device for realizing network connection based on bidirectional NAT (network Address translation) by proxy node |
-
2020
- 2020-12-11 CN CN202011447370.1A patent/CN114697388B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2262185A1 (en) * | 2008-04-30 | 2010-12-15 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method and system for forwarding data among private networks |
CN101877728A (en) * | 2010-06-25 | 2010-11-03 | 中兴通讯股份有限公司 | Method and device for converting and forwarding network addresses |
CN103023787A (en) * | 2011-09-26 | 2013-04-03 | 百度在线网络技术(北京)有限公司 | Data center system, data center device and method for providing service |
CN106982270A (en) * | 2016-01-19 | 2017-07-25 | 华为技术有限公司 | A kind of method, device and network system distributed and map public network address |
CN107959613A (en) * | 2016-10-18 | 2018-04-24 | 华为技术有限公司 | Message forwarding method and device |
CN111147425A (en) * | 2018-11-05 | 2020-05-12 | 成都鼎桥通信技术有限公司 | Data access processing method, device, equipment and storage medium |
CN111432040A (en) * | 2019-01-09 | 2020-07-17 | 成都鼎桥通信技术有限公司 | Data packet sending method and device for multi-system terminal |
CN110662259A (en) * | 2019-12-02 | 2020-01-07 | 武汉慧联无限科技有限公司 | Message processing method and device and computer storage medium |
CN111711705A (en) * | 2020-04-21 | 2020-09-25 | 北京天维信通科技有限公司 | Method and device for realizing network connection based on bidirectional NAT (network Address translation) by proxy node |
Also Published As
Publication number | Publication date |
---|---|
CN114697388A (en) | 2022-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108449282B (en) | Load balancing method and device | |
CN114697388B (en) | Data transmission method and device | |
CN112235175B (en) | Access method and access device of network bridge equipment and network bridge equipment | |
CN110177010B (en) | Link switching method and device | |
EP2432194B1 (en) | Method, device and system for information synchronization | |
CN110784489B (en) | Secure communication system and method thereof | |
CN104426816B (en) | A kind of virtual machine communication method and device | |
CN113765801B (en) | Message processing method and device applied to data center, electronic equipment and medium | |
CN111786989B (en) | Communication processing method and device and electronic equipment | |
CN110430478B (en) | Networking communication method, device, terminal equipment and storage medium | |
CN115174310B (en) | PDN dialing and configuration method, system, device, equipment and storage medium | |
CN110351394B (en) | Network data processing method and device, computer device and readable storage medium | |
CN103179229B (en) | A kind of data service communications method, equipment and system | |
CN112511980B (en) | Communication system, method and device | |
CN114157633A (en) | Message forwarding method and device | |
CN113784201A (en) | Auxiliary screen device networking processing method and device, intelligent terminal and medium | |
CN112996137A (en) | Method for establishing data connection on multi-operation system terminal | |
JP5213070B2 (en) | Wireless communication network connection system and wireless communication network connection method | |
CN111741075A (en) | Communication connection method, vehicle remote connection system and connection equipment | |
CN113115400B (en) | Communication method and device | |
CN112448878B (en) | PPPoE transparent transmission method, PPPoE server and electronic equipment | |
CN117377129A (en) | Network sharing method and device, chip, electronic equipment and storage medium | |
CN113014679B (en) | Communication method, device and system | |
CN114915610B (en) | Method, device, electronic equipment and storage medium for sending network request | |
CN105323326A (en) | Universal transformation platform for communication among terminals, server, system, and method |
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 |