CN112540801A - Network card configuration method, host device, network card device, and storage medium - Google Patents

Network card configuration method, host device, network card device, and storage medium Download PDF

Info

Publication number
CN112540801A
CN112540801A CN201910902734.1A CN201910902734A CN112540801A CN 112540801 A CN112540801 A CN 112540801A CN 201910902734 A CN201910902734 A CN 201910902734A CN 112540801 A CN112540801 A CN 112540801A
Authority
CN
China
Prior art keywords
network card
configuration
descriptor
switching instruction
equipment
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
CN201910902734.1A
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.)
Xian Zhongxing New Software Co Ltd
Original Assignee
Xian Zhongxing New Software 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 Xian Zhongxing New Software Co Ltd filed Critical Xian Zhongxing New Software Co Ltd
Priority to CN201910902734.1A priority Critical patent/CN112540801A/en
Publication of CN112540801A publication Critical patent/CN112540801A/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/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

The application relates to a network card configuration method, a host device, a network card device and a storage medium. The embodiment of the application comprises the following steps: and generating a network card switching instruction according to the state data parameters of the host equipment so as to load the corresponding network card driver. According to the scheme provided by the embodiment of the application, the network card drive can be flexibly adapted at least, the requirement of data transmission is met, and meanwhile, the power consumption of the equipment can be adjusted and the equipment can be protected.

Description

