Method for recovering network configuration, electronic device and storage medium
By introducing a multi-virtual network interface card (NIC) scheme into the radio frequency (RF) unit device, the network address can be automatically detected and restored, solving the problem of difficult remote reset of traditional RF unit devices and realizing remote network configuration recovery without changing the hardware.
Patent Information
- Application Number
- CN202410502179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
Traditional radio frequency unit devices are complex to operate on high-altitude antennas, difficult to reset remotely, and cannot be remotely restored when users forget their network address.
A multi-virtual network interface card (NIC) solution is introduced, which configures both fixed and remotely configurable virtual NICs and restores the default configuration by automatically detecting the IP address.
It enables remote network address recovery without changing hardware and network architecture, solving the problem of access difficulties caused by devices forgetting their addresses.
Smart Images

Figure CN120834995A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a network device connection method, in particular to a method for recovering network configuration, an electronic device and a storage medium. BACKGROUND
[0002] When a user forgets a device network address or an address setting is abnormal, the device network address is usually restored to a default address through a hardware button. There are two common recovery methods, one is to use an existing factory reset button to determine whether to reset the network address through the length of the button pressing time, and the other is to add a special network address reset button to click to reset.
[0003] A conventional radio unit (RU) device is generally deployed on a high-altitude antenna, and an operator needs to operate and reset the device on site. Remote resetting is time-consuming and may not be effective. If the network is reset through a webpage, it may not be used due to forgetting the network address. SUMMARY
[0004] In view of the above, it is necessary to provide a method for recovering network configuration, an electronic device and a storage medium, which introduces a multi-virtual network card solution without changing the existing hardware and network architecture to initialize a default network address.
[0005] The embodiment of the present application provides a method for recovering network configuration, which is applied to an electronic device and includes the following steps: configuring a first virtual network card and a second virtual network card for a physical network card interface, wherein the first virtual network card has a fixed and unmodifiable first network address, and the second virtual network card has a remotely configurable second network address; enabling the first virtual network card during system initialization, and determining whether a request for modifying the network address is received; and if the request for modifying the network address is received, enabling the second virtual network card, configuring a third network address for the second virtual network card, and using the second virtual network card for communication.
[0006] Preferably, the method for recovering network configuration further includes: determining whether the third network address is available; and if the third network address is not available, resuming to use the second network address.
[0007] Preferably, the method for recovering network configuration further includes: determining whether the second network address is available; and if the second network address is also not available, using the first virtual network card for communication.
[0008] The embodiment of the present application also provides an electronic device, comprising a memory, a processor, a program for recovering network configuration stored in the memory and executable on the processor, a virtual network card configuration module and a management module, wherein the program for recovering network configuration is executed by the processor to implement the following steps: configuring a first virtual network card and a second virtual network card for a physical network card interface, wherein the first virtual network card has a fixed and unmodifiable first network address, and the second virtual network card has a remotely configurable second network address; enabling the first virtual network card when the system is initialized, and judging whether a request for modifying the network address is received; and if the request for modifying the network address is received, enabling the second virtual network card, configuring a third network address for the second virtual network card, and using the second virtual network card for communication.
[0009] Preferably, the program for recovering network configuration is executed by the processor to implement the following steps: judging whether the third network address is available; and if the third network address is not available, using the second network address.
[0010] Preferably, the program for recovering network configuration is executed by the processor to implement the following steps: judging whether the second network address is available; and if the second network address is also not available, using the first virtual network card for communication.
[0011] The embodiment of the present application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program is executed to implement the steps of the method for recovering network configuration.
[0012] The method for recovering network configuration, the electronic device and the storage medium of the embodiment of the present application automatically detect a recovery scheme through a network address, automatically identify a correct Internet Protocol (IP) network address, recover to a previous version of the IP network address, and solve the problem that a network address is forgotten, a network address of a remote device is abnormally modified, and the device cannot be accessed. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 The figure is a schematic diagram of the architecture of the system for recovering network configuration of the embodiment of the present application.
[0014] Figure 2 The figure is a flowchart of the steps of the method for recovering network configuration of the embodiment of the present application.
[0015] Figure 3 The figure is a schematic diagram of the hardware architecture of the electronic device of the embodiment of the present application.
[0016] Figure 4 The figure is a function block diagram of the electronic device of the embodiment of the present application.
[0017] Explanation of main element symbols
[0018] System for restoring network configuration 100 Radio frequency unit 110 Primary Ethernet network interface 111 Virtual Ethernet network interface 112、113 Router 120 First personal computer 130 First Ethernet network interface 135 Second personal computer 140 Second Ethernet network interface 145 Electronic device 200 Processor 210 Memory 220 System for restoring network configuration 230 Virtual network card configuration module 310 Management module 320 Step S11-S17
[0019] The following detailed description will further describe the present application with reference to the above mentioned drawings. DETAILED DESCRIPTION
[0020] In order to enable a more clear understanding of the above-mentioned objects, features and advantages of the present application, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict, if possible.
[0021] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The described embodiments are merely a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0023] It should be noted that the description of “first”, “second” and the like in the present application is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the technical features or implicitly indicating the number of the technical features. Therefore, the features limited by “first”, “second” can explicitly or implicitly include at least one of the features. In addition, the technical solutions of various embodiments can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection required by the present application.
[0024] Figure 1 The architecture schematic diagram of the system for restoring network configuration in the embodiment of the present application.
[0025] The system 100 for recovering network configuration in the embodiment of the present application comprises a radio unit 110, a router 120, a first personal computer 130 and a second personal computer 140. The radio unit 110 further comprises a main Ethernet interface (eth4) 111, a virtual Ethernet interface (eth4:1) 112 and a virtual Ethernet interface (eth4:2) 113. The first personal computer 130 further comprises a first Ethernet interface (eth) 135, and the second personal computer 140 further comprises a second Ethernet interface (eth) 145. The router 120 can also be a switch or other network device with routing function.
[0026] In the embodiment of the present application, two virtual Ethernet interfaces are configured for the main Ethernet interface (eth4) 111, including the virtual Ethernet interface (eth4:1) 112 and the virtual Ethernet interface (eth4:2) 113. The virtual Ethernet interface 112 is initially configured with a fixed address, for example, 192.168.10.1. The virtual Ethernet interface 113 is configured with a variable address and can be modified to a different address via a user interface or other means.
[0027] The first personal computer 130 is directly connected to the main Ethernet interface 111 of the radio unit 110 through the first Ethernet interface 135. The second personal computer 140 is connected to the main Ethernet interface 111 of the radio unit 110 through the second Ethernet interface 145 and via the router 120. When there are multiple radio units 110 connected to the local area network via the router 120, the network domain of 192.168.10.x should not be used any more.
[0028] Figure 2 The flow chart of steps of the method for recovering network configuration in the embodiment of the present application is applied to an electronic device, which is a computer device. The order of steps in the flow chart can be changed according to different requirements, and some steps can be omitted.
[0029] In step S11, a first virtual network card with a fixed and unmodifiable first address and a second virtual network card with a remotely configurable second address are configured for a physical network card interface.
[0030] In step S12, the first virtual network card is enabled when the system is initialized, and it is determined whether a request for modifying the address is received.
[0031] In step S13, if the request for modifying the address is received, the second virtual network card is enabled, a third address is configured for the second virtual network card, and the second virtual network card is used for communication instead.
[0032] In step S14, it is determined whether the third address is available.
[0033] Step S15, if the third URL is not available, the second URL is used to resume.
[0034] Step S16, it is judged whether the second URL is available.
[0035] Step S17, if the second URL is also not available, the first virtual network card is used to communicate.
[0036] The method for recovering network configuration of the embodiment of the present application can automatically recognize the correct Internet Protocol (IP) URL through the network address automatic detection recovery scheme, recover to the last version of IP URL, and solve the problem that the network address is forgotten, the network address of the remote device is abnormally modified, and the device cannot be accessed. In addition, the multi-virtual network card scheme is introduced, the existing hardware mode and network architecture do not need to be changed, and the default network address is initialized
[0037] 3 is a hardware architecture schematic diagram of the electronic device of the embodiment of the present application. The electronic device 200, for example, a computer device, but is not limited to, can be connected to the processor 210, the memory 220 and the system 230 for recovering network configuration through the system bus, Figure 3 Only the electronic device 200 with components 210-230 is shown, but it should be understood that all the shown components are not required to be implemented, and more or less components can be alternatively implemented.
[0038] The memory 220 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 220 can be an internal storage unit of the electronic device 200, such as a hard disk or a memory of the electronic device 200. In other embodiments, the memory 220 can also be an external storage device of the electronic device 200, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 200. Of course, the memory 220 can also include both an internal storage unit and an external storage device of the electronic device 200. In this embodiment, the memory 220 is generally used to store an operating system and various application programs installed on the electronic device 200, such as program codes of the network configuration recovery system 230, etc. In addition, the memory 220 can also be used to temporarily store various data that have been output or will be output.
[0039] The processor 210 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 210 is generally used to control the overall operation of the electronic device 200. In this embodiment, the processor 210 is used to run program codes or process data stored in the memory 220, such as running the network configuration recovery system 230, etc.
[0040] It should be noted that, Figure 3 The electronic device 200 is only used for illustration. In other embodiments, the electronic device 200 can also include more or fewer components, or have a different configuration of components.
[0041] The modules / units of the electronic device 200, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of the above-mentioned various method embodiments when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the computer readable medium can include or exclude contents according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0042] Figure 4 is a functional block diagram of an electronic device of an embodiment of the present application, which is used to execute a method for recovering network configuration. The method for recovering network configuration of an embodiment of the present application can be implemented by a computer program in a storage medium, for example, the memory 220 in the electronic device 200. When the computer program implementing the method of the present application is loaded into the memory 220 by the processor 210, the processor 210 driving the electronic device 200 executes the method for recovering network configuration of an embodiment of the present application.
[0043] The electronic device 200 of an embodiment of the present application includes a virtual network card configuration module 310 and a management module 320.
[0044] The virtual network card configuration module 310 configures a first virtual network card and a second virtual network card for a physical network card interface, the first virtual network card has a fixed and unmodifiable first network address, and the second virtual network card has a remotely configurable second network address.
[0045] When the system is initialized, the management module 320 enables the first virtual network card and judges whether a request for modifying the network address is received.
[0046] If the request for modifying the network address is received, the management module 320 enables the second virtual network card, configures a third network address for the second virtual network card, and uses the second virtual network card for communication instead.
[0047] The management module 320 judges whether the third network address is available.
[0048] If the third URL is not available, the management module 320 resumes using the second URL.
[0049] The management module 320 determines whether the second URL is available.
[0050] If the second URL is also not available, the management module 320 uses the first virtual network card for communication.
[0051] It can be understood that the above-described module division is only a logical function division, and actual implementation can have another division manner. In addition, each function module in each embodiment of the present application can be integrated in the same processing unit, or each module can be physically present alone, or two or more modules can be integrated in the same unit. The integrated module can be realized in the form of hardware or in the form of hardware plus software function module.
[0052] For those skilled in the art, other corresponding changes or adjustments can be made according to the actual needs generated by combining the technical solutions and technical concepts provided by the embodiments of the present application, and these changes and adjustments shall all belong to the protection scope of the claims of the present application.
Claims
1. A method for restoring network configuration, applied to an electronic device, characterized in that: The method comprises: configuring a first virtual network card and a second virtual network card for a physical network card interface, wherein the first virtual network card has a fixed and unmodifiable first network address, and the second virtual network card has a remotely configurable second network address; enabling the first virtual network card when the system is initialized, and determining whether a request for modifying the network address is received; and if the request for modifying the network address is received, enabling the second virtual network card, configuring a third network address for the second virtual network card, and using the second virtual network card for communication.
2. The method of recovering network configuration according to claim 1, wherein, Further comprising: determining whether the third network address is available; and if the third network address is not available, resuming to use the second network address. Further comprising:
3. The method of recovering network configuration according to claim 2, wherein, determining whether the second network address is available; and if the second network address is also not available, using the first virtual network card for communication. The electronic device comprises a memory, a processor, and a program for restoring network configuration stored in the memory and executable on the processor, and when the program for restoring network configuration is executed by the processor, the following steps are implemented: configuring a first virtual network card and a second virtual network card for a physical network card interface, wherein the first virtual network card has a fixed and unmodifiable first network address, and the second virtual network card has a remotely configurable second network address; 4. An electronic device, characterized by comprising: enabling the first virtual network card when the system is initialized, and determining whether a request for modifying the network address is received; and if the request for modifying the network address is received, enabling the second virtual network card, configuring a third network address for the second virtual network card, and using the second virtual network card for communication. When the program for restoring network configuration is executed by the processor, the following steps are further implemented: determining whether the third network address is available; and 5. The electronic device of claim 4, wherein, if the third network address is not available, resuming to use the second network address. When the program for restoring network configuration is executed by the processor, the following steps are further implemented: determining whether the second network address is available; and 6. The electronic device of claim 5, wherein, if the second network address is also not available, using the first virtual network card for communication. The instructions are executed by the processor and loaded to implement the method for restoring network configuration according to any one of claims 1-3. 7. A storage medium having stored thereon at least one computer instruction, characterized in that