The embodiment of the invention provides a kind of method, system and equipment of the multiplexing data card port that is used to dial up on the telephone, and to realize the multiplexed port of data card, is user-friendly to data card and stores.
For achieving the above object, the embodiment of the invention proposes a kind of method of the multiplexing data card port that is used to dial up on the telephone, and comprising:
Device identification ID to first port of the described terminal of terminal reported data card correspondence is a CD ID, so that described terminal is modeled to CD with the disc area of the flash memory of described data card, and calls the CD program in the described data card;
Described CD program is used to detect backstage and the driving whether described terminal has installed described data card, if do not install, the port mode of then changing described first port is the USB flash disk pattern, and the backstage and the driving of described data card are installed; On the backstage that described data card is installed and after driving, restart described data card;
If install, then according to the port mode of described first port, be USB flash disk ID, so that described terminal becomes USB flash disk with the USB flash disk regional simulation of the flash memory of described data card to the device id of described first port of described terminal to report.
The embodiment of the invention also proposes a kind of system of the multiplexing data card port that is used to dial up on the telephone, and comprising:
Terminal is used to receive the device identification ID of first port of described terminal, with the corresponding region of the flash memory of the described first port corresponding equipment virtual be described device id corresponding equipment;
Data card, the device id that is used for to first port of the described terminal of described terminal to report data card correspondence is a CD ID; According to calling of described terminal, move the CD program in the disc area of flash memory of described data card, detect described terminal whether the backstage and the driving of described data card have been installed, if do not install, the port mode of then changing described first port is the USB flash disk pattern, and the backstage and the driving of described data card are installed; On the backstage that described data card is installed and after driving, described data card is restarted; If install,, be USB flash disk ID to the device id of described first port of described terminal to report then according to the port mode of described first port.
The embodiment of the invention also proposes a kind of data card that is used to dial up on the telephone, and comprising:
First reporting module, the device id that is used for to first port of the described terminal of terminal reported data card correspondence is a CD ID;
Detection module is used in described first reporting module according to calling of described terminal, detecting backstage and driving that whether described terminal has installed described data card after the device id of described terminal to report is CD ID;
Port mode is provided with module, is used for detecting at described detection module that described terminal is not installed the backstage of described data card and when driving, the port mode that described first port is set is the USB flash disk pattern; On the backstage that described data card is installed and after driving, restart described data card;
Second reporting module is used for detecting that described terminal has been installed the backstage of described data card and when driving at described detection module, according to described port mode the setting of module is set, and is USB flash disk ID to the device id of described first port of described terminal to report.
Compared with prior art, the technical scheme of the embodiment of the invention has the following advantages: by same port being modeled to two kinds of patterns of CD and USB flash disk, carry out only using when mutual the pattern of USB flash disk at terminal and data card, thereby improved user's experience, increased the differential competition ability of product.And optimized the original working mechanism of data card on implementation, realized the multiplexing of data card port, the user can carry out data storage easily when online, for the user has brought convenience when using data card to store.
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Generally, data card has the function of PNP (Plug and Play, plug and play), and a flash memory (Flash Memory) is arranged in it, is called for short Flash.The principal feature of Flash is also to keep canned data, Flash to belong to EEPROM (electrically erasable programmable ROM) type under situation about not powering up for a long time, and very high access speed is arranged, and be easy to wipe and rewrite, power consumption is very little, and capacity is bigger, can conveniently be used for storing data.After data card being inserted into the USB slot of terminal, terminal will be 3 zones with the Flash area dividing of data card, comprises NV (nonvolatile, non-volatile) zone, disc area and USB flash disk zone.Data card Flash dividing region is as shown in Figure 1: wherein,
The NV zone: be used to store the zone of NV item, wherein the NV item is used to refer to the port mode of given data card;
Disc area: be used to store the backstage dialer software;
USB flash disk zone: be used for storaging user data.
Terminal can be with regional virtual 3 ports that become of the Flash of data card, 3 ports are respectively CD port, PCUI (Personal Computer User Interface, the PC user interface) port and MODEM (MOdulator-DEModulator, modulator-demodular unit) port, wherein, the PCUI port is used for carrying out alternately with the backstage dialer software, and the MODEM port is used for carrying out alternately with network side, and the CD port then is used for information such as memory dialing software and storaging user data.The CD port can have CD pattern and two kinds of port modes of USB flash disk pattern.Wherein, the implementation of CD is the disc area in data card Flash zone, and terminal goes the form of this disc area according to CD to read, thereby this disc area is modeled to CD, and pattern at this moment is exactly the CD pattern.The implementation of USB flash disk is in the USB flash disk zone in data card Flash zone, and terminal goes the form of this USB flash disk zone according to USB flash disk to read, thereby this USB flash disk regional simulation is become USB flash disk, and pattern at this moment is exactly the USB flash disk pattern.Like this, just have CD and two kinds of patterns of USB flash disk simultaneously in the Flash zone of data card, and CD and USB flash disk use same port, thereby realized the multiplexing of data card port.Insert the USB slot of terminal at data card after, terminal becomes the CD pattern with this CD port mapping when installing first, and when installing once more, terminal will become the USB flash disk pattern with this CD port mapping.So just, can under the USB flash disk pattern of data card, carry out data storage.
An embodiment of the method for multiplexing data card port provided by the invention as shown in Figure 2, comprising:
Step S201 is a CD ID to the device identification ID of first port of the described terminal of terminal to report data card correspondence, so that described terminal is modeled to CD with the disc area of the flash memory of described data card, and calls the CD program in the described data card;
Step S202, described CD program is used to detect backstage and the driving whether described terminal has installed described data card, if do not install, the port mode of then changing described first port is the USB flash disk pattern, and the backstage and the driving of described data card are installed;
Step S203 if install, then according to the port mode of described first port, is USB flash disk ID to the device id of described first port of described terminal to report, so that described terminal becomes USB flash disk with the USB flash disk regional simulation of the flash memory of described data card.
As seen, in the embodiment of the invention, data card only is modeled to USB flash disk, has improved user's experience, the user can carry out data storage easily when online, for the user has brought convenience when using data card to store.
Another embodiment of the method for multiplexing data card port provided by the invention as shown in Figure 3, comprising:
Step S301 starts terminal, data card is inserted in the USB slot of terminal, then the service data card.
Step S302, the NV item in the terminal reading of data card NV zone, wherein the NV item is used to specify the port mode of data card, when the NV item is the USB flash disk pattern, forwards step S303 to, when the NV item is the CD pattern, forwards step S305 to.
Step S303, whether the terminal sense terminals has finished the installation of backstage and driver, if backstage and driver have been installed, forwards step S309 to, if backstage and driver are not installed, then forwards step S304 to.
Step S304, the NV item in the terminal data card NV zone is set to the CD pattern, forwards step S305 then to.
Step S305, after the data card operation, by the USB interface reporting terminal, make the Flash zone of terminal scanning data card, from begin to scan the interval that disc area finishes always, wherein, data card is to adopt SCSI (Small Computer System Interface, small computer system interface) order to carry out alternately with terminal.SCSI is a kind of independent processor standard that is used for the system-level interface between computing machine and the smart machine (comprising hard disk, floppy drive, CD-ROM drive, printer, scanner etc.), is the interface standard between various computing machines and the external unit.Scsi command is to be sent by starting outfit, allows certain operation that target device carries out, order be that form with byte stream sends by bus, and scsi command also is the command history of a class USB device.Data card reports by scsi command, and the instruction of the data card that terminal receives is that device id is a compact disk equipment, and terminal will be gone the disc area in scan-data card Flash zone according to the CD pattern then, thereby data card is modeled to CD.
Step S306, terminal is called the driver that data card carries, and uses automatic operation Auto Run (file that operating system the is called automatically) order in the driver, finishes the installation of backstage and drive software.
Step S307, terminal is after the installation of finishing backstage and drive software, data card is by the USB interface reporting terminal, terminal is still gone the disc area in scan-data card Flash zone according to the CD pattern, after the Auto Run in CD order detected backstage and drive software and installed, the port mode that terminal will the switch data card was provided with the NV item that is used for the storage port pattern of this moment, the NV item is set to the USB flash disk pattern, and the NV item is stored in the NV zone.
Step S308 restarts data card, forwards step S302 to.
Step S309, this moment, the NV item was the USB flash disk pattern, and backstage and drive software have been installed, terminal can be gone to the USB flash disk zone in scan-data card Flash zone, thereby data card is modeled to USB flash disk.The address area that terminal reads is the USB flash disk zone, to the operation that the USB flash disk zone of this data card can be read, and the also operation that can write, the USB flash disk zone of this data card is read-write zone.Under the USB flash disk pattern, terminal is given an order to the PCUI of data card port and MODEM port.Make the PCUI port and the backstage dialer software of data card carry out alternately, the MODEM port and the network side of data card carry out alternately.
Step S310, data card is connected with terminal by the USB slot, and the user can finish the operation of read-write, thereby realize the multiplexing of data card port easily in the enterprising line data storage in the USB flash disk zone of data card.
As seen, in the embodiment of the invention, by same port being modeled to two kinds of patterns of CD and USB flash disk, carry out only using when mutual the pattern of USB flash disk at terminal and data card, improved user's experience, realized the multiplexing of data card port, the user carries out data storage easily when online, for the user has brought convenience when using data card to store.
The embodiment of the invention also provides a kind of system of multiplexing data card port, as shown in Figure 4, comprising:
Terminal 10 is used to receive the device identification ID of first port of described terminal 10, with the corresponding region of the flash memory of the described first port corresponding equipment virtual be described device id corresponding equipment;
Data card 20, the device id that is used for to first port of the described terminal 10 of described terminal 10 reported data cards 20 correspondences is a CD ID; According to calling of described terminal 10, move the CD program in the disc area of flash memory of described data card 20, detect backstage and driving that whether described terminal 10 has installed described data card 20, if do not install, the port mode of then changing described first port is the USB flash disk pattern, and the backstage and the driving of described data card 20 are installed; If install, then according to the port mode of described first port, reporting the device id of described first port to described terminal 10 is USB flash disk ID.And by terminal 20 virtual three ports, comprising:
The PC user interface port is used for carrying out alternately with the backstage dialer software.
Modem port is used for carrying out alternately with network side.
The CD port can be used for memory dialing software and data message.
The embodiment of the invention also provides a kind of equipment of multiplexing data card port, and this equipment is data card 20, as shown in Figure 5, comprising:
First reporting module 200, the device id that is used for to first port of the described terminal 10 of terminal 10 reported data cards 20 correspondences is a CD ID;
Detection module 210 is used in described first reporting module 200 according to calling of described terminal 10, detecting backstage and driving that whether described terminal 10 has installed described data card 20 after the device id that described terminal 10 reports is CD ID;
Port mode is provided with module 220, is used for detecting at described detection module 210 that described terminal 10 is not installed the backstage of described data card 20 and when driving, the port mode that described first port is set is the USB flash disk pattern; Described port mode is provided with module 220 and specifically is used for detecting that described terminal 10 is not installed the backstage of described data card 20 and when driving at described detection module 210, be provided for storing the value of NV item of the port mode of described first port, make the corresponding USB flash disk pattern of value of described NV item;
Second reporting module 230, be used for detecting that described terminal 10 has been installed the backstage of described data card 20 and when driving at described detection module 210, according to described port mode the setting of module is set, reporting the device id of described first port to described terminal 10 is USB flash disk ID; Described second reporting module 230 specifically is used for detecting that described terminal 10 has been installed the backstage of described data card 20 and when driving at described detection module 210, read the NV item of the described first port correspondence, according to the port mode of described NV item record, reporting the device id of described first port to described terminal 10 is USB flash disk ID.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.