CN112463255A - Virtual interface loading method and device, physical network card and storage medium - Google Patents

Virtual interface loading method and device, physical network card and storage medium Download PDF

Info

Publication number
CN112463255A
CN112463255A CN202011455931.2A CN202011455931A CN112463255A CN 112463255 A CN112463255 A CN 112463255A CN 202011455931 A CN202011455931 A CN 202011455931A CN 112463255 A CN112463255 A CN 112463255A
Authority
CN
China
Prior art keywords
interface
virtual interface
target
virtual
parameters
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
Application number
CN202011455931.2A
Other languages
Chinese (zh)
Inventor
邹子文
梁天永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xaircraft Technology Co Ltd
Original Assignee
Guangzhou Xaircraft Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xaircraft Technology Co Ltd filed Critical Guangzhou Xaircraft Technology Co Ltd
Priority to CN202011455931.2A priority Critical patent/CN112463255A/en
Publication of CN112463255A publication Critical patent/CN112463255A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a virtual interface loading method and device, a physical network card and a storage medium, and relates to the technical field of virtual interfaces. In the application, first, a virtual interface reload instruction is obtained, where the virtual interface reload instruction includes virtual interface identification information, and the virtual interface identification information is used to identify a target virtual interface that needs to be reloaded. And secondly, acquiring target interface parameters based on the virtual interface identification information, wherein the target interface parameters are new interface parameters corresponding to the interface parameters of the target virtual interface. The target virtual interface is then reloaded based on the target interface parameters. Based on the method, the problem of poor connection stability established based on the virtual interface in the prior art can be solved.

Description

