[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN1744591A - Distributed apparatus Redirectional system and method thereof in a kind of terminal network environment - Google Patents

Distributed apparatus Redirectional system and method thereof in a kind of terminal network environment Download PDF

Info

Publication number
CN1744591A
CN1744591A CN 200410073676 CN200410073676A CN1744591A CN 1744591 A CN1744591 A CN 1744591A CN 200410073676 CN200410073676 CN 200410073676 CN 200410073676 A CN200410073676 A CN 200410073676A CN 1744591 A CN1744591 A CN 1744591A
Authority
CN
China
Prior art keywords
equipment
terminal
service agent
module
agent module
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.)
Granted
Application number
CN 200410073676
Other languages
Chinese (zh)
Other versions
CN100512271C (en
Inventor
叶剑
朱珍民
李锦涛
史红周
郭俊波
顾晓光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aumiwalker Technology Co.,Ltd.
Original Assignee
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CNB200410073676XA priority Critical patent/CN100512271C/en
Publication of CN1744591A publication Critical patent/CN1744591A/en
Application granted granted Critical
Publication of CN100512271C publication Critical patent/CN100512271C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides the distributed apparatus Redirectional system in a kind of terminal network environment, comprise virtual drive module, service agent module and terminal proxy module, passage by application → virtual drive module → service agent module → terminal proxy module → terminal equipment driving → terminal equipment, the access logic of using equipment is reflected on the terminal equipment, and returns according to the contrary of former passage.In this communication process, virtual driving often and be indifferent to the details of operation is just returned the device access logic by network delivery to terminal equipment and former road.Adopt above-mentioned communication description process can shield the difference of access from different devices details, have very strong versatility; Simultaneously by special interface is provided, the operation of equipment of some special requirement is provided support, have stronger extensibility.

Description

Distributed apparatus Redirectional system and method thereof in a kind of terminal network environment
Technical field
The present invention relates to the terminal unit remote access technique in the graphic terminal application protocol, more particularly, the present invention relates to the distributed apparatus reorientation method in a kind of terminal network environment.
Background technology
Along with developing rapidly of network infrastructure and internet, the use that is distributed in the terminal equipment in the network is universal day by day.Use the various application on the network terminal accesses network to become the important way that people obtain information and various network services.Many network terminals are used and are not only related to user interface operations, need to operate plurality of devices simultaneously.
In graphic terminal was used, applied logic realized that on application server terminal is by the application program on the network execution server.The target of application access is the equipment on the server, and the terminal use often wishes to use and can realize mutual with the equipment of terminal this locality.For example user terminal logs on server, and opens mp3 player plays audio frequency.User's purpose obviously is to wish that audio content can playback on the sound card of terminal sound card equipment rather than server.Application server is a complexity and crucial problem to the device access of a plurality of users place terminal.
The visit of using in desktop environment equipment mainly comprises following process: the opening of equipment, initialization, read-write operation and close.In this course, driver at first will be finished the registration on operating system, and the file operation interface is provided simultaneously, and define equipment handling function in interface is to satisfy and to operate and control corresponding to the said equipment.Application program operates in user's space, and device drives operates in kernel spacing.Application is exactly to finish in the frequent data item of user's space and kernel spacing flows to the visit of equipment.In the terminal network environment, the user realizes that to the operation of the using information interaction by application server and terminal room user's Action Target is the equipment of terminal this locality.Though graphical user interface is in the local demonstration of terminal, applied logic occurs on the server, and the application of acquiescence just can't be satisfied terminal use's demand to the visit of server apparatus.Therefore in order to satisfy a plurality of terminal uses' device resource requirements for access, need be converted into visit to the visit of server apparatus by network with using to the terminal local device.Visit to equipment will be satisfied user transparent, and the user shows in this locality the user interface of application access on the server, simultaneously by the application access local device, realizes the device redirection function.In addition, this access mechanism need satisfy the transparency to using.The acquiescence realization of using is the visit to server apparatus, this access logic need be reflected on the terminal local device.
Summary of the invention
The objective of the invention is to provides a kind of device redirection method feasible, that have high scalability and versatility for terminal applies in the network terminal environment to the visit of equipment.
An object of the present invention is to satisfy network terminal environment multi-user requirement, the device access logic of application should be redirected on the equipment that starts the user place terminal of using.
Another object of the present invention is that the device redirection method should have versatility, satisfies the general-purpose interface demand of device access, promptly satisfies versatility requirement.
Another object of the present invention be can to particular device unique access logic special support is provided, support a plurality of subset supports of same category of device, promptly satisfy the autgmentability requirement.
Another object of the present invention is the support that the device redirection method needs the virtual driving of server end common apparatus, and virtual driving and server local standard device drives satisfy compatible requirement.
In order to realize the foregoing invention purpose, the invention provides the distributed apparatus Redirectional system in a kind of terminal network environment, comprise virtual drive module, service agent module and terminal proxy module, passage by application → virtual drive module → service agent module → terminal proxy module → terminal equipment driving → terminal equipment, the access logic of using equipment is reflected on the terminal equipment, and return according to the contrary of former passage, wherein:
Virtual drive module is supported registration/cancellation, listening port and device file operation-interface, based on redirected agreement, and the data communication between realization and service agent module;
Service agent module is used to realize that the multi-user lands support, monitors the login user situation, judges to start the user who uses; Realize communication interface and protocol description between service agent module and virtual drive module and service agent module and terminal proxy module;
The terminal proxy module sends the user and lands request, communication interface and protocol description between realization and service agent module, and the analyzing device access logic is the operating terminal local device then.
In order to realize the foregoing invention purpose, the invention provides the distributed apparatus reorientation method in a kind of terminal network environment, may further comprise the steps:
Load virtual driving;
Start the service broker, foundation is connected with virtual driving;
User's telnet;
The user starts application in the terminal applies environment;
Application access equipment;
The device access logic is passed to the service broker by virtual driving;
The device access logic is passed to the terminal agency by the service broker;
Terminal proxy resolution access logic, and realize the local device visit;
What as from the foregoing, the present invention realized on server is the virtual driving of light weight.Drive with standard and to compare, registration/cancellations of both device files is consistent with operation-interface, but the operation of equipment of reality do not carry out, but the operation logic of application is transmitted through the network to terminal, and feedback is back to application on the server.In this communication process, virtual driving often and be indifferent to the details of operation is just returned the device access logic by network delivery to terminal equipment and former road.Adopt above-mentioned communication description process can shield the difference of access from different devices details, have very strong versatility; Simultaneously by special interface is provided, the operation of equipment of some special requirement is provided support, have stronger extensibility.
Description of drawings
Fig. 1 is a device redirection system configuration schematic diagram of the present invention;
Fig. 2 is that application process sign pid of the present invention and user conversation sign sid relation are set up flow chart;
Fig. 3 is a method flow diagram of the present invention;
Fig. 4 is the flow chart of virtual driving of the present invention;
Fig. 5 is the schematic diagram of protocol interaction of the present invention.
Embodiment
Describe technical scheme of the present invention with reference to the accompanying drawings in detail.
As shown in Figure 1, in order to realize the foregoing invention purpose, the invention provides the distributed apparatus Redirectional system in a kind of graphic terminal environment, mainly comprise virtual drive module, service agent module and terminal proxy module, passage by " application → virtual drive module → service agent module → terminal proxy module → terminal equipment driving → terminal equipment ", the access logic of using equipment is reflected on the terminal equipment, and return according to the contrary of former passage, realize device redirection, the equipment that satisfies in the multiple users network environment is supported needs.
More particularly, the device redirection system comprises virtual drive module, supports registration/cancellation, listening port and device file operation-interface, based on redirected agreement, and the data communication between realization and service agent module.Wherein, virtual drive module comprises again:
The registration interface unit, the primary and secondary device number of registration is consistent with the device number of system standard equipment, according to the equipment needs of reality, registers a plurality of secondary devices, satisfies the autgmentability requirement.Registration interface provides the support of kernel spacing multithreading, and the port monitor function is provided in new thread.
The port monitoring unit is set up the virtual service broker's of being driven into redirected passage, finishes the foundation and the monitoring of communication port.Virtual driving receives that the service broker sends lands session identification sid and the corresponding relation between record sid and communication port.
Device file operation-interface unit, according to equipment open, the process of the control of equipment I/O, equipment read-write and device shutdown supports the standard device access interface.The interface definition conformance with standard drives design principle, satisfies the compatible requirement with standard device.
Equipment is opened interface unit, finishes the conversion that application process identifies pid and session identification sid with the service broker, judges according to the result to start the user conversation of using.To open logical description and send to the service broker, and acceptance is from service broker's feedback.
Equipment I/O control interface unit sends to the service broker with the description of I/O control logic, and accepts the feedback from the service broker.
Equipment is read interface unit, will read logical description and send to the service broker, and acceptance comprises the facility information that the equipment of reading obtains from service broker's feedback in the feedback.
Equipment is write interface unit, will write logical description and send to the service broker, describes to comprise the data of writing to equipment, and accepts service broker's feedback.
The device shutdown interface unit will be closed logical description and be sent to the service broker, and accept the feedback from the service broker.
The device redirection system also comprises service agent module, is used to realize that the multi-user lands support, monitors the login user situation, judges to start the user who uses; Realize communication interface and protocol description between service agent module and virtual drive module and service agent module and terminal proxy module.Wherein, service agent module comprises:
The session-context that a plurality of terminal uses land is monitored and managed in the multiple line distance management unit.The shared drive unit, the recording user session identification.
" service agent module-virtual drive module " communications interface unit, interactive user session identification and application process sign make up the device redirection passage between service agent module and virtual drive module, realize the transmission of device access logic between the two pellucidly.
" service agent module-terminal proxy module " communications interface unit makes up the device redirection passage between service agent module and terminal proxy module, realizes the transmission of device access logic between the two pellucidly.
The device redirection system also comprises the terminal proxy module, sends the user and lands request, and communication interface and protocol description between realization and service agent module, the analyzing device access logic is the operating terminal local device then.Wherein, the terminal proxy module comprises:
" terminal proxy module-service agent module " communications interface unit sends the request of landing, and makes up the device redirection passage between terminal proxy module and service agent module.
The access logic resolution unit analyzes different access logics and describes.
The device access unit, according to analysis result access terminal local device, the equipment of finishing the execution of terminal use's application program started is opened, I/O controls, equipment is read and write and shutoff operation, and the feedback of device access is returned the service broker.
Below in conjunction with accompanying drawing, at first embodiments of the present invention are made function and describe, then in conjunction with the redirected developing example of audio frequency apparatus, describe the information interactive process of device redirection in detail.
The design of virtual drive module and realization:
In graphic terminal was used, the virtual driving on the application server was by kernel or modular manner operation, and monitoring is from Terminal Service agency's request.If user's off-duty voice applications, the communications status between then virtual driving and Terminal Service agency is constant; If the voice applications on user's runtime server, then access logic is carried out according to the description of using.
The realization of the registration/cancellation of virtual driving is followed standard and is driven design, interface is init_module () and cleanup_module (), the primary and secondary device number of registration is consistent with the device number of system standard equipment, finish by devfs_register_dev () and devfs_mk_dir () function, satisfy server end device description coherence request.
Virtual driving of the present invention starts watcher thread by kernel_thread (), the communication port between monitoring and the service broker.Snoop procedure as shown in the figure.Watcher thread is waited for the connection request from the service broker, so that obtain the session information that lands or nullify.Service broker's request form is " conversation description+session identification ".Landing and nullify session is represented by " CN " and " DS " respectively.Session identification sid is obtained in virtual driving, to landing session the corresponding relation between sid and communication port is recorded in the system list, for future use; To nullifying session, itself and corresponding communication port information are deleted from tabulation.
Application to the operation of equipment according to equipment open, the order of equipment I/O control, equipment read-write and device shutdown carries out.Application realizes by device file operation-interface file_operations organization definition operating in the driving of equipment.Virtual driving mainly by the passage of " application → virtual driving → service broker → terminal agency → terminal equipment driving → terminal equipment ", is reflected to the access logic of using equipment on the terminal equipment, and returns according to the contrary of former passage.It should be noted that every kind of access logic all comprises command code and operand, describes operational order and operand respectively.Above-mentioned communication process has the transparency, and this transparency remains on above-mentioned communication process all the time always, and middle virtual driving and each agency also are indifferent to the details of order.Analytical work is carried out at last the terminal agency's.Terminal proxy resolution command code and operand, and finish the I/O control operation of real equipment by the calling interface of standard according to the result.
The present invention opens equipment interface by what virtual driving was registered in kernel, obtain the process identification (PID) pid of voice applications, by the data communication between virtual driving and Terminal Service agency, pid is reached the service broker, and the startup user conversation of acquisition voice applications identifies sid on the agency, and return driving.Legal sid returns and shows that voice applications carried out by the legal terminal login user, search sid and communication port relation contrast tabulation, the communication port of acquisition and corresponding session has been set up the corresponding relation between user and application this moment, the separation of the different sessions process data after serving.Process as shown in Figure 2.Simultaneously, return the information of normally opening to application.
Be applied in after the equipment of opening, need, the I/O attribute of equipment is provided with, obtains and revises by equipment I/O control interface ioctl operation.I/O control is complicated operations comparatively in the device driver, and interface definition comprises command word (command code) and parameter (operand).Be applied among the present invention when carrying out equipment I/O control operation, the control command word that virtual driving is just used from the system call interfaces program that is applied is also analyzed, obtaining action type at command code by macrodefinition _ IOC_DIR () is NONE, OUT, IN or the order of INOUT type, correspondence is not with parameter respectively, parameter is set, read parameter, four types of consultation parameters, call corresponding processing procedure then respectively, utilize protocol interaction partly to finish its function, the I/O control of using equipment is redirected on the terminal equipment.
In operation of equipment, read-write operation is that the most frequent operation takes place, and generally all is in the circle logic of application program.Read-write operation has two distinguishing features: the one, and operand part is huge, and what often transmit is buffer pointer; The 2nd, the state of read-write need return, and the factor that influences return state is more.The present invention is when the communication protocol of design read-write operation, and operating data buffering area part often adopts the random length mode, and is equipped with the size that length byte is described actual buffering area.Return state places one's entire reliance upon to the feedback of terminal equipment practical operation.
The redirected agreement of closing device operation of the present invention by defining between virtual drive module and service agent module passes to the service broker pellucidly.
The design of service agent module and realization:
Among the present invention, service agent module comprises that mainly information sends and receiving interface.The information transmission interface is realized receiving various requests from virtual driving, and is repackaged into service---and the protocol format (mainly being the syllable sequence difference) between the terminal agency is forwarded to Client Agent with request; The message pick-up interface receives various replying from Client Agent, and is repackaged into the protocol format (mainly being that syllable sequence is different) between service broker and virtual driving, mails to virtual driving.
The design of terminal proxy module and realization
Among the present invention, Client Agent partly provides the protocol interaction part corresponding to the service agent module transmitting-receiving.In addition, need describe according to the access logic of service broker's notice, design realizes the visit to local device.The operation of equipment interface of standard is adopted in the visit of local device, and the feedback of operating result need return to the Terminal Service agency.
4, design of communication protocol and realization, promptly be redirected the design and the realization of agreement:
Comprise three parts: device discovery, device description and device access.
Device discovery is mainly realized the discovery of terminal existing equipment, notice and feedback.Some equipment just exists at the beginning of terminal powers up and comes into force, such as keyboard/mouse, three cards (video card, network interface card and sound card) etc.These equipment will notification service when the user lands Terminal Service agency and at the service end record; And some equipment is supported plug-and-play feature, and USB device is exactly like this.Suchlike equipment may be before or after the user lands be connected with terminal and notifies Terminal Service.Above-mentioned which kind of situation no matter, agreement all needs to describe device discovery messages to Terminal Service, and the feedback of Terminal Service described is back to the terminal agency.
Device description, in a single day equipment be found, and just needs terminal that the specific descriptions information of equipment can be provided to service end.Descriptor should comprise device type, device descriptor, capacity of equipment description at least.
Terminal equipment roughly is divided into two classes: character device and block device.The I/O of character device is a unit with the byte, and the I/O of block device is a unit with record block or " sector ".By the development of many decades, the boundary between block device and the character device is fuzzy, but is continuing to use such division.
Device descriptor mainly is the concrete equipment that is used on the distinguishing terminal, can directly adopt the terminal equipment descriptor, can use dsp, mixer etc. such as audio frequency apparatus, and disk unit can be used hda, sda etc.; Also can adopt the primary and secondary device number to describe, the distribution of primary and secondary device number is described according to the primary and secondary device number of the equipment of terminal operating system, is respectively 14/3 and 14/0 etc. such as the primary and secondary device number of the dsp of audio frequency apparatus and mixer.
It is the equipment associated ancillary information that capacity of equipment is described, and depends on concrete equipment, the current I/O ability of description equipment, user mode etc.It also is the needs of serving terminal equipment adaptive ability support from now on that capacity of equipment is described.
Device access, main in patent application what introduce is the realization of this part, describes the opening of equipment, I/O control, reads and writes and close logic.
Among the present invention, the communication protocol between proxy module comprises that the request and the terminal of serving terminal arrive response two parts of service.Be described below respectively:
1) the request msg packet format is as shown in table 1:
The virtual data packet format that is driven into terminal of table 1
Length Operation code The parameter word segment table
2 bytes 1 byte Variable-length
Wherein each Field Definition is as follows:
Length field: whole length of data package.
The operation code field: represent the operation of equipment type that this packet is acted on behalf of, actual is right
Figure A20041007367600111
The present invention is not to having the poll item in the definition of operating in the file_operations structure.The select that the poll operation is used for system calls, and is specifically designed to the contradiction between the peripheral hardware operation of handling high-speed CPU and low speed.The essence of Select system call is that the sleep of single process in the system is waited for that becoming multiobject sleep waits for, improves the operational efficiency of whole system.If the Terminal Service process transfer select system call, it is actual that what wait for should be the operation of returning from remote terminal, depend on two factors: wait process of reading on the terminal and terminal are sent to virtual driving with reading result through network.Therefore poll call actual should be corresponding to for providing the socket of transfer of data to call between virtual device driver and the terminal.Therefore do not need regulation that poll is operated the operation code that is sent to terminal in table 2, the corresponding socket of a poll process only need directly call to(for) the poll operation gets final product.
Parameter field: the parameter format of regulation corresponding operating code, concrete form is as shown in table 3.Wherein parameter type is stipulated the form of data in this parameter, as 16 integers, 32 integers, byte stream etc.Have only when the supplemental characteristic type is byte stream, parameter length field is just arranged in the argument structure.Parameter value field subsequently is actual parameter value.
Table 3 parameter format
Parameter type Parameter length Parameter value
1 byte 2 bytes Variable-length
2) the response data packet format is as shown in table 4:
Table 4 terminal equipment operation response
The success mark Length The parameter word segment table
1 byte 2 bytes Variable-length
Wherein the meaning of each field is as follows:
The success mark: expression is by using the execution result of access request on the terminal physical device of initiating, and value is that 1 expression runs succeeded, otherwise expression makes mistakes in the process of implementation.
Length field: the total length of the data of expression back.
Parameter field: it is as shown in the table for concrete form.Return value or optional parameters for this operation.
As shown in Figure 3, reorientation method of the present invention may further comprise the steps:
Step 100 loads virtual driving;
Step 110 starts the service broker, and foundation is connected with virtual driving;
Step 120, user's telnet (at this moment, by the service broker, the relation in virtual driving between recording conversation sign sid and communication port);
Step 130, the user starts application in the terminal applies environment;
Step 140, application access equipment;
Step 150, the device access logic is passed to the service broker by virtual driving;
Step 160, the device access logic is passed to the terminal agency by the service broker;
Step 170, terminal proxy resolution access logic, and realize the local device visit;
The feedback of device access is returned by above-mentioned route;
As shown in Figure 4, the realization flow of virtual driving may further comprise the steps:
Step 200, application system is called;
Step 210, the kind of judgement system call is called if system call is open, then carries out next step, calls if system call is ioctl, and then execution in step 230, if for other calls, then execution in step 240; Wherein, system call comprises that open calls, and release calls, and read calls, and write calls, and ioctl calls, and poll calls.
Step 220 is obtained the port information with corresponding session communication, execution in step 240;
Step 230 is judged the ioctl type, and is handled accordingly execution in step 240;
Step 240, protocol interaction;
Step 250 is called and is returned.
In step 240, as shown in Figure 5,1-3 is the access logic mapping, and 4-6 is the visit feedback.
In the graphic terminal environment, multimedia application is an important use.In order to satisfy support to sound application, in terminal network, support audio frequency apparatus better, be the emphasis of the device redirection studied of the present invention.
Describe in conjunction with the foregoing invention implementation process, being redirected with audio frequency apparatus is embodiment, describes the specific implementation process of device redirection of the present invention.Along with the development of sound device hardware and enriching of application, voice applications needs sound card can support MIDI equipment, mixer apparatus etc.Wherein, mixer apparatus/dev/mixer is used widely in most voice applications as the volume adjustment means.The present invention has autgmentability preferably, can support plurality of devices to describe.The realization principle and the conventional audio equipment of mixer are identical, below the main embodiment of introducing at conventional audio equipment/dev/dsp.
1) user lands and registers
Virtual driving at first is loaded in the kernel with modular manner, in the registration process of kernel as mentioned above.Register its enable port watcher thread that finishes, monitor information (this moment, the service broker started as yet) from the service broker.Start the service broker, monitor self terminal agency's information.The terminal agency initiates the user and lands request, and foundation is connected with the service broker's.To each user who newly lands, service broker's distributing user session identification sid, the maintenance of startup thread is connected and data communication with the user's.Sid with the user in thread passes to virtual driving by solicited message.Virtual driving receives the sid that the service broker is transmitted, and the relation information of record sid and communication port finishes that the user lands and registration process.
2) application start process
The terminal use is by the audio application in the graphic interface startup service.Voice applications is at first by open order, and operating audio device file descriptor/dev/dsp carries out the opening operation of audio frequency apparatus, and this operation information is opened interface dev_open by the device file that kernel passes to virtual driving.In this interface,, the application process sign pid that gets access to is passed to the service broker according to said process.The service broker obtains pid, by visit/proc file system, obtains session identification sid, and virtual driving is given in passback.Virtual driving obtains the communication port of the session communication corresponding with the voice applications process by the sid of record and the relation between communication port.
3) application is to the visit of sound card
The I/O control ratio of sound card is abundanter, can be provided with and the information of obtaining many relevant sound card equipment attributes, and be example with the buffer information, sound card can be provided with and obtain the size of buffering area, and this corresponds respectively to above-mentioned OUT and the order of IN type.Interface definition to the setting of sound card buffering area in the application is:
ioctl(int audio_fd,int cmd,char*blocksize)
Wherein, audio_fd is the sound card equipment document number, and cmd is a command word, is SNDCTL_DSP_GETBLKSIZE at this, represents that this order need obtain buffer size, and blocksize is the buffer size of returning.This command mapping is to virtual driving, and the operation-interface in the virtual driving is
dev_ioctl(struct inode*inode,struct file*file,unsigned int cmd,unsigned long arg)
The corresponding command word of cmd wherein, the corresponding parameter of arg.Virtual driving need be by the type of _ IOC_DIR (cmd) resolve command word, according to type with the composition transparent of command word and parameter pass to the service broker.
It is the same with said process that buffer size and other I/O control is set.
Main operation to sound card equipment is the read-write sound card.Application to the read-write of sound card corresponding to audio sound-recording and playback function.Interface with the voice applications compose buffer is the example introduction below.The interface of voice applications compose buffer is:
write(int audio_fd,const void*buffer,size_t count)
Wherein audio_fd is the sound card equipment document number, and buffer is the buffer pointer of stores audio data, and count is the unit representation buffer size with the byte.This command mapping is to virtual driving, and the operation-interface in the virtual driving is
dev_write(struct file*file,const char*buffer,size_t count,loff_t*ppos)
Wherein buffer is the pointer of the buffering area of reception user's space voice data, and count is a buffer size.Voice applications is reflected to virtual driving to the logic of writing of sound card, passes to the service broker afterwards pellucidly.
To write the logical mappings process similar for the logical AND of reading of voice applications, but data flow direction is opposite.
4) sound card closes
The device shutdown of voice applications passes to the service broker by virtual driving.
5) cancellation of virtual unit driving
Virtual driving is not in case after loading, generally can nullify from kernel.In order to satisfy the consistency that drives with standard device, virtual driving provides equipment to nullify interface, realizes by devfs_unregister_chrdev () and devfs_unregister ().
Above-mentioned introduction be core of the present invention---the embodiment that virtual unit drives.Service broker, terminal agency drive the communication port that has constituted device redirection jointly with virtual unit, and the key of enforcement is the definition of communication protocol.With voice applications the most frequent voice data taking place and be written as example, introduces the communication protocol between service and terminal agency below.
After the service broker receives the write operation order of virtual driving,, organize packet, send to the terminal agency according to the device redirection agreement of definition between the agency.If it is 4096 bytes that for example each write operation is write the voice data size, it is as follows then to make up packet:
Length Operation code Parameter type Parameter length Parameter value
4100 3 B 4096 Voice data
Wherein length field is 4100 (1+1+2+4096), and it is 4100 bytes that expression sends data length overalls (not comprising length field); Command code is 3 to show that this is operating as write operation; Parameter type is " B ", show that follow-up data is a byte stream; Parameter length is 4096, shows that the parameter value field length is 4096 bytes; What parameter value was partly deposited is to be come by voice applications, and need write the voice data in the sound card.
Because the sound card write operation only need feed back success or not, therefore, return messages are simple, only describe whether successfully getting final product.If 4096 byte datas are for example once read in the IN type order that sound card is read or I/O operates etc., then return messages are as follows:
The success mark Length Parameter type Parameter length Parameter value
1 4099 B 4096 Voice data
Wherein successful tag field is 1, and expression is returned effectively; Length field is 4099, and expression follow-up data length overall is 4099 bytes; The parameter type field is " B ", and the data that show the back are byte stream; Parameter length field is 4096, shows that parameter value length is 4096 bytes; Parameter value partly is a voice data.
Device redirection method of the present invention realizes simple, highly versatile.What realize on server is the virtual driving of light weight.Drive with standard and to compare, registration/cancellations of both device files is consistent with operation-interface, but the operation of equipment of reality do not carry out, but the operation logic of application is transmitted through the network to terminal, and feedback is back to application on the server.In this communication process, virtual driving often and be indifferent to the details of operation is just returned the device access logic by network delivery to terminal equipment and former road.Adopt above-mentioned communication description process can shield the difference of access from different devices details, have very strong versatility; Simultaneously by special interface is provided, the operation of equipment of some special requirement is provided support, have stronger extensibility; The communication logic of aforesaid way is clear, and the subclass of intelligent network application protocol, i.e. device redirection agreement are adopted in the network service between service broker and the terminal agency.
It should be noted that at last: above embodiment is the unrestricted technical scheme of the present invention in order to explanation only, although the present invention is had been described in detail with reference to the foregoing description, those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention, and not breaking away from any modification or partial replacement of the spirit and scope of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (9)

