CN114268519A - Network communication system, data transmission method, and readable storage medium - Google Patents
Network communication system, data transmission method, and readable storage medium Download PDFInfo
- Publication number
- CN114268519A CN114268519A CN202111611321.1A CN202111611321A CN114268519A CN 114268519 A CN114268519 A CN 114268519A CN 202111611321 A CN202111611321 A CN 202111611321A CN 114268519 A CN114268519 A CN 114268519A
- Authority
- CN
- China
- Prior art keywords
- network
- virtual
- transmitted
- message
- local area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 112
- 238000004891 communication Methods 0.000 title claims abstract description 111
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000005540 biological transmission Effects 0.000 title claims abstract description 55
- 238000004590 computer program Methods 0.000 claims description 4
- 230000003993 interaction Effects 0.000 abstract description 11
- 238000004519 manufacturing process Methods 0.000 abstract description 7
- 230000002452 interceptive effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The application provides a network communication system, a data transmission method and a readable storage medium, and relates to the technical field of network communication. According to the network communication system, the user terminal is mutually connected with the first communication port of the switch, the plurality of network devices are respectively connected with the second communication port of the switch, then the plurality of virtual network cards are simulated and created at the user terminal, each network device is ensured to independently correspond to one virtual network card and be positioned in the same virtual local area network with the virtual network card, the network communication system is enabled to substantially establish a plurality of non-interfering virtual local area networks which simultaneously comprise the user terminal, and the user can be ensured to directly carry out data interaction with the plurality of network devices through the user terminal under the condition that the factory IP addresses of the network devices are not modified, so that the network communication experience of the user is improved, and the production cost of the network devices is effectively maintained.
Description
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a network communication system, a data transmission method, and a readable storage medium.
Background
In a local area network communication process of a network communication Protocol stack (Transmission Control Protocol/Internet Protocol, TCP/IP), data information is transmitted through a message. When a message is transmitted over a network, routing is implemented based on an Internet Protocol (IP) address interconnected between networks, and an IP address of each network device needs to be unique to avoid network collision caused by IP address duplication.
However, it is worth noting that most of the network devices currently circulating in the market are general-purpose devices that are designed by manufacturers in view of production cost and can be produced in large quantities, and the general-purpose devices need to be configured with the same IP address when being produced and manufactured, so that a user often needs to modify a unique IP address for each network device separately when needing to perform data interaction with multiple general-purpose network devices through one terminal device, which affects network communication experience of the user.
Disclosure of Invention
In view of the above, an object of the present application is to provide a network communication system, a data transmission method, and a readable storage medium, which can implement data interaction between a single user terminal and multiple network devices without modifying factory IP addresses of the network devices, improve network communication experience of users, and effectively maintain production costs of the network devices.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, the present application provides a network communication system, which includes a user terminal, a switch, and a plurality of network devices having the same factory IP address;
the user terminal is connected with a first communication port of the switch, and the network devices are respectively connected with a second communication port of the switch;
the user terminal is simulated and created with a plurality of virtual network cards, wherein the total number of the virtual network cards is the same as that of network devices, and each network device independently corresponds to one virtual network card and is positioned in the same virtual local area network with the virtual network card.
In an optional embodiment, the virtual IP addresses of the virtual network cards are different from each other, and have the same IP network segment as the factory IP address.
In an alternative embodiment, the network communication system further comprises a power supply device;
the power supply equipment is electrically connected with the user terminal, the switch and each network equipment and is used for providing electric energy for the user terminal, the switch and each network equipment.
In a second aspect, the present application provides a data transmission method, which is applied to the network communication system described in any one of the foregoing embodiments, and the data transmission method includes:
adding respective messages to be transmitted of different virtual network cards to the same TRUNK by a user terminal, and sending a plurality of messages to be transmitted to an exchanger through a first communication port of the exchanger, wherein the destination IP address of each message to be transmitted is a delivery IP address, and each message to be transmitted records a virtual local area network identifier corresponding to the virtual network card where the message to be transmitted is located;
the switch reads the virtual local area network identification included in each received message to be transmitted, selects a second communication port corresponding to the virtual local area network identification and transmits the message to be transmitted to the network equipment connected with the second communication port.
In an optional embodiment, the data transmission method further includes:
under the condition that a target data message exists in each network device, transmitting the target data message to the switch through a second communication port connected with the network device, wherein the target IP address of each target data message is the virtual IP address of a virtual network card of the same virtual local area network as the network device where the target data message is located, and each target data message records the virtual local area network identifier corresponding to the network device where the target data message is located;
and the switch transmits each received target data message to a virtual network card of the user terminal, which has the same virtual local area network identifier as the target data message, through the first communication port.
In a third aspect, the present application provides a data transmission method, which is applied to a user terminal included in the network communication system described in any one of the foregoing embodiments, and the data transmission method includes:
detecting whether a message to be transmitted exists at each virtual network card, wherein the destination IP address of the message to be transmitted is a factory IP address, and the message to be transmitted records a virtual local area network identifier corresponding to the virtual network card where the message to be transmitted is located;
adding respective messages to be transmitted of different virtual network cards into the same TRUNK, sending a plurality of messages to be transmitted to the switch through a first communication port of the switch, and transmitting the messages to be transmitted to corresponding network equipment through a second communication port corresponding to a virtual local area network identifier in the messages to be transmitted by the switch.
In an optional embodiment, the data transmission method further includes:
receiving a target data message transmitted by the switch through a first communication port, wherein a target IP address of the target data message is a virtual IP address of a virtual network card of the same virtual local area network as a network device from which the target data message comes, and the target data message records a virtual local area network identifier corresponding to the network device from which the target data message comes;
and distributing the target data message to a virtual network card corresponding to the virtual local area network identifier according to the virtual local area network identifier included in the target data message.
In a fourth aspect, the present application provides a data transmission method, which is applied to a switch included in the network communication system described in any one of the foregoing embodiments, and the data transmission method includes:
receiving a message to be transmitted by a user terminal through a first communication port, wherein a destination IP address of the message to be transmitted is a factory IP address, and the message to be transmitted records a virtual local area network identifier corresponding to a virtual network card from which the message to be transmitted comes;
and for each message to be transmitted, reading a virtual local area network identifier included in the message to be transmitted, selecting a second communication port corresponding to the virtual local area network identifier, and transmitting the message to be transmitted to the network equipment connected with the second communication port.
In an optional embodiment, the data transmission method further includes:
receiving a target data message transmitted by each of the plurality of network devices through a second communication port, wherein a target IP address of each target data message is a virtual IP address of a virtual network card in the same virtual local area network as the network device from which the target data message comes, and each target data message records a virtual local area network identifier corresponding to the network device from which the target data message comes;
and aiming at each target data message, transmitting the target data message to a virtual network card of the user terminal, which has the same virtual local area network identifier as the target data message, through the first communication port.
In a fifth aspect, the present application provides a readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the data transmission method according to any one of the foregoing embodiments.
In this case, the beneficial effects of the embodiments of the present application include the following:
according to the network communication system, the user terminal is mutually connected with the first communication port of the switch, the plurality of network devices are respectively connected with the second communication port of the switch, then the plurality of virtual network cards are simulated and created at the user terminal, each network device is ensured to independently correspond to one virtual network card and be positioned in the same virtual local area network with the virtual network card, the network communication system is enabled to substantially establish a plurality of non-interfering virtual local area networks which simultaneously comprise the user terminal, and the user can be ensured to directly carry out data interaction with the plurality of network devices through the user terminal under the condition that the factory IP addresses of the network devices are not modified, so that the network communication experience of the user is improved, and the production cost of the network devices is effectively maintained.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic diagram illustrating a network communication system according to an embodiment of the present application;
fig. 2 is a second schematic diagram illustrating a network communication system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a first data transmission method according to an embodiment of the present application;
fig. 4 is a second flowchart of a first data transmission method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a second data transmission method according to an embodiment of the present application;
fig. 6 is a second flowchart of a second data transmission method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a third data transmission method according to an embodiment of the present application;
fig. 8 is a second flowchart of a third data transmission method according to an embodiment of the present application.
Icon: 10-a network communication system; 11-a user terminal; 12-a switch; 13-a network device; 14-power supply equipment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is to be understood that relational terms such as the terms first and second, and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a network communication system 10 according to an embodiment of the present disclosure. In this embodiment of the application, the network communication system 10 enables a user to interact data with multiple network devices 13 through the user terminal 11 without modifying a factory IP address of the network device 13, so that the user is prevented from performing an IP address adjustment operation on the network device 13 while maintaining a production cost of an existing manufacturer for the network device 13, and network communication experience of the user is improved. The factory IP address is used to indicate an IP address that is maintained by the corresponding network device 13 from the factory; the user terminal 11 may be, but is not limited to, a smart phone, a personal computer, a tablet computer, a notebook computer, etc.
In the embodiment of the present application, the network communication system 10 may include a user terminal 11, a switch 12, and a plurality of network devices 13 having the same factory IP address. The user terminal 11 is interconnected to a first communication port of the switch 12, and each of the plurality of network devices 13 is connected to a second communication port of the switch 12. A plurality of virtual network cards are created in the user terminal 11 in a simulated manner, where the total number of the virtual network cards is the same as the total number of the network devices, each network device 13 individually corresponds to one virtual network card and is located in the same virtual local area network as the virtual network card, and different network devices 13 each correspond to one virtual local area network, so that each virtual local area network corresponds to one second communication port of the switch 12 and one virtual network card of the user terminal 11.
In this case, the network communication system 10 is substantially equal to a plurality of virtual local area networks which are built one by one and include the user terminal 11 and are not interfered with each other, and even though the factory IP addresses of the network devices 13 in each virtual local area network are the same, a user can directly define a virtual local area network which needs to perform data transmission and directly transmit data to the network device 13 which wants to access through the second communication port corresponding to the virtual local area network, so that the user can be ensured to perform data interaction with the plurality of network devices 13 directly through the user terminal 11 without modifying the factory IP addresses of the network devices 13, thereby improving the network communication experience of the user and effectively maintaining the production cost of the network devices.
In the embodiment of the present application, the respective virtual IP addresses of the multiple virtual network cards are different from each other and have the same IP network segment as the factory IP address, so as to ensure that each virtual network card can perform data interaction with the network device 13 in the virtual local area network in which the virtual network card is located.
The example is given by taking the switch 12 as an example, where the switch 12 has 47 second communication ports, and 47 network devices 13 having the same factory IP address "192.168.10.253", where each network device 13 is communicated with one second communication port of the switch 12, and the virtual local area network identifier "VLAN 2", "VLAN 3", … … "," VLAN47 ", or" VLAN48 "to which each second communication port belongs is correspondingly assigned, so as to characterize the identity of the corresponding virtual local area network by each virtual local area network identifier. At this time, 47 virtual network cards are created by corresponding simulation at the user terminal connected to the first communication port of the switch 12, each virtual network card is made to correspond to one virtual local area network identifier, and the respective virtual IP addresses of the 47 virtual network cards are sequentially expressed as "192.168.10.2", "192.168.10.3", … … "," 192.168.10.47 "and" 192.168.10.48 ", and are sequentially made to correspond to the aforementioned virtual local area network identifiers" VLA2 "," VLAN3 ", … …", "VLAN 47" and "VLAN 48". In this case, these 47 virtual network cards would have the same IP network segment "192.168.10" as the factory IP address "192.168.10.253".
Optionally, referring to fig. 2, fig. 2 is a second schematic view illustrating a composition of the network communication system 10 according to an embodiment of the present application. In this embodiment, the network communication system 10 further includes a power supply device 14, where the power supply device 14 is electrically connected to the user terminal 11, the switch 12, and each of the network devices 13, and is configured to provide power to the user terminal 11, the switch 12, and each of the network devices 13. In an implementation manner of this embodiment, the power supply device 14 may be obtained by a plurality of power supply device clusters, and each power supply device is responsible for a power supply transaction of one electronic device (for example, the user terminal 11 or the switch 12).
In the present application, in order to ensure that the user can smoothly perform data interaction with the plurality of network devices 13 through the user terminal 11, the present application implements the above functions by providing a data transmission method applied to the above network communication system 10. The following describes a data transmission method provided in the present application.
Referring to fig. 3, fig. 3 is a flowchart illustrating a first data transmission method according to an embodiment of the present application. In this embodiment of the present application, the first data transmission method may include step S210 and step S220.
Step S210, the user terminal adds the respective messages to be transmitted of the different virtual network cards to the same TRUNK, and sends the multiple messages to be transmitted to the switch through the first communication port of the switch.
In this embodiment, the user terminal 11 may generate the to-be-transmitted messages for different network devices 13 in response to a user operation, and the user terminal 11 determines whether to perform data interaction by determining whether to separately determine whether to have the to-be-transmitted message at each virtual network card of the user terminal 11. If a message to be transmitted exists at a certain virtual network card, the source IP address of the message to be transmitted is the virtual IP address of the virtual network card generating the message to be transmitted, the destination IP address of the message to be transmitted is the factory IP address, and the message to be transmitted correspondingly records the virtual local area network identifier corresponding to the virtual network card where the message to be transmitted is located, so that the switch 12 determines through which second communication port the message to be transmitted needs to be transmitted.
For example, the virtual network card 1 corresponding to the virtual local area network identifier "VLAN 2" is used, when the virtual network card 1 generates a to-be-transmitted message, the source IP address of the to-be-transmitted message is the virtual IP address "192.168.10.2" of the virtual network card 1, the destination IP address of the to-be-transmitted message is the factory IP address "192.168.10.253", and the virtual local area network identifier recorded in the to-be-transmitted message is the virtual local area network identifier "VLAN 2" corresponding to the virtual network card 1.
After the user terminal 11 determines the messages to be transmitted generated by the different virtual network cards, the generated messages to be transmitted are added to the same TRUNK, so that the messages to be transmitted are transmitted to the switch 12 through the first communication port of the switch 12 connected to the user terminal 11.
Step S220, the switch reads, for each received to-be-transmitted message, a virtual local area network identifier included in the to-be-transmitted message, and selects a second communication port corresponding to the virtual local area network identifier to transmit the to-be-transmitted message to the network device connected to the second communication port.
In this embodiment, since the plurality of network devices 13 all have the same factory IP address, and the destination IP addresses of all the messages to be transmitted received by the switch 12 are the factory IP addresses, when determining to which network device 13 each message to be transmitted needs to be forwarded, the switch 12 needs to distinguish the network device 13 to which the corresponding message to be transmitted is transmitted by reading the virtual local area network identifier included in each message to be transmitted. For each message to be transmitted, after reading the identifier of the virtual local area network included in the message to be transmitted, the switch 12 selects the second communication port corresponding to the identifier of the virtual local area network to transmit the message to be transmitted, so as to transmit the message to be transmitted to the network device 13 that needs to be transmitted in place.
Thus, the present application can enable the user to simultaneously access a plurality of network devices 13 directly through the user terminal 11 without modifying the factory IP addresses of the network devices 13 through steps S210 and S220.
Optionally, referring to fig. 4, fig. 4 is a second flowchart illustrating a first data transmission method according to an embodiment of the present application. In this embodiment of the present application, the first data transmission method may further include step S230 and step S240.
In step S230, each network device transmits the target data packet to the switch through the second communication port connected to the network device when the target data packet exists.
In this embodiment, after each network device 13 receives the to-be-transmitted message from the user terminal 11, the source IP address corresponding to the to-be-transmitted message may be extracted from the to-be-transmitted message to determine the virtual network card in the same virtual local area network as the network device 13, where the source IP address is the virtual IP address of the virtual network card in the same virtual local area network as the network device 13. Therefore, when a certain network device 13 generates a target data packet to be transmitted to the user terminal 11, the destination IP address of the target data packet is the virtual IP address of the virtual network card in the same virtual lan as the network device 13 that generates the target data packet, the source IP address of the target data packet is the factory IP address of the network device 13 that generates the target data packet, and the target data packet correspondingly records the virtual lan identifier corresponding to the network device 13 that generates the target data packet.
After generating a target data packet, the network device 13 sends the generated target data packet to the switch 12 through the second communication port of the switch 12 connected to the network device 13.
Step S240, the switch transmits each received target data packet to a virtual network card of the user terminal, which has the same virtual local area network identifier as the target data packet, through the first communication port.
In this embodiment, when the switch 12 receives a target data packet, it correspondingly reads the virtual local area network identifier included in the target data packet to determine whether the target data packet needs to be transmitted to another network device 13 or to the user terminal 11. When the vlan id recorded in the target data packet matches the vlan of the network device that generated the target data packet, it means that the target data packet needs to be transmitted to the user terminal 11 and is not transmitted to another network device 13. At this time, the switch 12 transmits the target data packet to the user terminal 11 through the first communication port connected to the user terminal 11, so that the user terminal 11 allocates the target data packet to a virtual network card having a corresponding virtual IP address identical to the source IP address of the target data packet, and at this time, the virtual network card receiving the target data packet has the same virtual local area network identifier as the target data packet.
Thus, the present application can implement data feedback between each network device 13 and the user terminal 11 by executing the above steps S230 and S240.
In the present application, in order to ensure that the user terminal 11 in the network communication system 10 can perform data interaction with a plurality of network devices 13 having the same factory IP address, the present application realizes the above functions by providing a data transmission method applied to the user terminal in the network communication system 10. The following describes a data transmission method provided in the present application.
Referring to fig. 5, fig. 5 is a flowchart illustrating a second data transmission method according to an embodiment of the present application. In this embodiment of the present application, the second data transmission method may include step S310 and step S320.
Step S310, whether a message to be transmitted exists at each virtual network card is detected.
In this embodiment, a source IP address of a to-be-transmitted message generated at each virtual network card is a virtual IP address of the virtual network card, a destination IP address of the to-be-transmitted message is a factory IP address, and a virtual local area network identifier corresponding to the virtual network card where the to-be-transmitted message is recorded in the to-be-transmitted message.
Step S320, adding the respective messages to be transmitted of different virtual network cards to the same TRUNK, sending a plurality of messages to be transmitted to the switch through the first communication port of the switch, and transmitting the messages to be transmitted to the corresponding network device through the second communication port corresponding to the virtual lan identifier in the messages to be transmitted by the switch.
Thus, the present application can achieve the effect that the user terminal 11 simultaneously accesses a plurality of network devices 13 by executing the above steps S310 and S320.
Optionally, referring to fig. 6, fig. 6 is a second flowchart of a second data transmission method provided in the embodiment of the present application. In this embodiment of the present application, the second data transmission method may further include step S330 and step S340.
Step S330, receiving the target data packet transmitted by the switch through the first communication port.
In this embodiment, the target data packet is generated by a certain network device 13 connected to the switch 12, a source IP address of the target data packet is the factory IP address, a destination IP address of the target data packet is a virtual IP address of a virtual network card in the same virtual local area network as the network device 13 from which the target data packet comes, and the target data packet records a virtual local area network identifier corresponding to the network device 13 from which the target data packet comes.
Step S340, according to the virtual local area network identifier included in the target data packet, allocating the target data packet to the virtual network card corresponding to the virtual local area network identifier.
Thus, the present application may receive the data feedback provided by each network device 13 to the user terminal 11 by executing the above steps S330 and S340.
In the present application, in order to ensure that the switch 12 in the network communication system 10 can accommodate data interaction between the user terminal 11 and a plurality of network devices 13 having the same factory IP address, the present application implements the above functions by providing a data transmission method applied to the switch 12 in the network communication system 10. The following describes a data transmission method provided in the present application.
Referring to fig. 7, fig. 7 is a flowchart illustrating a third data transmission method according to an embodiment of the present application. In the embodiment of the present application, the third data transmission method includes steps S410 and S420.
Step S410, receiving a message to be transmitted, which is transmitted by the user terminal through the first communication port.
In this embodiment, the source IP address of the to-be-transmitted message from the user terminal 11 is the virtual IP address of the virtual network card of the user terminal 11 that generates the to-be-transmitted message, the destination IP address of the to-be-transmitted message is a factory IP address, and the to-be-transmitted message records the virtual local area network identifier corresponding to the virtual network card where the to-be-transmitted message is located.
Step S420, for each to-be-transmitted message, reading a virtual local area network identifier included in the to-be-transmitted message, and selecting a second communication port corresponding to the virtual local area network identifier to transmit the to-be-transmitted message to a network device connected to the second communication port.
Thus, the present application can achieve the effect that the switch 12 accommodates the user terminal 11 accessing a plurality of network devices 13 simultaneously by executing the above steps S410 and S420.
Optionally, referring to fig. 8, fig. 8 is a second flowchart illustrating a third data transmission method according to an embodiment of the present application. In this embodiment, the third data transmission method may further include step S430 and step S440.
Step S430, receiving the target data packet transmitted by each of the plurality of network devices through the second communication port.
In this embodiment, the destination IP address of each target data packet is a virtual IP address of a virtual network card in the same virtual local area network as the network device 13 from which the target data packet comes, each target data packet records a virtual local area network identifier corresponding to the network device 13 from which the target data packet comes, and the source IP address of each target data packet is the factory IP address.
Step S440, for each target data packet, the target data packet is transmitted to the virtual network card of the user terminal, which has the same virtual local area network identifier as the target data packet, through the first communication port.
Thus, the present application can achieve the effect that the switch 12 harmonizes data feedback from each network device 13 to the user terminal 11 by executing the above steps S430 and S440.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, in the network communication system, the data transmission method and the readable storage medium provided in the embodiments of the present application, the network communication system provided by the application connects a user terminal and a first communication port of a switch with each other, and connects a plurality of network devices each to a second communication port of the switch, then, a plurality of virtual network cards are simulated and created at the user terminal, each network device is ensured to independently correspond to one virtual network card and to be positioned in the same virtual local area network with the virtual network card, so that the network communication system virtually builds a plurality of non-interfering virtual local area networks which simultaneously comprise the user terminal, the method and the system ensure that a user can directly perform data interaction with a plurality of network devices through the user terminal under the condition of not modifying the factory IP addresses of the network devices, thereby improving the network communication experience of the user and effectively maintaining the production cost of the network devices.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A network communication system is characterized in that the network communication system comprises a user terminal, an exchanger and a plurality of network devices with the same factory IP address;
the user terminal is connected with a first communication port of the switch, and the network devices are respectively connected with a second communication port of the switch;
the user terminal is simulated and created with a plurality of virtual network cards, wherein the total number of the virtual network cards is the same as that of network devices, and each network device independently corresponds to one virtual network card and is positioned in the same virtual local area network with the virtual network card.
2. The network communication system according to claim 1, wherein the virtual network cards have respective virtual IP addresses different from each other and have the same IP network segment as the factory IP address.
3. The network communication system according to claim 1, wherein the network communication system further comprises a power supply device;
the power supply equipment is electrically connected with the user terminal, the switch and each network equipment and is used for providing electric energy for the user terminal, the switch and each network equipment.
4. A data transmission method applied to the network communication system according to any one of claims 1 to 3, the data transmission method comprising:
adding respective messages to be transmitted of different virtual network cards to the same TRUNK by a user terminal, and sending a plurality of messages to be transmitted to an exchanger through a first communication port of the exchanger, wherein the destination IP address of each message to be transmitted is a delivery IP address, and each message to be transmitted records a virtual local area network identifier corresponding to the virtual network card where the message to be transmitted is located;
the switch reads the virtual local area network identification included in each received message to be transmitted, selects a second communication port corresponding to the virtual local area network identification and transmits the message to be transmitted to the network equipment connected with the second communication port.
5. The data transmission method according to claim 4, wherein the data transmission method further comprises:
under the condition that a target data message exists in each network device, transmitting the target data message to the switch through a second communication port connected with the network device, wherein the target IP address of each target data message is the virtual IP address of a virtual network card of the same virtual local area network as the network device where the target data message is located, and each target data message records the virtual local area network identifier corresponding to the network device where the target data message is located;
and the switch transmits each received target data message to a virtual network card of the user terminal, which has the same virtual local area network identifier as the target data message, through the first communication port.
6. A data transmission method applied to a user terminal included in the network communication system according to any one of claims 1 to 3, the data transmission method comprising:
detecting whether a message to be transmitted exists at each virtual network card, wherein the destination IP address of the message to be transmitted is a factory IP address, and the message to be transmitted records a virtual local area network identifier corresponding to the virtual network card where the message to be transmitted is located;
adding respective messages to be transmitted of different virtual network cards into the same TRUNK, sending a plurality of messages to be transmitted to the switch through a first communication port of the switch, and transmitting the messages to be transmitted to corresponding network equipment through a second communication port corresponding to a virtual local area network identifier in the messages to be transmitted by the switch.
7. The data transmission method according to claim 6, wherein the data transmission method further comprises:
receiving a target data message transmitted by the switch through a first communication port, wherein a target IP address of the target data message is a virtual IP address of a virtual network card of the same virtual local area network as a network device from which the target data message comes, and the target data message records a virtual local area network identifier corresponding to the network device from which the target data message comes;
and distributing the target data message to a virtual network card corresponding to the virtual local area network identifier according to the virtual local area network identifier included in the target data message.
8. A data transmission method applied to a switch included in the network communication system according to any one of claims 1 to 3, the data transmission method comprising:
receiving a message to be transmitted by a user terminal through a first communication port, wherein a destination IP address of the message to be transmitted is a factory IP address, and the message to be transmitted records a virtual local area network identifier corresponding to a virtual network card from which the message to be transmitted comes;
and for each message to be transmitted, reading a virtual local area network identifier included in the message to be transmitted, selecting a second communication port corresponding to the virtual local area network identifier, and transmitting the message to be transmitted to the network equipment connected with the second communication port.
9. The data transmission method according to claim 8, wherein the data transmission method further comprises:
receiving a target data message transmitted by each of the plurality of network devices through a second communication port, wherein a target IP address of each target data message is a virtual IP address of a virtual network card in the same virtual local area network as the network device from which the target data message comes, and each target data message records a virtual local area network identifier corresponding to the network device from which the target data message comes;
and aiming at each target data message, transmitting the target data message to a virtual network card of the user terminal, which has the same virtual local area network identifier as the target data message, through the first communication port.
10. A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data transmission method according to any one of claims 4 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111611321.1A CN114268519A (en) | 2021-12-27 | 2021-12-27 | Network communication system, data transmission method, and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111611321.1A CN114268519A (en) | 2021-12-27 | 2021-12-27 | Network communication system, data transmission method, and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114268519A true CN114268519A (en) | 2022-04-01 |
Family
ID=80830316
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111611321.1A Pending CN114268519A (en) | 2021-12-27 | 2021-12-27 | Network communication system, data transmission method, and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114268519A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118138499A (en) * | 2024-04-29 | 2024-06-04 | 苏州元脑智能科技有限公司 | Method, device, system and server for determining connectivity of connecting wires |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103051529A (en) * | 2012-12-20 | 2013-04-17 | 华为技术有限公司 | Method and device for processing messages |
CN104052670A (en) * | 2014-07-04 | 2014-09-17 | 华为技术有限公司 | Communication method and system |
CN104639663A (en) * | 2015-03-17 | 2015-05-20 | 四川天邑康和通信股份有限公司 | Method and system for simultaneously and automatically upgrading software of multiple optical modems |
CN109639554A (en) * | 2018-12-26 | 2019-04-16 | 山东有人信息技术有限公司 | A kind of long-range VLAN implementation method |
CN113194162A (en) * | 2021-04-28 | 2021-07-30 | 浙江宇视科技有限公司 | Data transmission method, device, electronic equipment and medium |
-
2021
- 2021-12-27 CN CN202111611321.1A patent/CN114268519A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103051529A (en) * | 2012-12-20 | 2013-04-17 | 华为技术有限公司 | Method and device for processing messages |
CN104052670A (en) * | 2014-07-04 | 2014-09-17 | 华为技术有限公司 | Communication method and system |
CN104639663A (en) * | 2015-03-17 | 2015-05-20 | 四川天邑康和通信股份有限公司 | Method and system for simultaneously and automatically upgrading software of multiple optical modems |
CN109639554A (en) * | 2018-12-26 | 2019-04-16 | 山东有人信息技术有限公司 | A kind of long-range VLAN implementation method |
CN113194162A (en) * | 2021-04-28 | 2021-07-30 | 浙江宇视科技有限公司 | Data transmission method, device, electronic equipment and medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118138499A (en) * | 2024-04-29 | 2024-06-04 | 苏州元脑智能科技有限公司 | Method, device, system and server for determining connectivity of connecting wires |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1602617B (en) | Network configuration evaluation | |
CN112003703B (en) | Method and device for transmitting authenticatable message across chains | |
CN106301785B (en) | Method and system for binding intelligent household equipment and intelligent terminal | |
CN101238680A (en) | System and method for generating unique and persistent identifiers | |
CN112953774B (en) | Network topology generation method, system, equipment and computer storage medium | |
CN102932493A (en) | Recording stateless internet protocol | |
KR20150022722A (en) | Communications device utilizing a central discovery mechanism, and respective method | |
CN108401037A (en) | User terminal and the binding method of equipment, device and system | |
CN109617816B (en) | Data message transmission method and device | |
CN101507132A (en) | Efficient formation of ad hoc networks | |
CN101820432A (en) | Safety control method and device of stateless address configuration | |
CN112637330B (en) | Block chain large file copy address selection method, system, equipment and storage medium | |
CN108696601A (en) | Detect the hardware address conflict in computer network | |
CN112333289A (en) | Reverse proxy access method, device, electronic equipment and storage medium | |
CN114268519A (en) | Network communication system, data transmission method, and readable storage medium | |
CN113905050A (en) | Method, device and system for detecting internet access information | |
CN110619022B (en) | Node detection method, device, equipment and storage medium based on block chain network | |
CN106453349A (en) | An account number login method and apparatus | |
CN114390044B (en) | File uploading method, system, equipment and storage medium | |
CN107070719A (en) | A kind of device management method and device | |
CN109039753A (en) | A kind of communication means and communication equipment based on Ethernet | |
CN104333615A (en) | Method and device for tracing address source | |
CN114629744B (en) | Data access method, system and related device based on macvlan host network | |
CN101656722A (en) | Method for generating dynamic host configuration protocol (DHCP) snooping binding information, and device thereof | |
CN109450770A (en) | Service executing apparatus, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220401 |
|
RJ01 | Rejection of invention patent application after publication |