Network card configuration method, host device, network card device, and storage medium
Technical Field
The embodiment of the present application relates to, but not limited to, the technical field of data transmission, and in particular, to a network card configuration method, a host device, a network card device, and a storage medium.
Background
The development of data products with network card equipment is faster and faster, and the functions of the data products are more and more. The data products with the network card device are widely applied to host devices such as host computers, vehicle-mounted communication systems and intelligent terminal systems.
At present, in a data product with a network card device, although an unrelated process is sometimes removed or disabled, data transmission capability cannot be improved, because the network card configuration of the data product limits the data transmission capability; and by adopting a part of technical schemes, when the host equipment does not need high data transmission capacity, the network card configuration with high data transmission capacity is still kept, so that the power consumption of the equipment is overhigh or the equipment is halted due to overhigh temperature.
Disclosure of Invention
The embodiment of the application provides a network card configuration method, a host device, a network card device and a storage medium, which can flexibly adapt to network card driving, meet the data transmission requirement, and simultaneously can realize the adjustment of the power consumption of the device and the protection of the device.
In a first aspect, an embodiment of the present application provides a network card configuration method, which is used for a host device connected to a network card device, and the method includes:
collecting state data parameters of the host equipment;
generating a network card switching instruction according to the state data parameters;
and sending and outputting the network card switching instruction.
In a second aspect, an embodiment of the present application provides a network card configuration method, which is used for a network card device connected to a host device, and includes:
acquiring a network card switching instruction;
and loading the corresponding network card driver according to the network card switching instruction.
In a third aspect, an embodiment of the present application provides a host device, including: a first memory, a first processor and a computer program stored on the first memory and executable on the first processor, the first processor when executing the program implementing:
the network card configuration method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a network card device, including: a second memory, a second processor and a computer program stored on the second memory and executable on the second processor, the second processor when executing the program implementing:
the network card configuration method according to the second aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions for:
the network card configuration method of the first aspect or the second aspect is executed.
The embodiment of the application comprises the following steps: and generating a network card switching instruction according to the state data parameters of the host equipment so as to load the corresponding network card driver. According to the scheme provided by the embodiment of the application, the network card drive can be flexibly adapted at least, the requirement of data transmission is met, and meanwhile, the power consumption of the equipment can be adjusted and the equipment can be protected.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the claimed subject matter and are incorporated in and constitute a part of this specification, illustrate embodiments of the subject matter and together with the description serve to explain the principles of the subject matter and not to limit the subject matter.
Fig. 1 is a flowchart of a network card configuration method according to an embodiment of the present application;
fig. 2 is a flowchart of a network card configuration method according to another embodiment of the present application;
fig. 3 is a flowchart of a network card configuration method according to another embodiment of the present application;
fig. 4 is a flowchart of a network card configuration method according to another embodiment of the present application;
fig. 5 is a schematic signal flow diagram of a network card configuration method according to another embodiment of the present application;
fig. 6 is a flowchart of a network card configuration method according to another embodiment of the present application;
fig. 7 is a flowchart of a network card configuration method according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
At present, in a data product with a network card device, although an unrelated process is sometimes removed or disabled, data transmission capability cannot be improved, because the network card configuration of the data product limits the data transmission capability; and by adopting a part of technical schemes, when the host equipment does not need high data transmission capacity, the network card configuration with high data transmission capacity is still kept, so that the power consumption of the equipment is overhigh or the equipment is halted due to overhigh temperature.
For example, if the network card device reports multiple sets of network card configurations to the host device, the host device may select a certain set of network card configurations for configuration. On one hand, if the host device has a requirement for completing a data download service at a high speed or other high-speed transmission requirements, there may be a situation that the selected network card has low data transmission capability and cannot meet the high transmission capability requirement of the current host device. On the other hand, if the host device does not need high data transmission capability, such as strong network signal, more downloaded data cache, small size of transmission file, standby host, high device temperature, etc., the network card device still maintains the network card configuration with high data transmission capability, which easily causes over-high power consumption of the device or a crash due to over-high temperature.
Based on this, the embodiment of the application provides a network card configuration method, a host device, a network card device and a storage medium, which can implement automatic adaptation of different network card drives according to user requirements or actual data transmission conditions to achieve optimal resource configuration, so that the requirements of users can be met, the power consumption of the device can be effectively adjusted, the device is prevented from being halted and restarted due to overhigh temperature, and the like, thereby effectively improving the user experience, improving the reliability of the device and prolonging the service life of the device.
For example, in a scenario of actual use of the network card device, a user does not need to highly transmit processing data for a long time, for example, when the host is in an idle period and the user does not need to highly transmit data, the network card device can appropriately adjust the network card drive, thereby adjusting data transmission capability, reducing data transmission capability, further reducing power consumption and temperature of the device, and simultaneously not affecting normal use of the user. When the network signal is weak, the downloading time is short, the data file is large, the temperature of the equipment is low or normal, and the like, the equipment can be properly configured with the network card drive with high data transmission capability. When a user selects to download data at a high speed on the interactive interface of the application layer module according to the self requirement, the device is automatically switched to a network card drive with high data transmission capability, so that the weak network signal and other user requirements are made up. Therefore, the network card can be flexibly adapted by applying the embodiment of the application, and the optimal configuration of resources is achieved.
In the following embodiments, the host device may be a host computer, a vehicle-mounted system, an intelligent terminal, or a data product, such as a customer premises equipment (cpe) (client premium equipment), and an internal data processing board; the network card device may be an independent data product, such as a portable routing device ufi (user Friendly interface), or may be a network card module embedded in the data product. The host device and the network card device are connected through a universal Serial bus (usb) line. The host device and the network card device can be connected in a pluggable manner or in a fixed manner.
In a first aspect, an embodiment of the present application provides a network card configuration method for a host device, where the host device is in communication connection with a network card device.
Example 1A
Referring to fig. 1, the network card configuration method of the present example includes the steps of:
s1110, collecting state data parameters of the host equipment;
s1120, generating a network card switching instruction according to the state data parameters;
s1130, the network card switching instruction is sent and output.
In step S1110, in some embodiments, an application layer module may be installed on the host device, and the application layer module is used to collect the status data parameters of the host device. For example, when the user uses the network card device for the first time or selects to install, the storage content in the network card device may be installed on the host device, where the storage content in the network card device includes the installation package of the application layer module. The status data parameters may include one or more of the following parameters: network signal strength (network transmission capability), file data size (data size), current data cache size, temperature, user setting requirements (setting network card configuration parameters), and the like. The application layer module can collect network signal intensity parameters by using a routing rule; collecting file data size parameters through a system open source interface for reading file size information; the method comprises the steps that a system interface for detecting cache information corresponds to a current data cache size parameter of the mobile phone; collecting temperature parameters by reading the system temperature; and collecting the parameters required by the user setting by receiving the configuration of the network card set by the user. For example, a selection button or an input box may be set on a configuration interface of the application layer module, and a network card configuration set by a user may be obtained according to selection or information input operation of the selection button or the input box set on the configuration interface of the user, so as to form a user setting requirement parameter. In some embodiments, the application layer service module is convenient for the user to use and set the user setting requirement parameters, and the functions are also added to the APP interface: a network card drive selection menu for reducing data transmission capacity is added on the APP interface, after the menu is selected, a friendly prompt for setting success or failure can be popped up, and a user is informed of the operation effect, so that the service life of equipment can be prolonged; the APP interface is added with a network card drive selection menu for improving data transmission capacity, and after the menu is selected, the user is prompted to play a role in the operation, such as data downloading is promoted or the network speed is improved. If the network card with high data transmission capacity is not supported, prompting that the user cannot switch, wherein the network card with high data transmission capacity is not supported by the system; and if so, directly prompting the user that the switching is successful.
In an embodiment, the application layer module may start and execute step S1100 at the following time: when a user connects a network card device to a host device through a USB line; or when the host device is powered on and utilizes WIFI to perform data transmission.
Step S1120, a network card switching instruction is generated according to the status data parameter.
In some embodiments, the network card switching instruction includes a high data transmission capability network card configuration switching instruction and a low data transmission capability network card configuration switching instruction. Obviously, the network card switching instruction may also include a network card configuration instruction with a plurality of data transmission capability levels corresponding to the network card configuration number of the network card device.
In some embodiments, state data parameter thresholds, such as a network signal intensity threshold, a file data size threshold, a current data cache size threshold, a temperature threshold, a user setting requirement threshold, and the like, need to be preset in advance, the acquired state data parameters are compared with the preset state data parameter thresholds in real time or periodically or randomly, and a network card switching instruction is generated according to a comparison result. In some embodiments, the state data parameter threshold may be dynamically modified as needed. For example, in an actual usage scenario, according to one or more status data parameters, it is determined that a user does not need to transmit and process data at a high speed for a long time, and a network card configuration instruction with a low data transmission capability may be generated and sent to the network card device to reduce the data transmission capability, thereby reducing the power consumption and temperature of the network card device without affecting the normal use of the user. For example, the video is watched while the video is downloaded, at this time, the application layer module acquires the current data cache size, compares the current data cache size with the current data cache size threshold, and when the comparison result shows that the current data cache size is larger than the current data cache size threshold, determines that the user does not need high data transmission, and can generate a network card configuration instruction for switching low data transmission capacity to be issued to the network card device, so that the network card device reduces the data transmission capacity, thereby reducing the power consumption and temperature of the data terminal product, and simultaneously, the normal use of the user is not affected.
In other embodiments, the network card switching instruction can be directly generated according to the parameters set by the user. For example, in an actual use scenario, when a user needs to watch a high-definition video or needs to acquire data from a network quickly, the user can set a requirement parameter by setting the user, and the application layer module generates a network card configuration instruction for switching high data transmission capability according to the requirement parameter set by the user, so that the network card device is automatically switched to a network card drive with high transmission capability; on the contrary, when the user does not need the high transmission capability requirement, the user can set the requirement parameters by setting the user, and the application layer module generates a network card configuration instruction for switching the low data transmission capability according to the requirement parameters set by the user, so that the network card device is automatically switched to the network card drive with the low transmission capability.
Step S1130, the network card switching instruction is sent and output.
In some embodiments, the application layer module of the host device sends and outputs the network card switching instruction to the upper layer service module of the network card device through the USB cable.
Example 1B
Referring to fig. 2, the present example, with respect to example 1A, further includes the steps of:
s1210, obtaining network card configuration information from the network card device;
s1220, according to the network card configuration information, sending USB descriptor request information to the network card equipment; the USB descriptor request information comprises character string descriptor request information;
s1230, receiving first response information of the network card equipment to the USB descriptor request information;
s1240, sending the configuration descriptor and the setting data endpoint descriptor to the network card equipment according to the first response information;
and S1250, receiving second response information of the network card device to the configuration descriptor and the setting data endpoint descriptor.
In some embodiments, by executing step S1210, after the host device receives the network card configuration information from the network card device, the host device executes steps S1220 to S1230, and if one or more pieces of USB descriptor request information sent by the host device to the network card device can all obtain the first response information meeting expectations, it is determined that the host device and the network card device realize normal interaction of the USB descriptors, and step S1240 is executed. Wherein, the multiple USB descriptor request information interaction may be realized by performing steps S1220 to S1230 multiple times. The USB descriptor request information comprises character string descriptor request information and the like; the first response information includes a string descriptor.
Step S1240, according to the first response information, sending the configuration descriptor and the setting data endpoint descriptor to the network card device.
In some embodiments, the host device may send the configuration descriptor and set the data endpoint descriptor to the network card device according to a determination result that the host device and the network card device can realize normal interaction of the USB descriptor, which is fed back by the operating system identification module in the network card device. The configuration descriptor comprises a configuration USB interface and an endpoint descriptor, and is used for configuring a control channel endpoint; the set data endpoint descriptor is used to set data channel endpoints.
And S1250, receiving second response information of the network card device to the configuration descriptor and the setting data endpoint descriptor.
In some embodiments, the network card device performs network card configuration according to the configuration descriptor and the set data endpoint descriptor, and forms second response information to be fed back to the host device according to a result of the network card configuration.
According to the method, the optimal network card drive adaptation can be selected according to whether the configuration descriptor of the network card and the set data endpoint descriptor can respond normally, so that the power consumption of the equipment can be reduced, the data resources can be utilized reasonably, the service life of the equipment is prolonged, and the user experience can be improved.
In a second aspect, embodiments of the present application provide a network card configuration method for a network card device, where the network card device is communicatively connected to a host device,
example 2A
Referring to fig. 3, the network card configuration method of the present example includes the steps of:
s2110, acquiring a network card switching instruction;
and S2120, loading the corresponding network card driver according to the network card switching instruction.
Step S2110, acquiring a network card switching instruction.
In some embodiments, an upper layer service module may be initialized in the network card device, and the upper layer service module is used to obtain the network card switching instruction through the USB cable.
And S2120, loading the corresponding network card driver according to the network card switching instruction.
In some embodiments, the network card switching instruction includes a high data transmission capability network card configuration switching instruction and a low data transmission capability network card configuration switching instruction. Obviously, the network card switching instruction may also include a network card configuration instruction with a plurality of data transmission capability levels corresponding to the network card configuration number of the network card device. The network card driver with high transmission rate can be loaded according to the configuration instruction for switching the network card with high data transmission capability; and loading the network card driver with low transmission rate according to the configuration instruction for switching the network card with low data transmission capacity.
Example 2B
Referring to fig. 4, this example, with respect to example 2A, further includes the steps of:
s2210, uploading the network card configuration information to the host equipment according to the network card switching instruction;
s2220, acquiring USB descriptor request information from the host device, and replying a first response message according to the USB descriptor request information; the USB descriptor comprises character string descriptor request information;
s2230, obtaining the configuration descriptor and the setting data end point descriptor from the host device, and configuring the corresponding interface and setting the end point according to the configuration descriptor and the setting data end point descriptor;
and S2240, correspondingly selecting to load the corresponding network card driver or maintain the original network card driver according to whether the interface configuration and the endpoint setting are successful.
In some embodiments, referring to fig. 5, a network card identification switching module, an operating system identification module, and a kernel network card driver module may be initialized in the network card device to complete steps S2210, S2220, S2230, and S2240.
Step S2210, according to the network card switching instruction, uploading the network card configuration information to the host device.
In some embodiments, step S2210 corresponds to step S1210 in example 1B. That is, the network card device outputs the network card configuration information by performing step S2210, and the host device receives the network card configuration information by performing step S1210.
In some embodiments, in step S2210, according to the network card switching instruction, the network card identification switching module reports the network card configuration information to be switched to the operating system identification module, and the network card configuration information is uploaded to the host device by the operating system identification module, so that the host device executes step S1210 as in example 1B. For example, the high-performance network card configuration information can be selected and reported according to a network card configuration instruction for switching the high data transmission capability; and selecting the low-performance network card configuration information to report according to the switching low-data transmission capability network card configuration instruction.
Step S2220 acquires the USB descriptor request message from the host device, and replies the first response message according to the USB descriptor request message.
In some embodiments, step S2220 corresponds to steps S1220 and S1230 in example 1B. That is, the host device sends the USB descriptor request message to the network card device by performing step S1210, the network card device obtains the USB descriptor request message from the host device by performing step S2220, and replies the first response message according to the USB descriptor request message, and the host device receives the first response message of the network card device to the USB descriptor request message by performing step S1230. And if one or more USB descriptor request messages sent to the network card device by the host device can obtain first response messages which accord with expectation, judging that the host device and the network card device realize normal interaction of the USB descriptors. In some embodiments, the operating system identification module may be used to respond to USB string descriptor request information issued by the host device, and after the operating system identification module completes responding to the USB string descriptor request information issued by the host device, according to a determination result of whether the host device and the network card device implement normal interaction of USB descriptors, the operating system identification module determines whether the network card configuration is successful and the data channel establishment is completed, and if so, feeds back information to the host device, so that the host device executes step 1240S. The USB descriptor request information comprises character string descriptor request information and the like; the first response information includes a string descriptor.
Step S2230, obtaining the configuration descriptor and the setting data endpoint descriptor from the host device, and performing corresponding interface configuration and endpoint setting according to the configuration descriptor and the setting data endpoint descriptor.
In some embodiments, step S2230 corresponds to step S1240 in example 1B. That is, the host device sends the configuration descriptor and the setting data endpoint descriptor to the network card device by executing step S1240, and the network card device obtains the configuration descriptor and the setting data endpoint descriptor from the host device by executing step S2230, and performs corresponding interface configuration and endpoint setting according to the configuration descriptor and the setting data endpoint descriptor.
And S2240, correspondingly selecting to load the corresponding network card driver or maintain the original network card driver according to whether the interface configuration and the endpoint setting are successful.
In some embodiments, step S2240 corresponds to step S1250 in example 1B. That is, the network card device correspondingly selects to load the corresponding network card driver or maintain the original network card driver according to whether the interface configuration and the endpoint setting are successful or not by executing step S2240, and forms a second response message to report to the host device. The host device receives second response information of the network card device to the configuration descriptor and the setting data endpoint descriptor by performing step S1250.
In some embodiments, the host device issues the configuration descriptor and the setting data endpoint descriptor to the operating system identification module, the operating system identification module issues the configuration descriptor and the setting data endpoint descriptor to the network card identification switching module, and the network card identification switching module sends the configuration descriptor and the setting data endpoint descriptor to the kernel network card driver module. The configuration descriptor comprises a configuration USB interface and an endpoint descriptor, and is used for configuring a control channel endpoint; the set data endpoint descriptor is used to set data channel endpoints. The kernel network card driving module carries out configuration according to a configuration USB interface and an endpoint descriptor issued by the network card switching identification module, if the configuration fails, a failure result (second response information) is notified to the network card switching identification module, the network card identification switching module reports to the operating system identification module according to the configuration condition of the kernel network card driving module and the condition of setting a data endpoint, and then reports to the host equipment by the operating system identification module, and the kernel network card driving module directly carries out communication according to the network card configuration before switching; if the configuration is successful, the network card switching identification module continuously forwards the set data endpoint descriptor issued by the operating system identification module to the kernel network card driving module, if the data endpoint is successfully set, the kernel network card driving module loads the switched network card driving for communication, and the kernel network card driving module responds the reported control channel endpoint and the data channel endpoint (second response information) to the host device; if the data end point setting fails, the network card switching identification module is notified of the failure result (second response information), the network card identification switching module reports the operating system identification module according to the configuration condition of the kernel network card driving module and the data end point setting condition, the operating system identification module reports the operating system identification module to the host equipment, and the kernel network card driving module directly communicates according to the network card configuration before switching.
According to the method, the optimal network card drive adaptation can be selected according to whether the configuration descriptor of the network card and the set data endpoint descriptor can respond normally, so that the power consumption of equipment can be reduced, data resources can be utilized reasonably, the service life of a product is prolonged, and the experience of a user can be improved.
Example 2C
Referring to fig. 6, the present example further includes, with respect to example 2B, before step S2210, the steps of:
and S2310, identifying the operating system type of the host equipment according to the network card switching instruction.
In some embodiments, the os identification module may be utilized to perform os identification according to factors such as the type of request message sent by the host device, the index information, the packet length, the number of string descriptor messages, etc., and if the number of string descriptors supported and obtained according to different os is different, it may be possible to distinguish whether the os is a Windows, MAC, Linux, etc. For example, when the network card switching identification module receives a network card switching instruction from the upper layer service module, the network card switching identification module reports the network card configuration to the operating system identification module, the operating system identification module identifies the operating system and determines what type of system the operating system is, and if the host system is an MAC or Linux system, the network card configuration to be switched by the network card switching identification module is reported to the host device through the operating system identification module. In one embodiment, after the os id module interacts with the host, the board side determines that the host is the MAC system, and the MAC system supports two network card drivers, i.e., NCM and ECM. The ECM network card has limited driving transmission capability, and if the ECM network card does not support other acceleration devices, the transmission capability of the ECM (Ethernet network Control Model) network card is limited, unless other hardware is used to enhance the transmission capability, but the hardware cost is relatively increased. The NCM (Network Control Model) Network card driver can enhance data transmission capability by using software, and is a cost-saving approach for users and manufacturers by relatively increasing hardware. Therefore, the ECM network card driver can be used as a low-performance network card driver for responding to the switching of the low-data-transmission-capacity network card configuration instruction, and the NCM network card driver can be used as a high-performance network card driver for responding to the switching of the high-data-transmission-capacity network card configuration instruction. If the operating system of the host device is a Linux system, the operating system also supports three Network card drives of RNDIS (Remote Network Driver Interface Specification, also called remoteddis, which is a Remote Network Driver Interface Specification), ECM, and NCM, and can match different Network card switching instructions according to requirements.
In a third aspect, an embodiment of the present application provides a network card configuration method, which is used in a data transmission system, where the data transmission system includes a host device and a network card device that are communicatively connected to each other, and the method includes:
the host device executes the network card configuration method according to the first aspect, and correspondingly, the network card device executes the network card configuration method according to the second aspect.
Example 3A
The network card configuration method of the present example includes: the host device executes the network card configuration method according to the first aspect example 1A, and correspondingly, the network card device executes the network card configuration method according to the second aspect example 2A.
Example 3B
The network card configuration method of the present example includes: the host device performs the network card configuration method of example 1B as the first aspect, and correspondingly, the network card device performs the network card configuration method of example 2B as the second aspect.
Example 3C
The network card configuration method of the present example includes: the host device performs the network card configuration method of example 1B as the first aspect, and correspondingly, the network card device performs the network card configuration method of example 2C as the second aspect.
In a fourth aspect, an embodiment of the present application provides a network card configuration method, which is used for a network card device connected to a host device.
Example 4A
Referring to fig. 7, the network card configuration method of the present example includes the steps of:
s4110, collecting state data parameters of the host equipment;
s4120, generating a network card switching instruction according to the state data parameters;
s4130, perform the network card configuration method as in example 2A, example 2B, or example 2C of the second aspect.
In some embodiments, an application layer module may be installed on the network card device, and the application layer module on the network card device executes steps S4110 and S4120 to realize the collection of the status data parameters of the host device and the generation of the network card switching instruction.
In some embodiments, please refer to the related description of example 2A, example 2B, or example 2C in the second aspect for the description of step S4130, which is not repeated herein.
In a fifth aspect, an embodiment of the present application provides a host device, including: a first memory, a first processor and a computer program stored on the first memory and executable on the first processor, the first processor implementing, when executing the program:
the network card configuration method according to example 1A or example 1B in the first aspect.
In a sixth aspect, an embodiment of the present application provides a network card device, including: a second memory, a second processor and a computer program stored on the second memory and executable on the second processor, the second processor implementing, when executing the program:
a network card configuration method as in example 2A, example 2B, or example 2C of the second aspect;
alternatively, the first and second electrodes may be,
the network card configuration method of example 4A in the fourth aspect.
In a seventh aspect, an embodiment of the present application provides a data transmission system, where the data transmission system includes a host device and a network card device that are communicatively connected to each other, and the network card device is connected to the host device through a USB cable.
The host device includes: a first memory, a first processor and a computer program stored on the first memory and executable on the first processor, the first processor implementing, when executing the program: the network card configuration method of example 1A or example 1B in the first aspect;
in a corresponding manner, the first and second optical fibers are,
the network card device includes: a second memory, a second processor and a computer program stored on the second memory and executable on the second processor, the second processor implementing, when executing the program: the network card configuration method of example 2A, example 2B, or example 2C in the second aspect.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions for:
performing the network card configuration method of example 1A or example 1B in the first aspect;
alternatively, the first and second electrodes may be,
performing the network card configuration method of example 2A, example 2B, or example 2C in the second aspect;
alternatively, the first and second electrodes may be,
performing the network card configuration method of example 3A, example 3B, or example 3C in the third aspect;
alternatively, the first and second electrodes may be,
the network card configuration method of example 4A in the fourth aspect is performed.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
While the preferred embodiments of the present invention have been described, the present invention is not limited to the above embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and such equivalent modifications or substitutions are included in the scope of the present invention defined by the claims.