1, the distributed apparatus Redirectional system in a kind of terminal network environment, it is characterized in that, comprise virtual drive module, service agent module and terminal proxy module, passage by application → virtual drive module → service agent module → terminal proxy module → terminal equipment driving → terminal equipment, the access logic of using equipment is reflected on the terminal equipment, and return according to the contrary of former passage, wherein:
Virtual drive module is supported registration/cancellation, listening port and device file operation-interface, based on redirected agreement, and the data communication between realization and service agent module;
Service agent module is used to realize that the multi-user lands support, monitors the login user situation, judges to start the user who uses; Realize communication interface and protocol description between service agent module and virtual drive module and service agent module and terminal proxy module;
The terminal proxy module sends the user and lands request, communication interface and protocol description between realization and service agent module, and the analyzing device access logic is the operating terminal local device then.
2, the system as claimed in claim 1, it is characterized in that, virtual drive module comprises the registration interface unit, the port monitoring unit, device file operation-interface unit, equipment is opened interface unit, equipment I/O control interface unit, equipment is read interface unit, and equipment is write interface unit and device shutdown interface unit, wherein:
The registration interface unit is used to register primary and secondary equipment, and the support of kernel spacing multithreading is provided, and the port monitor function is provided in new thread;
The port monitoring unit is used to set up the redirected passage of virtual drive module to service agent module;
Device file operation-interface unit, be used for according to equipment open, the process of the control of equipment I/O, equipment read-write and device shutdown supports the standard device access interface;
Equipment is opened interface unit, be used for finishing the conversion of application process sign pid and session identification sid with service agent module, judge the user conversation of start using according to the result, and will open logical description and send to service agent module, and accept feedback from service agent module;
Equipment I/O control interface unit is used for the description of I/O control logic is sent to service agent module, and accepts the feedback from service agent module;
Equipment is read interface unit, be used for sending to service agent module with reading logical description, and acceptance is from the feedback of service agent module;
Equipment is write interface unit, will write logical description and send to service agent module, describes to comprise the data of writing to equipment, and accepts the feedback of service agent module;
The device shutdown interface unit is used for sending to service agent module with closing logical description, and accepts the feedback from service agent module.
3, system as claimed in claim 2 is characterized in that, the primary and secondary device number of described registration interface unit (ONU) registration is consistent with the device number of system standard equipment.
4, the system as claimed in claim 1, it is characterized in that described service agent module comprises the multiple line distance management unit, the shared drive unit, service agent module-virtual drive module communications interface unit and service agent module-terminal proxy module communications interface unit, wherein:
The multiple line distance management unit is used to monitor and manage the session-context that a plurality of terminal uses land;
The shared drive unit is used for the recording user session identification;
Service agent module-virtual drive module communications interface unit is used for interactive user session identification and application process sign, makes up the device redirection passage between service agent module and virtual drive module, realizes the transmission of device access logic between the two;
Service agent module-terminal proxy module communications interface unit is used to make up the device redirection passage between service agent module and terminal proxy module, realizes the transmission of device access logic between the two.
5, the system as claimed in claim 1 is characterized in that, described terminal proxy module comprises terminal proxy module-service agent module communications interface unit, access logic resolution unit and device access unit, wherein:
Terminal proxy module-service agent module communications interface unit is used for sending the request of landing, and makes up the device redirection passage between terminal proxy module and service agent module;
The access logic resolution unit is used to analyze different access logics and describes;
The device access unit is used for according to analysis result access terminal local device, and the equipment of finishing the execution of terminal use's application program started is opened, I/O controls, equipment is read and write and shutoff operation, and the feedback of device access is returned service agent module.
6, the system as claimed in claim 1 is characterized in that, described redirected agreement comprises device discovery, device description and device access, and wherein: device discovery is used to realize discovery, notice and the feedback to the terminal existing equipment; Device descriptor mainly is the concrete equipment that is used on the distinguishing terminal; Device access is used to the opening of the equipment of describing, I/O control, reads and writes and close logic.
7, the distributed apparatus reorientation method in a kind of terminal network environment may further comprise the steps:
A) load virtual driving;
B) start the service broker, foundation is connected with virtual driving;
C) user's telnet;
D) user starts application in the terminal applies environment;
E) application access equipment;
F) the device access logic is passed to the service broker by virtual driving;
G) the device access logic is passed to the terminal agency by the service broker;
H) terminal proxy resolution access logic, and realize the local device visit;
8, method as claimed in claim 7 is characterized in that, in the step c), and by service agent module, the relation in virtual drive module between recording conversation sign sid and communication port.
9, method as claimed in claim 7 is characterized in that, virtual driving realizes may further comprise the steps:
A) application system is called;
B) judge the kind of system call, call, then carry out next step, call if system call is iocti, then execution in step d if system call is open), if for other calls, execution in step e then);
C) obtain port information with corresponding session communication, execution in step e);
D) judge the iocti type, and handle accordingly execution in step e);
E) protocol interaction;
F) call and return.
CNB200410073676XA 2004-08-31 2004-08-31 Distributed device reorienting system and method in terminal network environment Expired - Fee Related CN100512271C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410073676XA CN100512271C (en) 2004-08-31 2004-08-31 Distributed device reorienting system and method in terminal network environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410073676XA CN100512271C (en) 2004-08-31 2004-08-31 Distributed device reorienting system and method in terminal network environment

