CN100512271C - Distributed device reorienting system and method in terminal network environment - Google Patents

Distributed device reorienting system and method in terminal network environment Download PDF

Info

Publication number
CN100512271C
CN100512271C CNB200410073676XA CN200410073676A CN100512271C CN 100512271 C CN100512271 C CN 100512271C CN B200410073676X A CNB200410073676X A CN B200410073676XA CN 200410073676 A CN200410073676 A CN 200410073676A CN 100512271 C CN100512271 C CN 100512271C
Authority
CN
China
Prior art keywords
terminal
equipment
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.)
Expired - Fee Related
Application number
CNB200410073676XA
Other languages
Chinese (zh)
Other versions
CN1744591A (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 system includes virtual drive module, service proxy module and terminal proxy module. Through channel of application - virtual drive module - service proxy module - terminal proxy module - terminal device driver - terminal device, the method reflects the access logic from application to terminal device, and inverse return is according to original returned channel. In the communication procedure, virtual drive often does not concern detail of operation. Through network, drive access logic is transferred to terminal device and returned along original path. Shielding detail of operation, the invention possesses high generality. Moreover, the invention can support operations for special device by providing specific interface so as to possess high expandability.

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, by be driven into the passage of terminal equipment successively through virtual drive module, service agent module, terminal proxy module, terminal equipment from application, the access logic of using equipment is reflected on the terminal equipment, and return according to described passage is contrary, 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.
Figure C200410073676D00111
Do not have the poll item in the definition of operating in the 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 is used and is sent the device access request to virtual driving, the forming device access logic;
Step 150, the device access logic is passed to the service broker by virtual driving;
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 are the access logic mapping, and 4-6 are 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, by using the passage of process virtual drive module, service agent module, terminal proxy module, terminal equipment driving and terminal equipment successively, the access logic of using equipment is reflected on the terminal equipment, and return according to described passage is contrary, 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 multiple line distance management unit and shared drive unit, communications interface unit between described service agent module and the virtual drive module, and service agent module is to the communications interface unit between the terminal proxy module, 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;
Communications interface unit between service agent module and the virtual drive module 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 is used to make up the device redirection passage between service agent module and terminal proxy module to the communications interface unit of 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, 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 is sent the device access request to virtual driving, the forming device access logic;
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 the service broker, the relation in virtual driving 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:
A1). receive system call from application system;
B1). judge the kind of system call, call if system call is open, then carry out next step, call if system call is ioctl, then execution in step d1), if for other calls, execution in step e1 then);
C1). obtain the port information with corresponding session communication, execution in step e1);
D1). judge the ioctl type, and handle accordingly execution in step e1);
E1). protocol interaction;
F1). 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 CN1744591A (en) 2006-03-08
CN100512271C true 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)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103778B (en) * 2011-02-23 2014-04-30 中兴通讯股份有限公司 Mobile payment system, mobile terminal and method for realizing mobile payment service
CN102857535B (en) * 2011-07-01 2015-09-09 云联(北京)信息技术有限公司 A kind of computer processing unit, computer gateway, interactive system
CN102508795B (en) * 2011-10-14 2014-10-22 深圳市京华科讯科技有限公司 Parallel port redirection method and system
CN102508796B (en) * 2011-10-14 2014-10-22 深圳市京华科讯科技有限公司 Serial port redirection method and system
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
CN106027487B (en) * 2016-04-28 2019-07-23 广州广电运通金融电子股份有限公司 A kind of access management method and system of hardware device
CN107613020B (en) * 2017-10-16 2020-04-24 北京东土科技股份有限公司 Equipment management method and device
CN109982121B (en) * 2019-03-28 2021-07-06 烽火通信科技股份有限公司 Set top box, cloud virtual system and equipment redirection method
CN111885170B (en) * 2020-07-23 2022-03-11 平安科技(深圳)有限公司 Processing method and system of Internet of things control system, cloud server and medium
CN112422681B (en) * 2020-11-18 2023-01-13 中盈优创资讯科技有限公司 Cross-platform distributed communication calling method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201943A (en) * 1997-06-04 1998-12-16 国际商业机器公司 Host information access via distributed programmed objects
CN1210308A (en) * 1997-06-04 1999-03-10 国际商业机器公司 Applet redirection for controlled access to non-originating hosts
CN1266321A (en) * 1998-09-21 2000-09-13 阿尔卡塔尔公司 Intelligent card, relative terminal, communication system and access remote application method
WO2001022238A1 (en) * 1999-09-21 2001-03-29 Wyse Technology Displaying windowing application programs on a terminal
US20030139931A1 (en) * 2002-01-21 2003-07-24 Samsung Electronics Co., Ltd. Client device of thin client network system and method of controlling the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201943A (en) * 1997-06-04 1998-12-16 国际商业机器公司 Host information access via distributed programmed objects
CN1210308A (en) * 1997-06-04 1999-03-10 国际商业机器公司 Applet redirection for controlled access to non-originating hosts
CN1266321A (en) * 1998-09-21 2000-09-13 阿尔卡塔尔公司 Intelligent card, relative terminal, communication system and access remote application method
WO2001022238A1 (en) * 1999-09-21 2001-03-29 Wyse Technology Displaying windowing application programs on a terminal
US20030139931A1 (en) * 2002-01-21 2003-07-24 Samsung Electronics Co., Ltd. Client device of thin client network system and method of controlling the same

Also Published As

Publication number Publication date
CN1744591A (en) 2006-03-08

Similar Documents

Publication Publication Date Title
US11700164B2 (en) Pervasive realtime framework
WO2000068808A1 (en) Meeting system and information storage medium
US6691154B1 (en) Instantaneous remote control of an unattended server
US7574662B1 (en) Remote document sharing
US7908325B1 (en) System and method for event-based collaboration
CN100512271C (en) Distributed device reorienting system and method in terminal network environment
US20050198578A1 (en) System and process for controlling a shared display given inputs from multiple users using multiple input modalities
US20130275495A1 (en) Systems and Methods for Managing Multimedia Operations in Remote Sessions
US5544297A (en) Object-oriented audio record/playback system
US20020161895A1 (en) Systems and methods for unified remote control access
US8762544B2 (en) Selectively communicating data of a peripheral device to plural sending computers
KR20080089573A (en) System, method, and computer program product for concurrent collaboration of media
Johanson et al. Extending tuplespaces for coordination in interactive workspaces
CN108573393A (en) Comment information processing method, device, server and storage medium
JP7176188B2 (en) Information generation system, information generation method, information processing device, program
CN112911320A (en) Live broadcast method and device, computer equipment and storage medium
CN112311950A (en) Communication method and device
US7072939B1 (en) Instant selective multiple soft document sharing between multiple heterogeneous computing devices
KR20200020656A (en) Apparatus of work managing based on chat room, method by the same and storage media storing the same
US20100110004A1 (en) Converged desktop between a pc and a trading turret
CN112637626A (en) Plug flow method, system, device, electronic equipment and storage medium
CN103701854A (en) Network real-time audio transmission method based on application virtualization
US20060195586A1 (en) Sessions and terminals configured for binding in an extensible manner
WO2005121957A2 (en) Device independent data streaming
US20040117472A1 (en) Consultation service system, server, and consultation service terminal

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