Claims (12)

1. The network card configuration method is used for a host device connected with a network card device, and comprises the following steps:
collecting state data parameters of the host equipment;
generating a network card switching instruction according to the state data parameters;
and sending and outputting the network card switching instruction.
2. The method of claim 1,
the status data parameters include one or more of the following parameters: network signal strength, file data size, current data cache size, temperature, user set requirements.
3. The method according to claim 1 or 2,
the network card switching instruction comprises one of the following instructions: and switching a network card configuration instruction with high data transmission capacity and switching a network card configuration instruction with low data transmission capacity.
4. The method of claim 1, wherein the host device is connected to a network card device via a USB cable, the method further comprising:
acquiring network card configuration information from network card equipment;
according to the network card configuration information, sending USB descriptor request information to network card equipment; wherein the USB descriptor request information comprises string descriptor request information;
receiving first response information of the network card equipment to the USB descriptor request information;
according to the first response information, sending a configuration descriptor and a setting data endpoint descriptor to the network card equipment;
and receiving second response information of the network card device to the configuration descriptor and the setting data endpoint descriptor.
5. The network card configuration method is used for the network card equipment connected with the host equipment, and comprises the following steps:
acquiring a network card switching instruction;
and loading the corresponding network card driver according to the network card switching instruction.
6. The method of claim 5,
the network card switching instruction comprises one of the following instructions: and switching a network card configuration instruction with high data transmission capacity and switching a network card configuration instruction with low data transmission capacity.
7. The method according to claim 5 or 6, wherein the network card device is connected to the host device through a USB cable, and the switching of the corresponding network card driver according to the network card switching instruction comprises:
uploading network card configuration information to host equipment according to a network card switching instruction;
acquiring USB descriptor request information from host equipment, and replying first response information according to the USB descriptor request information; wherein the USB descriptor includes string descriptor request information;
acquiring a configuration descriptor and a setting data endpoint descriptor from host equipment, and performing corresponding interface configuration and endpoint setting according to the configuration descriptor and the setting data endpoint descriptor;
and correspondingly selecting to load the corresponding network card driver or maintain the original network card driver according to the success of the interface configuration and the endpoint setting.
8. The method according to claim 7, wherein before uploading the network card configuration information to the host device according to the network card switching instruction, further comprising:
and identifying the type of the operating system of the host equipment according to the network card switching instruction.
9. The method according to claim 5, 6 or 8, wherein before the obtaining the network card switching instruction, further comprising:
collecting state data parameters of host equipment;
and generating a network card switching instruction according to the state data parameters.
10. A host device, comprising: a first memory, a first processor and a computer program stored on the first memory and executable on the first processor, the first processor when executing the program implementing:
the network card configuration method of any one of claims 1-4.
11. A network card device, comprising: a second memory, a second processor and a computer program stored on the second memory and executable on the second processor, the second processor when executing the program implementing:
the network card configuration method of any one of claims 5 to 9.
12. A computer-readable storage medium storing computer-executable instructions for:
executing the network card configuration method of any of claims 1 to 9.
CN201910902734.1A 2019-09-23 2019-09-23 Network card configuration method, host device, network card device, and storage medium Pending CN112540801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910902734.1A CN112540801A (en) 2019-09-23 2019-09-23 Network card configuration method, host device, network card device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910902734.1A CN112540801A (en) 2019-09-23 2019-09-23 Network card configuration method, host device, network card device, and storage medium