Publications (2)

Publication Number Publication Date
CN1744591A true CN1744591A (en) 2006-03-08
CN100512271C CN100512271C (en) 2009-07-08

Family

ID=36139785

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410073676XA Expired - Fee Related CN100512271C (en) 2004-08-31 2004-08-31 Distributed device reorienting system and method in terminal network environment

Country Status (1)

Country Link
CN (1) CN100512271C (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103778A (en) * 2011-02-23 2011-06-22 中兴通讯股份有限公司 Mobile payment system, mobile terminal and method for realizing mobile payment service
CN102508796A (en) * 2011-10-14 2012-06-20 深圳市京华科讯科技有限公司 Serial port redirection method and system
CN102508795A (en) * 2011-10-14 2012-06-20 深圳市京华科讯科技有限公司 Parallel port redirection method and system
CN102857535A (en) * 2011-07-01 2013-01-02 云联(北京)信息技术有限公司 Computer processing unit, computer gateway and interactive system
CN102915317A (en) * 2012-03-08 2013-02-06 北京金山安全软件有限公司 sound control method and device
CN103473110A (en) * 2012-06-08 2013-12-25 腾讯科技(深圳)有限公司 Equipment control method, device and system
WO2017185952A1 (en) * 2016-04-28 2017-11-02 广州广电运通金融电子股份有限公司 Hardware device access management method and system
CN107613020A (en) * 2017-10-16 2018-01-19 北京东土科技股份有限公司 A kind of device management method and device
CN109982121A (en) * 2019-03-28 2019-07-05 烽火通信科技股份有限公司 A kind of set-top box, cloud virtual system and device redirection method
CN112422681A (en) * 2020-11-18 2021-02-26 中盈优创资讯科技有限公司 Cross-platform distributed communication calling method and device
WO2022016998A1 (en) * 2020-07-23 2022-01-27 平安科技(深圳)有限公司 Method for processing internet of things control system, and system, server, terminal and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6014702A (en) * 1997-06-04 2000-01-11 International Business Machines Corporation Host information access via distributed programmed objects
US5987523A (en) * 1997-06-04 1999-11-16 International Business Machines Corporation Applet redirection for controlled access to non-orginating hosts
FR2783624B1 (en) * 1998-09-21 2000-12-15 Cit Alcatel CHIP CARD FOR ACCESSING A REMOTE APPLICATION, TERMINAL AND COMMUNICATION SYSTEM THEREOF AND METHOD FOR ACCESSING THE REMOTE APPLICATION USING THIS CHIP CARD
EP1956492B1 (en) * 1999-09-21 2018-09-05 Wyse Technology L.L.C. Displaying windowing application programs on a terminal
KR20030062864A (en) * 2002-01-21 2003-07-28 삼성전자주식회사 Client device of thin client network system and method of controlling the same

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103778A (en) * 2011-02-23 2011-06-22 中兴通讯股份有限公司 Mobile payment system, mobile terminal and method for realizing mobile payment service
CN102103778B (en) * 2011-02-23 2014-04-30 中兴通讯股份有限公司 Mobile payment system, mobile terminal and method for realizing mobile payment service
CN102857535A (en) * 2011-07-01 2013-01-02 云联(北京)信息技术有限公司 Computer processing unit, computer gateway and interactive system
CN102857535B (en) * 2011-07-01 2015-09-09 云联(北京)信息技术有限公司 A kind of computer processing unit, computer gateway, interactive system
CN102508796B (en) * 2011-10-14 2014-10-22 深圳市京华科讯科技有限公司 Serial port redirection method and system
CN102508796A (en) * 2011-10-14 2012-06-20 深圳市京华科讯科技有限公司 Serial port redirection method and system
CN102508795A (en) * 2011-10-14 2012-06-20 深圳市京华科讯科技有限公司 Parallel port redirection method and system
CN102915317A (en) * 2012-03-08 2013-02-06 北京金山安全软件有限公司 sound control method and device
CN102915317B (en) * 2012-03-08 2016-01-20 北京金山安全软件有限公司 sound control method and device
CN103473110A (en) * 2012-06-08 2013-12-25 腾讯科技(深圳)有限公司 Equipment control method, device and system
WO2017185952A1 (en) * 2016-04-28 2017-11-02 广州广电运通金融电子股份有限公司 Hardware device access management method and system
CN107613020A (en) * 2017-10-16 2018-01-19 北京东土科技股份有限公司 A kind of device management method and device
CN107613020B (en) * 2017-10-16 2020-04-24 北京东土科技股份有限公司 Equipment management method and device
US11075821B2 (en) 2017-10-16 2021-07-27 Kyland Technology Co., Ltd. Method and apparatus for managing field device based on cloud server
CN109982121A (en) * 2019-03-28 2019-07-05 烽火通信科技股份有限公司 A kind of set-top box, cloud virtual system and device redirection method
CN109982121B (en) * 2019-03-28 2021-07-06 烽火通信科技股份有限公司 Set top box, cloud virtual system and equipment redirection method
WO2022016998A1 (en) * 2020-07-23 2022-01-27 平安科技(深圳)有限公司 Method for processing internet of things control system, and system, server, terminal and medium
CN112422681A (en) * 2020-11-18 2021-02-26 中盈优创资讯科技有限公司 Cross-platform distributed communication calling method and device

Also Published As

Publication number Publication date
CN100512271C (en) 2009-07-08

Similar Documents

Publication Publication Date Title
CN1212583C (en) Information processing method information terminal support server collaboration system and storage medium stockage an information processing program
CN1285042C (en) Content server, content data delivering method, program and recording medium
CN1142513C (en) Dynamic content supplied processor
CN1745382A (en) Embedding a session description message in a real-time control protocol (RTCP) message
CN1604531A (en) Systems and methods for determining remote device media capabilities
CN1282946C (en) Speech recognition conversation selection device, speech recogntion conversation system, speech recognition conversation selection method, and program
CN1601465A (en) Dynamic registry partitioning
CN101080000A (en) Method, system, server and terminal for displaying speaker in video conference
CN1744591A (en) Distributed apparatus Redirectional system and method thereof in a kind of terminal network environment
CN101035039A (en) USB mapping method
CN1685395A (en) System and method for use of multiple applications
CN1610308A (en) One to many data projection system and method
KR20110027845A (en) Session description message extensions
CN1229944A (en) System and method for reducing footprint of preloaded classes
CN1606309A (en) Apparatus and method for remote controlling
CN1852101A (en) Parallel downloading method and terminal
CN1661598A (en) Collaboration server, collaboration system, and method and program for collaboration server and system
CN101075983A (en) Instant speech telecommunication terminal, server, system and instant speech telecommunication method
CN1556631A (en) Method of realizing scene chat between customers in instant communication
CN1881977A (en) Communication device and command transmission method
CN1766885A (en) Systems and methods for supporting managed data
CN101042710A (en) Method and system for implementing acquisition data sharing
CN1109312C (en) Information processors having agent function and storage mediums which contain processing programs
CN1765101A (en) Client-server system for providing multimedia and interactive service for mobile terminal and its method
US20070083660A1 (en) Amorphic Computing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING AUMIWALKER TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: INSTITUTE OF COMPUTING TECHNOLOGY, CHINESE ACADEMY OF SCIENCES

Effective date: 20121205

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100080 HAIDIAN, BEIJING TO: 100071 FENGTAI, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20121205

Address after: 100071, B402, 10 Spark Road, Fengtai District Science City, Beijing

Patentee after: Beijing Aumiwalker Technology Co.,Ltd.

Address before: 100080 Haidian District, Zhongguancun Academy of Sciences, South Road, No. 6, No.

Patentee before: Institute of Computing Technology, Chinese Academy of Sciences

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090708

Termination date: 20130831