Virtual and real equipment interconnection method and device, electronic equipment and medium
By creating virtual connection devices in SDN devices and automatically connecting virtual and real devices, the problems of cumbersome configuration and low flexibility of virtual and real devices in the existing technology are solved, and efficient and flexible virtual and real devices are achieved.
Patent Information
- Application Number
- CN202411710336.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The interconnection configuration process of existing virtual and real devices is cumbersome and has low flexibility. Especially when replacing the device, it is necessary to manually adjust the complex configuration.
By obtaining the interface information of the target virtual and real device in the SDN device, creating a virtual connection device according to the user's networking needs, and connecting the target virtual and real device to the virtual and real device, thereby realizing the automated interconnection of virtual and real devices.
It improves the efficiency and flexibility of virtual and real equipment interconnection, reduces the need for manual configuration, and realizes automatic networking according to networking requirements, improving the speed and flexibility of interconnection.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of device communication technology, and in particular, to a method, device, electronic device and medium for interconnecting virtual and real devices. Background Art
[0002] As the means of cyber attacks continue to escalate, higher requirements are placed on network security protection. Usually, in order to improve the ability of network security protection, the network range will use simulated real-life environments to conduct network attack drills to discover and repair potential security vulnerabilities.
[0003] When simulating the real environment, virtualization technology, container technology, etc. are used to quickly build and replicate the virtual network environment of the network range. When conducting drills, it is usually necessary to use and connect physical machines to conduct them more efficiently, which involves the interconnection between virtual devices and physical devices, that is, the interconnection between virtual and real devices.
[0004] At present, the configuration process of virtual and real device interconnection is rather cumbersome. When a physical device or a virtual device needs to be replaced, the relevant configuration needs to be adjusted manually. The adjustment process is relatively complicated, resulting in low flexibility of virtual device interconnection. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, electronic device and medium for interconnecting virtual and real devices to improve the efficiency and flexibility of interconnecting virtual and real devices.
[0006] In a first aspect, the present application provides a method for interconnecting virtual and real devices.
[0007] Used in a virtual-real device networking system, the virtual-real device networking system is provided with an SDN device, the SDN device is connected to a plurality of physical devices, and the method includes:
[0008] When receiving the user's networking requirements for the target virtual and real devices, obtain the interface information of the target virtual and real devices from the SDN device according to the networking requirements;
[0009] Create a virtual connection device based on networking requirements and interface information of target virtual and real devices;
[0010] Connect the target virtual and real device to the virtual connection device to connect the target virtual and real devices.
[0011] In a second aspect, the present application provides a virtual and real device interconnection device.
[0012] Used in a virtual-real device networking system, the virtual-real device networking system is provided with an SDN device, the SDN device is connected to multiple physical devices, and the device includes:
[0013] The acquisition module is used to obtain the interface information of the target virtual and real device from the SDN device according to the networking requirements when receiving the user's networking requirements for the target virtual and real device;
[0014] A creation module is used to create a virtual connection device according to the networking requirements and the interface information of the target virtual and real devices;
[0015] The connection module is used to connect the target virtual and real devices to the virtual connection device to connect the target virtual and real devices.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When one or more programs are executed by one or more processors, the one or more processors implement the virtual-real device interconnection method provided in any embodiment of the present application.
[0020] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, a method for interconnecting virtual and real devices as provided in any embodiment of the present application is implemented.
[0021] The technical solution of the embodiment of the present application is applied to a virtual-real device networking system, in which an SDN device is provided, and the SDN device is connected to a plurality of physical devices. When the user's networking requirements for the target virtual-real device are received, the interface information of the target virtual-real device is obtained from the SDN device according to the networking requirements; then a virtual connection device is created according to the networking requirements and the interface information of the target virtual-real device; finally, the target virtual-real device is connected to the virtual connection device to connect the target virtual-real device. Based on this, in this embodiment, as long as the physical device is connected to the SDN device and the networking requirements are directly input, a virtual connection device can be created, so that the virtual-real device can be successfully interconnected through the virtual connection device, without the need for manual configuration, and the interconnection efficiency is higher, and only the networking requirements need to be input to perform networking according to the networking requirements, which is more flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for interconnecting virtual and real devices provided in Example 1 of the present application;
[0023] Figure 2 A schematic diagram of the structure of a virtual-real device interconnection device provided in Embodiment 2 of the present application;
[0024] Figure 3A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application;
[0025] Figure 4 A structural diagram of the interconnection between virtual and real devices provided in Example 1 of the present application. DETAILED DESCRIPTION
[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0027] Embodiment 1
[0028] Figure 1 A flowchart of a method for interconnecting virtual and real devices provided in Example 1 of the present application is shown in FIG. Figure 1 As shown, the virtual-real device interconnection method provided in this embodiment can be applied to a virtual-real device networking system, where the virtual-real device networking system is provided with an SDN device, and the SDN device is connected to multiple physical devices, and specifically may include the following steps:
[0029] Step 101: upon receiving a user's networking requirement for a target virtual device, obtain interface information of the target virtual device from an SDN device according to the networking requirement.
[0030] In this step, the target virtual device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among multiple physical devices connected to the SDN device. That is, there may be one or more target virtual devices involved in this embodiment, and there may also be one or more target physical devices.
[0031] In a specific example, the target virtual device may be an MES, ERP or other system, and the target physical device may be a local physical device that is directly accessed through the fixed interface, physical port or VLAN of the SDN device, or a remote physical device that requires VPN resources or dedicated lines to be opened.
[0032] In addition, the networking requirements include the connectivity requirements between the target virtual device and the target physical device. Users can input the networking requirements for the target virtual and physical devices in text or graphic form. In text form, the identifier of the target virtual device and the identifier of the target physical device as well as the connectivity requirements between them can be indicated so that they can be processed correctly after receiving the networking requirements.
[0033] In a graphical manner, virtual devices and physical devices can be graphically visualized in advance, and the user can connect the virtual devices and physical devices. By identifying the two ends of the connection line, the identifier of the target virtual device and the identifier of the target physical device that need to be connected can be obtained, wherein a connection line represents a connectivity requirement.
[0034] In this step, after receiving the networking requirements, the virtual interface information of the target virtual device and the port information of the target physical device connected to the SDN device will be obtained from the SDN device based on the identifier of the target virtual device and the identifier of the target physical device involved in the networking requirements. The virtual interface information and port information are the interface information of the target virtual and real devices obtained in this step.
[0035] Step 102: Create a virtual connection device according to the networking requirements and the interface information of the target virtual and real devices.
[0036] In this step, the virtual connection device may be a virtual switch and / or a virtual router, wherein the virtual switch is mainly used for layer 2 networking, and the virtual router is used for layer 3 networking.
[0037] Specifically, the network hierarchy between each target physical device and each target virtual device may be determined based on the interface information and connectivity requirements of the target virtual and real devices; and then a virtual connection device may be created based on the network hierarchy.
[0038] Since the number of target entity devices involved in this embodiment may be multiple, and the network segments between the target entity devices may be the same or different, when determining the network hierarchy architecture, it will involve the second-layer networking for the same network segment and the third-layer networking for different network segments.
[0039] Therefore, when determining the network hierarchy architecture, it is possible to determine whether the target physical device is in the same network segment. Specifically, at least one target physical device that needs to be connected to the same target virtual device can be determined based on connectivity requirements to obtain a set of physical devices corresponding to the target virtual device; then, for the set of physical devices corresponding to any target virtual device, determine whether the target physical devices in the set of physical devices belong to the same network segment.
[0040] If so, a two-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set; otherwise, a three-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set.
[0041] Among them, the network segment determination is only required when connecting to the same target virtual device. Therefore, in order to facilitate the determination, the target physical devices connected to the same target virtual device can be regarded as a set, and then the target physical devices in the set are determined to be in the same network segment.
[0042] It should be noted that the method of determining the same network segment can refer to the network segment-related technologies, which will not be repeated here.
[0043] If they belong to the same network segment, only Layer 2 networking is required to achieve connectivity, corresponding to the Layer 2 networking architecture. If they do not belong to the same network segment, Layer 3 networking is required to achieve connectivity, corresponding to the Layer 3 networking architecture.
[0044] After the hierarchical architecture is determined, the corresponding virtual connection devices to be created will also be clearly identified. That is, if it is a two-layer networking architecture, a virtual switch is created between the target virtual device and the target physical device, and the virtual switch is the virtual connection device; if it is a three-layer networking architecture, a virtual router is created between the target virtual device and the target physical device, and the virtual router is the virtual connection device.
[0045] It should be noted that in a certain set, there are multiple target physical devices in the same network segment and at least one target physical device in another network segment. At this time, the corresponding hierarchical architecture can be a complex hierarchical architecture. For this complex hierarchical architecture, it is necessary to create a virtual switch and a virtual router. You can first connect multiple target physical devices in the same network segment to a virtual switch, and then connect the virtual switch and the target physical devices in other network segments to the virtual router.
[0046] Furthermore, if there are multiple target physical device groups (ie, multiple target physical devices) in the same network segment, each target physical device group needs to create its own corresponding virtual switch.
[0047] It should be noted that the virtual connection device in this step is dynamically created based on the networking requirements. In order to more clearly describe the dynamic creation process, a specific example can be used for illustration. Figure 4 , Figure 4 A structural diagram of the interconnection between virtual and real devices provided in Example 1 of the present application.
[0048] like Figure 4 As shown, the physical device includes local physical resource 1, local physical resource 2 and remote physical resource. The networking requirement may be to connect local physical resource 1 to the ERP system, and to connect local physical resource 1, local physical resource 2 and remote physical resource to the MES system. Based on the records of the SDN device, local physical resource 1, local physical resource 2 and remote physical resource are all in different network segments.
[0049] Based on the requirement of connecting local entity resource 1 to the ERP system, a virtual switch can be created for local entity resource 1; based on the requirement of connecting local entity resource 1, local entity resource 2 and remote entity resources to the MES system, since local entity resource 1, local entity resource 2 and remote entity resources are in different network segments, a virtual switch needs to be set for each physical device, and then a virtual router is set to connect each virtual switch to form a three-layer network.
[0050] Based on the above creation strategies, it is concluded that a virtual switch is created for each of the local entity resource 1, the local entity resource 2 and the remote entity resource, namely the local network 1, the local network 2 and the remote network, and then a virtual router is created to connect the local network 1, the local network 2 and the remote network. Then the local network 1 is connected to the ERP system to realize the connection between the local entity resource 1 and the ERP system, and the virtual router is connected to the MES system to realize the connection between the local entity resource 1, the local entity resource 2 and the remote entity resource to the MES system.
[0051] Step 103: Connect the target virtual and real device to the virtual connection device to connect the target virtual and real devices.
[0052] In this step, after the aforementioned virtual connection device is created, the target virtual device and the target physical device can be connected according to the aforementioned network hierarchy. If it is a two-layer networking architecture, the target virtual device and the target physical device are connected to the virtual switch; if it is a three-layer networking architecture, the target virtual device and the target physical device are connected to the virtual router.
[0053] In a specific example, if a layer-2 networking architecture is formed between the target physical device and the target virtual device, the target physical device and the target virtual device may be connected to the created virtual switch.
[0054] If a three-layer network architecture is formed between the target physical device and the target virtual device, the target physical device and the target virtual device can be connected to the created virtual router.
[0055] If it is the aforementioned complex networking architecture, multiple target physical devices in the same network segment are first connected to a virtual switch, and then the virtual switch and the target physical devices in other network segments are connected to a virtual router.
[0056] In this embodiment, it is applied to a virtual-real device networking system, in which an SDN device is provided, and the SDN device is connected to a plurality of physical devices. When the user's networking requirements for the target virtual-real device are received, the interface information of the target virtual-real device is obtained from the SDN device according to the networking requirements; then a virtual connection device is created according to the networking requirements and the interface information of the target virtual-real device; finally, the target virtual-real device is connected to the virtual connection device to connect the target virtual-real device. Based on this, in this embodiment, as long as the physical device is connected to the SDN device and the networking requirements are directly input, a virtual connection device can be created, so that the virtual-real device can be successfully interconnected through the virtual connection device, without the need for manual configuration, and the interconnection efficiency is higher, and only the networking requirements need to be input to perform networking according to the networking requirements, which is more flexible.
[0057] Embodiment 2
[0058] Figure 2 This is a structural diagram of a virtual-real device interconnection device provided in the second embodiment of the present application. The virtual-real device interconnection device provided in the embodiment of the present application is used in a virtual-real device networking system. The virtual-real device networking system is provided with an SDN device. The SDN device is connected to multiple physical devices. The virtual-real device interconnection method provided in any embodiment of the present application can be executed, and the method has the corresponding functional modules and beneficial effects. The device can be implemented in software and / or hardware, such as Figure 2 As shown, the virtual-real device interconnection apparatus specifically includes: an acquisition module 201 , a creation module 202 , and a connection module 203 .
[0059] The acquisition module is used to obtain the interface information of the target virtual and real device from the SDN device according to the networking requirements when receiving the user's networking requirements for the target virtual and real device;
[0060] A creation module is used to create a virtual connection device according to the networking requirements and the interface information of the target virtual and real devices;
[0061] The connection module is used to connect the target virtual and real devices to the virtual connection device to connect the target virtual and real devices.
[0062] In this embodiment, it is applied to a virtual-real device networking system, in which an SDN device is provided, and the SDN device is connected to a plurality of physical devices. When the user's networking requirements for the target virtual-real device are received, the interface information of the target virtual-real device is obtained from the SDN device according to the networking requirements; then a virtual connection device is created according to the networking requirements and the interface information of the target virtual-real device; finally, the target virtual-real device is connected to the virtual connection device to connect the target virtual-real device. Based on this, in this embodiment, as long as the physical device is connected to the SDN device and the networking requirements are directly input, a virtual connection device can be created, so that the virtual-real device can be successfully interconnected through the virtual connection device, without the need for manual configuration, and the interconnection efficiency is higher, and only the networking requirements need to be input to perform networking according to the networking requirements, which is more flexible.
[0063] Furthermore, the target virtual-real device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among a plurality of physical devices connected to the SDN device.
[0064] Furthermore, the networking requirements include connectivity requirements between the target virtual device and the target physical device, and the creation module is specifically used to:
[0065] Determine the network hierarchy between each target physical device and each target virtual device according to the interface information and connectivity requirements of the target virtual and real devices;
[0066] Create virtual connection devices based on network hierarchy.
[0067] Furthermore, the creation module is specifically used for:
[0068] Determine at least one target physical device that needs to be connected to the same target virtual device according to the connectivity requirement, and obtain a set of physical devices corresponding to the target virtual device;
[0069] For a physical device set corresponding to any target virtual device, determining whether the target physical devices in the physical device set belong to the same network segment;
[0070] If so, a two-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set;
[0071] Otherwise, a three-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set.
[0072] Furthermore, the network hierarchical architecture includes a two-layer networking architecture and / or a three-layer networking architecture, and the creation module is specifically used for:
[0073] If it is a two-layer networking architecture, a virtual switch is created between the target virtual device and the target physical device. The virtual switch is a virtual connection device.
[0074] If it is a three-layer networking architecture, a virtual router is created between the target virtual device and the target physical device. The virtual router is a virtual connection device.
[0075] Furthermore, the connection module is specifically used for:
[0076] If it is a two-layer networking architecture, connect the target virtual device and the target physical device to the virtual switch;
[0077] If it is a three-layer network architecture, connect the target virtual device and the target physical device to the virtual router.
[0078] Embodiment 3
[0079] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application is shown in FIG. Figure 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of the processor 310 in the electronic device can be one or more. Figure 3 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0080] The memory 320 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the virtual-real device interconnection method in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 320, that is, to implement the above-mentioned virtual-real device interconnection method:
[0081] When receiving the user's networking requirements for the target virtual and real devices, obtain the interface information of the target virtual and real devices from the SDN device according to the networking requirements;
[0082] Create a virtual connection device based on networking requirements and interface information of target virtual and real devices;
[0083] Connect the target virtual and real device to the virtual connection device to connect the target virtual and real devices.
[0084] In this embodiment, it is applied to a virtual-real device networking system, in which an SDN device is provided, and the SDN device is connected to a plurality of physical devices. When the user's networking requirements for the target virtual-real device are received, the interface information of the target virtual-real device is obtained from the SDN device according to the networking requirements; then a virtual connection device is created according to the networking requirements and the interface information of the target virtual-real device; finally, the target virtual-real device is connected to the virtual connection device to connect the target virtual-real device. Based on this, in this embodiment, as long as the physical device is connected to the SDN device and the networking requirements are directly input, a virtual connection device can be created, so that the virtual-real device can be successfully interconnected through the virtual connection device, without the need for manual configuration, and the interconnection efficiency is higher, and only the networking requirements need to be input to perform networking according to the networking requirements, which is more flexible.
[0085] Furthermore, the target virtual-real device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among a plurality of physical devices connected to the SDN device.
[0086] Furthermore, the networking requirement includes a connectivity requirement between a target virtual device and a target physical device. Creating a virtual connection device according to the networking requirement and interface information of the target virtual and physical devices includes:
[0087] Determine the network hierarchy between each target physical device and each target virtual device according to the interface information and connectivity requirements of the target virtual and real devices;
[0088] Create virtual connection devices based on network hierarchy.
[0089] Furthermore, the network hierarchical architecture between each target physical device and each target virtual device is determined according to the interface information and connectivity requirements of the target virtual and real devices, including:
[0090] Determine at least one target physical device that needs to be connected to the same target virtual device according to the connectivity requirement, and obtain a set of physical devices corresponding to the target virtual device;
[0091] For a physical device set corresponding to any target virtual device, determining whether the target physical devices in the physical device set belong to the same network segment;
[0092] If so, a two-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set;
[0093] Otherwise, a three-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set.
[0094] Furthermore, the network hierarchy architecture includes a two-layer networking architecture and / or a three-layer networking architecture, and creating a virtual connection device according to the network hierarchy architecture includes:
[0095] If it is a two-layer networking architecture, a virtual switch is created between the target virtual device and the target physical device. The virtual switch is a virtual connection device.
[0096] If it is a three-layer networking architecture, a virtual router is created between the target virtual device and the target physical device. The virtual router is a virtual connection device.
[0097] Furthermore, the virtual connection device is a virtual switch or a virtual router, and connecting the target virtual and real devices to the virtual connection device includes:
[0098] If it is a two-layer networking architecture, connect the target virtual device and the target physical device to the virtual switch;
[0099] If it is a three-layer network architecture, connect the target virtual device and the target physical device to the virtual router.
[0100] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0101] Embodiment 4
[0102] Embodiment 4 of the present application further provides a storage medium including computer executable instructions, and when the computer executable instructions are executed by a computer processor, they are used to execute a method for interconnecting virtual and real devices, the method comprising:
[0103] When receiving the user's networking requirements for the target virtual and real devices, obtain the interface information of the target virtual and real devices from the SDN device according to the networking requirements;
[0104] Create a virtual connection device based on networking requirements and interface information of target virtual and real devices;
[0105] Connect the target virtual and real device to the virtual connection device to connect the target virtual and real devices.
[0106] In this embodiment, it is applied to a virtual-real device networking system, in which an SDN device is provided, and the SDN device is connected to a plurality of physical devices. When the user's networking requirements for the target virtual-real device are received, the interface information of the target virtual-real device is obtained from the SDN device according to the networking requirements; then a virtual connection device is created according to the networking requirements and the interface information of the target virtual-real device; finally, the target virtual-real device is connected to the virtual connection device to connect the target virtual-real device. Based on this, in this embodiment, as long as the physical device is connected to the SDN device and the networking requirements are directly input, a virtual connection device can be created, so that the virtual-real device can be successfully interconnected through the virtual connection device, without the need for manual configuration, and the interconnection efficiency is higher, and only the networking requirements need to be input to perform networking according to the networking requirements, which is more flexible.
[0107] Furthermore, the target virtual-real device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among a plurality of physical devices connected to the SDN device.
[0108] Furthermore, the networking requirement includes a connectivity requirement between a target virtual device and a target physical device. Creating a virtual connection device according to the networking requirement and interface information of the target virtual and physical devices includes:
[0109] Determine the network hierarchy between each target physical device and each target virtual device according to the interface information and connectivity requirements of the target virtual and real devices;
[0110] Create virtual connection devices based on network hierarchy.
[0111] Furthermore, the network hierarchical architecture between each target physical device and each target virtual device is determined according to the interface information and connectivity requirements of the target virtual and real devices, including:
[0112] Determine at least one target physical device that needs to be connected to the same target virtual device according to the connectivity requirement, and obtain a set of physical devices corresponding to the target virtual device;
[0113] For a physical device set corresponding to any target virtual device, determining whether the target physical devices in the physical device set belong to the same network segment;
[0114] If so, a two-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set;
[0115] Otherwise, a three-layer network architecture is determined between the target virtual device and the target physical device in the corresponding physical device set.
[0116] Furthermore, the network hierarchy architecture includes a two-layer networking architecture and / or a three-layer networking architecture, and creating a virtual connection device according to the network hierarchy architecture includes:
[0117] If it is a two-layer networking architecture, a virtual switch is created between the target virtual device and the target physical device. The virtual switch is a virtual connection device.
[0118] If it is a three-layer networking architecture, a virtual router is created between the target virtual device and the target physical device. The virtual router is a virtual connection device.
[0119] Furthermore, the virtual connection device is a virtual switch or a virtual router, and connecting the target virtual and real devices to the virtual connection device includes:
[0120] If it is a two-layer networking architecture, connect the target virtual device and the target physical device to the virtual switch;
[0121] If it is a three-layer network architecture, connect the target virtual device and the target physical device to the virtual router.
[0122] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the above method operations, can also execute related operations in the virtual-real device interconnection method provided in any embodiment of the present application.
[0123] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0124] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0125] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for interconnecting virtual and real devices, characterized in that: Used in a virtual-real device networking system, the virtual-real device networking system is provided with an SDN device, the SDN device is connected to a plurality of physical devices, the method comprises: When receiving a user's networking requirement for a target virtual device, acquiring interface information of the target virtual device from the SDN device according to the networking requirement; Creating a virtual connection device according to the networking requirements and the interface information of the target virtual and real devices; The target virtual-real device is connected to the virtual connection device to connect the target virtual-real device.
2. The method according to claim 1, characterized in that The target virtual-real device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among a plurality of physical devices connected to the SDN device.
3. The method according to claim 2, characterized in that The networking requirement includes a connectivity requirement between a target virtual device and a target physical device, and the step of creating a virtual connection device according to the networking requirement and the interface information of the target virtual and physical devices includes: Determine the network hierarchy between each target physical device and each target virtual device according to the interface information of the target virtual and real devices and the connectivity requirements; A virtual connection device is created according to the network hierarchy.
4. The method according to claim 3, characterized in that The determining of the network hierarchical architecture between each target physical device and each target virtual device according to the interface information of the target virtual-real device and the connectivity requirement includes: Determine at least one target physical device that needs to be connected to the same target virtual device according to the connectivity requirement, and obtain a set of physical devices corresponding to the target virtual device; For a set of physical devices corresponding to any of the target virtual devices, determining whether the target physical devices in the set of physical devices belong to the same network segment; If so, determining a two-layer networking architecture between the target virtual device and the target physical device in the corresponding physical device set; Otherwise, a three-layer networking architecture is determined between the target virtual device and the target physical device in the corresponding physical device set.
5. The method according to claim 3, characterized in that: The network hierarchical architecture includes a two-layer networking architecture and / or a three-layer networking architecture, and the creating a virtual connection device according to the network hierarchical architecture includes: If it is a two-layer networking architecture, a virtual switch is created between the target virtual device and the target physical device, and the virtual switch is a virtual connection device; If it is a three-layer networking architecture, a virtual router is created between the target virtual device and the target physical device, and the virtual router is a virtual connection device.
6. The method according to claim 5, characterized in that The virtual connection device is a virtual switch or a virtual router, and the step of connecting the target virtual and real device to the virtual connection device includes: If it is a two-layer networking architecture, connecting the target virtual device and the target physical device to the virtual switch; If it is a three-layer networking architecture, the target virtual device and the target physical device are connected to the virtual router.
7. A virtual and real device interconnection device, characterized in that: Used in a virtual-real device networking system, the virtual-real device networking system is provided with an SDN device, the SDN device is connected to a plurality of physical devices, and the device comprises: An acquisition module, configured to, upon receiving a user's networking requirement for a target virtual and real device, acquire interface information of the target virtual and real device from the SDN device according to the networking requirement; A creation module, used to create a virtual connection device according to the networking requirements and the interface information of the target virtual and real devices; The connection module is used to connect the target virtual-real device to the virtual connection device to connect the target virtual-real device.
8. The device according to claim 7, characterized in that The target virtual-real device includes a target virtual device and a target physical device, and the target physical device is at least one physical device among a plurality of physical devices connected to the SDN device.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the virtual-real device interconnection method as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for interconnecting virtual and real devices as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Network creating method, related device and system
CN108768692A
Network shooting range system and virtual network implementation method and device of network shooting range system
CN114363021A
Target creation system and method based on virtualization platform
CN115617463A
Method for realizing IPSec VPN (Internet Protocol Security Virtual Private Network) two-layer networking and IPSec VPN gateway
CN115941389A
Virtual-real interconnection method and device, equipment and storage medium
CN118487936A