Publications (1)

Publication Number Publication Date
CN112540801A true CN112540801A (en) 2021-03-23

Family

ID=75013150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910902734.1A Pending CN112540801A (en) 2019-09-23 2019-09-23 Network card configuration method, host device, network card device, and storage medium

Country Status (1)

Country Link
CN (1) CN112540801A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204384A (en) * 2021-05-14 2021-08-03 山东英信计算机技术有限公司 Equipment starting method and device and computer readable storage medium
CN113835783A (en) * 2021-09-24 2021-12-24 青岛海信移动通信技术股份有限公司 Method and device for controlling start of Wi-Fi network card and terminal equipment
CN114401232A (en) * 2021-12-27 2022-04-26 中国电信股份有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040203296A1 (en) * 2002-11-15 2004-10-14 Globespan Virata Inc. Method and system for attaching a USB network adapter supporting both RNDIS and non-RNDIS capable operating systems
CN101458556A (en) * 2007-12-14 2009-06-17 联想(北京)有限公司 Dynamic control method and device for network card power consumption and connection mode
CN103414659A (en) * 2013-08-30 2013-11-27 南京理工大学连云港研究院 User-based network access interface selection device and method
CN104216728A (en) * 2013-06-03 2014-12-17 中兴通讯股份有限公司 Method for connecting USB network card, USB network card and PC
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040203296A1 (en) * 2002-11-15 2004-10-14 Globespan Virata Inc. Method and system for attaching a USB network adapter supporting both RNDIS and non-RNDIS capable operating systems
CN101458556A (en) * 2007-12-14 2009-06-17 联想(北京)有限公司 Dynamic control method and device for network card power consumption and connection mode
CN104216728A (en) * 2013-06-03 2014-12-17 中兴通讯股份有限公司 Method for connecting USB network card, USB network card and PC
CN103414659A (en) * 2013-08-30 2013-11-27 南京理工大学连云港研究院 User-based network access interface selection device and method
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204384A (en) * 2021-05-14 2021-08-03 山东英信计算机技术有限公司 Equipment starting method and device and computer readable storage medium
CN113835783A (en) * 2021-09-24 2021-12-24 青岛海信移动通信技术股份有限公司 Method and device for controlling start of Wi-Fi network card and terminal equipment
CN114401232A (en) * 2021-12-27 2022-04-26 中国电信股份有限公司 Data transmission method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112540801A (en) Network card configuration method, host device, network card device, and storage medium
US20130254759A1 (en) Installing an operating system in a host system
US20140082314A1 (en) Control apparatus and control method therefor
CN109376053B (en) Data processing method and device and mobile terminal
CN108334372B (en) Firmware upgrading processing method, device and system
CN113852564A (en) Server control method, device and medium
CN111083564B (en) Intelligent television upgrading method, intelligent terminal, intelligent peripheral and intelligent television
CN103873886A (en) Image information processing method, device and system
CN103561089A (en) Virtual machine desktop log-in method, device and system
US10423373B2 (en) Regeneration chip and contact control method therefor
CN104077250A (en) Connection processing method and device for intelligent terminal and storage equipment
US10291740B2 (en) Method and apparatus for determining application to be recommended
US20110208923A1 (en) Storage method and system, terminal service board, control board and storage channel board
CN103607649A (en) Advertisement insertion method and player
CN110781014B (en) Recording data multi-process distribution method and system based on Android device
US10007529B2 (en) Data terminal running mode switching method, device, and data terminal
CN111128247B (en) Data recording method, device, computing equipment and storage medium
WO2016179944A1 (en) Function multiplexing method and apparatus for communication interface
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server
CN103870564A (en) Data updating method and electronic equipment
US10931121B2 (en) Controlling battery utilization using discharge pattern when system is powered off
CN112416641A (en) Controlled end node restart detection method in master-slave architecture and master control end node
CN113268358A (en) Data communication method, device and system and multi-equipment cascade system
CN106960662B (en) Display method of display device, display device and Virtual Reality (VR) system
CN116881091B (en) System event log reporting method, device, chip, equipment and storage medium

Legal Events

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