Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of family gateway equipment and on family gateway equipment the method for carry memory device, build for solving prior art that family expenses NAS cost is high, the problem of complicated operation.
Reach for achieving the above object other relevant purposes, the invention provides a kind of on family gateway equipment the method for carry memory device, be applied to hard-disk interface, and have in the gateway device of programmable functions, comprising: memory device is accessed to described home gateway; Described home gateway identification the described memory device of carry; The described memory device of warning terminal user carry; If the user accepts carry, by the user, configure described memory device; If the user does not accept, finish; By described memory device carry and be mapped in described terminal system.
Preferably, also comprise the step that described memory device is divided into to some zones between the step of described home gateway identification the described memory device of carry and the step of the described memory device of described warning terminal user carry, described by described memory device carry and be mapped in the step in described terminal system, different terminal systems is one or more zone in the described some zones of carry only.
The present invention also provides a kind of family gateway equipment, comprising: the controlled in wireless chip, for receiving and send wireless signal; Master chip, comprise the memory device expansion interface, application service module and management interface, and described home gateway user configures described application service module by described management interface; External storage equipment, be connected to described memory device expansion interface, is used to described home gateway user that network storage space is provided.
As mentioned above, family gateway equipment of the present invention reaches the method for carry memory device on family gateway equipment, and have following beneficial effect: needn't additionally buy family expenses NAS and just can realize the family data center, cost is low.And according to preferred implementation, the user data separate management, fail safe is good, simple to operate.
Embodiment
Below, by specific instantiation explanation embodiments of the present invention, those skilled in the art can understand other advantages of the present invention and effect easily by the disclosed content of this specification.The present invention can also be implemented or be applied by other different embodiment, and the every details in this specification also can be based on different viewpoints and application, carries out various modifications or change not deviating under spirit of the present invention.
Refer to accompanying drawing.It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, satisfy in graphic only show with the present invention in the assembly that has but not component count, shape and size drafting while implementing according to reality, during its actual enforcement, kenel, quantity and the ratio of each assembly can be a kind of random change, and its assembly layout kenel also may be more complicated.
At first consult Fig. 1, Fig. 1 is family gateway equipment structured flowchart of the present invention.Controlled in wireless chip 1 is connected with antenna, for controlling the wireless signal sending and receiving.Master chip 2 is connected (in this example, adopting pci bus to connect) with controlled in wireless chip 1, have calculation function, and able to programme.In this example, it has adopted the Marvell88F6550 chip, and wherein operation has the Linux2.6 kernel.And master chip 2 comprises hard-disk interface 21 and USB Host interface 22, hard disk 3 and USB memory device 4 are connected to master chip 2 by hard-disk interface 21 and USB Host interface 22 respectively.
Be provided with multiple application service module in master chip 2, such as FTP service module, BT download module, file-sharing administration module, also be provided with management interface.In this example, management interface is realized by webpage, is connected to the user of family gateway equipment, by input for example 192.168.1.1/service of specific URL(in browser), master chip 2 is to user's return service configuration interface.The user configures the various attributes of the services such as FTP, BT download on the service configuration interface.In addition, the user, by the service configuration interface, also can be divided into some subregions by hard disk 3 or USB memory device 4, is the different subregion of each user assignment, to improve secure user data.Can also mark off public partition, as needed memory blocks of service such as FTP, file-sharings.
Fig. 2 is shown as an embodiment flow chart of the method for the present invention's carry memory device on family gateway equipment.For convenience of description, following methods embodiment realizes by the family gateway equipment shown in Fig. 1, in practical application, realizes that the hardware device result of the inventive method can be different from the family gateway equipment shown in Fig. 1.
Step S1 means memory device is accessed to family gateway equipment.In this example, memory device is SATA hard disk 3, during practical application, can be as required or the chip that adopts different and use other memory device.
Step S2 means that family gateway equipment is to identification carry memory device.In this example, family gateway equipment can move linux kernel, and when the SATA hard disk accesses the SATA interface of family gateway equipment, master chip 2 is identified and carry hard disk 3 automatically.
Step S3 means that, after having the terminal use to be connected to family gateway equipment, the family gateway equipment warning terminal user has the available network memory device at present, and points out the user by network equipment carry or be mapped to this locality.The prompting user be described by network equipment carry or be mapped to local flow process below in conjunction with Fig. 3.Step 31 means to obtain terminal use's network request.In this example, kernel hooking is installed in family gateway equipment, when the terminal use initiates network request (such as the http request), kernel hooking is caught this request.Step 32 means to analyze this request bag, determines terminal use's carry situation (whether being prompted), the operating system adopted etc. information.Step S33 means to judge whether that needs push information.In this example, if mobile phone, panel computer, or the memory device that this terminal had been prompted and had accessed family gateway equipment do not change, and is judged as and do not need to push information, otherwise be judged as, needs to push information.Step S34-S35 means to push for needs the situation of information, imports the httpd module of home gateway itself, and structure response replys bag, utilizes " http302redirect " mechanism, and structure prompting, user configure the page.Step S34 ' means for the situation that does not need to push information, directly transmission network request.
Step S4 means that the user agrees just this network equipment carry or is mapped to terminal use this locality, and after completing configuration item, by family gateway equipment to the terminal use push corresponding script (fall as, if terminal is the Linux type systematic, push the shell script; If terminal is the windows system, push the batch processing script), the terminal machine can be mapped as the network equipment local storage system after carrying out script, the terminal use can be as the local disk of access terminal the accesses network memory device.
Introduce in this example according to user's configuration network equipment carry or be mapped to the embodiment of terminal this locality below in conjunction with Fig. 4.Step S41 means user's input configuration item on the configuration page.Preferably, family gateway equipment can first check the situation of memory device, such as size, the partition information of memory space.Family gateway equipment can also arrange the best practices configuration item in repository storage different terminals system, different storage device situation.When pushing to the user, by the information of memory device and the information such as terminal operating system that detect, insert in advance the user together with corresponding best configuration practice and configure in the page, the user only need to be changed the value of filling out in advance on the configuration page.Step S42 means the configuration item of user's input is write to repository.Step S43-step S44 is optional step, after being illustrated in the user and preserving configuration item, family gateway equipment is analyzed the existing carry situation of home gateway and terminal mapping situation, prevent in user's layoutprocedure, due to the external storage equipment problem of data safety that improper plug causes from family gateway equipment, if find that in this process, external storage equipment, by improper plug from family gateway equipment, does not carry out the later operation of step S5 and sends corresponding prompting to the user.Step S45 means to judge terminal use's OS Type.Step S46 means if terminal use's operating system is Unix class (comprising Linux), according to user's configuration item establishment Unix script (such as Shell), and by script, is pushed to terminal use's execution.Step S7 means that the terminal use carries out script, after execution, can complete Disk Mapping, remaps, appends mapping, delete useless mapping etc. operation.The situation that step S6 '-S7 ' is Windows for terminal use's operating system, process and Unix type systematic are similar, repeat no more.
Preferably; can carry out to the memory device of carry subregion, minute user management at the gateway device end; after the administration interface of logging in gateway equipment; can be set to the memory space that each terminal use distributes certain area; but not whole memory device is all shone upon to a user, reach the purpose of protection privacy of user.Can also reserve public partition, as file server, the needed memory space of ftp server etc.Correspondingly, in gateway device, can built-in file sharing module, FTP service module, BT download module, in the gateway device administration interface, the interface that provides shared setting, service configuration and BT task to arrange for the user, the user configures URL and the memory location of BT task, carry out the BT download by gateway device, being stored in user configured zone after download (can be the zone of distributing to the user, can be also the file-sharing zone), thus the shutdown of end-user machine in downloading process, restart etc. and can not affect the BT downloading task.
It should be noted that, in practical application, above-mentioned execution mode can have multiple variation, for example to the user, pushes the strategy of information, can be set to the equipment such as mobile phone, panel computer are also pushed to information, adopt with common PC and hold identical or different carry or mapping mode.Other service or application except BT downloads perhaps is set in family gateway equipment, downloads such as electric donkey, common http etc.
In sum, the present invention, without buying the NAS of family equipment, can realize that family data center function and cost are low, and easy to use.So the present invention has effectively overcome various shortcoming of the prior art and the tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all can, under spirit of the present invention and category, be modified or be changed above-described embodiment.Therefore, such as in affiliated technical field, have and usually know that the knowledgeable, not breaking away from all equivalence modifications that complete under disclosed spirit and technological thought or changing, must be contained by claim of the present invention.