Virtual interface loading method and device, physical network card and storage medium
Technical Field
The present application relates to the field of virtual interface technologies, and in particular, to a virtual interface loading method and apparatus, a physical network card, and a storage medium.
Background
In order to reduce the device cost, a plurality of virtual interfaces are generally configured for one physical network card to implement different services. However, the inventor researches and discovers that in the technology of configuring a plurality of virtual interfaces on one physical network card, the connection established based on the virtual interfaces has the problem of poor stability.
Disclosure of Invention
In view of this, an object of the present application is to provide a method and an apparatus for loading a virtual interface, a physical network card, and a storage medium, so as to solve the problem in the prior art that connection stability established based on a virtual interface is poor.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
a virtual interface loading method is applied to a physical network card configured with a plurality of virtual interfaces, and comprises the following steps:
obtaining a virtual interface overloading instruction, wherein the virtual interface overloading instruction comprises virtual interface identification information which is used for identifying a target virtual interface needing to be reloaded;
acquiring target interface parameters based on the virtual interface identification information, wherein the target interface parameters are new interface parameters corresponding to the interface parameters of the target virtual interface;
reloading the target virtual interface based on the target interface parameters.
In a preferred option of the embodiment of the present application, in the virtual interface loading method, the step of reloading the target virtual interface based on the target interface parameter includes:
closing and deleting the target virtual interface;
establishing a new target virtual interface based on the target interface parameters;
and starting the new target virtual interface to enable the new target virtual interface to execute interface work based on the target interface parameters.
In a preferred option of the embodiment of the present application, in the virtual interface loading method, the step of reloading the target virtual interface based on the target interface parameter includes:
establishing a new target virtual interface based on the target interface parameters;
starting the new target virtual interface to enable the new target virtual interface to execute interface work based on the target interface parameters;
and sending an interface switching instruction generated based on the new target virtual interface to target equipment connected with the target virtual interface, so that the target equipment is disconnected with the target virtual interface based on the interface switching instruction and establishes connection with the new target virtual interface.
In a preferred option of the embodiment of the present application, in the method for loading a virtual interface, the step of obtaining a reload instruction of the virtual interface includes:
judging whether new interface parameters are generated aiming at the target virtual interface;
and if new interface parameters are generated aiming at the target virtual interface, generating a virtual interface overloading instruction comprising the virtual interface identification information of the target virtual interface.
In a preferred option of the embodiment of the present application, in the virtual interface loading method, the virtual interface loading method further includes:
obtaining a parameter updating instruction, wherein the parameter updating instruction comprises virtual interface identification information;
and generating new interface parameters based on the parameter updating instruction aiming at the interface parameters of the target virtual interface corresponding to the virtual interface identification information.
In a preferred option of the embodiment of the present application, in the virtual interface loading method, the step of generating a new interface parameter for the interface parameter of the target virtual interface corresponding to the virtual interface identification information based on the parameter update instruction includes:
determining a target configuration file based on the virtual interface identification information, wherein the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information;
deleting the interface parameters in the target configuration file;
and writing the interface updating parameters included by the parameter updating instruction into the target configuration file, wherein the interface updating parameters are used as new interface parameters.
In a preferred option of the embodiment of the present application, in the virtual interface loading method, the step of generating a new interface parameter for the interface parameter of the target virtual interface corresponding to the virtual interface identification information based on the parameter update instruction includes:
determining a target configuration file based on the virtual interface identification information, wherein the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information;
reading the interface parameters from the target configuration file;
updating the interface parameters based on the interface updating parameters included in the parameter updating instruction to obtain new interface parameters;
and writing the new interface parameters into the target configuration file.
The embodiment of the present application further provides a virtual interface loading device, which is applied to a physical network card configured with a plurality of virtual interfaces, and the virtual interface loading device includes:
the system comprises a reloading instruction obtaining module, a reloading instruction obtaining module and a reloading instruction processing module, wherein the reloading instruction of the virtual interface comprises virtual interface identification information which is used for identifying a target virtual interface needing to be reloaded;
an interface parameter obtaining module, configured to obtain a target interface parameter based on the virtual interface identification information, where the target interface parameter is a new interface parameter corresponding to an interface parameter of the target virtual interface;
and the virtual interface loading module is used for reloading the target virtual interface based on the target interface parameters.
On the basis, an embodiment of the present application further provides a physical network card, including:
a memory for storing a computer program;
and the processor is connected with the memory and is used for executing the computer program stored in the memory so as to realize the virtual interface loading method.
On the basis, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed, the virtual interface loading method is implemented.
According to the virtual interface loading method and device, the physical network card and the storage medium, the virtual interface overloading instruction comprising the virtual interface identification information is obtained, so that the target virtual interface corresponding to the virtual interface identification information can be reloaded in a targeted manner based on the virtual interface identification information. Therefore, the problem that in the process of reloading the target virtual interface, due to reloading of other virtual interfaces, the connection established based on the other virtual interfaces is disconnected can be solved, the stability of the connection established based on the virtual interfaces is integrally improved, the problem that the connection established based on the virtual interfaces in the prior art is poor in stability is solved, the reliable operation of communication services is guaranteed, and the high practical value is achieved.
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
Fig. 1 is a block diagram of a physical network card according to an embodiment of the present disclosure.
Fig. 2 is a schematic flowchart of a virtual interface loading method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating sub-steps included in step S110 in fig. 2.
Fig. 4 is a flowchart illustrating sub-steps included in step S130 in fig. 2.
Fig. 5 is a flowchart illustrating other sub-steps included in step S130 in fig. 2.
Fig. 6 is a flowchart illustrating other steps included in the virtual interface loading method according to the embodiment of the present application.
Fig. 7 is a flowchart illustrating sub-steps included in step S150 in fig. 6.
Fig. 8 is a flowchart illustrating other sub-steps included in step S150 in fig. 6.
Fig. 9 is a system block diagram of an unmanned aerial vehicle communication system according to an embodiment of the present application.
Fig. 10 is a block diagram illustrating a virtual interface loading apparatus according to an embodiment of the present application.
Icon: 10-physical network card; 12-a memory; 14-a processor; 100-virtual interface loading means; 110-a reload instruction obtaining module; 120-interface parameter acquisition module; 130-virtual interface load module.
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 only a part of the embodiments of the present application, and not all the 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.
In some current applications of the physical network card, a plurality of virtual interfaces are generally configured based on cost considerations, so that different services can be realized. For example, in a bridge mode of a router, two virtual interfaces may be configured, one virtual interface may be used to connect to an upper level router and the other virtual interface may be used to create a new local area network.
The research of the inventor of the application finds that the connection disconnection problem is easy to occur based on the connection established between the virtual interfaces and other equipment, and thus the connection stability is poor.
Further, as a result of further research by the inventors of the present application, it has been found that a problem that connection disconnection easily occurs in connection with other devices established based on a plurality of virtual interfaces is due to:
based on certain requirements, after interface parameters of any one virtual interface are modified, all the virtual interfaces are reloaded, and the reloading can disconnect the connection established based on each virtual interface, so that the connection established based on a plurality of virtual interfaces is caused, and the problem of poor stability is presented on the whole.
For example, for the bridge mode of a home router, the first virtual interface may be used as CLIENT for connecting to an upper-level router, and the second virtual interface may be used as AP (access point) for opening a new local area network for other devices (such as mobile phones, etc.) to access. Therefore, if a superior router with a better network needs to be changed, the interface parameters of the first virtual interface need to be modified or updated, and then, after the interface parameters are modified or updated, the virtual interface needs to be reloaded in order to ensure that the modified or updated interface parameters can be effectively used, and the reloaded object includes not only the first virtual interface but also the second virtual interface, so that the connection between other devices such as a mobile phone and the like and the second virtual interface is disconnected.
Based on the above technical problem and the finding of the reasons for the technical problem, in order to overcome the technical problem, as shown in fig. 1, an embodiment of the present application provides a physical network card 10, which may include a memory 12, a processor 14 and a virtual interface loading apparatus 100.
Wherein the memory 12 and the processor 14 are electrically connected directly or indirectly to realize data transmission or interaction. For example, they may be electrically connected to each other via one or more communication buses or signal lines. The virtual interface loading apparatus 100 includes at least one software functional module that can be stored in the memory 12 in the form of software or firmware (firmware). The processor 14 is configured to execute an executable computer program stored in the memory 12, for example, a software functional module and a computer program included in the virtual interface loading apparatus 100, so as to implement the virtual interface loading method provided in the embodiment of the present application.
Alternatively, the Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 14 may be a general-purpose processor including a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and the like.
It is understood that the configuration shown in fig. 1 is merely illustrative, and the physical network card 10 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. For example, the physical network card 10 may further include a communication unit for information interaction with other devices.
The existence form of the physical network card 10 is not limited, for example, in an alternative example, the physical network card 10 may be a router.
With reference to fig. 2, an embodiment of the present application further provides a virtual interface loading method, which can be applied to the physical network card 10. The physical network card 10 may be configured with a plurality of virtual interfaces, and the method steps defined by the flows related to the virtual interface loading method may be implemented by the physical network card 10.
The specific process shown in FIG. 2 will be described in detail below.
Step S110, obtaining a virtual interface overloading instruction.
In this embodiment, the physical network card 10 may obtain a virtual interface reload instruction for reloading the target virtual interface. The virtual interface reload instruction may include virtual interface identification information, where the virtual interface identification information is used to identify the target virtual interface that needs to be reloaded.
And step S120, acquiring target interface parameters based on the virtual interface identification information.
In this embodiment, after obtaining the virtual interface reload instruction based on step S110, the physical network card 10 may obtain a target interface parameter of a target virtual interface corresponding to (identified by) the virtual interface identification information based on the virtual interface identification information included in the virtual interface reload instruction.
And the target interface parameter is a new interface parameter corresponding to the interface parameter of the target virtual interface.
Step S130, reloading the target virtual interface based on the target interface parameter.
In this embodiment, after obtaining the target interface parameter based on step S120, the physical network card 10 may reload the target virtual interface based on the target interface parameter.
Based on the method, the virtual interface reloading instruction comprising the virtual interface identification information is obtained, so that the target virtual interface corresponding to the virtual interface identification information can be reloaded in a targeted manner based on the virtual interface identification information. Therefore, the problem that the connection established based on other virtual interfaces is disconnected due to the fact that other virtual interfaces are reloaded in the process of reloading the target virtual interface can be solved, the stability of the connection established based on a plurality of virtual interfaces is integrally improved, the problem that the connection established based on the virtual interfaces is poor in stability in the prior art is solved, and the reliable operation of communication services is guaranteed.
In the first aspect, it should be noted that, in step S110, a specific manner for obtaining the virtual interface reload instruction is not limited, and may be selected according to an actual application requirement.
For example, in an alternative example, in order to ensure timely and effective reloading operation on the target virtual interface, in conjunction with fig. 3, step S110 may include step S111 and step S113, which are described in detail below.
Step S111, determining whether new interface parameters are generated for the target virtual interface.
In this embodiment, in order to obtain the virtual interface reload instruction in a timely manner, it may be determined whether new interface parameters are generated for the target virtual interface.
When it is determined that a new interface parameter is generated for the target virtual interface, step S113 may be executed to generate a virtual interface reload instruction.
Step S113, generating a virtual interface reload instruction including the virtual interface identification information of the target virtual interface.
In this embodiment, when it is determined that a new interface parameter is generated for a target virtual interface based on step S111, in order to perform targeted reloading on the target virtual interface, a virtual interface reload instruction including virtual interface identification information of the target virtual interface may be generated, so that when the virtual interface reload instruction is executed, the target virtual interface may be reloaded in a targeted manner based on the virtual interface identification information, thereby avoiding false reloading of other virtual interfaces.
For another example, in another alternative example, the target virtual interface may not need to be reloaded immediately after new interface parameters are generated for the target virtual interface based on the user's needs. Based on this, after generating a new interface parameter for the target virtual interface, it may be determined whether a certain condition is reached, such as reaching a certain time condition or acquiring certain trigger information (such as generating a trigger instruction based on an operation of a user), and after reaching the certain condition, a virtual interface reload instruction is generated.
In the second aspect, it should be noted that, in step S120, a specific manner for obtaining the target interface parameter is not limited, and may be selected according to an actual application requirement.
For example, in an alternative example, a corresponding configuration file may be determined based on the virtual interface identification information and a pre-established correspondence relationship, and then parameters are read from the configuration file, so that the target interface parameters may be obtained.
For another example, in an alternative example, a plurality of existing configuration files may be traversed based on the virtual interface identification information, so that corresponding configuration files may also be determined, and then parameters are read from the configuration files, so that the target interface parameters may be obtained.
In the third aspect, it should be noted that, in step S130, a specific manner of reloading the target virtual interface is not limited, and may be selected according to an actual application requirement.
For example, in an alternative example, in order to avoid the problem of wasting virtual interface resources and possibly causing virtual interface conflict, in conjunction with fig. 4, step S130 may include step S131, step S132 and step S133, which are described in detail below.
Step S131, closing and deleting the target virtual interface.
In this embodiment, the target virtual interface may be closed and deleted.
Step S132, establishing a new target virtual interface based on the target interface parameters.
In this embodiment, after the target virtual interface is closed and deleted based on step S131, a new target virtual interface may be established based on the target interface parameters acquired in step S120, that is, based on new interface parameters corresponding to the target virtual interface.
Step S133, starting the new target virtual interface, so that the new target virtual interface executes interface operation based on the target interface parameters.
In this embodiment, after the new target virtual interface is established based on step S132, the new target virtual interface may be started, so that the new target virtual interface may perform interface operations based on the target interface parameters.
It will be appreciated that in this example, to facilitate other devices to which the target virtual interface was connected before being shut down and deleted, a connection can effectively be established based on the new target virtual interface, which may have an interface name that is the same as the interface name of the target virtual interface, e.g., as one possible example of an application, the interface name may be wlan 0.
For another example, in another alternative example, in order to ensure that the physical network card 10 has enough virtual interfaces to form a standby virtual interface, in conjunction with fig. 5, step S130 may include step S134, step S135, and step S136, which is described in detail below.
And step S134, establishing a new target virtual interface based on the target interface parameters.
In this embodiment, after obtaining the target interface parameters based on step S120, a new target virtual interface may be established based on the target interface parameters.
Step S135, starting the new target virtual interface, so that the new target virtual interface performs interface operation based on the target interface parameters.
In this implementation, after the new target virtual interface is established based on step S134, the new target virtual interface may be started, and thus, the new target virtual interface may be enabled to perform interface operations based on the target interface parameters.
Step S136, sending an interface switching instruction generated based on the new target virtual interface to the target device connected to the target virtual interface, so that the target device disconnects the target virtual interface based on the interface switching instruction and establishes connection with the new target virtual interface.
In this embodiment, after the new target virtual interface is started based on step S135, an interface switching instruction may be generated based on the new target virtual interface, and then the interface switching instruction is sent to the target device connected to the target virtual interface. As such, the target device may be enabled to disconnect from the target virtual interface and establish a connection with the new target virtual interface based on the interface switch instruction (to enable establishment of a connection with the new target virtual interface, the interface switch instruction may include an interface name of the new target virtual interface).
It will be appreciated that in this example, to facilitate other devices to which the target virtual interface was connected before being shut down and deleted, a connection can effectively be established based on the new target virtual interface, which may have an interface name different from that of the target virtual interface, e.g., as one possible application example, the interface name of the target virtual interface may be wlan0 and the interface name of the new target virtual interface may be wlan 1.
On the basis of the above example, since the target interface parameter, that is, the new interface parameter, needs to be acquired when step S120 is executed, in order to enable the new interface parameter to be acquired, in this embodiment, the virtual interface loading method may further include a step of generating the new interface parameter. Based on this, in conjunction with fig. 6, the virtual interface loading method may further include step S140 and step S150, which are described in detail below.
Step S140, a parameter update instruction is obtained.
In this embodiment, the physical network card 10 may obtain a parameter update instruction for generating the new interface parameter, where the parameter update instruction may include virtual interface identification information (the virtual interface identification information is used to identify a target virtual interface that needs to be reloaded).
Step S150, generating new interface parameters based on the parameter update instruction for the interface parameters of the target virtual interface corresponding to the virtual interface identification information.
In this embodiment, after obtaining the parameter update instruction based on step S140, the physical network card 10 may generate a new interface parameter based on the parameter update instruction for the interface parameter of the target virtual interface corresponding to the virtual interface identification information.
Optionally, in the above example, the specific manner of obtaining the parameter updating instruction based on step S140 is not limited, and may be selected according to the actual application requirement.
For example, in an alternative example, the parameter update instruction may be generated in response to a parameter update operation by a user, and thus, the parameter update instruction may be obtained.
For another example, in another alternative example, the parameter update instruction may be triggered to be generated based on a preconfigured condition, such as every certain time interval or a certain occurrence (for example, too many other devices connected by a virtual interface are present, so as to ensure the safety and efficiency of communication), and thus, the parameter update instruction may also be obtained.
Optionally, in the above example, the specific manner of generating the new interface parameter based on step S150 is not limited, and may be selected according to the actual application requirement.
For example, in an alternative example, in order to improve the efficiency of generating the new interface parameter and thus improve the efficiency of reloading the virtual interface as a whole, in conjunction with fig. 7, step S150 may include step S151, step S152, and step S153, which are described in detail below.
Step S151, determining a target configuration file based on the virtual interface identification information.
In this embodiment, after the parameter update instruction is obtained based on step S140, a configuration file corresponding to the virtual interface identification information may be determined based on the virtual interface identification information included in the parameter update instruction, so that a target configuration file may be obtained.
And the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information. That is, the interface parameters are located in the target configuration file.
Step S152, deleting the interface parameters in the target configuration file.
In this embodiment, after determining the target configuration file based on step S151, a deletion operation may be performed on the interface parameters in the target configuration file. That is, the interface parameters of the target virtual interface in the target configuration file may be deleted.
Step S153, writing the interface update parameters included in the parameter update instruction into the target configuration file.
In this embodiment, after deleting the interface parameters in the target configuration file based on step S152, that is, after deleting the interface parameters of the target virtual interface, the interface update parameters included in the parameter update instruction may be written into the target configuration file.
That is, the parameter update instruction may further include the interface update parameter on the basis of including the virtual interface identification information. And, the interface update parameter can be used as a new interface parameter, so that the interface update parameter can be directly written into the target configuration file.
Based on this, when step S120 is executed, the parameters in the target configuration file may be directly read, so as to obtain the new interface parameters, that is, the target interface parameters.
For another example, in another alternative example, in order to reduce the data amount of the interface update parameter, so that when the parameter update instruction is generated based on the parameter update operation of the user, the parameter update operation may be simpler and the operation difficulty of the user is reduced, with reference to fig. 8, step S150 may include step S154, step S155, step S156, and step S157, which is described in detail below.
Step S154, determining a target configuration file based on the virtual interface identification information.
In this embodiment, after the parameter update instruction is obtained based on step S140, a configuration file corresponding to the virtual interface identification information may be determined based on the virtual interface identification information included in the parameter update instruction, so that a target configuration file may be obtained.
And the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information. That is, the interface parameters are located in the target configuration file.
Step S155, reading the interface parameters from the target configuration file.
In this embodiment, after determining the target configuration file based on step S154, the interface parameters may be read from the target configuration file, so that the interface parameters of the target virtual interface may be obtained.
Step S156, based on the interface update parameters included in the parameter update instruction, update the interface parameters to obtain new interface parameters.
In this embodiment, after obtaining the interface parameters based on step S155, the interface parameters may be updated (e.g., one or more of parameters such as an interface name, an access password, and an access point encryption type are updated) based on the interface update parameters included in the parameter update instruction, so as to obtain new interface parameters.
That is, the parameter update instruction may further include the interface update parameter on the basis of including the virtual interface identification information.
Step S157, writing the new interface parameter into the target configuration file.
In this embodiment, after obtaining the new interface parameter based on step S156, the new interface parameter may be written into the target configuration file to replace the interface parameter. In this way, when step S120 is executed, the parameter in the target configuration file may be directly read, so as to obtain the new interface parameter, that is, the target interface parameter.
On the basis of the above example, in order to better explain the example, the application also provides a specific application example. The application example may be a scene based on an unmanned aerial vehicle communication system, and in conjunction with fig. 9, the unmanned aerial vehicle communication system may include a remote controller, a mobile phone (or other terminal devices) and an unmanned aerial vehicle.
In detail, the remote controller may include a virtual interface a and a virtual interface B, where the virtual interface a may be used as a virtual interface in an AP mode to communicate with (a client of) the mobile phone, and the virtual interface B may be used as a MESH mode (a MESH mode refers to a MESH topology defined by IEEE 802.16-2004) to communicate with the unmanned aerial vehicle so as to maximize a coverage area of the wireless network on the basis of ensuring a network throughput and providing an effective utilization rate of the network).
In the above-mentioned unmanned aerial vehicle communication system, as a scenario in which interface parameters need to be modified (updated), a pairing process of the unmanned aerial vehicle is performed. When the remote controller is paired with the unmanned aerial vehicle, the remote controller needs to enter a special appointed network, if the mesh id is XAG0000, and after two communication parties enter the same mesh id network, pairing information interaction is carried out, if the two communication parties enter the mesh id network (such as XAG1234) after pairing.
That is to say, in the above example, after the remote controller and the drone are paired, the parameters of the mesh network need to be modified, so that the modified parameters need to be reloaded, and thus, if the reloaded parameters are reloaded and the virtual interface a is also reloaded during the process of executing the reloading, the communication between the virtual interface a and the mobile phone is disconnected. Based on this, to explain the above virtual interface loading method, the name of the virtual interface a may be wlan0, and the name of the virtual interface B may be wlan 0-1.
1. Obtaining a virtual interface reload instruction, such as network reload wlan 0-1;
2. reading new interface parameters corresponding to the wlan0-1 in a corresponding configuration file, such as mode mesh and mesh id XAG1234, based on the wlan0-1 in the virtual interface reload instruction;
3. closing and deleting a virtual interface wlan0-1, wherein the corresponding two operation instructions are ip link set dev wlan0-1 down and iwdev wlan0-1 del in an OPENRRT system of a remote controller respectively;
4. performing interface addition operation based on the read new interface parameters to establish a new virtual interface wlan0-1, wherein instructions corresponding to the operation are iwphy 0interface add wlan0-1 type mp and iwdev wlan0-1 mesh join XAG1234 in an OPENRRT system of the remote controller;
5. and (3) executing a starting operation on a new virtual interface wlan0-1 to enable the new virtual interface to work under new interface parameters, wherein an instruction corresponding to the operation is ip link set dev wlan0-1 up in an OPENRRT system of the remote controller.
Based on this, the purpose of reloading only the virtual interface wlan0-1 can be realized, the virtual interface wlan0 is not reloaded, and stable communication between the mobile phone and the remote controller is ensured.
With reference to fig. 10, an embodiment of the present application further provides a virtual interface loading apparatus 100, which can be applied to the physical network card 10. The virtual interface loading apparatus 100 includes a reload instruction obtaining module 110, an interface parameter obtaining module 120, and a virtual interface loading module 130.
The reload instruction obtaining module 110 may be configured to obtain a virtual interface reload instruction, where the virtual interface reload instruction includes virtual interface identification information, and the virtual interface identification information is used to identify a target virtual interface that needs to be reloaded. In this embodiment, the reload instruction obtaining module 110 is configured to execute step S110 shown in fig. 2, and reference may be made to the foregoing description of step S110 for relevant contents of the reload instruction obtaining module 110.
The interface parameter obtaining module 120 may be configured to obtain a target interface parameter based on the virtual interface identification information, where the target interface parameter is a new interface parameter corresponding to the interface parameter of the target virtual interface. In this embodiment, the interface parameter acquiring module 120 may be configured to perform step S120 shown in fig. 2, and reference may be made to the foregoing description of step S120 for relevant contents of the interface parameter acquiring module 120.
The virtual interface loading module 130 may be configured to reload the target virtual interface based on the target interface parameter. In this embodiment, the virtual interface loading module 130 may be configured to execute step S130 shown in fig. 2, and reference may be made to the foregoing description of step S130 for relevant contents of the virtual interface loading module 130.
Based on the above example, the virtual interface loading apparatus 100 may further include other modules having different functions based on different requirements.
For example, in an alternative example, the other modules may be configured to:
obtaining a parameter updating instruction, wherein the parameter updating instruction comprises virtual interface identification information;
and generating new interface parameters based on the parameter updating instruction aiming at the interface parameters of the target virtual interface corresponding to the virtual interface identification information.
Wherein, the specific functions of the other modules can refer to the related description.
In an embodiment of the present application, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and the computer program executes the steps of the virtual interface loading method when running.
The steps executed when the computer program runs are not described in detail herein, and reference may be made to the foregoing explanation of the virtual interface loading method.
In summary, the virtual interface loading method and apparatus, the physical network card, and the storage medium provided by the present application enable targeted reloading of the target virtual interface corresponding to the virtual interface identification information based on the virtual interface identification information by obtaining the virtual interface reload instruction including the virtual interface identification information. Therefore, the problem that in the process of reloading the target virtual interface, due to reloading of other virtual interfaces, the connection established based on the other virtual interfaces is disconnected can be solved, the stability of the connection established based on the virtual interfaces is integrally improved, the problem that the connection established based on the virtual interfaces in the prior art is poor in stability is solved, the reliable operation of communication services is guaranteed, and the high practical value is achieved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various 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 computer 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 storage medium and including instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned 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. It should be noted that, in this document, 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 above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A virtual interface loading method is applied to a physical network card configured with a plurality of virtual interfaces, and comprises the following steps:
obtaining a virtual interface overloading instruction, wherein the virtual interface overloading instruction comprises virtual interface identification information which is used for identifying a target virtual interface needing to be reloaded;
acquiring target interface parameters based on the virtual interface identification information, wherein the target interface parameters are new interface parameters corresponding to the interface parameters of the target virtual interface;
reloading the target virtual interface based on the target interface parameters.
2. The virtual interface loading method according to claim 1, wherein the step of reloading the target virtual interface based on the target interface parameter comprises:
closing and deleting the target virtual interface;
establishing a new target virtual interface based on the target interface parameters;
and starting the new target virtual interface to enable the new target virtual interface to execute interface work based on the target interface parameters.
3. The virtual interface loading method according to claim 1, wherein the step of reloading the target virtual interface based on the target interface parameter comprises:
establishing a new target virtual interface based on the target interface parameters;
starting the new target virtual interface to enable the new target virtual interface to execute interface work based on the target interface parameters;
and sending an interface switching instruction generated based on the new target virtual interface to target equipment connected with the target virtual interface, so that the target equipment is disconnected with the target virtual interface based on the interface switching instruction and establishes connection with the new target virtual interface.
4. The virtual interface loading method according to claim 1, wherein the step of obtaining the virtual interface reload instruction comprises:
judging whether new interface parameters are generated aiming at the target virtual interface;
and if new interface parameters are generated aiming at the target virtual interface, generating a virtual interface overloading instruction comprising the virtual interface identification information of the target virtual interface.
5. The virtual interface loading method according to any one of claims 1 to 4, wherein the virtual interface loading method further comprises:
obtaining a parameter updating instruction, wherein the parameter updating instruction comprises virtual interface identification information;
and generating new interface parameters based on the parameter updating instruction aiming at the interface parameters of the target virtual interface corresponding to the virtual interface identification information.
6. The virtual interface loading method according to claim 5, wherein the step of generating a new interface parameter for the interface parameter of the target virtual interface corresponding to the virtual interface identification information based on the parameter update instruction includes:
determining a target configuration file based on the virtual interface identification information, wherein the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information;
deleting the interface parameters in the target configuration file;
and writing the interface updating parameters included by the parameter updating instruction into the target configuration file, wherein the interface updating parameters are used as new interface parameters.
7. The virtual interface loading method according to claim 5, wherein the step of generating a new interface parameter for the interface parameter of the target virtual interface corresponding to the virtual interface identification information based on the parameter update instruction includes:
determining a target configuration file based on the virtual interface identification information, wherein the target configuration file has interface parameters of a target virtual interface corresponding to the virtual interface identification information;
reading the interface parameters from the target configuration file;
updating the interface parameters based on the interface updating parameters included in the parameter updating instruction to obtain new interface parameters;
and writing the new interface parameters into the target configuration file.
8. A virtual interface loading device is applied to a physical network card configured with a plurality of virtual interfaces, and comprises:
the system comprises a reloading instruction obtaining module, a reloading instruction obtaining module and a reloading instruction processing module, wherein the reloading instruction of the virtual interface comprises virtual interface identification information which is used for identifying a target virtual interface needing to be reloaded;
an interface parameter obtaining module, configured to obtain a target interface parameter based on the virtual interface identification information, where the target interface parameter is a new interface parameter corresponding to an interface parameter of the target virtual interface;
and the virtual interface loading module is used for reloading the target virtual interface based on the target interface parameters.
9. A physical network card, comprising:
a memory for storing a computer program;
a processor coupled to the memory for executing the computer program stored in the memory to implement the virtual interface loading method of any of claims 1-7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed, implements the virtual interface loading method of any one of claims 1 to 7.
CN202011455931.2A 2020-12-10 2020-12-10 Virtual interface loading method and device, physical network card and storage medium Pending CN112463255A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011455931.2A CN112463255A (en) 2020-12-10 2020-12-10 Virtual interface loading method and device, physical network card and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011455931.2A CN112463255A (en) 2020-12-10 2020-12-10 Virtual interface loading method and device, physical network card and storage medium

