CN114244804A - Network device starting method, equipment and storage medium based on dual systems - Google Patents

Network device starting method, equipment and storage medium based on dual systems Download PDF

Info

Publication number
CN114244804A
CN114244804A CN202010934168.5A CN202010934168A CN114244804A CN 114244804 A CN114244804 A CN 114244804A CN 202010934168 A CN202010934168 A CN 202010934168A CN 114244804 A CN114244804 A CN 114244804A
Authority
CN
China
Prior art keywords
network device
name
information
rootns
joined
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.)
Granted
Application number
CN202010934168.5A
Other languages
Chinese (zh)
Other versions
CN114244804B (en
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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202010934168.5A priority Critical patent/CN114244804B/en
Publication of CN114244804A publication Critical patent/CN114244804A/en
Application granted granted Critical
Publication of CN114244804B publication Critical patent/CN114244804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a network device starting method, equipment and a storage medium based on a dual system. The method comprises the steps of obtaining a joining instruction through a Roots field, wherein the joining instruction indicates information of a network device to be joined, and obtains information of an original network device. The Rootns domain allocates serial numbers for each original network device and the network device to be added, performs pairing between the network device to be added and the original network device, and configures a configuration file for the network device to be added so as to open a container corresponding to the network device to be added. When the method is used for starting the network device, the problem that the container corresponding to the network device cannot be normally started due to the fact that the network device is failed to pair because the network device is accessed to exceed the memory in the pairing process can be avoided.

Description

Network device starting method, equipment and storage medium based on dual systems
Technical Field
The present application relates to terminal technologies, and in particular, to a method, an apparatus, and a storage medium for starting a network device based on dual systems.
Background
A network device, such as a network card, may be provided in the electronic device. When the network device is turned on, the container corresponding to the network device needs to be started.
In the prior art, index values are configured for network devices, and the index values are continuously accumulated. When the container corresponding to the network device to be added is started, the name of the original network device can be determined according to the index value, and then the name is matched with the network device to be added.
However, in the prior art, since the index values are continuously accumulated, the index values are not reduced due to the reduction of network devices; therefore, the name of the original network device is determined in the index value, the problem of access boundary crossing can occur, the name of the original network device cannot be found, further, the name of the original network device cannot be matched with the network device to be added, and further, a container corresponding to the network device to be added cannot be started.
Disclosure of Invention
The application provides a network device starting method, equipment and a storage medium based on a dual system, which are used for solving the problem that when a network device is started, the number of network devices is not matched with the index value of the network device, so that access exceeds a memory.
In a first aspect, the present application provides a method for starting a network device based on dual systems, where the method is applied to an electronic device, and a root namespace Rootns domain and a kernel run in the electronic device; the method comprises the following steps:
after receiving a joining instruction, the roots field is used for indicating that a network device to be joined needs to be added, and the joining instruction comprises a first name of the network device to be joined and acquires information of an original network device and information of the network device to be joined; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file;
the Rootns field distributes serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices;
the Rootns field determines a second name matched with the first name indicated by the joining instruction according to the information of the network device to be joined, the information of the original network device and the serial number;
and the Rootns field configures the configuration file of the network device with the second name matched with the first name to the network device to be joined so as to open the container corresponding to the network device to be joined.
In one possible design, after receiving the join instruction, the Rootns field obtains information of the original network device and information of the network device to be joined, including:
the Rootns field initiates the join instruction to the kernel;
and the kernel opens up a space for the network device to be added and sends the information of the original network device and the information of the network device to be added to the Roots domain.
In one possible design, the information of the network device to be joined further includes a first index value; the information of the original network device further includes a second index value.
After the Rootns field initiates the join instruction to the core, the method further comprises:
the kernel determines a first index value corresponding to the network device to be joined.
In one possible design, the determining, by the roots field, a second name matching the first name indicated by the join instruction according to the information of the network device to be joined, the information of the legacy network device, and the sequence number includes:
the Rootns field determines each second index value corresponding to each sequence number according to each sequence number;
the Rootns field determines each second name corresponding to each second index value according to each second index value corresponding to each serial number;
and the roots field matches each second name with the first name indicated by the adding instruction to obtain the second name matched with the first name.
In one possible design, the join instruction includes a matching relationship between the first name and the second name;
the Rootns field matches each second name with the first name indicated by the join instruction to obtain a second name matched with the first name, and the method comprises the following steps:
and the Rootns field obtains a second name matched with the first name according to the matching relation.
In one possible design, the network device is a network card.
In one possible design, the second index value and the serial number belonging to the same original network device are stored in a key-value pair manner;
the first index value and the serial number belonging to the same network device to be joined are stored in a key-value pair manner.
In a second aspect, the present application provides an electronic device comprising: kernel, root namespace Rootns domain;
the Rootns domain is used for receiving a joining instruction, wherein the joining instruction is used for indicating that a network device to be joined needs to be added, the joining instruction comprises a first name of the network device to be joined, and information of an original network device and information of the network device to be joined are acquired; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file;
the Rootns field is also used for distributing serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices;
the Rootns field is further configured to determine, according to the information of the network device to be joined, the information of the original network device, and the sequence number, a second name that matches the first name indicated by the join instruction;
the Rootns field is further configured to configure a configuration file of a network device with a second name matching the first name to the network device to be joined, so as to open a container corresponding to the network device to be joined.
In one possible design, the roots field is specifically configured to initiate the join instruction to the core;
the kernel is further configured to open up a space for the network device to be added, and send information of the original network device and information of the network device to be added to the roots domain.
The information of the network device to be added also comprises a first index value; the information of the original network device further includes a second index value.
In one possible design, the core is further configured to determine a first index value corresponding to the network device to join after the roots field initiates the join instruction to the core.
In one possible design, when the Rootns field is configured to determine, according to the information of the network device to be joined, the information of the original network device, and the sequence number, a second name that matches the first name indicated by the join instruction, the Rootns field is specifically configured to:
the Rootns field determines each second index value corresponding to each sequence number according to each sequence number;
the Rootns field determines each second name corresponding to each second index value according to each second index value corresponding to each serial number;
and the roots field matches each second name with the first name indicated by the adding instruction to obtain the second name matched with the first name.
In one possible design, the join instruction includes a matching relationship between the first name and the second name;
when the Rootns field is used to match each second name with the first name indicated by the join instruction, and obtain a second name matched with the first name, the Rootns field is specifically used to:
and the Rootns field obtains a second name matched with the first name according to the matching relation.
In one possible design, the network device is a network card.
In one possible design, the second index value and the serial number belonging to the same original network device are stored in a key-value pair manner;
in one possible design, the first index value and the sequence number belonging to the same network device to be joined are stored in a key-value pair.
In a third aspect, the present application provides an electronic device, comprising: a processor and a memory;
wherein the memory stores instructions executable by the processor, which when executed by the processor, cause the processor to perform the method provided by any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method provided by any one of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a processing chip comprising the electronic device as provided in the third aspect.
According to the network device starting method, equipment and storage medium based on the dual systems, the serial numbers are distributed to the network devices in the electronic equipment through Roots, and the serial numbers and the index values are stored in a one-to-one corresponding mode. When the names of the network devices and the network devices to be added are matched, the corresponding index values can be found through the serial numbers of the network devices, so that the names of the corresponding original network devices can be found, the original network devices are further matched with the network devices to be added, then the containers corresponding to the network devices to be added can be started, and the phenomenon that the containers cannot be opened successfully due to the fact that access exceeds the memory is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a dual-system-based network device startup method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another dual-system-based network device startup method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Dual systems may be installed in the electronic device, each in a respective container. The user can work under the dual system or the single system according to the self requirement. When the user uses the dual system, the user can close the system which is not needed to be used for the moment, and when the closed system needs to be used again, the user can select to restart the system which needs to be started. When the system to be started is restarted, the network device of the container corresponding to the system to be started needs to be paired with the original network device in the electronic equipment, and after the pairing is successful, the container corresponding to the system to be started can be started so as to start the system to be started.
In an example, fig. 1 is a schematic view of an application scenario provided by an embodiment of the present application, as shown in fig. 1, a dual system is installed in an electronic device, and each system is located in a respective container, as shown in fig. 1, a system 1 corresponds to a container 1, and a system 2 corresponds to a container 2. When one of the containers needs to be opened, the Rootns field acquires the configuration file corresponding to the network device corresponding to the container to be opened from the configuration file. The configuration file contains the name of the network device to be opened and the name of the network device to be paired. And then, the Rootns domain acquires the information of the network device to be opened and the original network device from the kernel, and performs pairing on the name of the network device to be opened and the name of the original network device by searching the index value distributed by the kernel, so that the container to be opened is opened.
However, in the above process, when the network device in the electronic device is turned on after being turned off, since the index value of the network device is continuously increased and is not decreased due to the decrease of the network device, when the name of the network device to be turned on is matched with the name of the original network device, if the name of the network device is searched through the index value, the problem of out-of-range access occurs, which results in a matching failure of the network device, and a container corresponding to the network device to be turned on also fails to be turned on.
The application provides a network device starting method, equipment and storage medium based on dual systems, and aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a method for starting a network device based on dual systems according to an embodiment of the present application, where the method is applied to an electronic device, and a kernel and root namespace (roots) domain runs in the electronic device. As shown in fig. 2, the method includes:
101. after receiving a joining instruction, the roots field is used for indicating that a network device to be joined needs to be added, the joining instruction comprises a first name of the network device to be joined, and information of an original network device and information of the network device to be joined are obtained; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file.
In one example, the network device is a network card.
Illustratively, two Android systems are installed in the electronic device, and each system is in a respective container. When one of the containers needs to be opened, the kernel sends an indication to the Rootns field to open the container. And then, the Rootns domain searches the information of the network device to be added corresponding to the container to be opened from the root directory of the electronic equipment according to the instruction of the container to be opened, wherein the information of the network device comprises the name of the network device corresponding to the container to be opened. Then, the Rootns domain acquires the information of the original network device and the information of the network device to be added from the kernel through a netlink socket, wherein the information of the original network device comprises the name of the original network device and a configuration file of the original network device, and the information of the network device to be added comprises the name of the network device to be added.
102. The Rootns field distributes serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices.
Illustratively, after acquiring information of an original network device and information of a network device to be added in the electronic device, the Rootns field allocates respective serial numbers to the original network device and the network device to be added, and the serial numbers are sequentially accumulated according to the number of the network devices, wherein the serial numbers are the accumulated number of the original network device and the network device to be added.
103. The Rootns field determines a second name matching the first name indicated by the join instruction according to the information of the network device to be joined, the information of the original network device, and the serial number.
Illustratively, after assigning serial numbers to the original network device and the network device to be joined, the Rootns domain searches for the name of the network device corresponding to the serial number by searching for the serial number of the network device, pairs the name of the network device to be joined with the name of the original network device, and performs pair pairing on the successfully paired network device. And if the pairing is not successful, sequentially executing the pairing according to the serial numbers until the pairing process is finished after each network device to be added is paired with each original network device.
104. The Rootns field configures a configuration file of a network device of a second name matching the first name to the network device to be joined to open a container corresponding to the network device to be joined.
Illustratively, after the name of each network device to be joined and each original network device successfully perform pair pairing, the Rootns field will configure the configuration file of the original network device to the network device to be joined paired therewith. And when all the network devices to be added are successfully configured, the containers corresponding to the network devices to be added can be successfully opened.
In this embodiment, information of a network device to be added and information of an original network device are obtained from a kernel through a Rootns domain, where the information of the original network device includes a name of the original network device and a configuration file of the original network device, and the information of the network device to be added includes a name of the network device to be added. And then the Rootns field distributes serial numbers for each original network device and the network device to be added. The name of the network device corresponding to the serial number is found by finding the serial number of the network device, so that the name of the network device to be added is paired with the name of the original network device, and the configuration file of the original network device is configured to the network device to be added after the pairing is successful. After all the network devices to be added are successfully configured, the containers corresponding to the network devices to be added can be successfully opened. By executing the opening process of the network device and executing the pairing process according to the serial number, the problem that the corresponding network device exceeds the access limit in the configuration process of the network device can be avoided, and the container cannot be opened unsuccessfully because the access memory exceeds the limit.
Fig. 3 is a schematic flowchart of another dual-system-based network device booting method according to an embodiment of the present application, where the method is applied to an electronic device, and a kernel and root namespace (roots) domain runs in the electronic device. As shown in fig. 3, the method includes:
201. after receiving a join instruction, the join instruction is used for indicating that a network device to be joined needs to be added, the join instruction comprises a first name of the network device to be joined, and the roots field initiates the join instruction to the core.
In one example, the network device is a network card.
Illustratively, two Android systems are installed in the electronic device, and each Android system is in a respective container. When a container in an electronic device is to be opened, the kernel sends an indication to the Rootns field to open the container. After receiving the instruction of opening the container, the Rootns field goes to the root directory of the electronic device to find information of the network device corresponding to the container to be opened, where the information of the network device includes a name of the network device corresponding to the container to be opened. The Rootns field then initiates a join instruction to the core, wherein the join instruction indicates to open up memory space for the network device to be joined.
202. The kernel opens up space for the network devices to be joined.
Illustratively, after the kernel receives a join instruction initiated by the Rootns domain, the kernel opens up a memory space for each network device to be joined, and stores the name of each network device to be joined in the respective memory space.
203. The kernel determines a first index value corresponding to a network device to be joined.
For example, after the kernel opens up a memory space for the network device to be added, the kernel may also allocate an index value corresponding to each network device to be added. The index values allocated by the cores can only be accumulated in sequence, and cannot be reduced due to the reduction of network devices in the cores.
204. And the kernel sends the information of the original network device and the information of the network device to be added to the Roots domain. The information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file.
In one example, the information of the network device to be joined further includes a first index value; the information of the original network device further includes a second index value.
Exemplarily, after the kernel stores information of the network device to be added, the Rootns domain may obtain information of the original network device and information of the network device to be added from the kernel through a netlink socket, where the information of the original network device includes a name of the original network device, a configuration file of the original network device, and an index value of the original network device, and the information of the network device to be added includes a name of the network device to be added and an index value of the network device to be added.
205. The Rootns field distributes serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices.
Illustratively, after acquiring information of an original network device and information of a network device to be added in the electronic device, the Rootns field allocates respective serial numbers to the original network device and the network device to be added, and the serial numbers are sequentially accumulated according to the number of the network devices, where the serial numbers are the accumulated number of the original network device and the network device to be added.
206. The Rootns domain stores a second index value and a serial number belonging to the same original network device in a key-value pair mode; the first index value and the serial number belonging to the same network device to be joined are stored in a key-value pair manner.
For example, after assigning the serial numbers to the original network devices and the network devices to be added, the Rootns domain creates corresponding structural bodies TD _ NET _ LIST for the original network devices and the network devices to be added, and stores the index values and the serial numbers of the network devices in the respective structural bodies in a key value pair manner.
207. The Rootns field determines a second name matching the first name indicated by the join instruction according to the information of the network device to be joined, the information of the original network device, and the serial number.
In one example, step 207 specifically includes the following steps:
the first step is that each second index value corresponding to each serial number is determined according to each serial number.
And a second step of determining each second name corresponding to each second index value according to each second index value corresponding to each serial number.
And step three, matching each second name with the first name indicated by the adding instruction to obtain a second name matched with the first name.
In one example, the join instruction includes a matching relationship between the first name and the second name; the third step specifically comprises: and obtaining a second name matched with the first name according to the matching relation.
Illustratively, after assigning serial numbers to the original network device and the network device to be added, the Rootns field needs to match the name of the network device to be added with the name of the original network device according to the matching relationship in the information of the network device to be added. Specifically, in the matching process, the index value of the corresponding original network device can be found through the serial number of the original network device, the name of the original network device corresponding to the index value is further found, and the name of the network device to be added is matched with the name of the original network device. If the name is not matched with the name of the network device to be added, the matching with the name of the next original network device is continued according to the serial number until the name of the original network device matched with the serial number is found or all the names of the original network devices are completely matched. And if the name is matched with the name of the network device to be added, finishing matching, and executing pair pairing on the network device to be added and the original network device until all the network devices to be added are matched, and finishing the matching process.
208. The Rootns field configures a configuration file of a network device of a second name matching the first name to the network device to be joined to open a container corresponding to the network device to be joined.
Illustratively, after the name of the network device to be joined and the original network device successfully perform pair pairing, the Rootns field will configure the profile of the original network device to the network device to be joined. And when all the network devices to be added are successfully configured, the containers corresponding to the network devices to be added can be successfully opened.
In this embodiment, after receiving the instruction to open the container, the Rootns domain goes to the root directory of the electronic device to search for information of the network device corresponding to the container to be opened, and sequentially stores the acquired information of the network device to be added to the memory space corresponding to each network device to be added, which is applied to the kernel. The kernel assigns a corresponding index value to each network device to be joined. Then, the Rootns domain acquires the information of the original network device and the information of the network device to be added from the kernel through the netlink, wherein the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file. And then, assigning serial numbers to each original network device and each network device to be added by the Roots field, wherein the serial numbers are the accumulated number of the network devices, and respectively storing the index value and the serial number of the original network device, the index value and the serial number of the network device to be added into the newly-built structural body in a key value pair mode. In the process of pairing the network devices, the Rootns field determines the index value of each original network device corresponding to each serial number according to each serial number of the original network device, and determines the name of each original network device corresponding to the index value of each original network device according to the index value of each original network device corresponding to each serial number. And matching the name of each original network device with the name of the network device to be added. After the name of the network device to be joined and the original network device successfully perform pair pairing, the Rootns domain will configure the configuration file of the original network device to the network device to be joined. And when all the network devices to be added are successfully configured, the containers corresponding to the network devices to be added can be successfully opened. When the network device is started through the method, the index value of the network device can be searched through the serial number in the pairing process of the network device, and then the name corresponding to the network device is searched. By adopting the method, the phenomenon that the container corresponding to the network device cannot be normally opened due to the fact that the network device is searched to exceed the memory range when the index value of the network device is not matched with the number of the network devices can be avoided.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 4, the electronic device includes a kernel 41 and a root namespace roots field 42.
A Rootns field 42, configured to, after receiving a joining instruction, where the joining instruction is used to indicate that a network device to be joined needs to be added, and the joining instruction includes a first name of the network device to be joined, and obtains information of an original network device and information of the network device to be joined; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file.
The Rootns field 42 is further configured to assign serial numbers to each original network device and the network device to be added, where the serial numbers are the accumulated number of the network devices.
The roots field 42 is further configured to determine a second name matching the first name indicated by the join instruction according to the information of the network device to be joined, the information of the original network device, and the sequence number.
The Rootns field 42 is further configured to configure the configuration file of the network device of the second name matching the first name to the network device to be joined, so as to open the container corresponding to the network device to be joined.
In one example, the roots field 42 is specifically used to initiate a join instruction to the core.
The kernel 41 is further configured to open up a space for the network device to be added, and send information of the original network device and information of the network device to be added to the Rootns domain 42.
In one example, the information of the network device to be joined further includes a first index value; the information of the original network device further includes a second index value.
In one example, the core 41 is further configured to determine a first index value corresponding to the network device to be joined after the roots field 42 initiates the join instruction to the core 41.
In one example, the roots field 42, when configured to determine, according to the information of the network device to be joined, the information of the original network device, and the sequence number, a second name matching the first name indicated by the join instruction, is specifically configured to:
the roots field 42 determines each second index value corresponding to each sequence number according to each sequence number.
The roots field 42 determines each second name corresponding to each second index value according to each second index value corresponding to each sequence number.
The roots field 42 matches each second name with the first name indicated by the add instruction, and obtains the second name matching the first name.
In one example, the join instruction includes a matching relationship of the first name and the second name.
The roots field 42, when configured to match each second name with the first name indicated by the add instruction, to obtain a second name matching the first name, is specifically configured to: and obtaining a second name matched with the first name according to the matching relation.
In one example, the network device is a network card.
In one example, the second index value and the sequence number belonging to the same original network device are stored in a key-value pair manner; the first index value and the serial number belonging to the same network device to be joined are stored in a key-value pair manner.
The electronic device provided by this embodiment is used to implement the technical scheme provided by the above method, and the implementation principle and technical effect are similar, which are not described again.
Fig. 5 is a schematic structural diagram of another electronic device provided in an embodiment of the present application, and as shown in fig. 5, the electronic device includes:
a processor (processor)291, the electronic device further including a memory (memory) 292; a Communication Interface 293 and bus 294 may also be included. The processor 291, the memory 292, and the communication interface 293 may communicate with each other via the bus 294. Communication interface 293 may be used for the transmission of information. Processor 291 may call logic instructions in memory 294 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 292 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 292 is a computer-readable storage medium for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 291 executes the functional application and data processing by executing the software program, instructions and modules stored in the memory 292, so as to implement the method in the above method embodiments.
The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 292 may include a high speed random access memory and may also include a non-volatile memory.
The embodiment of the application provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are executed by a processor to implement the method provided by the above embodiment.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (18)

1. A network device starting method based on dual systems is characterized in that the method is applied to electronic equipment, and a kernel and root name space Roots domain runs in the electronic equipment; the method comprises the following steps:
after receiving a joining instruction, the roots field is used for indicating that a network device to be joined needs to be added, and the joining instruction comprises a first name of the network device to be joined and acquires information of an original network device and information of the network device to be joined; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file;
the Rootns field distributes serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices;
the Rootns field determines a second name matched with the first name indicated by the joining instruction according to the information of the network device to be joined, the information of the original network device and the serial number;
and the Rootns field configures the configuration file of the network device with the second name matched with the first name to the network device to be joined so as to open the container corresponding to the network device to be joined.
2. The method of claim 1, wherein the Rootns field, after receiving the join instruction, obtains information of the original network device and information of the network device to be joined, and comprises:
the Rootns field initiates the join instruction to the kernel;
and the kernel opens up a space for the network device to be added and sends the information of the original network device and the information of the network device to be added to the Roots domain.
3. The method according to claim 2, wherein the information of the network device to be joined further includes a first index value; the information of the original network device further includes a second index value.
4. The method of claim 3, wherein after the Rootns field initiates the join instruction to the core, further comprising:
the kernel determines a first index value corresponding to the network device to be joined.
5. The method of claim 3, wherein the Rootns field determines a second name matching the first name indicated by the join instruction according to the information of the network device to be joined, the information of the legacy network device, and the sequence number, and comprises:
the Rootns field determines each second index value corresponding to each sequence number according to each sequence number;
the Rootns field determines each second name corresponding to each second index value according to each second index value corresponding to each serial number;
and the roots field matches each second name with the first name indicated by the adding instruction to obtain the second name matched with the first name.
6. The method of claim 5, wherein the join instruction includes a match between the first name and the second name;
the Rootns field matches each second name with the first name indicated by the join instruction to obtain a second name matched with the first name, and the method comprises the following steps:
and the Rootns field obtains a second name matched with the first name according to the matching relation.
7. The method of any of claims 1-6, wherein the network device is a network card.
8. The method according to any of claims 3-6, characterized in that the second index value and the sequence number belonging to the same legacy network device are stored as a key-value pair;
the first index value and the serial number belonging to the same network device to be joined are stored in a key-value pair manner.
9. An electronic device, characterized in that the electronic device comprises: kernel, root namespace Rootns domain;
the Rootns domain is used for receiving a joining instruction, wherein the joining instruction is used for indicating that a network device to be joined needs to be added, the joining instruction comprises a first name of the network device to be joined, and information of an original network device and information of the network device to be joined are acquired; the information of the network device to be added comprises a first name, and the information of the original network device comprises a second name and a configuration file;
the Rootns field is also used for distributing serial numbers for each original network device and the network devices to be added, wherein the serial numbers are the accumulated number of the network devices;
the Rootns field is further configured to determine, according to the information of the network device to be joined, the information of the original network device, and the sequence number, a second name that matches the first name indicated by the join instruction;
the Rootns field is further configured to configure a configuration file of a network device with a second name matching the first name to the network device to be joined, so as to open a container corresponding to the network device to be joined.
10. The electronic device of claim 9, wherein the roots field is specifically configured to initiate the join instruction to the kernel;
the kernel is further configured to open up a space for the network device to be added, and send information of the original network device and information of the network device to be added to the roots domain.
11. The electronic device according to claim 10, wherein the information of the network device to be joined further includes a first index value; the information of the original network device further includes a second index value.
12. The electronic device of claim 11, wherein the core is further configured to determine a first index value corresponding to the network device to join after the roots field initiates the join instruction to the core.
13. The electronic device of claim 11, wherein the Rootns field, when configured to determine, according to the information of the network device to be joined, the information of the original network device, and the serial number, the second name matching the first name indicated by the join instruction, is specifically configured to:
the Rootns field determines each second index value corresponding to each sequence number according to each sequence number;
the Rootns field determines each second name corresponding to each second index value according to each second index value corresponding to each serial number;
and the roots field matches each second name with the first name indicated by the adding instruction to obtain the second name matched with the first name.
14. The electronic device of claim 11, wherein the join instruction includes a matching relationship between the first name and the second name;
when the Rootns field is used to match each second name with the first name indicated by the join instruction, and obtain a second name matched with the first name, the Rootns field is specifically used to:
and the Rootns field obtains a second name matched with the first name according to the matching relation.
15. The electronic device of any of claims 9-14, wherein the network device is a network card.
16. Electronic equipment according to any of claims 11-14, characterized in that a second index value and a sequence number belonging to the same legacy network device are stored in a key-value pair;
the first index value and the serial number belonging to the same network device to be joined are stored in a key-value pair manner.
17. An electronic device, comprising: a processor and a memory;
wherein the memory stores instructions executable by the processor, which when executed by the processor, cause the processor to perform the method of any of claims 1-8.
18. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1-8.
CN202010934168.5A 2020-09-08 2020-09-08 Network device starting method, equipment and storage medium based on dual systems Active CN114244804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010934168.5A CN114244804B (en) 2020-09-08 2020-09-08 Network device starting method, equipment and storage medium based on dual systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010934168.5A CN114244804B (en) 2020-09-08 2020-09-08 Network device starting method, equipment and storage medium based on dual systems

Publications (2)

Publication Number Publication Date
CN114244804A true CN114244804A (en) 2022-03-25
CN114244804B CN114244804B (en) 2023-03-21

Family

ID=80742445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010934168.5A Active CN114244804B (en) 2020-09-08 2020-09-08 Network device starting method, equipment and storage medium based on dual systems

Country Status (1)

Country Link
CN (1) CN114244804B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064830A1 (en) * 2002-09-30 2004-04-01 Irving Richard H. Runtime services for network software platform
CN102497434A (en) * 2011-12-16 2012-06-13 中国科学院计算技术研究所 Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems
CN105049259A (en) * 2015-08-20 2015-11-11 北京星网锐捷网络技术有限公司 Network equipment, and server, system and method used for network equipment
CN106102098A (en) * 2016-05-27 2016-11-09 华为技术有限公司 A kind of method and device accessing WIFI network
CN107968849A (en) * 2017-11-28 2018-04-27 新浪网技术(中国)有限公司 The method and device that a kind of network special line is plugged into
CN109508225A (en) * 2018-11-15 2019-03-22 珠海市知安全科技有限公司 A kind of application container system under windows operating system
CN110139265A (en) * 2018-02-09 2019-08-16 成都鼎桥通信技术有限公司 The management method of dual system termi-nal double SIM card data service
CN111290792A (en) * 2018-12-07 2020-06-16 成都鼎桥通信技术有限公司 Method for carrying out system switching in multi-container domain at top speed

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064830A1 (en) * 2002-09-30 2004-04-01 Irving Richard H. Runtime services for network software platform
CN102497434A (en) * 2011-12-16 2012-06-13 中国科学院计算技术研究所 Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems
CN105049259A (en) * 2015-08-20 2015-11-11 北京星网锐捷网络技术有限公司 Network equipment, and server, system and method used for network equipment
CN106102098A (en) * 2016-05-27 2016-11-09 华为技术有限公司 A kind of method and device accessing WIFI network
CN107968849A (en) * 2017-11-28 2018-04-27 新浪网技术(中国)有限公司 The method and device that a kind of network special line is plugged into
CN110139265A (en) * 2018-02-09 2019-08-16 成都鼎桥通信技术有限公司 The management method of dual system termi-nal double SIM card data service
CN109508225A (en) * 2018-11-15 2019-03-22 珠海市知安全科技有限公司 A kind of application container system under windows operating system
CN111290792A (en) * 2018-12-07 2020-06-16 成都鼎桥通信技术有限公司 Method for carrying out system switching in multi-container domain at top speed

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨宇;刘荣科;王冬;: "VxWorks下基于82559的多网卡通信以及冗余切换技术" *

Also Published As

Publication number Publication date
CN114244804B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN110134446B (en) Method for starting PCIE equipment scanning
US9977804B2 (en) Index updates using parallel and hybrid execution
US11928493B2 (en) Sharing of FPGA board by multiple virtual machines
CN111352873B (en) NVMe protocol command processing method and device
CN113127150A (en) Rapid deployment method and device of cloud native system, electronic equipment and storage medium
CN108984270B (en) Memory allocation method and device for virtual machine
CN108614734B (en) Security parameter index management method and device
CN114244804B (en) Network device starting method, equipment and storage medium based on dual systems
CN109120680B (en) Control system, method and related equipment
CN112181637B (en) Memory resource allocation method and device
US20160253275A1 (en) Information processing device, information processing system, and exclusive control program
CN106598600A (en) Startup guide information display method and terminal device
CN108667750B (en) Virtual resource management method and device
CN113239047A (en) Database allocation method, service processing method, device and equipment
JP4411344B2 (en) A method for recognizing incompatibility in a bus system with multiple control devices
US9262184B2 (en) Virtual computer system and I/O implementing method in virtual computer
CN106155758B (en) Server system and related control method thereof
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
US10037166B2 (en) Tracking memory allocation
CN114217956A (en) Container cluster deployment method and device and computer equipment
CN115408064A (en) Method, server and related equipment for supporting kernel online update
CN111338981A (en) Memory fragmentation prevention method and system and storage medium
CN110297666A (en) Hot restorative procedure, device, system and storage medium
CN110928582B (en) Information processing apparatus and method of configuring target device of information processing apparatus
CN109033398B (en) Method and device for distributing nodes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant