Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the advantages of the technical solutions of the present invention clearer, the present invention is described in detail below with reference to the accompanying drawings and examples.
Example one
This embodiment provides a method for managing a port of a communication device, as shown in fig. 1, where the method for managing a port of a communication device includes:
101. the management equipment acquires port configuration information of the communication equipment;
102. the management equipment judges whether the port configuration information of the communication equipment is matched with the current operating system environment (namely the operating system environment of the management equipment) of the communication equipment;
103. if not, the management device issues a switch port configuration request to the communication device according to a port management strategy, and the communication device resets the port configuration according to the switch port configuration request.
According to the method for managing the communication equipment port, the management equipment can issue the port switching configuration request to the communication equipment when the port configuration information of the communication equipment is not matched with the operating system environment of the management equipment, and the communication equipment can reset the port configuration of the communication equipment according to the port switching configuration request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
Example two
In this embodiment, the communication device is a data card module, and the data card module is used as a network card device, so that the port of the data card module is a network card port, and the operating system where the data card module is located is a Windows operating system.
As shown in fig. 2, the method for managing the ports of the communication device includes:
201. and the management equipment issues a query port configuration request to the data card module.
The query port configuration request is a USB request USB _ vector _ GET _ CDC defined by a manufacturer of the management device, and the specific format may be: 0xC 00 xFD 0x 010 x 000 x 000 x 000 x020x 00.
202. And the management equipment receives the port configuration information of the data card module reported by the data card module.
Corresponding to the query port configuration request, the port configuration information format reported by the data card module is as follows: 0xFD 0x01 or 0xFD 0x00, where 0xFD is the characteristic value of the query port configuration request, 0x01 indicates that the port is in a dual port configuration, and 0x00 indicates that the port is in a single port configuration. In this embodiment, the port configuration of the data card module includes two port configurations and a single port configuration, and of course, the same applies to data card modules having more than two port configurations.
203. The management equipment judges whether the data card module is in dual-port configuration or not, and exits if the data card module is not in dual-port configuration; if a dual port configuration is desired, step 204 is performed.
Because the operating system where the data card module is located is a Windows operating system, and in the Windows operating system, the network card port of the data card module can only be configured for a single port, when the network card port of the data card module is configured for the single port, port switching is not required; when the network card port of the data card module is in a dual-port configuration, port switching is required.
204. And the management equipment issues a port switching configuration request to the data card module according to the port management strategy, and requests the data card module to switch the port into single-port configuration.
A port management policy is built in the management device, and the management policy is shown in table 1:
TABLE 1
According to the management strategy, the management equipment issues a switching port configuration request to the data card module, wherein the switching port configuration request is a USB request USB _ VENTOR _ SET _ CDC defined by a manufacturer of the management equipment, and the specific format can be as follows: 0x 400 xFE 0x 000 x 000 x 000 x020x00, the data format of the USB request may be: 0xFE 0x01 or 0xFE 0x00, where 0xFE is a feature value of the switch port configuration request, 0x01 indicates that the management device requests the data card module to switch the network card port to the dual-port configuration, and 0x00 indicates that the management device requests the data card module to switch the network card port to the single-port configuration. In this embodiment, the data format of the switch port configuration request is 0xFE 0x 00.
205. And the data card module sets the port configuration as single-port configuration according to the switching port configuration request.
206. And the data card module reports the reset port configuration information, namely single-port configuration, to the management equipment.
In the method for managing the port of the communication device according to the embodiment of the present invention, the operating system where the data card module is located is a Windows operating system, and since the network card port of the data card module can only be configured for a single port in the Windows operating system, when the management device determines that the data card module is configured for a dual port, the management device issues a request for switching the port to a single port configuration to the data card module, and the data card module sets the port configuration of the management device to be a single port according to the request and reports the single port configuration to the management device. Compared with the prior art, the data card module can dynamically adjust the port configuration of the data card module according to the current operating system environment under the management of the management equipment so as to adapt to the current operating system environment, thereby improving the use flexibility of the data card module and improving the experience quality of a user.
EXAMPLE III
In this embodiment, the communication device is a data card module, and the data card module is used as a network card device, so that the port of the data card module is a network card port, and the operating system where the data card module is located is a Linux system or an MAC OS X system.
As shown in fig. 3, the method for managing the ports of the communication device includes:
301-.
303. The management equipment judges whether the data card module of the data card module is in dual-port configuration or not, and exits if the data card module is in dual-port configuration; if not, step 304 is performed.
Because the operating system where the data card module is located is a Linux system or an MAC OS X system, and in the Linux system or the MAC OS X system, the network card port of the data card module can only be configured in a dual port manner, when the network card port of the data card module is configured in a dual port manner, port switching is not required; when the network card port of the data card module is configured as a single port, port switching is required.
304. And the management equipment issues a port switching configuration request to the data card module according to the port management strategy, and requests the data card module to switch the port into a dual-port configuration.
The port management policy built in the management device is shown in table 1 in embodiment two.
According to the management policy, the management device issues a switch port configuration request to the data card module, where a specific format of the switch port configuration request is similar to that in the second embodiment, except that in this embodiment, a data format of the switch port configuration request is 0xFE 0x 01.
305. And the data card module sets the port configuration to be a dual-port configuration according to the switching port configuration request.
306. And the data card module reports the reset port configuration information, namely dual-port configuration, to the management equipment.
In the method for managing the port of the communication equipment in the embodiment of the invention, the operating system where the data card module is located is a Linux system or an MAC OS X system, because the network card port of the data card module can only be configured in a double port mode in the Linux system or the MAC OS X system, when the management equipment judges that the data card module is configured in a single port mode, the management equipment issues a request for switching the port into the double port mode, and the data card module sets the port configuration of the data card module into the double port mode according to the request and reports the double port configuration to the management equipment. Compared with the prior art, the data card module can dynamically adjust the port configuration of the data card module according to the current operating system environment under the management of the management equipment so as to adapt to the current operating system environment, thereby improving the use flexibility of the data card module and improving the experience quality of a user.
Example four
The present embodiment provides a management device, as shown in fig. 4, the management device includes:
an obtaining module 401, configured to obtain port configuration information of the communication device;
a determining module 402, configured to determine whether the port configuration information of the communication device matches an operating system environment where the communication device is currently located;
the processing module 403 is configured to, when the port configuration information of the communication device does not match with the current operating system environment where the communication device is located, issue a port configuration switching request to the communication device according to a port management policy.
According to the management equipment provided by the embodiment of the invention, when the port configuration information of the communication equipment is not matched with the current operating system environment of the communication equipment, the management equipment can issue the port configuration switching request to the communication equipment, and the communication equipment can reset the port configuration of the communication equipment according to the port configuration switching request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
EXAMPLE five
As shown in fig. 5, the management apparatus includes:
an obtaining module 401, configured to obtain port configuration information of the communication device;
a determining module 402, configured to determine whether the port configuration information of the communication device matches an operating system environment where the communication device is currently located;
the processing module 403 is configured to, when the port configuration information of the communication device does not match with the current operating system environment where the communication device is located, issue a port configuration switching request to the communication device according to a port management policy.
Wherein the obtaining module 401 includes:
the issuing unit 4011 is configured to issue a query port configuration request to the communication device;
a receiving unit 4012, configured to receive the port configuration information of the communication device reported by the communication device.
Further, the receiving unit 4012 is further configured to receive the reconfigured port configuration information reported by the communication device.
In addition, in this embodiment, the specific implementation of each module function may refer to corresponding contents in the method embodiment, and is not described herein again; for example, the determining module 402 determines whether the port configuration information of the communication device matches with the current operating system environment of the communication device, and may refer to step 203 in the second embodiment, step 303 in the third embodiment, and the like.
According to the management equipment provided by the embodiment of the invention, when the port configuration information of the communication equipment is not matched with the current operating system environment of the communication equipment, the management equipment can issue the port configuration switching request to the communication equipment, and the communication equipment can reset the port configuration of the communication equipment according to the port configuration switching request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
EXAMPLE six
The present embodiment provides a communication device, as shown in fig. 6, the communication device includes:
a first receiving module 601, configured to receive a switch port configuration request issued by a management device;
a setting module 602, configured to reset the port configuration of the switching port according to the switching port configuration request.
According to the communication equipment provided by the embodiment of the invention, the management equipment can issue the port switching configuration request to the communication equipment when the port configuration information of the communication equipment is not matched with the current operating system environment of the communication equipment, and the communication equipment can reset the port configuration of the communication equipment according to the port switching configuration request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
EXAMPLE seven
The present embodiment provides a communication device, as shown in fig. 7, the communication device includes:
a first receiving module 601, configured to receive a switch port configuration request issued by a management device;
a setting module 602, configured to reset the port configuration of the switching port according to the switching port configuration request.
Wherein the communication device further comprises:
a second receiving module 603, configured to receive a query port configuration request issued by the management device;
a reporting module 604, configured to report the port configuration information of the communication device to the management device.
Further, the reporting module 604 is further configured to report the reconfigured port configuration information to the management device.
According to the communication equipment provided by the embodiment of the invention, the management equipment can issue the port switching configuration request to the communication equipment when the port configuration information of the communication equipment is not matched with the current operating system environment of the communication equipment, and the communication equipment can reset the port configuration of the communication equipment according to the port switching configuration request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
Example eight
This embodiment provides a port management system of a communication device, as shown in fig. 8, the port management system of a communication device includes: a management device 801 and a communication device 802, wherein,
the management device 801 is configured to obtain port configuration information of the communication device 802, determine whether the port configuration information of the communication device 802 matches an operating system environment in which the communication device 802 is currently located, and issue a port configuration switching request to the communication device 802 according to a port management policy when the port configuration information of the communication device 802 does not match the operating system environment in which the communication device 802 is currently located;
the communication device 802 is configured to receive a switch port configuration request issued by the management device 801, and reset the port configuration of the communication device according to the switch port configuration request.
The management device 801 is further configured to issue a query port configuration request to the communication device 802, and receive port configuration information of the communication device 802 reported by the communication device 802;
the communication device 802 is further configured to receive a query port configuration request issued by the management device 801, and report port configuration information of the communication device to the management device 801.
Further, the communication device 802 is further configured to report the reconfigured port configuration information to the management device 801;
the management device 801 is further configured to receive the reconfigured port configuration information reported by the communication device 802.
In addition, in this embodiment, the specific implementation of the management device 801 and the communication device 802 may refer to corresponding contents in the apparatus embodiment, which is not described herein again; for example, the management device 801 may refer to the relevant contents of the fourth embodiment and the fifth embodiment, and the communication device 802 may refer to the relevant contents of the sixth embodiment and the seventh embodiment.
In the port management system of the communication device according to the embodiment of the present invention, when the port configuration information of the communication device is not matched with the current operating system environment of the communication device, the management device can issue a port configuration switching request to the communication device, and the communication device can reset the port configuration of the communication device according to the port configuration switching request. Compared with the prior art, the communication equipment can dynamically adjust the port configuration of the communication equipment according to the current operating system environment under the management of the management equipment, so that the communication equipment is suitable for various operating system environments, the use flexibility of the communication equipment is improved, and the experience quality of a user is improved.
The management device, the communication device and the port management system of the communication device provided by the embodiment of the invention can realize the embodiment of the method provided by the embodiment of the invention. The method and system for managing the ports of the communication device, the management device and the communication device provided by the embodiment of the invention can be applied to the communication devices adopting different port configurations in different operating system environments, but are not limited to the method and the system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.