Publications (1)

Publication Number Publication Date
CN112463255A true CN112463255A (en) 2021-03-09

Family

ID=74801479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011455931.2A Pending CN112463255A (en) 2020-12-10 2020-12-10 Virtual interface loading method and device, physical network card and storage medium

Country Status (1)

Country Link
CN (1) CN112463255A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360185A (en) * 2021-05-10 2021-09-07 Tcl空调器(中山)有限公司 Processing method and device for micro control unit of air conditioner outdoor unit and micro control unit
CN113656100A (en) * 2021-08-17 2021-11-16 城云科技(中国)有限公司 Interface switching method and device, electronic device and computer program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902542A (en) * 2012-09-27 2013-01-30 Tcl通力电子(惠州)有限公司 virtual interface configuration method and device
CN102932174A (en) * 2012-10-25 2013-02-13 华为技术有限公司 Method, device and physical host for managing physical network card
CN107612702A (en) * 2016-07-12 2018-01-19 中兴通讯股份有限公司 A kind of method for configuring routers and device
CN108092869A (en) * 2017-12-26 2018-05-29 迈普通信技术股份有限公司 Virtual interface collocation method and communication equipment
CN108156009A (en) * 2016-12-06 2018-06-12 北京金山云网络技术有限公司 A kind of service calling method and device
US20200073692A1 (en) * 2018-08-30 2020-03-05 Juniper Networks, Inc. Multiple virtual network interface support for virtual execution elements

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902542A (en) * 2012-09-27 2013-01-30 Tcl通力电子(惠州)有限公司 virtual interface configuration method and device
CN102932174A (en) * 2012-10-25 2013-02-13 华为技术有限公司 Method, device and physical host for managing physical network card
CN107612702A (en) * 2016-07-12 2018-01-19 中兴通讯股份有限公司 A kind of method for configuring routers and device
CN108156009A (en) * 2016-12-06 2018-06-12 北京金山云网络技术有限公司 A kind of service calling method and device
CN108092869A (en) * 2017-12-26 2018-05-29 迈普通信技术股份有限公司 Virtual interface collocation method and communication equipment
US20200073692A1 (en) * 2018-08-30 2020-03-05 Juniper Networks, Inc. Multiple virtual network interface support for virtual execution elements

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360185A (en) * 2021-05-10 2021-09-07 Tcl空调器(中山)有限公司 Processing method and device for micro control unit of air conditioner outdoor unit and micro control unit
CN113360185B (en) * 2021-05-10 2023-06-23 Tcl空调器(中山)有限公司 Processing method and device of micro control unit of air conditioner external unit and micro control unit
CN113656100A (en) * 2021-08-17 2021-11-16 城云科技(中国)有限公司 Interface switching method and device, electronic device and computer program product

