WO2015117378A1 - Method and related system for adaptively configuring port, and computer storage medium - Google Patents
Method and related system for adaptively configuring port, and computer storage medium Download PDFInfo
- Publication number
- WO2015117378A1 WO2015117378A1 PCT/CN2014/089063 CN2014089063W WO2015117378A1 WO 2015117378 A1 WO2015117378 A1 WO 2015117378A1 CN 2014089063 W CN2014089063 W CN 2014089063W WO 2015117378 A1 WO2015117378 A1 WO 2015117378A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- operating system
- usb device
- port
- instruction
- port configuration
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a method and related system for port adaptive configuration, and a computer storage medium.
- USB devices access the wireless network with the following five user ports:
- the first one debug the modem port. Applies to all of the above systems for Windows. The manufacturer needs to provide the supporting Host driver, and cooperate with the system's own dialing program or the device's own dialing program to complete the Internet access function.
- RNDIS port Applies to all of the above systems for Windows. It does not require the vendor to provide a host driver, use the operating system's own driver, and use the WebUI to achieve Internet access.
- NDIS5.1 port Applies to all of the above systems for Windows. The manufacturer needs to provide a matching Host driver, and cooperate with the supporting application that comes with the device to implement the Internet access function.
- NDIS6.20 port Applicable to Windows 7 and above.
- the manufacturer needs to provide a matching Host driver, and the system itself can be used to implement the Internet access function or the application developed by the MBN API interface provided by the device to realize the functions of Internet access, SMS, and phone book.
- MBIM port Applicable to Windows 8 and above. You don't need the manufacturer to provide the host driver, use the system's own driver, and use the application developed by the system or the MBN API interface that comes with the device to realize the functions of Internet access, SMS, and phone book.
- the carrier needs to change from a port such as RNDIS to a user port of NDIS5.1, NDIS6.2, or MBIM later, it has to be implemented by upgrading the device version, and the device may generate various faults during the upgrade process. There are even problems with the computer blue screen or device crash.
- a fixed board-side driver version can only report the user port currently customized by the carrier. If you want to replace the user port, you must replace the new user port by upgrading the board-side driver. If the board-side driver can adaptively report various port requirements customized by the operator according to the requirements of different operators on different operating systems, such a board-side driver version is compatible with all customization requirements of different operators, saving development. Cost and R&D cycle, and operators can switch between different user ports without post-upgrade, which reduces the driver version and upgrade frequency, greatly reducing the development and maintenance costs of device drivers.
- the object of the present invention is to provide a method for port adaptive configuration, a related system, and a computer storage medium, which can realize the requirement of various port customizations by a board-side driver, and also avoids the need for the operator to change the port mode.
- the problem of the device firmware mode greatly reduces the development cycle and development and maintenance costs.
- an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a universal serial bus USB device, and the method includes:
- the port configuration command of the operating system is set, so that the operating system switches the USB device to the corresponding port according to the set port configuration instruction.
- the method further includes:
- USB insertion an instruction is obtained that the operating system uses the USB device as an optical disk storage device.
- the method further includes:
- obtaining information about an operating system used by the USB device includes:
- the version number of the operating system includes a major version number and a minor version number
- obtaining port configuration information of an operating system used by the USB device includes:
- the port configuration information is read according to the information of the operating system and the correspondence between the operating system and the port configuration information stored in advance in the optical disk storage device.
- the embodiment of the invention further includes a management system of a USB device configured by port adaptation, and the management system of the USB device includes:
- the first obtaining module is configured to obtain information about an operating system used by the USB device
- the second obtaining module is configured to obtain port configuration information of an operating system used by the USB device according to information of the operating system;
- the response module is configured to set the port configuration command of the operating system according to the information of the operating system and the port configuration information, so that the operating system sends the USB according to the configured port configuration command.
- the device switches to the corresponding port.
- the management system of the USB device further includes a third obtaining module configured to acquire an instruction of the operating system to use the USB device as an optical disk storage device when the USB is inserted.
- the management system of the USB device further includes a first instruction sending module configured to send the removal to the operating system after the response module sets the port configuration command of the operating system according to the operating system information and the port configuration information.
- An instruction of the optical disk storage device causes the operating system to switch the USB device to the corresponding port according to an instruction to remove the optical disk storage device.
- the first obtaining module includes:
- the first obtaining subunit is configured to obtain a version number of the operating system, where the version number includes a major version number and a minor version number;
- the second obtaining subunit is configured to obtain information about the operating system according to the major version number and the minor version number.
- the second obtaining module reads the port configuration information according to the information of the operating system and the correspondence between the operating system and the port configuration information pre-stored in the optical disk storage device.
- the embodiment of the present invention further includes a method for port adaptive configuration, which is applied to a driving system of a USB device, and the method includes:
- the method further includes:
- the method further includes the step of reporting the corresponding port to the operating system.
- the method further includes the step of issuing an instruction to report the USB device as an optical disk storage device to the operating system before the obtaining the port configuration command after the USB device is set. .
- the USB device is switched to the corresponding port according to the set port configuration command, including:
- the USB device is switched to the corresponding port according to the set port configuration command and the instruction to remove the optical disk storage device.
- the embodiment of the invention further includes a drive system of a port device adaptively configured by a USB device, and the drive system of the USB device includes:
- the fourth obtaining module is configured to obtain a port configuration command after the USB device sets the port configuration command of the operating system according to the operating system information and the port configuration information;
- An execution module configured to switch the USB device to the corresponding port according to the set port configuration instruction
- the reporting module is configured to report the corresponding port to the operating system.
- the driving system of the USB device further includes:
- the request receiving module is configured to receive a request instruction sent by the operating system when the USB device is inserted;
- the determining module is configured to determine whether the request instruction carries a port configuration instruction
- a decision module configured to: when the determining module determines that the request instruction carries a port configuration instruction, Select the corresponding port according to the port configuration command;
- the determining module determines that the port instruction is not carried in the request instruction, sending a feedback instruction to the fourth acquiring module, so that the fourth acquiring module acquires the port configuration command.
- the reporting module reports the corresponding port to the operating system.
- the driving system of the USB device further includes a second instruction sending module configured to: when the determining module determines that the request instruction does not carry the port configuration instruction, and before the fourth obtaining module acquires the port configuration command after the USB device is set, An instruction to report the USB device as a disc storage device to the operating system.
- the execution module includes:
- the first sub-unit is configured to: after acquiring, by the fourth obtaining module, the USB device according to the operating system information and port configuration information, after setting the port configuration command after the port configuration command of the operating system, responding to the instruction to remove the optical disc storage device;
- the second subunit is configured to switch the USB device to the corresponding port according to the set port configuration instruction and the instruction to remove the optical disc storage device.
- the embodiment of the invention further includes a system for port adaptive configuration, including the above-mentioned management system of the USB device and the drive system of the USB device.
- Embodiments of the invention also include a computer storage medium having stored therein computer executable instructions for performing the methods described above.
- the configuration command of the operating system is set according to the acquired information of the operating system and the port configuration information, so that the operating system is configured according to the configured port.
- the command switches the USB device to the corresponding port, so that a board-side driver can meet the requirements of various port customizations, and also avoids the problem that the operator needs to upgrade the device firmware mode when changing the port mode, which greatly reduces the development cycle and development. Maintenance costs.
- FIG. 1 is a flow chart showing the steps of a method for port adaptive configuration applied to a universal serial bus USB device according to an embodiment of the present invention
- FIG. 2 is a flowchart of step 11 in FIG. 1 according to an embodiment of the present invention.
- step 112 in FIG. 2 is a flowchart of step 112 in FIG. 2 according to an embodiment of the present invention
- FIG. 4 is a schematic structural diagram of a management system of a USB device configured by port adaptation according to an embodiment of the present invention
- FIG. 5 is a flow chart showing the steps of a method for port adaptive configuration of a drive system applied to a USB device according to an embodiment of the present invention
- FIG. 6 is a flowchart of step 42 in FIG. 4 according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a drive system of a USB device configured by port adaptation according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of a system for port adaptive configuration according to an embodiment of the present invention.
- FIG. 9 is a flowchart of a system for port adaptive configuration according to an embodiment of the present invention.
- the present invention is directed to the device-side drive of the device that only reports the user port customized by the operator, and cannot implement the problem that a board-side driver version adaptively implements different user port requirements of all operators, and provides a port adaptive configuration.
- the method, the management system, the drive system, and the system when the USB device is inserted into the operating system, set the configuration command of the operating system according to the acquired operating system information and the port configuration information, so that the operating system sends the USB according to the configured port configuration instruction.
- the device is switched to the corresponding port, so that one board-side driver can meet the requirements of various port customizations, and the problem that the operator needs to upgrade the device firmware mode by changing the port mode is avoided, which greatly reduces the development cycle and development and maintenance costs.
- an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a universal serial bus USB device, including:
- Step 11 Obtain information about an operating system used by the USB device.
- the operating system is the Host operating system
- the information of the operating system refers to the version of the operating system.
- Step 12 Obtain port configuration information of an operating system used by the USB device according to information of the operating system.
- the configuration file of the operator customized port requirement includes an operating system and a configuration instruction, and the corresponding relationship between the two is as shown in Table 1:
- the information format of the configuration file is fixed, and the content is derived from the operator's requirement for the user port. Therefore, according to the information of the operating system obtained in step 11, the configuration command of the port can be determined.
- Step 13 Set the port configuration command of the operating system according to the information of the operating system and the port configuration information, so that the operating system switches the USB device to the corresponding port according to the set port configuration instruction.
- the port configuration command is set in the operating system according to the information of the operating system acquired in step 11 and the port configuration information acquired in step 12 to meet the requirements of the operator.
- the method before performing step 11, the method further includes: when the USB is inserted, acquiring an instruction that the operating system uses the USB device as an optical disk storage device.
- an optical disk storage device uses a read-only optical disk (CDROM), wherein an application installation program of an integrated user port management module is stored in a read-only optical disk (CDROM), and the above configuration file is integrated in a user port management module.
- CDROM read-only optical disk
- an application installation program of an integrated user port management module is stored in a read-only optical disk (CDROM)
- the above configuration file is integrated in a user port management module.
- the method further includes: The operating system sends an instruction to remove the optical disk storage device, causing the operating system to switch the USB device to the corresponding port according to an instruction to remove the optical disk storage device.
- the CD-ROM needs to be removed, so that the operator-customized user port appears.
- obtaining information about an operating system used by a USB device includes:
- Step 111 Obtain a version number of the operating system, where the version number includes a major version number and a minor version number.
- the version number of the system is obtained by calling the WIN32 API function.
- Step 112 Obtain information about the operating system according to the major version number and the minor version number.
- step 112 is as follows:
- Step 1121 if the primary and secondary version numbers are 5 and 1, respectively, it is determined that the current operating system is XP, and if not, the determination is continued;
- Step 1122 If the primary and secondary version numbers are 6 and 0, respectively, determine that the current operating system is VISTA, and if not, continue to determine;
- Step 1123 if the primary and secondary version numbers are 6 and 1, respectively, it is determined that the current operating system is Windows 7, and if not, the determination is continued;
- Step 1124 if the primary and secondary version numbers are 6 and 2 respectively, it is determined that the current operating system is Windows 8, and if not, the determination is continued;
- step 1125 if the primary and secondary version numbers are 6 and 3, respectively, it is determined that the current operating system is Windows 8.1.
- obtaining port configuration information of an operating system used by the USB device includes:
- the port configuration information is read according to the information of the operating system and the correspondence between the operating system and the port configuration information stored in advance in the optical disk storage device.
- the configuration file of the operator customized port requirement is integrated in the user port management module of the compact disk (CDROM), so the port configuration information can be read according to the information of the operating system.
- the embodiment of the present invention further provides a port device adaptive configuration USB device management system 40, including:
- the first obtaining module 41 is configured to obtain information about an operating system used by the USB device.
- the second obtaining module 42 is configured to obtain port configuration information of an operating system used by the USB device according to information of the operating system;
- the response module 43 is configured to set the port configuration command of the operating system according to the information of the operating system and the port configuration information, so that the operating system switches the USB device to the corresponding port according to the set port configuration instruction.
- the management system 40 of the USB device of the present invention further includes a third obtaining module configured to acquire an instruction of the operating system to use the USB device as an optical disk storage device when the USB is inserted.
- the management system 40 of the USB device of the present invention further includes a first instruction sending module configured to send to the operating system after the response module sets the port configuration command of the operating system according to the operating system information and the port configuration information.
- the instruction to remove the optical disk storage device causes the operating system to switch the USB device to the corresponding port according to an instruction to remove the optical disk storage device.
- the first obtaining module 41 includes:
- the first obtaining subunit is configured to obtain a version number of the operating system, where the version number includes a major version number and a minor version number;
- the second obtaining subunit is configured to obtain information about the operating system according to the major version number and the minor version number.
- the second obtaining module 42 reads the port configuration information according to the information of the operating system and the correspondence between the operating system and the port configuration information stored in advance in the optical disk storage device.
- each module of the management system of the above USB device can be integrated into a user port management module of a compact disk (CDROM).
- CDROM compact disk
- an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a driving system of a USB device, including:
- Step 51 Obtain a port configuration instruction after the USB device sets the port configuration command of the operating system according to the information of the operating system and the port configuration information.
- Step 52 Switch the USB device to the corresponding port according to the set port configuration instruction.
- Step 53 Report the corresponding port to the operating system.
- the method before performing step 51, the method further includes:
- the operating system when the USB device is inserted into the operating system, the operating system sends a request command, and if the request command carries the port configuration command, the corresponding port customized by the operator is selected according to the port configuration command. If the port configuration command is carried, step 51 is performed downward.
- the corresponding port is selected according to the port configuration instruction.
- the method further includes the step of reporting the corresponding port to the operating system, and ending the process.
- the method before performing the obtaining the port configuration command after the USB device is set, the method further includes the step of issuing an instruction to the operating system to report the USB device as an optical disk storage device.
- the optical disk storage device uses a read-only optical disk (CDROM).
- CDROM read-only optical disk
- COROM stores an application installation program of the user port management module, and reports the optical disk storage device to the operating system to facilitate installation of the user.
- Port management module a read-only optical disk (CDROM).
- switching the USB device to the corresponding port according to the set port configuration command includes:
- Step 521 After obtaining the port configuration command after the USB port device sets the port configuration command of the operating system according to the operating system information and the port configuration information, responding to the instruction to remove the optical disk storage device;
- Step 522 Switch the USB device to the corresponding port according to the set port configuration command and the instruction to remove the optical disk storage device.
- the optical disk storage device needs to be removed, so that the USB device switches to the corresponding port when a corresponding port customized by the operator appears.
- the embodiment of the present invention further provides a drive system 70 for a USB device configured with a port adaptive configuration, including:
- the fourth obtaining module 71 is configured to acquire a port configuration command after the USB device sets the port configuration command of the operating system according to the information of the operating system and the port configuration information;
- the executing module 72 is configured to switch the USB device to the corresponding port according to the set port configuration instruction
- the reporting module 73 is configured to report the corresponding port to the operating system.
- the driving system of the USB device of the present invention further includes:
- the request receiving module is configured to receive a request instruction sent by the operating system when the USB device is inserted;
- the determining module is configured to determine whether the request instruction carries a port configuration instruction
- a decision module configured to: when the determining module determines that the request instruction carries a port configuration instruction, select a corresponding port according to the port configuration instruction;
- the determining module determines that the port instruction is not carried in the request instruction, sending a feedback instruction to the fourth acquiring module, so that the fourth acquiring module acquires the port configuration command.
- the reporting module reports the corresponding port to the operating system.
- the driving system of the USB device of the present invention further includes a second instruction sending module configured to: when the determining module determines that the request instruction does not carry the port configuration instruction, the fourth obtaining module acquires the port configuration command after the USB device is set , an instruction to the operating system to report the USB device as an optical disk storage device.
- the execution module 72 includes:
- the first sub-unit is configured to: after acquiring, by the fourth obtaining module, the USB device according to the operating system information and port configuration information, after setting the port configuration command after the port configuration command of the operating system, responding to the instruction to remove the optical disc storage device;
- the second subunit is configured to switch the USB device to the corresponding port according to the set port configuration instruction and the instruction to remove the optical disc storage device.
- an embodiment of the present invention provides a system 80 for port adaptive configuration, including the above-described management system 40 of the USB device and the drive system 70 of the USB device.
- the embodiments and the beneficial effects of the management system 40 of the USB device and the drive system 70 of the USB device are applicable to the system 80.
- the flow of the system 80 is as shown in FIG.
- Embodiments of the present invention also include a computer storage medium having stored therein computer executable instructions for performing the method of any of the above embodiments.
- Each of the above units or modules may be implemented by a central processing unit (CPU), a digital signal processor (DSP), or a field-programmable gate array (FPGA) in an electronic device.
- CPU central processing unit
- DSP digital signal processor
- FPGA field-programmable gate array
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. Instructions are provided for implementation The steps of a function specified in a block or blocks of a flow or a flow and/or a block diagram of a flow chart.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
本发明涉及通信技术领域,尤其涉及一种端口自适应配置的方法及相关系统、计算机存储介质。The present invention relates to the field of communications technologies, and in particular, to a method and related system for port adaptive configuration, and a computer storage medium.
随着微软操作系统的不断推出,运营商要求支持的Windows系统越来越多,主要包括XP、VISTA、Windows7、Windows8和Windows8.1系统。在这几种操作系统上,USB设备以如下五种用户端口接入到无线网络中:With the continuous introduction of Microsoft operating systems, operators are demanding more and more Windows systems, including XP, VISTA, Windows 7, Windows 8, and Windows 8.1. On these operating systems, USB devices access the wireless network with the following five user ports:
第一种:调试解调器(Modem)端口。应用于Windows上述所有系统。需要厂商提供配套的Host驱动,配合系统自带拨号程序或设备自带拨号程序完成上网功能。The first one: debug the modem port. Applies to all of the above systems for Windows. The manufacturer needs to provide the supporting Host driver, and cooperate with the system's own dialing program or the device's own dialing program to complete the Internet access function.
第二种:RNDIS端口。应用于Windows上述所有系统。它不需要厂商提供配套的Host驱动,使用操作系统自带驱动,配合WebUI实现上网功能。Second: RNDIS port. Applies to all of the above systems for Windows. It does not require the vendor to provide a host driver, use the operating system's own driver, and use the WebUI to achieve Internet access.
第三种:NDIS5.1端口。应用于Windows上述所有系统。需要厂商提供配套的Host驱动,配合设备自带的配套应用程序实现上网功能。Third: NDIS5.1 port. Applies to all of the above systems for Windows. The manufacturer needs to provide a matching Host driver, and cooperate with the supporting application that comes with the device to implement the Internet access function.
第四种:NDIS6.20端口。应用于Windows 7及以上版本系统。需要厂商提供配套的Host驱动,配合系统自带应用程序实现上网功能或配合设备自带的MBN API接口开发的应用程序实现上网、短信、电话本等功能。Fourth: NDIS6.20 port. Applicable to Windows 7 and above. The manufacturer needs to provide a matching Host driver, and the system itself can be used to implement the Internet access function or the application developed by the MBN API interface provided by the device to realize the functions of Internet access, SMS, and phone book.
第五种:MBIM端口。应用于Windows 8及以上版本系统。不需要厂商提供配套的Host驱动,使用系统自身驱动,配合系统自带应用程序或设备自带的MBN API接口开发的应用程序实现上网、短信、电话本等功能。Fifth: MBIM port. Applicable to Windows 8 and above. You don't need the manufacturer to provide the host driver, use the system's own driver, and use the application developed by the system or the MBN API interface that comes with the device to realize the functions of Internet access, SMS, and phone book.
不同运营商对用户端口的选择是不同的,即使在同一操作系统下,不同运营商也可能会根据各自的需求使用不同的用户端口,因此绝大多数运 营商会对设备上报的用户端口提出不同的要求。在这种情况下,设备针对不同运营商开发不同的定制版本,满足其对用户端口的不同使用需求,由于运营商的数量庞大,造成了定制版本特别多,大大增加了开发及维护工作量。此外,随着LTE技术的应用,高速上网无疑是USB网卡后续必须具备的能力。从上述端口特点可以看出,NDIS5.1、NDIS6.2和MBIM由于具有传输大聚合包的能力,将会成为未来USB设备端口的主流发展方向。当运营商后期需要从RNDIS等端口更改为NDIS5.1、NDIS6.2或MBIM的用户端口时,不得不通过升级设备版本的方式来实现,而设备在升级过程中有可能会产生各种故障,甚至出现电脑蓝屏或者设备死机问题。Different operators have different choices of user ports. Even under the same operating system, different operators may use different user ports according to their respective needs. The business has different requirements for the user port reported by the device. In this case, the device develops different customized versions for different operators to meet the different usage requirements of the user ports. Due to the large number of operators, the customized version is particularly large, which greatly increases the development and maintenance workload. In addition, with the application of LTE technology, high-speed Internet access is undoubtedly a must-have capability for USB network cards. It can be seen from the above port characteristics that NDIS5.1, NDIS6.2 and MBIM will become the mainstream development direction of USB device ports in the future due to the ability to transmit large aggregation packets. When the carrier needs to change from a port such as RNDIS to a user port of NDIS5.1, NDIS6.2, or MBIM later, it has to be implemented by upgrading the device version, and the device may generate various faults during the upgrade process. There are even problems with the computer blue screen or device crash.
综上所述,出现这些问题的根本原因在于目前的设备把运营商对端口的需求固化在该设备的板侧驱动中。固定的板侧驱动版本,只能上报该运营商当前定制的用户端口,如果要更换用户端口,则必须通过升级板侧驱动来更换新的用户端口。假如板侧驱动能根据不同运营商在不同操作系统上的需求,自适应上报该运营商定制的各种端口需求,这样一个板侧驱动版本就兼容了不同运营商的所有定制要求,节省了开发成本和研发周期,而且运营商不需要后期升级就可以在不同的用户端口之间自由切换,这样带来驱动版本和升级频率的减少,大大降低了设备驱动的开发和维护成本。In summary, the root cause of these problems is that current devices solidify the operator's demand for ports in the board-side drive of the device. A fixed board-side driver version can only report the user port currently customized by the carrier. If you want to replace the user port, you must replace the new user port by upgrading the board-side driver. If the board-side driver can adaptively report various port requirements customized by the operator according to the requirements of different operators on different operating systems, such a board-side driver version is compatible with all customization requirements of different operators, saving development. Cost and R&D cycle, and operators can switch between different user ports without post-upgrade, which reduces the driver version and upgrade frequency, greatly reducing the development and maintenance costs of device drivers.
发明内容Summary of the invention
本发明的目的在于提供一种端口自适应配置的方法及相关系统、计算机存储介质,实现了一个板侧驱动就可以满足各种端口定制的要求,同时也避免了运营商改变端口模式必须采用升级设备固件方式的问题,大大降低了研发周期和开发维护成本。The object of the present invention is to provide a method for port adaptive configuration, a related system, and a computer storage medium, which can realize the requirement of various port customizations by a board-side driver, and also avoids the need for the operator to change the port mode. The problem of the device firmware mode greatly reduces the development cycle and development and maintenance costs.
为了达到上述目的,本发明实施例提供了一种端口自适应配置的方法,应用于通用串行总线USB设备,方法包括:In order to achieve the above object, an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a universal serial bus USB device, and the method includes:
获取USB设备所使用操作系统的信息; Obtain information about the operating system used by the USB device;
根据操作系统的信息,获取USB设备所使用操作系统的端口配置信息;Obtain port configuration information of an operating system used by the USB device according to information of the operating system;
根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置,使操作系统根据所设置的端口配置指令将USB设备切换至对应端口。According to the information of the operating system and the port configuration information, the port configuration command of the operating system is set, so that the operating system switches the USB device to the corresponding port according to the set port configuration instruction.
一具体实施例中,方法还包括:In a specific embodiment, the method further includes:
在USB插入时,获取操作系统将USB设备作为一个光盘存储设备的指令。At the time of USB insertion, an instruction is obtained that the operating system uses the USB device as an optical disk storage device.
一具体实施例中,根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置之后,方法还包括:In a specific embodiment, after the port configuration command of the operating system is set according to the information of the operating system and the port configuration information, the method further includes:
向操作系统发送移除光盘存储设备的指令,使操作系统根据移除光盘存储设备的指令,将USB设备切换至对应端口。Sending an instruction to the operating system to remove the optical disk storage device, causing the operating system to switch the USB device to the corresponding port according to an instruction to remove the optical disk storage device.
一具体实施例中,获取USB设备所使用操作系统的信息,包括:In a specific embodiment, obtaining information about an operating system used by the USB device includes:
获取操作系统的版本号,版本号包括主版本号和次版本号;Obtain the version number of the operating system, and the version number includes a major version number and a minor version number;
根据主版本号与次版本号获取操作系统的信息。Obtain information about the operating system based on the major version number and the minor version number.
一具体实施例中,获取USB设备所使用操作系统的端口配置信息,包括:In a specific embodiment, obtaining port configuration information of an operating system used by the USB device includes:
根据操作系统的信息以及预先存储在光盘存储设备中的操作系统与端口配置信息的对应关系,读取端口配置信息。The port configuration information is read according to the information of the operating system and the correspondence between the operating system and the port configuration information stored in advance in the optical disk storage device.
本发明实施例还包括一种端口自适应配置的USB设备的管理系统,USB设备的管理系统包括:The embodiment of the invention further includes a management system of a USB device configured by port adaptation, and the management system of the USB device includes:
第一获取模块,配置为获取USB设备所使用操作系统的信息;The first obtaining module is configured to obtain information about an operating system used by the USB device;
第二获取模块,配置为根据操作系统的信息,获取USB设备所使用操作系统的端口配置信息;The second obtaining module is configured to obtain port configuration information of an operating system used by the USB device according to information of the operating system;
响应模块,配置为根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置,使操作系统根据所设置的端口配置指令将USB 设备切换至对应端口。The response module is configured to set the port configuration command of the operating system according to the information of the operating system and the port configuration information, so that the operating system sends the USB according to the configured port configuration command. The device switches to the corresponding port.
一具体实施例中,USB设备的管理系统还包括第三获取模块,配置为在USB插入时,获取操作系统将USB设备作为一个光盘存储设备的指令。In a specific embodiment, the management system of the USB device further includes a third obtaining module configured to acquire an instruction of the operating system to use the USB device as an optical disk storage device when the USB is inserted.
一具体实施例中,USB设备的管理系统还包括第一指令发送模块,配置为在响应模块根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置之后向操作系统发送移除光盘存储设备的指令,使操作系统根据移除光盘存储设备的指令,将USB设备切换至对应端口。In a specific embodiment, the management system of the USB device further includes a first instruction sending module configured to send the removal to the operating system after the response module sets the port configuration command of the operating system according to the operating system information and the port configuration information. An instruction of the optical disk storage device causes the operating system to switch the USB device to the corresponding port according to an instruction to remove the optical disk storage device.
一具体实施例中,第一获取模块包括:In a specific embodiment, the first obtaining module includes:
第一获取子单元,配置为获取操作系统的版本号,版本号包括主版本号和次版本号;The first obtaining subunit is configured to obtain a version number of the operating system, where the version number includes a major version number and a minor version number;
第二获取子单元,配置为根据主版本号与次版本号获取操作系统的信息。The second obtaining subunit is configured to obtain information about the operating system according to the major version number and the minor version number.
一具体实施例中,第二获取模块根据操作系统的信息以及预先存储在光盘存储设备中的操作系统与端口配置信息的对应关系,读取端口配置信息。In a specific embodiment, the second obtaining module reads the port configuration information according to the information of the operating system and the correspondence between the operating system and the port configuration information pre-stored in the optical disk storage device.
本发明的实施例还包括一种端口自适应配置的方法,应用于USB设备的驱动系统,方法包括:The embodiment of the present invention further includes a method for port adaptive configuration, which is applied to a driving system of a USB device, and the method includes:
获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令;Obtaining a port configuration command after the USB device sets the port configuration command of the operating system according to the information of the operating system and the port configuration information;
根据所设置的端口配置指令将USB设备切换至对应端口;Switching the USB device to the corresponding port according to the set port configuration command;
向操作系统上报对应端口。Report the corresponding port to the operating system.
一具体实施例中,方法还包括:In a specific embodiment, the method further includes:
在USB设备插入时,接收操作系统下发的请求指令;Receiving a request instruction issued by the operating system when the USB device is inserted;
判断请求指令中是否携带端口配置指令,若携带端口配置指令,则根据端口配置指令选定对应端口;若未携带端口配置指令,则向下执行获取 USB设备设置后的端口配置指令的步骤。Determine whether the port command is carried in the request command. If the port configuration command is carried, the corresponding port is selected according to the port configuration command; if the port configuration command is not carried, the acquisition is performed downward. The steps of the port configuration command after the USB device is set.
一具体实施例中,在判断请求指令中携带端口配置指令,根据端口配置指令选定对应端口之后,方法还包括向操作系统上报对应端口的步骤。In a specific embodiment, after the port requesting instruction is carried in the determining request command, and the corresponding port is selected according to the port configuration command, the method further includes the step of reporting the corresponding port to the operating system.
一具体实施例中,在判断请求指令中未携带端口配置指令之后,执行获取USB设备设置后的端口配置指令之前,方法还包括向操作系统发出将USB设备上报为一个光盘存储设备的指令的步骤。In a specific embodiment, after the obtaining the port configuration command in the request command, the method further includes the step of issuing an instruction to report the USB device as an optical disk storage device to the operating system before the obtaining the port configuration command after the USB device is set. .
一具体实施例中,根据所设置的端口配置指令将USB设备切换至对应端口,包括:In a specific embodiment, the USB device is switched to the corresponding port according to the set port configuration command, including:
获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令之后,响应移除光盘存储设备的指令;Obtaining an instruction of the USB device to respond to the removal of the optical disk storage device after the port configuration command is set according to the operating system information and the port configuration information;
根据所设置的端口配置指令和移除光盘存储设备的指令,将USB设备切换至对应端口。The USB device is switched to the corresponding port according to the set port configuration command and the instruction to remove the optical disk storage device.
本发明实施例还包括一种端口自适应配置的USB设备的驱动系统,USB设备的驱动系统包括:The embodiment of the invention further includes a drive system of a port device adaptively configured by a USB device, and the drive system of the USB device includes:
第四获取模块,配置为获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令;The fourth obtaining module is configured to obtain a port configuration command after the USB device sets the port configuration command of the operating system according to the operating system information and the port configuration information;
执行模块,配置为根据所设置的端口配置指令将USB设备切换至对应端口;An execution module configured to switch the USB device to the corresponding port according to the set port configuration instruction;
上报模块,配置为向操作系统上报对应端口。The reporting module is configured to report the corresponding port to the operating system.
一具体实施例中,USB设备的驱动系统还包括:In a specific embodiment, the driving system of the USB device further includes:
请求接收模块,配置为在USB设备插入时,接收操作系统下发的请求指令;The request receiving module is configured to receive a request instruction sent by the operating system when the USB device is inserted;
判断模块,配置为判断请求指令中是否携带端口配置指令,The determining module is configured to determine whether the request instruction carries a port configuration instruction,
决策模块,配置为当判断模块判断请求指令中携带端口配置指令时, 根据端口配置指令选定对应端口;a decision module configured to: when the determining module determines that the request instruction carries a port configuration instruction, Select the corresponding port according to the port configuration command;
当判断模块判断请求指令中未携带端口配置指令,则向第四获取模块发送反馈指令,使第四获取模块获取端口配置指令。When the determining module determines that the port instruction is not carried in the request instruction, sending a feedback instruction to the fourth acquiring module, so that the fourth acquiring module acquires the port configuration command.
一具体实施例中,决策模块根据端口配置指令选定对应端口之后,上报模块向操作系统上报对应端口。In a specific embodiment, after the decision module selects the corresponding port according to the port configuration command, the reporting module reports the corresponding port to the operating system.
一具体实施例中,USB设备的驱动系统还包括第二指令发送模块,配置为当判断模块判断请求指令中未携带端口配置指令时,第四获取模块获取USB设备设置后的端口配置指令之前,向操作系统发出将USB设备上报为一个光盘存储设备的指令。In a specific embodiment, the driving system of the USB device further includes a second instruction sending module configured to: when the determining module determines that the request instruction does not carry the port configuration instruction, and before the fourth obtaining module acquires the port configuration command after the USB device is set, An instruction to report the USB device as a disc storage device to the operating system.
一具体实施例中,执行模块包括:In a specific embodiment, the execution module includes:
第一子单元,配置为在第四获取模块获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令之后,响应移除光盘存储设备的指令;The first sub-unit is configured to: after acquiring, by the fourth obtaining module, the USB device according to the operating system information and port configuration information, after setting the port configuration command after the port configuration command of the operating system, responding to the instruction to remove the optical disc storage device;
第二子单元,配置为根据所设置的端口配置指令和移除光盘存储设备的指令,将USB设备切换至对应端口。The second subunit is configured to switch the USB device to the corresponding port according to the set port configuration instruction and the instruction to remove the optical disc storage device.
本发明实施例还包括一种端口自适应配置的系统,包括上述的USB设备的管理系统和USB设备的驱动系统。The embodiment of the invention further includes a system for port adaptive configuration, including the above-mentioned management system of the USB device and the drive system of the USB device.
本发明实施例还包括一种计算机存储介质,其中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。Embodiments of the invention also include a computer storage medium having stored therein computer executable instructions for performing the methods described above.
本发明实施例的端口自适应配置的方法中,当USB设备插入操作系统时,根据获取的操作系统的信息和端口配置信息对操作系统的配置指令进行设置,使得操作系统根据所设置的端口配置指令将USB设备切换至对应端口,从而实现一个板侧驱动就可以满足各种端口定制的需求,同时也避免了运营商改变端口模式必须采用升级设备固件方式的问题,大大降低了研发周期和开发维护成本。 In the port adaptive configuration method of the embodiment of the present invention, when the USB device is inserted into the operating system, the configuration command of the operating system is set according to the acquired information of the operating system and the port configuration information, so that the operating system is configured according to the configured port. The command switches the USB device to the corresponding port, so that a board-side driver can meet the requirements of various port customizations, and also avoids the problem that the operator needs to upgrade the device firmware mode when changing the port mode, which greatly reduces the development cycle and development. Maintenance costs.
图1为本发明实施例的应用于通用串行总线USB设备的端口自适应配置的方法的步骤流程图;1 is a flow chart showing the steps of a method for port adaptive configuration applied to a universal serial bus USB device according to an embodiment of the present invention;
图2为本发明实施例中图1中步骤11的流程图;2 is a flowchart of
图3为本发明实施例中图2中步骤112的流程图;3 is a flowchart of
图4为本发明实施例的端口自适应配置的USB设备的管理系统的结构示意图;4 is a schematic structural diagram of a management system of a USB device configured by port adaptation according to an embodiment of the present invention;
图5为本发明实施例的应用于USB设备的驱动系统的端口自适应配置的方法的步骤流程图;5 is a flow chart showing the steps of a method for port adaptive configuration of a drive system applied to a USB device according to an embodiment of the present invention;
图6为本发明实施例中图4中步骤42的流程图;6 is a flowchart of
图7为本发明实施例的端口自适应配置的USB设备的驱动系统的结构示意图;FIG. 7 is a schematic structural diagram of a drive system of a USB device configured by port adaptation according to an embodiment of the present invention; FIG.
图8为本发明实施例的端口自适应配置的系统的结构示意图;以及FIG. 8 is a schematic structural diagram of a system for port adaptive configuration according to an embodiment of the present invention;
图9为本发明实施例的端口自适应配置的系统的流程图。FIG. 9 is a flowchart of a system for port adaptive configuration according to an embodiment of the present invention.
为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the present invention will be more clearly described in the following description.
本发明针对现有技术中设备板侧驱动只上报该运营商定制的用户端口,无法实现一个板侧驱动版本自适应实现所有运营商不同用户端口需求的问题,提供了一种端口自适应配置的方法、管理系统、驱动系统及系统,当USB设备插入操作系统时,根据获取的操作系统的信息和端口配置信息对操作系统的配置指令进行设置,使得操作系统根据所设置的端口配置指令将USB设备切换至对应端口,从而实现一个板侧驱动就可以满足各种端口定制的需求,同时也避免了运营商改变端口模式必须采用升级设备固件方式的问题,大大降低了研发周期和开发维护成本。 The present invention is directed to the device-side drive of the device that only reports the user port customized by the operator, and cannot implement the problem that a board-side driver version adaptively implements different user port requirements of all operators, and provides a port adaptive configuration. The method, the management system, the drive system, and the system, when the USB device is inserted into the operating system, set the configuration command of the operating system according to the acquired operating system information and the port configuration information, so that the operating system sends the USB according to the configured port configuration instruction. The device is switched to the corresponding port, so that one board-side driver can meet the requirements of various port customizations, and the problem that the operator needs to upgrade the device firmware mode by changing the port mode is avoided, which greatly reduces the development cycle and development and maintenance costs.
如图1所示,本发明实施例提供了一种端口自适应配置的方法,应用于通用串行总线USB设备,包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a universal serial bus USB device, including:
步骤11,获取USB设备所使用操作系统的信息;Step 11: Obtain information about an operating system used by the USB device.
本发明的具体实施例中,操作系统为Host操作系统,操作系统的信息是指操作系统的版本。In the specific embodiment of the present invention, the operating system is the Host operating system, and the information of the operating system refers to the version of the operating system.
步骤12,根据操作系统的信息,获取USB设备所使用操作系统的端口配置信息;Step 12: Obtain port configuration information of an operating system used by the USB device according to information of the operating system.
本发明的具体实施例中,运营商定制端口需求的配置文件包括操作系统和配置指令两部分,二者的对应关系如表1所示:In the specific embodiment of the present invention, the configuration file of the operator customized port requirement includes an operating system and a configuration instruction, and the corresponding relationship between the two is as shown in Table 1:
表1Table 1
该配置文件中信息格式固定,内容来源于运营商对用户端口的需求,因此根据步骤11获取的操作系统的信息可确定端口的配置指令。The information format of the configuration file is fixed, and the content is derived from the operator's requirement for the user port. Therefore, according to the information of the operating system obtained in
步骤13,根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置,使操作系统根据所设置的端口配置指令将USB设备切换至对应端口。Step 13: Set the port configuration command of the operating system according to the information of the operating system and the port configuration information, so that the operating system switches the USB device to the corresponding port according to the set port configuration instruction.
本发明的具体实施例中,根据步骤11获取的操作系统的信息和步骤12获取的端口配置信息在操作系统中对端口配置指令进行设置,以满足运营商的要求。In a specific embodiment of the present invention, the port configuration command is set in the operating system according to the information of the operating system acquired in
可选地,本发明的上述实施例中,在执行步骤11之前,该方法还包括:在USB插入时,获取操作系统将USB设备作为一个光盘存储设备的指令。Optionally, in the foregoing embodiment of the present invention, before performing
本发明的具体实施例中,光盘存储设备采用只读光盘(CDROM),其中只读光盘(CDROM)中存放了集成用户端口管理模块的应用安装程序,且上述配置文件集成在用户端口管理模块中。In a specific embodiment of the present invention, an optical disk storage device uses a read-only optical disk (CDROM), wherein an application installation program of an integrated user port management module is stored in a read-only optical disk (CDROM), and the above configuration file is integrated in a user port management module. .
可选地,本发明的上述实施例中,执行步骤13后,该方法还包括:向
操作系统发送移除光盘存储设备的指令,使操作系统根据移除光盘存储设备的指令,将USB设备切换至对应端口。Optionally, in the foregoing embodiment of the present invention, after performing
本发明的具体实施例中,对操作系统的端口配置指令设置完成后,需要将只读光盘(CDROM)进行移除,以便出现运营商定制的用户端口。In a specific embodiment of the present invention, after the port configuration command of the operating system is set, the CD-ROM needs to be removed, so that the operator-customized user port appears.
如图2所示,本发明的上述实施例中,获取USB设备所使用操作系统的信息,包括:As shown in FIG. 2, in the foregoing embodiment of the present invention, obtaining information about an operating system used by a USB device includes:
步骤111,获取操作系统的版本号,版本号包括主版本号和次版本号;Step 111: Obtain a version number of the operating system, where the version number includes a major version number and a minor version number.
本发明的具体实施例中,通过调用WIN32API函数来获取系统的版本号。In a specific embodiment of the invention, the version number of the system is obtained by calling the WIN32 API function.
步骤112,根据主版本号与次版本号获取操作系统的信息。Step 112: Obtain information about the operating system according to the major version number and the minor version number.
本发明的具体实施例中,如图3所示,步骤112的流程如下:In a specific embodiment of the present invention, as shown in FIG. 3, the process of
步骤1121,如果主次版本号分别为5和1,则确定当前操作系统是XP,如果不是,则继续判断;
步骤1122,如果主次版本号分别为6和0,则确定当前操作系统是VISTA,如果不是,则继续判断;Step 1122: If the primary and secondary version numbers are 6 and 0, respectively, determine that the current operating system is VISTA, and if not, continue to determine;
步骤1123,如果主次版本号分别为6和1,则确定当前操作系统是Windows7,如果不是,则继续判断;
步骤1124,如果主次版本号分别为6和2,则确定当前操作系统是Windows8,如果不是,则继续判断;
步骤1125,如果主次版本号分别为6和3,则确定当前操作系统是Windows8.1。In
本发明的上述实施例中,获取USB设备所使用操作系统的端口配置信息,包括:In the foregoing embodiment of the present invention, obtaining port configuration information of an operating system used by the USB device includes:
根据操作系统的信息以及预先存储在光盘存储设备中的操作系统与端口配置信息的对应关系,读取端口配置信息。 The port configuration information is read according to the information of the operating system and the correspondence between the operating system and the port configuration information stored in advance in the optical disk storage device.
本发明的具体实施例中,运营商定制端口需求的配置文件集成在只读光盘(CDROM)的用户端口管理模块中,因此可以根据操作系统的信息读取端口配置信息。In a specific embodiment of the present invention, the configuration file of the operator customized port requirement is integrated in the user port management module of the compact disk (CDROM), so the port configuration information can be read according to the information of the operating system.
为了更好的实现上述目的,如图4所示,本发明实施例还提供一种端口自适应配置的USB设备的管理系统40,包括:In order to achieve the above purpose, as shown in FIG. 4, the embodiment of the present invention further provides a port device adaptive configuration USB
第一获取模块41,配置为获取USB设备所使用操作系统的信息;The first obtaining
第二获取模块42,配置为根据操作系统的信息,获取USB设备所使用操作系统的端口配置信息;The second obtaining
响应模块43,配置为根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置,使操作系统根据所设置的端口配置指令将USB设备切换至对应端口。The
可选地,本发明的USB设备的管理系统40还包括第三获取模块,配置为在USB插入时,获取操作系统将USB设备作为一个光盘存储设备的指令。Optionally, the
可选地,本发明的USB设备的管理系统40还包括第一指令发送模块,配置为在响应模块根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置之后向操作系统发送移除光盘存储设备的指令,使操作系统根据移除光盘存储设备的指令,将USB设备切换至对应端口。Optionally, the
其中,第一获取模块41包括:The first obtaining
第一获取子单元,配置为获取操作系统的版本号,版本号包括主版本号和次版本号;The first obtaining subunit is configured to obtain a version number of the operating system, where the version number includes a major version number and a minor version number;
第二获取子单元,配置为根据主版本号与次版本号获取操作系统的信息。The second obtaining subunit is configured to obtain information about the operating system according to the major version number and the minor version number.
其中,第二获取模块42根据操作系统的信息以及预先存储在光盘存储设备中的操作系统与端口配置信息的对应关系,读取端口配置信息。
The second obtaining
本发明的具体实施例中,上述USB设备的管理系统的各模块都可集成在只读光盘(CDROM)的用户端口管理模块中。In a specific embodiment of the present invention, each module of the management system of the above USB device can be integrated into a user port management module of a compact disk (CDROM).
如图5所示,本发明实施例提供一种端口自适应配置的方法,应用于USB设备的驱动系统,包括:As shown in FIG. 5, an embodiment of the present invention provides a method for port adaptive configuration, which is applied to a driving system of a USB device, including:
步骤51,获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令;Step 51: Obtain a port configuration instruction after the USB device sets the port configuration command of the operating system according to the information of the operating system and the port configuration information.
步骤52,根据所设置的端口配置指令将USB设备切换至对应端口;Step 52: Switch the USB device to the corresponding port according to the set port configuration instruction.
步骤53,向操作系统上报对应端口。Step 53: Report the corresponding port to the operating system.
本发明的具体实施例中,接收上述USB设备设置后的端口配置指令,对设置后的端口配置指令作出响应,并将设置后的端口配置指令上报给操作系统,从而成功将USB设备切换至运营商定制的对应端口,其中端口与端口配置指令的对应关系如表2所示:In a specific embodiment of the present invention, the port configuration command after the setting of the USB device is received, and the configured port configuration command is responded, and the set port configuration command is reported to the operating system, thereby successfully switching the USB device to the operation. The corresponding port of the customer customization, wherein the correspondence between the port and the port configuration command is as shown in Table 2:
表2Table 2
可选地,本发明的上述实施例中,在执行步骤51之前,该方法还包括:Optionally, in the foregoing embodiment of the present invention, before performing
在USB设备插入时,接收操作系统下发的请求指令;Receiving a request instruction issued by the operating system when the USB device is inserted;
判断请求指令中是否携带端口配置指令,若携带端口配置指令,则根据端口配置指令选定对应端口;若未携带端口配置指令,则向下执行获取USB设备设置后的端口配置指令的步骤。Determine whether the port command is carried in the request command. If the port configuration command is carried, the corresponding port is selected according to the port configuration command; if the port configuration command is not carried, the step of obtaining the port configuration command after the USB device setting is performed downward.
本发明的具体实施例中,当USB设备插入操作系统时,操作系统会下发一条请求指令,若此请求指令中携带端口配置指令,则根据此端口配置指令选定运营商定制的对应端口,若为携带端口配置指令,则向下执行步骤51。In a specific embodiment of the present invention, when the USB device is inserted into the operating system, the operating system sends a request command, and if the request command carries the port configuration command, the corresponding port customized by the operator is selected according to the port configuration command. If the port configuration command is carried,
可选地,本发明的上述实施例中,根据端口配置指令选定对应端口之 后,该方法还包括向操作系统上报对应端口的步骤,结束流程。Optionally, in the foregoing embodiment of the present invention, the corresponding port is selected according to the port configuration instruction. The method further includes the step of reporting the corresponding port to the operating system, and ending the process.
可选地,本发明的上述实施例中,执行获取USB设备设置后的端口配置指令之前,还包括向操作系统发出将USB设备上报为一个光盘存储设备的指令的步骤。Optionally, in the foregoing embodiment of the present invention, before performing the obtaining the port configuration command after the USB device is set, the method further includes the step of issuing an instruction to the operating system to report the USB device as an optical disk storage device.
本发明的具体实施例中,光盘存储设备采用只读光盘(CDROM),此只读光盘(COROM)中存储了用户端口管理模块的应用安装程序,向操作系统上报此光盘存储设备,便于安装用户端口管理模块。In a specific embodiment of the present invention, the optical disk storage device uses a read-only optical disk (CDROM). The read-only optical disk (COROM) stores an application installation program of the user port management module, and reports the optical disk storage device to the operating system to facilitate installation of the user. Port management module.
如图6所示,本发明的上述实施例中,根据所设置的端口配置指令将USB设备切换至对应端口,包括:As shown in FIG. 6, in the above embodiment of the present invention, switching the USB device to the corresponding port according to the set port configuration command includes:
步骤521,获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令之后,响应移除光盘存储设备的指令;Step 521: After obtaining the port configuration command after the USB port device sets the port configuration command of the operating system according to the operating system information and the port configuration information, responding to the instruction to remove the optical disk storage device;
步骤522,根据所设置的端口配置指令和移除光盘存储设备的指令,将USB设备切换至对应端口。Step 522: Switch the USB device to the corresponding port according to the set port configuration command and the instruction to remove the optical disk storage device.
本发明的具体实施例中,在获取到设置后的端口配置指令之后,需要将光盘存储设备移除,以便出现运营商定制的对应的端口时USB设备切换至此对应端口。In a specific embodiment of the present invention, after the set port configuration command is obtained, the optical disk storage device needs to be removed, so that the USB device switches to the corresponding port when a corresponding port customized by the operator appears.
为了更好的实现上述目的,如图7所示,本发明实施例还提供一种端口自适应配置的USB设备的驱动系统70,包括:In order to achieve the above objective, as shown in FIG. 7, the embodiment of the present invention further provides a
第四获取模块71,配置为获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令;The fourth obtaining
执行模块72,配置为根据所设置的端口配置指令将USB设备切换至对应端口;The executing
上报模块73,配置为向操作系统上报对应端口。The reporting
可选地,本发明的USB设备的驱动系统还包括: Optionally, the driving system of the USB device of the present invention further includes:
请求接收模块,配置为在USB设备插入时,接收操作系统下发的请求指令;The request receiving module is configured to receive a request instruction sent by the operating system when the USB device is inserted;
判断模块,配置为判断请求指令中是否携带端口配置指令,The determining module is configured to determine whether the request instruction carries a port configuration instruction,
决策模块,配置为当判断模块判断请求指令中携带端口配置指令时,根据端口配置指令选定对应端口;a decision module, configured to: when the determining module determines that the request instruction carries a port configuration instruction, select a corresponding port according to the port configuration instruction;
当判断模块判断请求指令中未携带端口配置指令,则向第四获取模块发送反馈指令,使第四获取模块获取端口配置指令。When the determining module determines that the port instruction is not carried in the request instruction, sending a feedback instruction to the fourth acquiring module, so that the fourth acquiring module acquires the port configuration command.
可选地,决策模块根据端口配置指令选定对应端口之后,上报模块向操作系统上报对应端口。Optionally, after the determining module selects the corresponding port according to the port configuration command, the reporting module reports the corresponding port to the operating system.
可选地,本发明的USB设备的驱动系统还包括第二指令发送模块,配置为当判断模块判断请求指令中未携带端口配置指令时,第四获取模块获取USB设备设置后的端口配置指令之前,向操作系统发出将USB设备上报为一个光盘存储设备的指令。Optionally, the driving system of the USB device of the present invention further includes a second instruction sending module configured to: when the determining module determines that the request instruction does not carry the port configuration instruction, the fourth obtaining module acquires the port configuration command after the USB device is set , an instruction to the operating system to report the USB device as an optical disk storage device.
其中,执行模块72包括:The
第一子单元,配置为在第四获取模块获取USB设备根据操作系统的信息和端口配置信息,对操作系统的端口配置指令进行设置后的端口配置指令之后,响应移除光盘存储设备的指令;The first sub-unit is configured to: after acquiring, by the fourth obtaining module, the USB device according to the operating system information and port configuration information, after setting the port configuration command after the port configuration command of the operating system, responding to the instruction to remove the optical disc storage device;
第二子单元,配置为根据所设置的端口配置指令和移除光盘存储设备的指令,将USB设备切换至对应端口。The second subunit is configured to switch the USB device to the corresponding port according to the set port configuration instruction and the instruction to remove the optical disc storage device.
为了更好的实现上述目的,如图8所示,本发明的实施例提供一种端口自适应配置的系统80,包括上述的USB设备的管理系统40和USB设备的驱动系统70。In order to better achieve the above objective, as shown in FIG. 8, an embodiment of the present invention provides a
本发明的具体实施例中,上述USB设备的管理系统40和USB设备的驱动系统70的实施例及有益效果均适用于该系统80,该系统80的流程如图9所示。
In the specific embodiment of the present invention, the embodiments and the beneficial effects of the
本发明实施例还包括一种计算机存储介质,其中存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一实施例所述的方法。Embodiments of the present invention also include a computer storage medium having stored therein computer executable instructions for performing the method of any of the above embodiments.
上述各单元或模块可以由电子设备中的中央处理器(Central Processing Unit,CPU)、数字信号处理器(Digital Signal Processor,DSP)或可编程逻辑阵列(Field-Programmable Gate Array,FPGA)实现。Each of the above units or modules may be implemented by a central processing unit (CPU), a digital signal processor (DSP), or a field-programmable gate array (FPGA) in an electronic device.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. Instructions are provided for implementation The steps of a function specified in a block or blocks of a flow or a flow and/or a block diagram of a flow chart.
Claims (22)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410431688.9 | 2014-08-28 | ||
| CN201410431688.9A CN104199789B (en) | 2014-08-28 | 2014-08-28 | Method, management system, drive system and the system of autosensing configuration |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2015117378A1 true WO2015117378A1 (en) | 2015-08-13 |
Family
ID=52085085
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2014/089063 Ceased WO2015117378A1 (en) | 2014-08-28 | 2014-10-21 | Method and related system for adaptively configuring port, and computer storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN104199789B (en) |
| WO (1) | WO2015117378A1 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106170778B (en) * | 2015-02-13 | 2019-04-19 | 华为技术有限公司 | A method for switching USB driver version and USB device |
| CN106301860A (en) * | 2015-06-08 | 2017-01-04 | 西安中兴新软件有限责任公司 | A kind of support the method for heterogeneous networks interface, USB device and system |
| CN105573934B (en) * | 2015-12-11 | 2019-11-12 | 北京元心科技有限公司 | Method and device for operating multi-system slave device to access master device through USB connection |
| CN113032297B (en) * | 2021-02-23 | 2023-12-29 | 西安广和通无线软件有限公司 | Configuration method and device of USB network card equipment, computer equipment and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1471007A (en) * | 2002-07-26 | 2004-01-28 | 赫扬科技股份有限公司 | USB direct on-line display switching device and method |
| CN101609408A (en) * | 2009-06-19 | 2009-12-23 | 中兴通讯股份有限公司 | A method and system for realizing self-starting of terminal equipment |
| CN101714925A (en) * | 2009-11-09 | 2010-05-26 | 深圳华为通信技术有限公司 | Method and system for managing ports of communication equipment, management equipment and communication equipment |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102375786B (en) * | 2011-10-18 | 2014-09-10 | 中兴通讯股份有限公司 | Automatic operating system identifying method and system for USB (Universal Serial Bus) equipment |
-
2014
- 2014-08-28 CN CN201410431688.9A patent/CN104199789B/en active Active
- 2014-10-21 WO PCT/CN2014/089063 patent/WO2015117378A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1471007A (en) * | 2002-07-26 | 2004-01-28 | 赫扬科技股份有限公司 | USB direct on-line display switching device and method |
| CN101609408A (en) * | 2009-06-19 | 2009-12-23 | 中兴通讯股份有限公司 | A method and system for realizing self-starting of terminal equipment |
| CN101714925A (en) * | 2009-11-09 | 2010-05-26 | 深圳华为通信技术有限公司 | Method and system for managing ports of communication equipment, management equipment and communication equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104199789B (en) | 2018-01-16 |
| CN104199789A (en) | 2014-12-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104202194B (en) | The collocation method and device of PCIe topologys | |
| US20130055254A1 (en) | Methods and apparatuses for providing a virtual machine with dynamic assignment of a physical hardware resource | |
| US11789718B2 (en) | System and method for subscription based solution modification implementation | |
| WO2018040746A1 (en) | Driver installation method, device, and electronic apparatus | |
| WO2017121153A1 (en) | Software upgrading method and device | |
| CN114201197A (en) | Firmware upgrade method, device, electronic device and readable storage medium | |
| WO2015117378A1 (en) | Method and related system for adaptively configuring port, and computer storage medium | |
| CN101650694B (en) | USB device, computer and method for achieving virtual device allocation of USB device | |
| WO2016058427A1 (en) | Usb wireless network card configuration method, host, usb wireless network card and communication system | |
| CN107357743A (en) | A kind of method and device for controlling USB device | |
| CN106484464A (en) | Tuner chip driving method and electronic equipment | |
| CN115469964A (en) | Method and device for determining mapping relationship between block device and virtual machine drive letter | |
| US20180203726A1 (en) | Virtual machine migration method and apparatus | |
| CN111190621A (en) | Firmware burning method, device, system, terminal device and storage medium | |
| CN110795205A (en) | System and method for providing cloud service based on software container | |
| CN106325859B (en) | Method and server for installing drivers | |
| JP2013513874A (en) | Data card upgrade method and device | |
| US20190205156A1 (en) | Container access method and apparatus | |
| CN102265256A (en) | An upgrade control method and a chip of a communication equipment and the communication equipment | |
| WO2020000657A1 (en) | Method and apparatus for establishing operation and maintenance monitoring connection, terminal device, and medium | |
| CN103123594A (en) | Running mode switching method of data terminal, device and data terminal | |
| WO2015154690A1 (en) | Charging socket and mobile terminal processing method based on charging socket | |
| US12229597B2 (en) | Electronic device and method for controlling electronic device | |
| US10049070B2 (en) | Data card, and data card switching method and apparatus | |
| CN110347624B (en) | Method, device and equipment for adjusting basic input and output system setting |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14881799 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 14881799 Country of ref document: EP Kind code of ref document: A1 |