Similar Documents

Publication Publication Date Title
US11064352B2 (en) Embedded universal integrated circuit card (eUICC) file system management with profile switching
US11039301B2 (en) Apparatuses, methods and systems for implementing a system-on-chip with integrated reprogrammable cellular network connectivity
JP6161076B2 (en) An extensible framework for wireless network connectivity
CN112737899B (en) Intelligent device management method and device, storage medium and electronic device
CN112463255A (en) Virtual interface loading method and device, physical network card and storage medium
JP6751088B2 (en) Implicit file generation in APDU scripts
CN107295503B (en) Method for determining access mode of mobile terminal, storage medium and mobile terminal
CN113825121B (en) Delaying delivery of esims to secondary mobile wireless devices subscribed to cellular wireless services
CN107371234B (en) Registration method, device and terminal
CN113872835B (en) Method and device for equipment network distribution, server, intelligent household appliance and terminal equipment
WO2016075622A1 (en) Communication with plurality of cellular networks using cellular modem and virtual subscriber identity modules stored in software-based embedded universal integrated circuit card (euicc)
CN111405059B (en) Cloud device data transmission method, electronic device and Internet of things system
CN101902731B (en) Internet access method based on mobile communication equipment terminals
EP3197207A1 (en) Method for managing application resources and registered node in m2m
CN105100002A (en) Attribute operation method and device
KR101982312B1 (en) Method for wi-fi direct group formation with server support
CN111294888B (en) Network selection method and device
CN103944926A (en) Remote desktop session switching method, client and gateway
RU2615759C2 (en) Method and device for video recording
EP3174322A1 (en) Method for deleting notification resource, and common service entity
CN108882185B (en) Configuration method and device of supplementary service and mobile terminal
CN113824789B (en) Configuration method, device, equipment and storage medium of access descriptor
CN112671556B (en) Router configuration method and device, storage medium and electronic device
EP2983085B1 (en) Method and apparatus for informing connection condition between external device and router
US10555217B2 (en) Terminal device, terminal-device control method, and terminal-device control program

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510000 Block C, 115 Gaopu Road, Tianhe District, Guangzhou City, Guangdong Province

Applicant after: Guangzhou Jifei Technology Co.,Ltd.

Address before: 510000 Block C, 115 Gaopu Road, Tianhe District, Guangzhou City, Guangdong Province

Applicant before: Guangzhou Xaircraft Technology Co.,Ltd.