WO2009135393A1 - 一种多计算机的同步控制方法及系统 - Google Patents

一种多计算机的同步控制方法及系统 Download PDF

Info

Publication number
WO2009135393A1
WO2009135393A1 PCT/CN2009/070476 CN2009070476W WO2009135393A1 WO 2009135393 A1 WO2009135393 A1 WO 2009135393A1 CN 2009070476 W CN2009070476 W CN 2009070476W WO 2009135393 A1 WO2009135393 A1 WO 2009135393A1
Authority
WO
WIPO (PCT)
Prior art keywords
computer
information
status information
control
instruction
Prior art date
Application number
PCT/CN2009/070476
Other languages
English (en)
French (fr)
Inventor
刘建明
胡平平
赵峰
Original Assignee
国网信息通信有限公司
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 国网信息通信有限公司 filed Critical 国网信息通信有限公司
Priority to US12/934,853 priority Critical patent/US8554864B2/en
Priority to EP09741668.9A priority patent/EP2276201A4/en
Publication of WO2009135393A1 publication Critical patent/WO2009135393A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality

Definitions

  • the present invention relates to the field of synchronous processing of multiple computers, and more particularly to a synchronous control method and system for multiple computers.
  • the first is a multi-computer synchronous browsing control system based on the client/server model.
  • a computer as the server there must be a computer as the server, and other computers in the system must communicate with the computer as the server to complete the required synchronization control.
  • the computer as the server is different from the software running on other computers, and in order to ensure the normal operation of the system, the computer as the server must be operated first and keep running.
  • the second is a multi-computer synchronous browsing control system based on peer-to-peer mode.
  • Such a system does not require a special computer as a server to control other computers, but the user must manually set the control of the master computer, that is, the user needs to execute the control request command in advance, and after obtaining the permission, the corresponding computer can be Set as the main control computer to control the operation; accordingly, if the main control computer needs to be replaced, it is necessary to execute the control abandonment command of the current main control computer first, and then re-execute the new control request command for the newly set main control computer. After the permission is obtained, the replacement of the master computer can be completed.
  • server software and client software which add unnecessary system overhead, waste resources, and high cost
  • the acquisition and abandonment of the control of the master computer is realized by the user executing a specific command, which is inconvenient to use and operate, and often causes the user to feel a system failure, and the user experience is poor.
  • the technical problem to be solved by the present invention is to provide a multi-computer synchronous control method and system, which can realize the synchronous control of multiple computers simply and efficiently on the basis of reducing system overhead, resource waste, and cost reduction, and Get a better experience.
  • the embodiment of the present invention provides the following technical solutions:
  • a multi-computer synchronization control method wherein the plurality of computers are connected through a network, and the method includes:
  • the operation information table includes: identification information of all computers in the network, and running state information of the corresponding computer;
  • the synchronization control operation is performed on a computer recorded in the operation information table when the operational status information of the computer receiving the instruction conforms to a preset rule.
  • the running status information includes peer status information, master status information or dependent status information.
  • the synchronization control instruction is a synchronization control trigger instruction
  • the step of performing the synchronization control includes:
  • the other computer receives the control right request message and converts its operational status information into dependent status information.
  • the operation information table further includes: a priority parameter, where the step of performing the synchronization control further includes:
  • a computer having the highest priority is selected as the computer that needs to perform the state determination step.
  • the priority parameter is generated according to a startup time and address information of a computer in the network.
  • the step of performing synchronization control further includes:
  • the synchronization control instruction is a synchronization control operation instruction
  • the step of performing the synchronization control further includes:
  • the computer having the slave status information performs a corresponding operation in accordance with the control operation request.
  • the method further includes:
  • the computer with the master status information does not receive the synchronization control instruction within the preset time threshold, the main control status information of the computer is converted into the peer status information, and the control right abandon message is sent to the The computer having the slave status information recorded in the operation information table; the computer having the slave status information aborting the message according to the control right, and converting the running status information to the peer status information.
  • the embodiment of the invention further discloses a multi-computer synchronization control system, wherein the plurality of computers are connected through a network, and the system comprises:
  • the operation information table maintenance module is configured to maintain an operation information table on each computer in the network, where the operation information table includes: identification information of all computers in the network, and running state information of the corresponding computer;
  • An instruction receiving processing module configured to receive a synchronization control instruction input by a user on any computer in the network
  • a synchronization control operation module configured to perform the synchronization control operation on a computer recorded in the operation information table when the running state information of the computer that receives the instruction conforms to the preset rule.
  • the running status information includes peer status information, master status information or dependent status information.
  • the synchronization control instruction is a synchronization control trigger instruction
  • the synchronization control operation module includes:
  • a peer-to-peer state determining sub-module configured to determine, according to the synchronous control triggering instruction, whether the running state information of the computer that receives the command is peer-to-peer state information; if yes, triggering the master state transition sub-module;
  • a master state transition submodule configured to convert the peer state information into a master state information, and submit a control right request message to another computer recorded in the operation information table;
  • the slave state transition submodule is configured to receive, by the other computer, the control right request message, and convert its running state information into slave state information.
  • the operation information table further includes: a priority parameter
  • the synchronization control operation module further includes:
  • the first priority judging sub-module is configured to compare the priority parameter of the computer that receives the instruction, and select one computer with the highest priority as the computer that needs to perform the state judging step.
  • the synchronization control operation module further includes:
  • a time recording sub-module configured to record, in a running information table of each computer in the network, a time when the computer with the master status message sends a control request cancellation, packet, and time;
  • a second priority judging submodule configured to determine the earliest time for issuing the control request message
  • the computer or the computer that issues the control request message at the same time and has a higher priority parameter, converts the running state information of the corresponding other computer into the slave state information for the computer having the master state information.
  • the synchronization control instruction is a synchronization control operation instruction
  • the synchronization control operation module further includes:
  • the main control state judging submodule is configured to determine, according to the synchronous control operation instruction, whether the running state information of the computer that receives the command is the main control state information; if yes, triggering the local machine to execute the sending submodule;
  • the local device performs a sending submodule, configured to execute the instruction on the computer with the master state information, and generate a corresponding control operation request to send to the corresponding computer with the slave state information;
  • a synchronization operation submodule configured to cause the computer having the slave status information to perform a corresponding operation according to the control operation request.
  • the system further includes:
  • a status update module configured to: when the computer with the master status information does not receive the synchronization control instruction within a preset time threshold, convert the master status information of the computer into peer status information, and send The control revokes the message to the computer having the Dependent State Information recorded in the operation information table; and causes the computer having the Dependent State Information to abort the message according to the control right, and converts the running state information to the peer state information.
  • the embodiment of the present invention further discloses a multi-machine multi-screen 3D synchronous display method, wherein the plurality of computers are connected through a network, and the display screen of the computer includes a main window and a sub-window, and the method includes:
  • the operation information table is maintained on each computer connected to the network according to the startup message of the computer connected to the network connection;
  • the startup message includes: 3D object information and display perspective information;
  • the operation information table includes: all computers in the network IP address and its running status information;
  • the running status information includes peer status information, master status information or dependent status information;
  • the 3D object is loaded on the computer in the network according to the startup message, and each computer draws the 3D object according to the corresponding display angle information in its main window, and each computer separately generates a child. Window, drawing the network in the child window except this calculation One 6—
  • the operating state information of the computer receiving the command is peer-to-peer state information, converting the peer-to-peer state information into the master state information, and submitting the control right request message to another computer recorded in the running information table;
  • the other computer receives the control right request message, and converts its running status information into dependent state information
  • the operation information table further includes: a priority parameter
  • the method further includes: selecting, by comparing the priority parameter of the computer that receives the instruction, selecting a computer with the highest priority as the state to be executed The computer that judges the steps.
  • the priority parameter is generated according to a startup time and address information of a computer in the network.
  • the method further includes:
  • the embodiment of the present invention further discloses a multi-machine multi-screen 3D synchronous display system, wherein the plurality of computers are connected through a network, and the display screen of the computer includes a main window and a sub-window, and the system includes:
  • the operation information table maintenance unit is configured to maintain an operation information table on each computer connected to the network according to a startup message of the computer connected to the network connection;
  • the startup message includes: a 3D pair 6: information and display angle information;
  • the operation information table includes: an IP address of all computers in the network and running status information thereof;
  • the running status information includes peer status information, master status information or dependent status information;
  • a startup unit configured to load the 3D object according to the startup message on a computer in the network, and cause each computer to draw the 3D object according to corresponding display angle information in its main window, and simultaneously
  • Each computer generates a sub-window, and draws a 3D object of different angles of the computer other than the computer in the sub-window in the sub-window;
  • a trigger instruction receiving unit configured to receive a 3D object triggering instruction submitted by the user on any computer in the network
  • a master state transition unit configured to: when the operating state information of the computer that receives the command is peer state information, convert the peer state information into master state information, and submit a control request message to the running Other computers recorded in the information form;
  • a slave state transition unit configured to convert the running state information to the slave state information when the other computer receives the control right request message
  • An operation instruction receiving unit configured to receive a 3D object operation instruction submitted by the user on the computer with the master status information
  • a host rendering update unit configured to separately update the drawing of the 3D object in a main window and a sub-window of the current computer according to the operation instruction
  • An update request unit configured to generate a corresponding operation request according to the update drawing operation, and send the corresponding computer with the slave status information
  • the slave drawing update unit is configured to cause the computer having the slave state information to update the drawing of the 3D object in its corresponding main window and the child window according to the operation request.
  • the present invention has the following advantages:
  • the present invention implements the processing of multiple computer synchronous control operations in a simple peer-to-peer computer network environment.
  • the invention dynamically divides the computers in the system into different states by maintaining the operation information table in each computer; by means of a simple and effective communication protocol and an explicit protocol processing method, each computer in the system can be freely Ground control of the controlled object without conflict.
  • each computer in the system runs the same software, and it is not necessary to designate a certain computer as a special computer, and it is not necessary to specify that a certain computer must be kept non-stop. 6
  • each computer can enter and exit the system at any time.
  • the user does not need to use additional commands that are inconsistent with the control operation, and the usage and operation methods are simple, and the system overhead and resource waste are reduced, the cost is reduced, and the user experience is good.
  • the present invention is directed to a situation in which various multi-computer conflicts in reality, determining a unique host to perform a corresponding operation by determining a priority, the operation is simple, and no additional resources and system overhead are required, and the user obtains a better experience.
  • the technology of the present invention is simple to implement, has no technical obstacles, and has no special security algorithm.
  • FIG. 1 is a flow chart of an embodiment of a synchronization control method for a multi-computer according to the present invention
  • FIG. 2 is a structural block diagram of an embodiment of a synchronization control system for a multi-computer according to the present invention
  • FIG. 3 is a block diagram based on the core concept of the present invention.
  • FIG. 4 is a structural block diagram of an embodiment of a multi-screen 3D synchronous display system of the present invention
  • FIG. 5 is a schematic diagram 1 showing a specific example of a multi-screen 3D synchronous display system to which the present invention is applied;
  • FIG. 6 is a schematic diagram 2 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • FIG. 7 is a schematic diagram 3 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • Figure 8 is a schematic diagram 4 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • FIG. 9 is a schematic diagram 5 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • Figure 10 is a schematic diagram 6 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • FIG. 11 is a schematic diagram 7 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • Figure 12 is a schematic diagram 8 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied; 6
  • FIG. 13 is a schematic diagram 9 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • Figure 14 is a schematic diagram 10 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • FIG. 15 is a schematic diagram 11 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied;
  • Figure 16 is a schematic diagram 12 showing a specific example of a multi-machine multi-screen 3D synchronous display system to which the present invention is applied.
  • the invention is applicable to a wide variety of general purpose or special purpose computing system environments or configurations.
  • personal computer server computer, handheld or portable device, tablet device, multiprocessor system, microprocessor based system, set-top box, programmable consumer electronics device, network PC, small computer, mainframe computer, including A distributed computing environment of any of the above systems or devices, and the like.
  • the invention may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.
  • One of the core concepts of the embodiments of the present invention is that, on a plurality of computers connected by a network, an operation information table is maintained for each computer, and the information table contains information about all the computers, and the user is on any one of the computers.
  • the operation information table on the computer is read, and according to the operation instruction and the running state of the current computer, it is judged whether the preset rule is met, and the synchronous control operation is initiated under the met condition.
  • FIG. 1 a flowchart of an embodiment of a synchronization control method for a multi-computer according to the present invention is shown.
  • the multiple computers are connected through a network, and specifically include the following steps: 6
  • Step 101 Maintain the operation information table on each computer in the network
  • the operation information table may include: identification information of all computers in the network, and operation status information of the corresponding computer.
  • the so-called network in layman's terms, is composed of multiple computers (or other computer network devices) that are physically (or logically) connected by a transmission medium and software.
  • the composition of a computer network basically includes: a computer, a network operating system, a transmission medium (which may be tangible or intangible, such as a transmission medium of a wireless network is air) and corresponding application software.
  • the present invention is primarily concerned with improvements made in application software.
  • the network may be any type of network, such as a local area network, a metropolitan area network, a wide area network, and the Internet.
  • a plurality of computers may be connected by Ethernet.
  • the computer identification information may be network address information.
  • the operational status information may include peer status information, master status information, or dependent status information. That is, the state of the computer after the computer is started is divided into three types: peer status, master status, and slave status.
  • the computer in the network is in one of these three states, and at a certain time, only one computer is in the master state, that is, at the same time, there is no computer with multiple master states.
  • the present invention also proposes a new conflict prevention mechanism, which will be explained in the relevant section below.
  • the operation of maintaining the operation information table may specifically include the following situations:
  • a computer in the network starts, and sends a startup message (such as local address, startup time, etc.) to other computers in the network by means of network broadcast messages; the computer that has been started on the network responds to the message, and Establish a connection to the newly started computer and then maintain a separate operational information table on all started computers.
  • a startup message such as local address, startup time, etc.
  • the control request message sent by the computer sets the running status of the unit to the slave status.
  • a computer in the network exits, and the exit message is sent to other computers in the network in the form of a network broadcast message; the computer that has been started on the network responds to the message and disconnects from the computer, and then starts up.
  • the running status information of the corresponding computer in the operation information table is updated in real time according to the actual conversion of the running state information of the computer.
  • the corresponding computer transitions from the peer state to the master state, from the peer state to the slave state, or from the master state to the slave state, etc.; or, the synchronization control is not performed for a period of time. During operation, it transitions from the master state or the slave state to the peer state.
  • Step 102 Receive a synchronization control instruction input by a user on any computer in the network; the synchronization control instruction may include a synchronization control trigger instruction and a synchronization control operation instruction. It can be understood that for the asynchronous control instruction that only controls the operation of the local computer, it can be processed on the local computer according to the existing computer instruction processing mode.
  • Step 103 Perform the synchronization control operation on a computer recorded in the operation information table when the running state information of the computer that receives the instruction meets a preset rule.
  • the peer-to-peer state of the present invention has peer-to-peer state information
  • the master state has the master state information
  • the slave state has the slave state information
  • the host corresponds to the computer with the master state information
  • the slave That is, corresponding to a computer having dependent state information
  • the peer corresponds to a computer having peer state information.
  • Sub-step A1 determining, according to the synchronization control triggering instruction, whether the operating state information of the computer that receives the instruction is peer-to-peer state information;
  • Sub-step A2 if yes, converting the peer-to-peer state information into master state information, and submitting a control request message to other computers recorded in the operation information table;
  • Sub-step A3 the other computer receives the control right request message, and converts its running status information into dependent status information.
  • the running status information of the current computer is not the peer status information, it may be the master status information or the slave status information.
  • the master status information if it is the master status information, the synchronous control trigger instruction can be ignored, and the user is required to issue a synchronous control operation instruction. If it is slave status information, the synchronization control trigger command can also be ignored, and the user is prompted to be unable to operate at present.
  • the above operations are merely examples, and the present invention is not limited thereto.
  • the conversion delay counter is started to determine whether the transition of the master state is timed out, and if so, the transition of the current computer master state is abandoned.
  • two or more computers may simultaneously perform a local synchronization control trigger operation, and a conflict will occur.
  • a conflict occurs, it is necessary to make only one computer a host according to a certain rule.
  • a priority parameter may be added to the operation information table, and the synchronization control operation is performed by the following sub-steps:
  • Sub-step B1 comparing a priority parameter of the computer that receives the instruction, selecting a computer with the highest priority, determining whether the running status information of the computer is peer-to-peer status information; sub-step B2, if yes, the pair The state information is converted into the master state information, and the control right request message is submitted to other computers recorded in the operation information table;
  • Sub-step B3 the other computer receives the control right request message, and converts its running status information into dependent status information.
  • the priority parameter may be generated according to a startup time and address information of a computer in the network. For example, for a computer with a start-up time, generate a higher priority parameter; 6
  • Another conflict situation in practice is that, due to the transmission time delay caused by the network transmission quality, etc., it is possible that the time of the control request message of the computer A that first performs the synchronous control trigger operation reaches the other computer B, compared with the computer.
  • B starts synchronous control and the trigger operation is late, both computers will convert to the master status information and send a control request message to other computers.
  • the synchronization control operation can be performed by the following substeps:
  • Sub-step Cl determining, according to the synchronous control triggering instruction, whether the operating state information of the computer receiving the command is peer-to-peer state information;
  • Sub-step C2 if yes, converting the peer-to-peer state information into main control state information, and submitting a control right request message to other computers recorded in the operation information table;
  • Sub-step C3 the other computer receives the control right request message, and converts its running state information into dependent state information
  • Sub-step C4 recording, in a running information table of each computer in the network, a time when the computer having the main control status information issues a control right request message;
  • Sub-step C5 determining the computer with the earliest time to issue the control right request message, or the computer having the same time and the higher priority parameter for issuing the control right request message, the computer having the master status information, and the corresponding other computer
  • the operational status information is converted to dependent status information.
  • one way to determine the host can be:
  • the time when the computer responds to the local synchronization control trigger instruction is T1
  • the time of receiving the control request message ie, the time when the computer transmitting the control request message responds to the local synchronization control trigger instruction
  • T1 ⁇ T2 it means that the local computer triggers the synchronous control operation earlier, and then the running status information of the local computer is converted into the master status information.
  • T1 > ⁇ 2 it indicates that the remote computer that sent the control request message responds to the synchronization control earlier, and then converts the running state information of the remote computer into the master state information, and converts the running state information of the local computer into the slave state. information.
  • Tl T2
  • the time when the local computer responds to the synchronous control trigger operation is the same as the time when the remote computer that sent the control request message responds to the synchronous control trigger operation, then compares the priority parameters of the two computers. If the priority parameter of the local computer is higher, the running status information of the local computer is converted into the main control status information; if the priority parameter of the remote computer is high, the running status information of the remote computer is converted into the main control status information, The running status information of the local computer is converted into dependent status information.
  • the corresponding conflict prevention mechanism is to enable the computer with the highest priority to gain control and become the host (that is, obtain the master status information), and the other computers become slaves (ie, Obtain subordinate status information).
  • the corresponding conflict prevention mechanism is that when each computer receives the synchronous control triggering operation of the local user in the peer state, the time of the moment is recorded, and the control is sent to other computers. The time is included in the right request message.
  • a computer in a peer state receives multiple control request messages, or when a host receives a control request message from another computer, it determines the computer to be the host by comparing the time of each control request message.
  • the slave conflict prevention processing method can also refer to the above method. It can be understood that the local computer becomes a slave because it responds to the control request message sent by a computer on the network. There is only one case for a conflicting message source: A control request message sent by another computer on the network. Therefore, the method for handling the conflict can compare the time and priority of the host response and the control request triggering operation of the current host and the control request message according to the same principle of the third method to determine the new host. If the result of the comparison is the current host or the host, the local computer is still the slave of the current host, and the received control request information is discarded. If the result of the comparison is that the host that issued the control request message should become the host, the method of processing is that the local computer becomes the slave of the host, and the information of the current host is replaced with the information of the host.
  • the peer defense conflict prevention processing method can also refer to the above method.
  • a computer that is in a peer state receives a conflicting message in only one case: At the same time, it receives a control request message sent by more than one computer on the network. Therefore, the method of handling conflicts can compare the timings of these control request messages in response to the synchronous control triggering operation and the priority of the sending message computer according to the three-phase principle of the method, thereby determining the new host.
  • the synchronous control operation is usually further performed, and the user inputs a synchronous control operation instruction on any computer in the network, and the corresponding synchronous control operation may include the following sub-steps:
  • Sub-step D1 determining, according to the synchronous control operation instruction, whether the running state information of the computer that receives the command is the main control state information;
  • Sub-step D2 if yes, executing the instruction on the computer having the master status information, and generating a corresponding control operation request to be sent to the corresponding computer having the slave status information; sub-step D3, the slave status The computer of the information performs the corresponding operation in accordance with the control operation request.
  • the current computer running status information is not host status information, it may only be dependent status information. In this case, an error message can be returned to the user.
  • the method may further include the following steps:
  • a process for running the application software of the present invention may generally include the following steps: Step S1: Perform system component detection when the software starts running, and send a startup message such as a local IP address and a startup time to a network broadcast message. Other computers in the network; Step S2: System operation information table maintenance processing. The messages of other computer steps S1 and S4 in the system are received and processed accordingly.
  • step S1 For the startup message of step S1, if the IP address of the computer of the message is not sent in the system operation information table, a new information entry is generated by using the IP address and the startup time of the information; if the message exists in the system operation information table, the message is sent.
  • the IP address of the computer the IP of the information is used. 6
  • the address and start time replace the contents of the corresponding item in the information table, assigning a new priority to the entry (corresponding to the computer that sent the message).
  • the initiate response message is then sent back to the computer that sent the message.
  • step S4 For the exit message of step S4, if the IP address of the message exists in the system information running table, delete the corresponding item in the system information running table, disconnect the computer, if the computer that sends the message is still the master computer, then The state of the master computer is reset, and the machine goes to the peer state; if there is no IP address of the message in the system operation information table, the message is discarded.
  • Step S3 Accept the synchronous control instruction input by the local user, and perform the following different treatments for the asynchronous operation instruction, the synchronous control trigger instruction and the synchronous control operation instruction respectively:
  • step S4 For the asynchronous operation instruction, go to step S4;
  • the machine For the synchronous control trigger command, if the local machine is in the peer state, the machine is transferred to the master control state, and the master state transition delay counter is started to generate a control right request message (the message includes the local IP address and the local receiver). At the time of the operation), the message is sent to each computer, and the process proceeds to step S6. If the unit is in the master state, reset the state transition timer, and then go to step S5. If the unit is in the slave state, the operation is discarded and the process proceeds to step S5.
  • step S6 For the synchronous control operation command, if the unit is in the master state, a synchronization control message is sent to the other computer, and the state transition timer is reset, to step S6. If the unit is in a slave state, the operation is discarded and the process goes to step S5.
  • Step S4 Processing of the user asynchronous operation instruction.
  • step S5 If the user's action is to exit the system command, the local exit message is sent to each computer of the system, and then the program is exited. If it is a non-exit system command, execute these commands to step S5.
  • Step S5 receiving control messages from other computers in the system (step S3), and performing different processing according to the control right request message, the synchronization control message, and the control right abandonment message respectively:
  • Control right request message :
  • step B Processing when the local machine is in the master state: The time and priority parameters of the control request message are collided with the corresponding parameters of the host to determine a new host (the method is the same as described in step A), and the host is saved. The time of the control request message and the priority of the host. If the new host is not the local machine, the machine goes to the slave state and turns off the master state transition delay counter. Go to step S2.
  • step C Processing when the local machine is in the slave state: The synchronization control time and the priority parameter of the control right request message are collided with the corresponding parameters of the current host (the method is the same as described in the step A), and the new host is determined and saved. The time of the new host control request message and the priority of the new host, the machine is still in the slave state. Go to step S2.
  • Control abandonment message Only the computer in the slave state will receive the control to abandon the message, clear the time of the host control request message and the priority of the host, and the machine goes to the peer state. Go to step S2.
  • Step S6 The user synchronizes the processing of the operation instruction.
  • the local user synchronization control command from step S3 and the synchronization control message command from step S5 are converted into control operations to implement synchronous operation processing on the local computer. Go to step S7.
  • Step S7 The master state exits the message processing. If the unit is in the peer state or the slave state, it proceeds to step S2. Otherwise, it is judged whether the master state transition delay counter has timed out. If it times out, the machine is put into the peer state, the master state transition delay counter is turned off, and a control right abandonment message is sent to other computers in the system. Go to step S2.
  • the present invention realizes the process of synchronous control operations of multiple computers in a simple peer-to-peer computer network environment.
  • the computers in the system are dynamically divided into different states.
  • each computer in the system can be freely
  • the controlled object implements conflict-free synchronous control. Therefore, the present invention can make each computer in the system run the same software, without specifying that one computer is a special computer, and there is no need to specify that a certain computer must be in the 6
  • FIG. 2 there is shown a block diagram of an embodiment of a multi-computer synchronization control system of the present invention, wherein the plurality of computers are connected by a network, and the system may include:
  • the operation information table maintenance module 201 is configured to maintain a running information table on each computer in the network, where the operation information table includes: identification information of all computers in the network, and running state information of the corresponding computer;
  • the instruction receiving processing module 202 is configured to receive a synchronization control instruction input by the user on any computer in the network;
  • the synchronization control operation module 203 is configured to perform the synchronization control operation on a computer recorded in the operation information table when the running status information of the computer that receives the instruction meets a preset rule.
  • the running status information may include peer status information, master status information or dependent status information.
  • synchronization control instruction is a synchronization control triggering instruction
  • synchronization control operation module may include:
  • a peer-to-peer state determining sub-module configured to determine, according to the synchronous control triggering instruction, whether the running state information of the computer that receives the command is peer-to-peer state information; if yes, triggering the master state transition sub-module;
  • a master state transition submodule configured to convert the peer state information into a master state information, and submit a control right request message to another computer recorded in the operation information table;
  • the slave state transition submodule is configured to receive, by the other computer, the control right request message, and convert its running state information into slave state information.
  • the operation information table may further include: a priority parameter, where the computer that receives the instruction is a plurality of computers that simultaneously receive an instruction, and the synchronization control operation module includes:
  • a first priority judging submodule configured to compare a priority parameter of the computer that receives the instruction, and select a computer with the highest priority as a computer that needs to perform the state determining step;
  • a peer-to-peer state determining sub-module configured to determine, according to the synchronous control triggering instruction, whether the operating state information of the computer receiving the command is peer-to-peer state information; if yes, triggering the master state transition sub-module;
  • a master state transition submodule configured to convert the peer state information into a master state information, and submit a control right request message to another computer recorded in the operation information table;
  • the slave state transition submodule is configured to receive, by the other computer, the control right request message, and convert its running state information into slave state information.
  • the synchronization control operation module may include: a peer-to-peer state determination sub-module, configured to determine, according to the synchronization control triggering instruction, whether the operating state information of the computer that receives the instruction is peer-to-peer Status information; if yes, triggering the master state transition sub-module;
  • a master state transition submodule configured to convert the peer state information into a master state information, and submit a control right request message to another computer recorded in the operation information table;
  • a slave state transition submodule configured to receive, by the other computer, the control right request message, and convert its running state information into slave state information
  • a time recording sub-module configured to record, in a running information table of each computer in the network, a time when the computer with the master status message sends a control request cancellation, packet, and time;
  • a second priority judging sub-module configured to determine a computer that issues the control right request message at the earliest time, or a computer that issues the same control right message time and has a higher priority parameter, is a computer having main control status information, The running status information of the corresponding other computer is converted into the dependent status information.
  • the synchronization control operation module may further include:
  • the main control state judging submodule is configured to determine, according to the synchronous control operation instruction, whether the running state information of the computer that receives the command is the main control state information; if yes, triggering the local machine to execute the sending submodule;
  • the local device performs a sending submodule, configured to execute the instruction on the computer with the master state information, and generate a corresponding control operation request to send to the corresponding computer with the slave state information;
  • a synchronization operation submodule configured to cause the computer having the slave status information to perform a corresponding operation according to the control operation request.
  • the embodiment of the present invention may further include:
  • a status update module configured to: when the computer with the master status information does not receive the synchronization control instruction within a preset time threshold, convert the master status information of the computer into peer status information, and send The control revokes the message to the computer having the Dependent State Information recorded in the operation information table; and causes the computer having the Dependent State Information to abort the message according to the control right, and converts the running state information to the peer state information.
  • Scientific computing visualization is an emerging technology that emerged with the rapid development of computer technology in the late 1980s. It converts various complex data into intuitive graphics or images to facilitate people to correctly understand data or processes. meaning. Its main purpose is to process and analyze more and more scientific and engineering data more effectively, providing researchers and engineers with an effective and intuitive tool for exploring and studying the objective world.
  • computer hardware was costly and limited in performance.
  • the visualization technology focused on the research of high-resolution, large-field display technology.
  • foreign companies rely on their advanced hardware manufacturing technology to develop high-end dedicated visualization systems that are equipped with dedicated software that provided unparalleled display performance at the time, but the system was expensive and far from reaching The point of universal application. With the development of computer technology, the continuous reduction of hardware costs and the continuous improvement of performance have provided a huge impetus for the development of scientific computing visualization.
  • the high-level application of visualization technology mainly involves multi-machine multi-screen 3D synchronous display, which has been widely used in distributed product synchronous browsing, network-based remote fault analysis, medical consultation and other fields.
  • this multi-machine multi-screen 3D synchronous display technology is used to realize synchronous display control of the same 3D object on multiple computers connected by a network.
  • FIG. 3 there is shown a flowchart of an embodiment of a multi-machine multi-screen 3D synchronous display method implemented by the core concept of the present invention.
  • the plurality of computers are connected through a network, and the display screen of the computer may include a main window.
  • the sub-window this embodiment may include the following steps:
  • Step 301 Connect to the network according to a startup message of a computer connected to the network connection. 6
  • the startup message includes: 3D object information and display perspective information;
  • the operation information table includes: an IP address of all computers in the network and running status information thereof;
  • the running status information includes peer status information, and a master control Status information or dependent status information;
  • Step 302 The 3D object is loaded on the computer in the network according to the startup message, and each computer draws the 3D object according to corresponding display angle information in its main window, and at the same time, each computer Generating a sub-window separately, and drawing a 3D object of different angles of the computer other than the computer in the network in the sub-window;
  • Step 303 Receive a 3D object triggering instruction submitted by the user on any computer in the network.
  • Step 305 The other computer receives the control right request message, and converts its running status information into dependent state information.
  • Step 306 Receive a 3D object operation instruction submitted by the user on the computer with the master state information, and update the drawing of the 3D object in the main window and the child window of the current computer according to the instruction;
  • Step 307 Generate a corresponding operation request according to the update drawing operation, and send the corresponding operation request to a computer having the slave state information, where the computer with the slave state information is updated in its corresponding main window and the sub window according to the operation request. Drawing of the 3D object.
  • the computer that performs synchronous control first obtains control and becomes the host; the other computers become slaves and perform synchronous control processing according to the control of the host.
  • two or more computers may simultaneously perform a local synchronous control trigger operation, and a conflict will occur.
  • a computer is used as a host.
  • a priority parameter can also be set in the operation information table.
  • a method for conflict prevention can be added in the embodiment:
  • a computer having the highest priority is selected as the computer that needs to perform the state determination step.
  • the priority parameter is generated according to a startup time and address information of a computer in the network. Recording, in the operation information table of each computer in the network, the time when the computer having the master status information issues a control right request message;
  • the embodiment can be run on a high-performance PC computer connected via Ethernet, so as to synchronously display the same 3D data model on different computers on different computers, and the user can perform on any one of the computers.
  • the loading and browsing operations of 3D objects, other computers are controlled by the computer, and the functions of loading and browsing operations of the same 3D object are completed synchronously.
  • the running state information of this embodiment respectively identifies three different states of the computer, namely: a peer state, a master state, and a slave state.
  • a computer When a computer is in one of these three states, it can be called a peer, a master, and a slave, respectively.
  • a computer At a particular moment, a computer can only be in one of three states, and only one computer can be a host.
  • Computers on the network can be distinguished from each other by their unique IP addresses, and each computer has a different priority, and each computer has a unique priority.
  • browsing operations on 3D objects include:
  • Rotate operation In the non-translation state, press the left mouse button and drag the mouse in different directions.
  • Pan operation In the pan state, press the left mouse button and drag the mouse in different directions.
  • Zoom in operation The middle mouse button scrolls backwards.
  • Load 3D object data Open the specified 3DS data file. 6
  • the user's control operations on the computer can be divided into three types: synchronous control trigger operation, synchronous control operation, and asynchronous control operation.
  • the synchronous control triggering operation may include: loading 3D object data, starting rotation, panning, zooming, and display resetting of the loaded 3D object;
  • the synchronization control operation may include: rotating, panning the loaded 3D object
  • the zoom operation may include: setting the background color displayed by the computer, changing the display angle of the computer, and the like.
  • the synchronous control operation is a process that each computer has to perform synchronously at the same time;
  • the synchronous control trigger operation is an operation in which the user is to perform a synchronous operation on a computer in a peer state, and the synchronous control trigger operation may cause the computer to be changed by the peer machine.
  • asynchronous operations are handled by a computer itself.
  • the software starts, if the computers on the network are in the peer state, the computer will also be in the peer state.
  • the synchronization control trigger operation can include the following system messages:
  • the computer When the computer becomes the host, it sends a control request message to other computers in the network.
  • the content of the control request message includes the time when the local machine responds to the synchronous control trigger operation and the priority of the local machine.
  • the other computer After the other computer receives the 'J control right request message, it converts from the peer state to the slave state, and saves the time of receiving the control request, %, and the priority of the host for conflict determination.
  • the processing method and state transition operation of various messages in the peer-to-peer state may specifically be: (1) receiving a synchronous control triggering operation of the local user.
  • the unit enters the master control state; sends a control request message to other computers.
  • the synchronization control time and the priority parameter of the control request message are collided to determine the priority of the host and the host control request message and the priority of the host.
  • Remedy Send a control request message to the computer, and the machine remains in the peer state.
  • Remedy Disconnect the computer and the machine remains in the same state.
  • a computer Once a computer becomes a host, users can perform synchronous control operations on that computer. While performing the synchronous control operation, the host transmits control information to each slave through the network. Each slave responds to the synchronization control message and performs corresponding synchronization control processing according to the message, thereby implementing the synchronous browsing function.
  • Synchronous control operations can include the following system messages:
  • the host If the user performs the synchronous control trigger operation again during the state transition timing, the host resets the state transition timer, performs corresponding synchronization control processing, and transmits control information to each slave. The host continues to remain in the master state.
  • the processing method and state transition operation of various messages in the main control state may specifically be: (1) receiving the synchronous control triggering operation and the synchronous control operation of the local user.
  • Remedy Send control to give up information to each slave, exit the master state, and enter the peer state.
  • Remedy Send a control request message to the computer, and the machine remains in the master state.
  • Remedy Disconnect from this computer and the unit remains in the master state.
  • the slave responds to the synchronous control command issued by the host to control the local machine to perform the same synchronous control processing as the host.
  • the slave does not respond to the synchronous control of the local user to trigger the operation.
  • the slave receives the control abandon message from the host, it discards the saved host control request time and host priority, and then enters the peer state.
  • the slave can respond to the asynchronous control operation of the local user and perform corresponding processing.
  • the processing method and the state transition operation of the various messages in the slave state may specifically be: (1) receiving the synchronous control triggering operation and the synchronous control operation of the local user.
  • Remedy Discard the current host control request message and the priority of the host, and enter the peer state.
  • Remedy Send a control request message to the computer, and the unit remains in the slave state.
  • the 3D object drawing according to the synchronous control operation instruction submitted by the user can be implemented by the method of OpenGL drawing.
  • OpenGL is the "open graphic program interface".
  • OpenGL is an open 3D graphics development standard jointly developed by several large computer companies. It is a relatively complete 3D graphics standard. OpenGL is a hardware-independent interface that is independent of window system, operating system and hardware system. It can be applied to many different hardware platforms.OpenGL can also be applied to various network environments, running and publishing OpenGL commands on the client, and receiving and executing commands on the server. OpenGL is a software interface for graphics hardware.
  • Different functions which can be used to create various 2D and 3D object prototypes and perform various operations on objects, including description of object shape, model transformation, viewpoint transformation, coordinate transformation, light effect processing, color setting, texture Support, crop, bitmap , Anti-aliasing and various processing and other enhancements.
  • an OpenGL drawing process can include:
  • Step El creating a device context for the display window
  • Step E2 Generate an OpenGL rendering context according to the device context.
  • Step E3 associating the OpenGL rendering context with a device context
  • Step E4 parsing the instruction input by the user into the drawing command in the OpenGL context environment
  • Step E5 Perform drawing of each display window in sequence according to the drawing command.
  • Step E6 determining a target display window to be drawn, and setting an OpenGL context of the display window to a current OpenGL context environment;
  • Step E7 executing the drawing command in the current OpenGL context to complete drawing
  • Step E9 triggering the next target display window (such as a child window).
  • the device context is first obtained, and then an OpenGL function wglCreateContext is used to generate an OpenGL rendering context (Hender Context) hGLRC from the device context; then wglMakeCurrent is called to associate the generated rendering context hGLRC with the device context hDC.
  • an OpenGL function wglCreateContext is used to generate an OpenGL rendering context (Hender Context) hGLRC from the device context; then wglMakeCurrent is called to associate the generated rendering context hGLRC with the device context hDC.
  • the display processing of the main window OpenGL can be implemented on the basis of the SDI application framework, and the initialization processing of the main window OpenGL can be performed in the OnCreate() function of the SDI window class, including, for example, setting the required pixel format, obtaining the designation.
  • the OpenGL rendering context is associated with the device context, setting the context of the main window (the main window 3D display) to the current OpenGL context.
  • the 3D display of the child window can be implemented by associating the window corresponding to the previously created modeless dialog with the newly created OpenGL rendering context.
  • the initialization process of each sub-window OpenGL is similar to the initialization process of the above main window, but should be placed in the OnCreate() function of each dialog box.
  • the instructions Upon receiving an instruction input by the user, such as a browsing instruction input by the user through various input devices, the instructions are parsed into a drawing command in the three-dimensional display context. For example, when the user performs a mouse movement operation in different browsing modes, after receiving the user's mouse movement instruction, the system sets the drawing parameters of OpenGL according to the current browsing mode, and then issues a message for updating the drawing.
  • an instruction input by the user such as a browsing instruction input by the user through various input devices
  • the instructions are parsed into a drawing command in the three-dimensional display context. For example, when the user performs a mouse movement operation in different browsing modes, after receiving the user's mouse movement instruction, the system sets the drawing parameters of OpenGL according to the current browsing mode, and then issues a message for updating the drawing.
  • the drawing of the main window can be done in the OnDraw() function, and the drawing of the child window can be done in the respective OnPaint() function.
  • the SendMessage is used to send a drawing message to the first child window.
  • a drawing process similar to the main window is performed.
  • the next child window is completed. Send a draw message, and so on.
  • FIG. 4 a structural block diagram of an embodiment of a multi-machine multi-screen 3D synchronous display system according to the present invention is shown.
  • the plurality of computers are connected through a network, and the display screen of the computer includes a main window and a sub-window.
  • the system can include the following units:
  • the operation information table maintenance unit 401 is configured to maintain an operation information table on each computer connected to the network according to a startup message of the computer connected to the network connection;
  • the startup message includes: 3D object information and display perspective information;
  • the operation information table includes: an IP address of all computers in the network and running status information thereof;
  • the running status information includes peer status information, and a master control Status information or dependent status information;
  • the startup unit 402 is configured to load the 3D object according to the startup message on a computer in the network, and cause each computer to draw the 3D object according to corresponding display angle information in its main window. At the same time, each computer separately generates a sub-window, and draws 3D objects of different angles of the computer other than the computer in the network in the sub-window; 6
  • -29- trigger instruction receiving unit 403 configured to receive a 3D object triggering instruction submitted by the user on any computer in the network;
  • the master state transition unit 404 is configured to: when the operating state information of the computer that receives the command is peer state information, convert the peer state information into master state information, and submit a control request message to the Run other computers recorded in the information table;
  • the slave state transition unit 405 is configured to convert the running state information to the slave state information when the other computer receives the control right request message;
  • the operation instruction receiving unit 406 is configured to receive a 3D object operation instruction submitted by the user on the computer having the master status information;
  • the host drawing update unit 407 is configured to separately update the drawing of the 3D object in the main window and the sub window of the current computer according to the operation instruction;
  • An update request unit 408, configured to generate a corresponding operation request according to the update drawing operation, and send the corresponding computer with the slave status information;
  • the slave drawing update unit 409 is configured to cause the computer having the slave state information to update the drawing of the 3D object in its corresponding main window and sub window according to the operation request.
  • the operation information table may further include a priority parameter
  • the embodiment may further include: a first priority determining unit: configured to select the highest priority by comparing the priority parameter of the computer that receives the instruction
  • the computer is a computer that needs to perform the state determination step.
  • the priority parameter may be generated according to a startup time and address information of a computer in the network.
  • the following units may also be included:
  • a time recording unit configured to record, in a running information table of each computer in the network, a time when the computer having the master state information issues a control right request message
  • a second priority judging unit configured to determine a computer that issues a control request cancellation, the earliest time of the packet, or a computer that issues the same control request message at the same time and has a higher priority parameter, and has the main control state information
  • the computer converts the running status information of the corresponding other computer into the dependent status information.
  • the area on the right that occupies a certain proportion of the screen width (such as 1/5) is the sub-window area, which is used to display the computer that has been running on the system.
  • the displayed screen, the left side is the 3D display area of the unit.
  • a computer runs and opens a 3D object, does not receive the running message of other computers, so the child window is empty.
  • the display diagram of A computer is shown in Figure 5.
  • the main window of A computer displays 3D.
  • the B computer runs the system, it receives a response message from the A computer, automatically loads the 3D object opened by A, and displays it according to the default perspective, and simultaneously draws a sub-window corresponding to the A computer.
  • the B computer The display diagram is shown in Figure 6.
  • the main window of the B computer displays the left side view of the 3D object, and a sub-window displays the front view corresponding to the main window of the A computer.
  • A receives the start message of B, and draws a sub-window corresponding to the B computer according to the message.
  • the display diagram of the A computer is as shown in FIG. 7, and the main window of the A computer displays the 3D object.
  • the front view there is a sub-window showing the left side view corresponding to the main window of the B computer.
  • the respective sub-windows of the A computer and the B computer are one, and the viewing angle of the 3D display on each computer is different.
  • the C computer also loads the corresponding 3D object and displays it according to the local default view; simultaneously creates two sub-windows corresponding to the A and B computers, and presses the perspective of the A and B computers in the sub-window respectively.
  • the 3D object is displayed.
  • the display diagram of the C computer is as shown in FIG. 8.
  • the main window of the C computer displays the rear view of the 3D object, and has two child windows.
  • the first child window displays the front view corresponding to the main window of the A computer.
  • the second sub-window displays the left side view corresponding to the main window of the B computer; at the same time, the A and B computers respectively create a sub-window corresponding to the display angle of the C computer.
  • the display diagram of the A computer is as shown in FIG. 9 , A
  • the main window of the computer displays the front view of the 3D object, there are two child windows, the first sub-window displays the left side view corresponding to the main window of the B computer, and the second sub-window displays the rear view corresponding to the main window of the C computer;
  • the schematic diagram is shown in Figure 10.
  • the main window of the B computer displays the left side view of the 3D object.
  • a computer display port corresponding to a front view of the main window, the second sub-window corresponding to the window main computer C displays a rear view.
  • H does not have A computer as the host to control the 3D object to rotate forward by an angle
  • B computer and C computer as the slave rotate the 3D object in the same direction and angle.
  • the display diagram of the A computer is as shown in FIG.
  • the main window of the A computer displays the top view of the 3D object rotated forward.
  • the first child window displays the left side view of the clockwise rotated 3D object corresponding to the main window of the B computer.
  • the second child window The bottom bottom view of the forward-rotating 3D object corresponding to the main window of the C computer is displayed.
  • the display diagram of the B computer is shown in Figure 12.
  • the main window of the B computer displays the left side view of the 3D object rotated clockwise.
  • the first sub-window displays the forward-rotated 3D corresponding to the main window of the A computer.
  • the top view of the object, the second child window displays the bottom bottom view of the forward rotated 3D object corresponding to the main window of the C computer.
  • the display diagram of the C computer is shown in Figure 13.
  • the main window of the C computer displays the bottom bottom view of the 3D object rotated forward.
  • the first sub-window displays the forward-rotated 3D corresponding to the main window of the A computer.
  • the front view of the object, the second sub-window displays the left side view of the clockwise rotated 3D object corresponding to the main window of the B computer.
  • the display diagram of the B computer is as shown in FIG. 14.
  • the main window of the B computer displays the left side view of the 3D object rotated clockwise, and has a sub window showing the corresponding direction of the main window of the C computer.
  • the display diagram of the C computer is shown in Fig. 15.
  • the main window of the C computer displays the bottom bottom view of the 3D object rotated forward, and has a child window showing the left side view of the clockwise rotated 3D object corresponding to the main window of the B computer. .
  • the display diagram of the C computer is as shown in Fig. 16.
  • the main window of the C computer displays the bottom bottom view of the 3D object rotated forward, and there is no child window.
  • the OpenGL drawing process may specifically include:
  • Step F1 creating an OpenGL display device and associating with the current display window. If there are child windows, create an OpenGL display device for each child window and associate it with it. 6
  • Step F3. Calling the Invalidate( ) function of the specified window triggers the displayed update.
  • Step F4 Perform the following processing in the OnDraw ( ) or OnPaint ( ) message response function of the specified window:
  • glPushMatrix() glLoadIdentity()
  • gluLookAt gluLookAt
  • glMultMatrixf other OpenGL drawing functions
  • glPopMatrixO calls to glPushMatrix(), glLoadIdentity(), gluLookAt(), glMultMatrixf(), other OpenGL drawing functions, and glPopMatrixO.
  • a multi-computer synchronization control method provided by the present invention a multi-computer synchronous control system, a multi-machine multi-screen 3D synchronous display method, and a multi-machine multi-screen 3D 6

Description

6
- 1 - 一种多计算机的同步控制方法及系统
本申请要求于 2008 年 5 月 9 日提交中国专利局、 申请号为 200810106253.1、 发明名称为 "一种多计算机的同步控制方法及系统"的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及多计算机的同步处理领域, 特别是涉及一种多计算机的同 步控制方法及系统。
背景技术
在分布式产品同步浏览、 基于网络的远程故障分析、 医疗会诊等应用 领域, 经常需要将多台计算机通过网络连接, 以同步完成某一种控制操作。 现有技术中, 这种多计算机同步控制的方法通常有以下两种:
第一种为, 基于客户机 /服务器模式的多计算机同步浏览控制系统。 在 这种系统中, 必须有一台计算机作为服务器, 系统中的其它计算机必须与 作为服务器的计算机通信, 才能完成所需要的同步控制。 其中, 作为服务 器的计算机和其它计算机上所运行的软件不同, 并且, 为保证系统的正常 运行, 要求作为服务器的计算机必须首先运行, 并一直保持运行状态。
第二种为, 基于对等模式的多计算机同步浏览控制系统。 这种系统不 需要专门的计算机作为服务器控制其它计算机, 但必须通过用户人工设置 主控计算机的控制权, 也就是说, 需要由用户预先执行控制请求命令, 在 获得允许后, 相应的计算机才能被设定为主控计算机, 以控制操作; 相应 地, 如果需要更换主控计算机, 则需要先执行当前主控计算机的控制权放 弃命令, 再针对新设置的主控计算机重新执行新的控制请求命令, 在获得 允许后, 才能完成所述主控计算机的更换。
可以看出, 以上现有技术的第一种实现方式存在如下缺点:
( 1 )对于同一个系统, 需要配备不同的两套软件: 服务器软件和客户 机软件, 增加了不必要的系统开销、 浪费资源, 而且成本较高;
( 2 )为了保证系统的正常运行, 必须至少有一台特定的计算机(服务 器) 先运行, 且一直处于运行状态, 同样导致了系统开销增加、 资源浪费 和成本较高的问题; 6
-2-
( 3 )作为实施控制的主控计算机的控制操作, 需要先发送给服务器, 然后由服务器再转发给系统的其它计算机, 会造成控制的延时, 导致系统 的反应速度变慢。
以上现有技术的第二种实现方式存在如下缺点:
主控计算机控制权的获得和放弃是由用户执行特定命令实现的, 使用 和操作不方便, 且经常会给用户造成系统失效的感觉, 用户使用体验较差。
总之, 目前需要本领域技术人员迫切解决的一个技术问题就是: 如何 能够创新的提出一种多计算机的同步控制机制, 用以在减少系统开销和资 源浪费、 降低成本的基础上, 简单、 高效地实现多计算机的同步控制, 并 使用户获得更好的使用体验。
发明内容
本发明所要解决的技术问题是提供一种多计算机的同步控制方法及系 统, 用以在减少系统开销和资源浪费、 降低成本的基础上, 简单、 高效地 实现多计算机的同步控制, 并使用户获得更好的使用体验。
为解决上述技术问题, 本发明实施例提供了如下技术方案:
一种多计算机的同步控制方法, 所述多台计算机通过网络连接, 所述 的方法包括:
在网络中的各台计算机上维护运行信息表, 所述运行信息表中包括: 网络中所有计算机的标识信息、 以及对应计算机的运行状态信息;
接收用户在网络中任一台计算机上输入的同步控制指令;
在所述接收指令的计算机的运行状态信息符合预置规则时, 对所述运 行信息表中记录的计算机上执行所述同步控制操作。
优选的, 所述运行状态信息包括对等状态信息、 主控状态信息或从属 状态信息。
优选的, 所述同步控制指令为同步控制触发指令, 所述执行同步控制 的步骤包括:
依据所述同步控制触发指令判断所述接收指令的计算机的运行状态信 息是否为对等状态信息;
若是, 则将所述对等状态信息转换为主控状态信息, 并提交控制权请 6
-3 - 求消息至所述运行信息表中记录的其它计算机;
所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为 从属状态信息。
优选的, 所述运行信息表中还包括: 优先级参数, 所述执行同步控制 的步骤还包括:
通过对比所述接收指令的计算机的优先级参数, 选取优先级最高的一 台计算机为需要执行所述状态判断步骤的计算机。
优选的, 所述优先级参数根据网络中计算机的启动时间和地址信息生 成。
优选的, 所述执行同步控制的步骤还包括:
在网络中各计算机的运行信息表中, 记录所述具有主控状态信息的计 算机发出控制权请求消息的时间;
确定发出控制权请求消息的时间最早的计算机, 或者, 发出控制权请 求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计 算机, 将相应的其它计算机的运行状态信息转换为从属状态信息。
优选的, 所述同步控制指令为同步控制操作指令, 所述执行同步控制 的步骤还包括:
依据所述同步控制操作指令判断所述接收指令的计算机的运行状态信 息是否为主控状态信息;
若是, 则在所述具有主控状态信息的计算机上执行所述指令, 并生成 相应的控制操作请求发送至对应的具有从属状态信息的计算机;
所述具有从属状态信息的计算机依据所述控制操作请求执行相应的操 作。
优选的, 所述的方法, 还包括:
若所述具有主控状态信息的计算机在预设的时间阔值内未接收到同步 控制指令, 则将所述计算机的主控状态信息转换为对等状态信息, 并发送 控制权放弃消息至所述运行信息表中记录的具有从属状态信息的计算机; 所述具有从属状态信息的计算机依据所述控制权放弃消息, 转换其运 行状态信息为对等状态信息。 本发明实施例还公开了一种多计算机的同步控制系统, 所述多台计算 机通过网络连接, 所述的系统包括:
运行信息表维护模块, 用于在网络中的各台计算机上维护运行信息表, 所述运行信息表中包括: 网络中所有计算机的标识信息、 以及对应计算机 的运行状态信息;
指令接收处理模块, 用于接收用户在网络中任一台计算机上输入的同 步控制指令;
同步控制操作模块, 用于在所述接收指令的计算机的运行状态信息符 合预置规则时, 对所述运行信息表中记录的计算机上执行所述同步控制操 作。
优选的, 所述运行状态信息包括对等状态信息、 主控状态信息或从属 状态信息。
优选的, 所述同步控制指令为同步控制触发指令, 所述同步控制操作 模块包括:
对等状态判断子模块, 用于依据所述同步控制触发指令判断所述接收 指令的计算机的运行状态信息是否为对等状态信息; 若是, 则触发主控状 态转换子模块;
主控状态转换子模块, 用于将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换子模块, 用于所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为从属状态信息。
优选的, 所述运行信息表中还包括: 优先级参数, 所述同步控制操作 模块还包括:
第一优先级判断子模块, 用于对比所述接收指令的计算机的优先级参 数,选取优先级最高的一台计算机为需要执行所述状态判断步骤的计算机。
优选的, 所述同步控制操作模块还包括:
时间记录子模块, 用于在网络中各计算机的运行信息表中, 记录所述 具有主控状态信,包、的计算机发出控制权请求消 ,包、的时间;
第二优先级判断子模块, 用于确定发出控制权请求消息的时间最早的 计算机, 或者, 发出控制权请求消息的时间相同且优先级参数较高的计算 机, 为具有主控状态信息的计算机, 将相应的其它计算机的运行状态信息 转换为从属状态信息。
优选的, 所述同步控制指令为同步控制操作指令, 所述同步控制操作 模块还包括:
主控状态判断子模块, 用于依据所述同步控制操作指令判断所述接收 指令的计算机的运行状态信息是否为主控状态信息; 若是, 则触发本机执 行发送子模块;
本机执行发送子模块, 用于在所述具有主控状态信息的计算机上执行 所述指令, 并生成相应的控制操作请求发送至对应的具有从属状态信息的 计算机;
同步操作子模块, 用于使所述具有从属状态信息的计算机依据所述控 制操作请求执行相应的操作。
优选的, 所述的系统, 还包括:
状态更新模块, 用于在所述具有主控状态信息的计算机在预设的时间 阔值内未接收到同步控制指令时, 将所述计算机的主控状态信息转换为对 等状态信息, 并发送控制权放弃消息至所述运行信息表中记录的具有从属 状态信息的计算机; 并使所述具有从属状态信息的计算机依据所述控制权 放弃消息, 转换其运行状态信息为对等状态信息。
本发明实施例还公开了一种多机多屏的 3D同步显示方法,所述多台计 算机通过网络连接, 所述计算机的显示屏包括主窗口和子窗口, 所述的方 法包括:
依据进入网络连接的计算机的启动消息, 在网络中连接的各台计算机 上维护运行信息表; 所述启动消息包括: 3D对象信息和显示视角信息; 所 述运行信息表中包括: 网络中所有计算机的 IP地址及其运行状态信息; 所 述运行状态信息包括对等状态信息、 主控状态信息或从属状态信息;
所述网络中的计算机上分别依据所述启动消息加载所述 3D 对象, 并 且,各台计算机在其主窗口中分别按照对应的显示视角信息绘制所述 3D对 象, 同时, 各台计算机分别生成子窗口, 在子窗口中绘制网络中除本计算 一 6—
机外的其它计算机的、 不同视角的 3D对象;
接收用户在网络中任一台计算机上提交的 3D对象触发指令;
若所述接收指令的计算机的运行状态信息为对等状态信息, 则将所述 对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信 息表中记录的其它计算机;
所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为 从属状态信息;
接收用户在所述具有主控状态信息的计算机上提交的 3D 对象操作指 令,并根据所述指令在当前计算机的主窗口和子窗口中分别更新所述 3D对 象的绘制;
依据所述更新绘制操作生成相应的操作请求发送至对应的具有从属状 态信息的计算机, 所述具有从属状态信息的计算机依据所述操作请求, 分 别在其对应的主窗口和子窗口中更新所述 3D对象的绘制。
优选的, 所述运行信息表中还包括: 优先级参数, 所述的方法还包括: 通过对比所述接收指令的计算机的优先级参数, 选取优先级最高的一 台计算机为需要执行所述状态判断步骤的计算机。
优选的, 所述优先级参数根据网络中计算机的启动时间和地址信息生 成。
优选的, 所述的方法还包括:
在网络中各计算机的运行信息表中, 记录所述具有主控状态信息的计 算机发出控制权请求消息的时间;
确定发出控制权请求消息的时间最早的计算机, 或者, 发出控制权请 求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计 算机, 将相应的其它计算机的运行状态信息转换为从属状态信息。
本发明实施例还公开了一种多机多屏的 3D同步显示系统,所述多台计 算机通过网络连接, 所述计算机的显示屏包括主窗口和子窗口, 所述的系 统包括:
运行信息表维护单元, 用于依据进入网络连接的计算机的启动消息, 在网络中连接的各台计算机上维护运行信息表; 所述启动消息包括: 3D对 6 象信息和显示视角信息; 所述运行信息表中包括: 网络中所有计算机的 IP 地址及其运行状态信息; 所述运行状态信息包括对等状态信息、 主控状态 信息或从属状态信息;
启动单元, 用于在所述网络中的计算机上分别依据所述启动消息加载 所述 3D对象, 并且,使各台计算机在其主窗口中分别按照对应的显示视角 信息绘制所述 3D对象, 同时, 各台计算机分别生成子窗口, 在子窗口中绘 制网络中除本计算机外的其它计算机的、 不同视角的 3D对象;
触发指令接收单元, 用于接收用户在网络中任一台计算机上提交的 3D 对象触发指令;
主控状态转换单元, 用于在所述接收指令的计算机的运行状态信息为 对等状态信息时, 将所述对等状态信息转换为主控状态信息, 并提交控制 权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换单元, 用于在所述其它计算机接收所述控制权请求消息 时, 将其运行状态信息转换为从属状态信息;
操作指令接收单元, 用于接收用户在所述具有主控状态信息的计算机 上提交的 3D对象操作指令;
主机绘制更新单元, 用于根据所述操作指令在当前计算机的主窗口和 子窗口中分别更新所述 3D对象的绘制;
更新请求单元, 用于依据所述更新绘制操作生成相应的操作请求发送 至对应的具有从属状态信息的计算机;
从机绘制更新单元, 用于使所述具有从属状态信息的计算机依据所述 操作请求, 分别在其对应的主窗口和子窗口中更新所述 3D对象的绘制。
与现有技术相比, 本发明具有以下优点:
首先, 本发明在简单的对等计算机网络环境下, 实现了多台计算机同 步控制操作的处理。 本发明通过在每一台计算机中维护运行信息表, 动态 地将系统中的计算机划分为不同的状态; 通过简单有效的通信协议和明确 的协议处理方法, 实现了系统中各台计算机都可以自由地对被控对象实施 无冲突的同步控制。 应用本发明, 系统中各计算机运行同一个软件, 无须 指定某一台计算机为特殊计算机, 也无须指定某一台计算机必须处于不停 6
一 8—
机的运行状态, 各计算机可以随时进入和退出系统。 用户对控制对象的操 作无须使用和控制操作不一致的额外命令, 使用和操作方法简单, 并有效 地减少了系统开销和资源浪费、 降低了成本、 用户使用体验好。
再者, 本发明针对实际中各种多计算机冲突的情形, 通过判断优先级 确定唯一主机执行相应操作, 操作简单、 无需额外资源和系统开销, 使用 户获得更好体验。
最后, 本发明技术实现简单, 无技术障碍, 无特殊保密算法。
附图说明
图 1是本发明的一种多计算机的同步控制方法实施例的流程图; 图 2是本发明的一种多计算机的同步控制系统实施例的结构框图; 图 3是基于本发明核心构思实现的一种多机多屏的 3D同步显示方法实 施例的流程图;
图 4是本发明的一种 机多屏的 3D同步显示系统实施例的结构框图; 图 5是应用本发明的 机多屏 3D同步显示系统的一个具体实例中的显 示示意图 1 ;
图 6是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的显 示示意图 2;
图 7是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的显 示示意图 3 ;
图 8是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的显 示示意图 4;
图 9是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的显 示示意图 5 ;
图 10是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 6;
图 11是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 7 ;
图 12是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 8; 6
-9- 图 13是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 9;
图 14是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 10;
图 15是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 11 ;
图 16是应用本发明的多机多屏 3D同步显示系统的一个具体实例中的 显示示意图 12。
具体实施方式
为使本发明的上述目的、 特征和优点能够更加明显易懂, 下面结合附 图和具体实施方式对本发明作进一步详细的说明。
本发明可用于众多通用或专用的计算系统环境或配置中。 例如: 个人 计算机、 服务器计算机、 手持设备或便携式设备、 平板型设备、 多处理器 系统、 基于微处理器的系统、 置顶盒、 可编程的消费电子设备、 网络 PC、 小型计算机、 大型计算机、 包括以上任何系统或设备的分布式计算环境等 等。
本发明可以在由计算机执行的计算机可执行指令的一般上下文中描 述, 例如程序模块。 一般地, 程序模块包括执行特定任务或实现特定抽象 数据类型的例程、 程序、 对象、 组件、 数据结构等等。 也可以在分布式计 算环境中实践本发明, 在这些分布式计算环境中, 由通过通信网络而被连 接的远程处理设备来执行任务。 在分布式计算环境中, 程序模块可以位于 包括存储设备在内的本地和远程计算机存储介质中。
本发明实施例的核心构思之一在于, 在由网络连接的多台计算机上, 针对每一台计算机维护一个运行信息表, 该信息表包含所有计算机的相关 信息, 在用户对其中任一台计算机进行同步控制操作时, 读取该台计算机 上的运行信息表, 根据操作指令与当前计算机的运行状态判断是否符合预 置规则, 在符合的条件下, 发起同步控制操作。
参考图 1 , 示出了本发明的一种多计算机的同步控制方法实施例的流 程图, 其中, 所述多台计算机通过网络连接, 具体可以包括以下步骤: 6
- 10- 步骤 101、 在网络中的各台计算机上维护运行信息表;
所述运行信息表中可以包括: 网络中所有计算机的标识信息、 以及对 应计算机的运行状态信息。
所谓网络, 通俗地讲就是由多台计算机(或其它计算机网络设备) 通 过传输介质和软件物理 (或逻辑) 连接在一起组成的。 总的来说计算机网 络的组成基本上包括: 计算机、 网络操作系统、 传输介质 (可以是有形的, 也可以是无形的, 如无线网络的传输介质就是空气) 以及相应的应用软件 四部分。 本发明主要涉及在应用软件方面作出的改进。 在本发明中, 所述 网络可以为任一种网络, 如局域网、 城域网、 广域网和互联网等, 优选的, 可以由以太网连接多台计算机。 所述计算机标识信息则可以为网络地址信 息。
在实际中, 所述运行状态信息可以包括对等状态信息、 主控状态信息 或从属状态信息。 即网络中计算机启动后所处的状态分分别为对等状态、 主控状态和从属状态三种。 网络中的计算机处于这三种状态中的一种, 并 且在特定时间下, 只有一台计算机是处于主控状态, 也就是说, 在同一时 刻下, 不会存在多台主控状态的计算机。 对此, 本发明还提出了一种全新 的冲突防范机制, 将在下文相关部分进行说明。
维护运行信息表的操作具体可以包括以下几种情形:
一、 网络中的某台计算机启动, 将启动消息 (如本机地址、 启动时间 等信息) 以网络广播消息的方式, 发送给网络中的其它计算机; 网络上已 启动的计算机响应该消息, 并与该新启动的计算机建立连接, 然后在所有 启动的计算机上分别维护运行信息表。 具体可以为:
通过计算机标识信息 (如计算机的网络地址) 判断运行信息表中是否 已有当前计算机的记录, 如果是, 则生成新的信息表记录 (如本机地址和 启动时间), 用这条新记录替换相应地址的原记录; 如果否, 则直接在运行 信息表中添加所述新记录。
对于新进入网络中的计算机, 可以通过读取网络中其它计算机的运行 状态来确定本机的运行状态。 例如, 如果网络中的其它计算机都于对等状 态, 则设置本机的运行状态为对等状态; 如果本机启动时, 收到网络中其 6
- 11 - 它计算机发出的控制权请求消息, 则设置本机的运行状态为从属状态。
二、 网络中的某台计算机退出, 将退出消息以网络广播消息的方式, 发送给网络中的其它计算机; 网络上已启动的计算机响应该消息, 并与该 计算机断开连接, 然后在启动的计算上分别维护运行信息表。 具体可以为: 依据计算机标识信息删除运行信息表中请求退出的计算机的对应记 录; 如果该计算机退出前的运行状态为主控状态, 则复位到对等状态。
三、 根据实际中各计算机运行状态信息的转换实时更新所述运行信息 表中相应计算机的运行状态信息。
例如, 在执行同步控制过程中, 相应计算机从对等状态转换为主控状 态, 从对等状态转换为从属状态, 或从主控状态转换为从属状态等; 或者, 在一段时间没有执行同步控制操作时, 从主控状态或从属状态转换为对等 状态等。
当然, 本领域技术人员根据实际需要或经验釆用任一种方式维护运行 信息表都是可行的, 上述方法仅仅用于示例, 本发明对此不需要进行限定。
步骤 102、 接收用户在网络中任一台计算机上输入的同步控制指令; 所述同步控制指令可以包括同步控制触发指令和同步控制操作指令。 可以理解的是, 对于仅控制本地计算机机操作的非同步控制指令, 则按照 现有的计算机指令处理方式在本地计算机上处理即可。
步骤 103、 在所述接收指令的计算机的运行状态信息符合预置规则时, 对所述运行信息表中记录的计算机上执行所述同步控制操作。
处理本步骤的核心构思之一在于, 在对等状态下, 先发起同步控制的 计算机获得控制权, 成为主机; 其它计算机则成为从机, 按主机的控制进 行同步控制处理。 对此, 以下列举几种执行同步控制操作的方法来进一步 说明。 需要说明的是, 本发明所述对等状态为具有对等状态信息, 主控状 态为具有主控状态信息, 从属状态为具有从属状态信息; 主机即对应具有 主控状态信息的计算机, 从机即对应具有从属状态信息的计算机, 对等机 即对应具有对等状态信息的计算机。
方法一:
如果接收到的同步控制指令为同步控制触发指令, 则可以通过以下子 6
- 12- 步骤执行同步控制操作:
子步骤 Al、依据所述同步控制触发指令判断所述接收指令的计算机的 运行状态信息是否为对等状态信息;
子步骤 A2、 若是, 则将所述对等状态信息转换为主控状态信息, 并提 交控制权请求消息至所述运行信息表中记录的其它计算机;
子步骤 A3、 所述其它计算机接收所述控制权请求消息, 将其运行状态 信息转换为从属状态信息。
若当前计算机的运行状态信息不是对等状态信息, 则可能是主控状态 信息或从属状态信息。 在实际中, 如果是主控状态信息, 则可以忽略同步 控制触发指令, 等待用户发出同步控制操作指令。 如果是从属状态信息, 也可以忽略该同步控制触发指令, 并提示用户目前不能操作。 当然, 以上 操作仅仅用于举例, 本发明对此不作限制。
优选的, 还可以在计算机的对等状态转换为主控状态时, 启动转换延 时计数器, 用以判断所述主控状态的转换是否超时, 如果是, 则放弃当前 计算机主控状态的转换。
方法二:
在对等状态下, 可能出现两台或两台以上的计算机同时进行本地同步 控制触发操作, 此时将出现冲突。 按照上述处理本步骤的核心构思, 当出 现冲突时, 需要按照某种规则, 仅使一台计算机成为主机。
具体而言, 如果接收到的同步控制指令为同步控制触发指令, 可以在 运行信息表中添加优先级参数, 通过以下子步骤执行同步控制操作:
子步骤 Bl、 对比所述接收指令的计算机的优先级参数, 选取优先级最 高的一台计算机, 判断该计算机的运行状态信息是否为对等状态信息; 子步骤 B2、 若是, 则将所述对等状态信息转换为主控状态信息, 并提 交控制权请求消息至所述运行信息表中记录的其它计算机;
子步骤 B3、 所述其它计算机接收所述控制权请求消息, 将其运行状态 信息转换为从属状态信息。
优选的, 所述优先级参数可以根据网络中计算机的启动时间和地址信 息生成。 例如, 对于启动时间在先的计算机, 生成较高的优先级参数; 若 6
- 13 - 启动时间相同, 则对网络地址大的计算机, 生成较高的优先级参数。
方法三、
实际中另一种冲突的情形为, 由于网络传输质量等引起的传输时间延 迟, 可能某一台先进行同步控制触发操作的计算机 A的控制权请求消息到 达另一台计算机 B的时间, 比计算机 B开始同步控制触发操作的时间晚, 则这两台计算机都会转换为主控状态信息, 并向其它计算机发送控制权请 求消息。
在这种情况下, 可以通过以下子步骤执行同步控制操作:
子步骤 Cl、依据所述同步控制触发指令判断所述接收指令的计算机的 运行状态信息是否为对等状态信息;
子步骤 C2、 若是, 则将所述对等状态信息转换为主控状态信息, 并提 交控制权请求消息至所述运行信息表中记录的其它计算机;
子步骤 C3、 所述其它计算机接收所述控制权请求消息, 将其运行状态 信息转换为从属状态信息;
子步骤 C4、 在网络中各计算机的运行信息表中, 记录所述具有主控状 态信息的计算机发出控制权请求消息的时间;
子步骤 C5、 确定发出控制权请求消息的时间最早的计算机, 或者, 发 出控制权请求消息的时间相同且优先级参数较高的计算机, 为具有主控状 态信息的计算机, 将相应的其它计算机的运行状态信息转换为从属状态信 息。
例如, 一种确定主机过程可以为:
记计算机响应本地同步控制触发指令的时间为 T1 , 记接收到的控制权 请求消息的时间 (即发送该控制权请求消息的计算机响应本地同步控制触 发指令的时间) 为 T2;
当 T1 < T2 时, 表示本地计算机触发同步控制操作的时间较早, 则将 本地计算机的运行状态信息转换为主控状态信息。
当 Tl > Τ2时, 表示发送该控制权请求消息的远程计算机响应同步控 制的时间较早, 则将远程计算机的运行状态信息转换为主控状态信息, 将 本地计算机的运行状态信息转换为从属状态信息。 6
- 14- 当 Tl = T2时, 表示本地计算机响应同步控制触发操作的时间与发送 该控制权请求消息的远程计算机响应同步控制触发操作的时间相同, 则再 比较两台计算机的优先级参数。 如果本地计算机的优先级参数较高, 则将 本地计算机的运行状态信息转换为主控状态信息; 如果远程计算机的优先 级参数高, 则将远程计算机的运行状态信息转换为主控状态信息, 将本地 计算机的运行状态信息转换为从属状态信息。
简而言之, 对于方法二所示的冲突情形, 相应的冲突防范机制为, 使 优先级最高的计算机获得控制权, 成为主机(即获得主控状态信息), 其它 计算机就成为从机(即获得从属状态信息)。 对于方法三所示的冲突情形, 相应的冲突防范机制为, 每台计算机在对等状态下收到本机用户的同步控 制触发操作时, 记录该时刻的时间, 并在发送给其它计算机的控制权请求 消息中包含该时间。 某台处于对等状态的计算机接收到多个控制权请求消 息时, 或某台主机收到其它计算机的控制权请求消息时, 通过比较各控制 权请求消息的时间, 确定成为主机的计算机。
在实际中, 从机的冲突防范处理方法同样可以参照以上方法。 可以理 解, 本地计算机之所以成为从机, 是因为它先响应了网络上某台计算机发 送的控制权请求消息。 产生冲突的消息来源只有一种情况: 网络上另一台 计算机发送的控制权请求消息。 因此处理冲突的方法可以按照方法三相同 的原理比较当前主机和控制权请求消息的主机响应同步控制触发操作的时 间和优先级, 确定新的主机。 若比较的结果是当前主机还是主机, 则本地 计算机仍为当前主机的从机, 放弃收到的控制权请求信息。 若比较的结果 是发出控制权请求消息的主机应该成为主机, 则处理的方法是本地计算机 成为该主机的从机, 并用该主机的信息替换当前主机的信息。
相应地, 对等机的冲突防范处理方法也可以参照以上方法。 处于对等 状态的计算机收到冲突的消息只有一种情况: 同时收到网络上一台以上的 计算机同发送的控制权请求消息。 因此处理冲突的方法可以按照方法三相 同的原理比较这些控制权请求消息响应同步控制触发操作的时间和发送消 息计算机的优先级, 从而确定新的主机。
方法四、 6
- 15 - 在执行所述同步触发操作后, 通常会进一步执行同步控制操作, 用户 在网络中任一台计算机上输入同步控制操作指令, 则相应的同步控制操作 可以包括以下子步骤:
子步骤 Dl、依据所述同步控制操作指令判断所述接收指令的计算机的 运行状态信息是否为主控状态信息;
子步骤 D2、 若是, 则在所述具有主控状态信息的计算机上执行所述指 令,并生成相应的控制操作请求发送至对应的具有从属状态信息的计算机; 子步骤 D3、所述具有从属状态信息的计算机依据所述控制操作请求执 行相应的操作。
若当前计算机的运行状态信息不是主机状态信息, 则只可能是从属状 态信息。 在这种情况下, 可以向用户返回出错信息。
本领域技术人员易于想到上述方法一——方法四相关步骤的组合应 用, 都是本发明的实施方案, 但是由于篇幅限制, 本说明书在此就不—— 详述了。
在本发明实施例中, 还可以包括步骤:
若所述具有主控状态信息的计算机在预设的时间阔值内未接收到同步 控制指令, 则将所述计算机的主控状态信息转换为对等状态信息, 并发送 控制权放弃消息至所述运行信息表中记录的具有从属状态信息的计算机; 所述具有从属状态信息的计算机依据所述控制权放弃消息, 转换其运 行状态信息为对等状态信息。 例如, 一种运行本发明应用软件的过程大致可以包括如下步骤: 步骤 S1 : 在软件开始运行时执行系统组成检测, 它将本机 IP地址、 启 动时间等启动消息以网络广播消息的方式发送给网络中的其它计算机; 步骤 S2: 系统运行信息表维护处理。 接收系统中其它计算机步骤 S1 和步骤 S4的消息并进行相应的处理。
对于步骤 S1的启动消息,如果系统运行信息表中没有发送该消息计算 机的 IP地址, 则用该信息的 IP地址和启动时间生成一个新的信息表项; 如果系统运行信息表中存在发送该消息计算机的 IP地址,则用该信息的 IP 6
- 16- 地址和启动时间替换该信息表中对应项的内容, 为该表项 (对应于发送该 消息的计算机) 分配新的优先级。 然后向发送该消息的计算机回送启动应 答消息。
对于步骤 S4的退出消息, 如果系统信息运行表中存在该消息的 IP地 址, 删除系统信息运行表中的对应项, 断开与该计算机的连接, 如果发送 该消息的计算机还是主控计算机, 则复位主控计算机状态, 本机转入对等 状态; 如果系统运行信息表中没有该消息的 IP地址, 则丟弃该消息。
步骤 S3 : 接受本地用户输入的同步控制指令, 对于非同步操作指令、 同步控制触发指令和同步控制操作指令三种, 分别做如下不同处理:
对于非同步操作指令, 转到步骤 S4;
对于同步控制触发指令, 如果本机处于对等状态, 则将本机转入主控 状态, 启动主控状态转换延时计数器, 生成控制权请求消息 (该消息包括 本机 IP地址和本机收到该操作的时间 )并向各计算机发送该消息, 再转到 步骤 S6。如果本机处于主控状态,则复位状态转换定时器,再转到步骤 S5。 如果本机处于从属状态, 则放弃该操作, 再转到步骤 S5。
对于同步控制操作指令, 如果本机处于主控状态, 则向其它计算机发 送同步控制消息, 复位状态转换定时器, 到步骤 S6。 如果本机处于从属状 态, 则放弃该操作, 到步骤 S5。
步骤 S4: 用户非同步操作指令的处理。
如果用户的操作是退出系统命令, 则向系统各计算机发送本机退出消 息, 然后退出程序。 如果是非退出系统命令, 则执行这些命令, 到步骤 S5。
步骤 S5: 接收来自系统中其它计算机(步骤 S3 )的控制消息, 并按控 制权请求消息、 同步控制消息和控制权放弃消息分别做如下不同的处理: ( 1 )控制权请求消息:
A、 本机处于对等状态时的处理: 收到其它单个计算机的控制权请求 消息时, 本机进入从属状态, 发送消息的计算机为主控计算机, 保存主机 控制权请求消息的时间与主机的优先级; 同时收到其它多个计算机的控制 权请求消息时,对这些控制权请求消息的时间和优先级参数进行冲突判断, 方法是: 比较计算机控制权请求消息的时间, 如果控制权请求的时间不同, 6
- 17- 则时间早的计算机将成为主机; 如果控制权请求的时间相同, 则优先级高 的计算机将成为主机。 确定主机后, 保存主机控制权请求消息的时间与主 机的优先级。 到步骤 S2。
B、 本机处于主控状态时的处理: 将控制权请求消息的时间和优先级 参数与本主机的对应参数进行冲突判断, 确定新的主机(方法同本步骤 A 中所述), 保存主机控制权请求消息的时间与主机的优先级, 如果新主机不 是本机, 则本机转入从属状态, 关闭主控状态转换延时计数器。 到步骤 S2。
C、 本机处于从属状态时的处理: 将控制权请求消息的同步控制时间 和优先级参数与当前主机的对应参数进行冲突判断 (方法同本步骤 A中所 述),确定新的主机,保存新主机控制权请求消息的时间与新主机的优先级 , 本机仍为从属状态。 到步骤 S2。
( 2 ) 同步操作消息: 仅处于从属状态的计算机会收到同步操作消息, 从同步操作消息中提取同步控制命令, 到步骤 S6。
( 3 )控制权放弃消息: 仅处于从属状态的计算机会收到控制权放弃消 息, 清除主机控制权请求消息的时间与主机的优先级, 本机转入对等状态。 到步骤 S2。
步骤 S6: 用户同步操作指令的处理。 将来自步骤 S3 的本地用户同步 控制命令和来自步骤 S5的同步控制消息命令转化为控制操作,实现对本地 计算机的同步操作处理。 到步骤 S7。
步骤 S7 : 主控状态退出消息处理。如果本机处于对等状态或从属状态, 则到步骤 S2。 否则, 判断主控状态转换延时计数器是否超时, 如果超时, 则将本机转入对等状态, 关闭主控状态转换延时计数器, 并向系统中其它 计算机发送控制权放弃消息。 到步骤 S2。
可以看出, 本发明在简单的对等计算机网络环境下, 实现了多台计算 机同步控制操作的过程。 通过在每一台计算机中设置运行信息表, 动态地 将系统中的计算机划分为不同的状态; 通过简单有效的通信协议和明确的 协议处理方法, 实现了系统中各台计算机都可以自由地对被控对象实施无 冲突的同步控制。 因而本发明可以使系统中各计算机运行同一个软件, 无 须指定某一台计算机为特殊计算机, 也无须指定某一台计算机必须处于不 6
- 18- 停机的运行状态, 各计算机可以随时进入和退出系统。 用户对控制对象的 操作无须使用和控制操作不一致的额外命令, 使用和操作方法简单。 参考图 2 , 示出了本发明的一种多计算机的同步控制系统实施例的结 构框图, 所述多台计算机通过网络连接, 所述的系统可以包括:
运行信息表维护模块 201 , 用于在网络中的各台计算机上维护运行信 息表, 所述运行信息表中包括: 网络中所有计算机的标识信息、 以及对应 计算机的运行状态信息;
指令接收处理模块 202 , 用于接收用户在网络中任一台计算机上输入 的同步控制指令;
同步控制操作模块 203 , 用于在所述接收指令的计算机的运行状态信 息符合预置规则时, 对所述运行信息表中记录的计算机上执行所述同步控 制操作。
优选的, 所述运行状态信息可以包括对等状态信息、 主控状态信息或 从属状态信息。
本发明的一种实施例为, 所述同步控制指令为同步控制触发指令, 所 述同步控制操作模块可以包括:
对等状态判断子模块, 用于依据所述同步控制触发指令判断所述接收 指令的计算机的运行状态信息是否为对等状态信息; 若是, 则触发主控状 态转换子模块;
主控状态转换子模块,用于将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换子模块,用于所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为从属状态信息。
本发明的另一种实施例为, 所述运行信息表中还可以包括: 优先级参 数, 所述接收指令的计算机为多个同时接收指令的计算机, 所述同步控制 操作模块包括:
第一优先级判断子模块, 用于对比所述接收指令的计算机的优先级参 数,选取优先级最高的一台计算机为需要执行所述状态判断步骤的计算机; 6
- 19- 对等状态判断子模块, 用于依据所述同步控制触发指令判断所述接收 指令的计算机的运行状态信息是否为对等状态信息; 若是, 则触发主控状 态转换子模块;
主控状态转换子模块,用于将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换子模块,用于所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为从属状态信息。
本发明的另一种实施例为, 所述同步控制操作模块可以包括: 对等状态判断子模块, 用于依据所述同步控制触发指令判断所述接收 指令的计算机的运行状态信息是否为对等状态信息; 若是, 则触发主控状 态转换子模块;
主控状态转换子模块,用于将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换子模块,用于所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为从属状态信息;
时间记录子模块, 用于在网络中各计算机的运行信息表中, 记录所述 具有主控状态信,包、的计算机发出控制权请求消 ,包、的时间;
第二优先级判断子模块, 用于确定发出控制权请求消息的时间最早的 计算机, 或者, 发出控制权请求消息的时间相同且优先级参数较高的计算 机, 为具有主控状态信息的计算机, 将相应的其它计算机的运行状态信息 转换为从属状态信息。
本实施例中, 所述同步控制指令为同步控制操作指令时, 所述同步控 制操作模块还可以包括:
主控状态判断子模块, 用于依据所述同步控制操作指令判断所述接收 指令的计算机的运行状态信息是否为主控状态信息; 若是, 则触发本机执 行发送子模块;
本机执行发送子模块, 用于在所述具有主控状态信息的计算机上执行 所述指令, 并生成相应的控制操作请求发送至对应的具有从属状态信息的 计算机; 6
-20- 同步操作子模块, 用于使所述具有从属状态信息的计算机依据所述控 制操作请求执行相应的操作。
优选的, 本发明实施例还可以包括:
状态更新模块, 用于在所述具有主控状态信息的计算机在预设的时间 阔值内未接收到同步控制指令时, 将所述计算机的主控状态信息转换为对 等状态信息, 并发送控制权放弃消息至所述运行信息表中记录的具有从属 状态信息的计算机; 并使所述具有从属状态信息的计算机依据所述控制权 放弃消息, 转换其运行状态信息为对等状态信息。
由于图 2所示的系统实施例可以相应于图 1所示的方法实施例, 所以 描述的比较简单, 相关之处参见方法实施例的部分说明即可。
科学计算可视化,是上世纪 80年代后期随着计算机技术的迅速发展而 出现的一门新兴技术, 它通过把各种复杂的数据转换成直观的图形或图像, 以方便人们正确理解数据或过程的含义。 它的主要目的是更加有效地处理 和分析越来越多的科学和工程数据, 为科研和工程人员提供一个有效、 直 观地探索和研究客观世界的工具。 科学计算可视化发展的初期, 计算机硬 件的成本较高, 而且性能有限。 当时的可视化技术主要集中在高分辨率、 大视野显示技术的研究上。 在这一阶段, 国外公司依靠其先进的硬件制造 技术, 研发了高档专用的可视化系统, 这类系统配备着专用软件, 在当时 提供了无以伦比的显示性能, 但系统价格昂贵, 远没有达到普及应用的地 步。 随着计算机技术的发展, 其硬件成本的不断降低和性能的不断提高为 科学计算可视化的发展提供了巨大的推动力。
可视化技术的高层次应用主要涉及多机多屏的 3D同步显示,目前已经 广泛应用于分布式产品同步浏览、 基于网络的远程故障分析、 医疗会诊等 领域。 简而言之, 这种多机多屏的 3D同步显示技术就是用于实现, 在由网 络连接的多台计算机上, 对同一 3D对象进行同步显示控制。
参考图 3 , 示出了基于本发明核心构思实现的一种多机多屏的 3D同步 显示方法实施例的流程图, 所述多台计算机通过网络连接, 所述计算机的 显示屏可以包括主窗口和子窗口, 本实施例可以包括以下步骤:
步骤 301、 依据进入网络连接的计算机的启动消息, 在网络中连接的 6
-21 - 各台计算机上维护运行信息表;
其中, 所述启动消息包括: 3D对象信息和显示视角信息; 所述运行信 息表中包括: 网络中所有计算机的 IP地址及其运行状态信息; 所述运行状 态信息包括对等状态信息、 主控状态信息或从属状态信息;
步骤 302、 所述网络中的计算机上分别依据所述启动消息加载所述 3D 对象, 并且, 各台计算机在其主窗口中分别按照对应的显示视角信息绘制 所述 3D对象, 同时, 各台计算机分别生成子窗口, 在子窗口中绘制网络中 除本计算机外的其它计算机的、 不同视角的 3D对象;
步骤 303、接收用户在网络中任一台计算机上提交的 3D对象触发指令; 步骤 304、 若所述接收指令的计算机的运行状态信息为对等状态信息, 则将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所 述运行信息表中记录的其它计算机;
步骤 305、 所述其它计算机接收所述控制权请求消息, 将其运行状态 信息转换为从属状态信息;
步骤 306、接收用户在所述具有主控状态信息的计算机上提交的 3D对 象操作指令, 并根据所述指令在当前计算机的主窗口和子窗口中分别更新 所述 3D对象的绘制;
步骤 307、 依据所述更新绘制操作生成相应的操作请求发送至对应的 具有从属状态信息的计算机, 所述具有从属状态信息的计算机依据所述操 作请求, 分别在其对应的主窗口和子窗口中更新所述 3D对象的绘制。
在对等状态下, 先进行同步控制的计算机获得控制权, 成为主机; 其 它的计算机则成为从机并按主机的控制进行同步控制处理。 然而在对等状 态下,可能出现两台或两台以上的计算机同时进行本地同步控制触发操作, 此时将出现冲突。 为避免出现冲突, 使一台计算机成为主机, 本实施例还 可以在所述运行信息表中设置优先级参数, 则一种冲突防范的方法可以为 在本实施例中增加步骤:
通过对比所述接收指令的计算机的优先级参数, 选取优先级最高的一 台计算机为需要执行所述状态判断步骤的计算机。
关于本步骤的描述可以参见前述多计算机同步控制方法实施例中的方 6
-22- 法二, 在 J¾ i不详述了。
优选的, 所述优先级参数根据网络中计算机的启动时间和地址信息生 成。 在网络中各计算机的运行信息表中, 记录所述具有主控状态信息的计 算机发出控制权请求消息的时间;
确定发出控制权请求消息的时间最早的计算机, 或者, 发出控制权请 求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计 算机, 将相应的其它计算机的运行状态信息转换为从属状态信息。
关于本步骤的描述可以参见前述多计算机同步控制方法实施例中的方 法三, 在 J¾ i不详述了。
在实际中, 本实施例可以运行在通过以太网连接的高性能 PC 计算机 上,用以实现在各计算机上按不同的视角同步显示同一个 3D数据模型,用 户可以在其中任意一台计算机上进行 3D对象的装入和浏览操作,其它计算 机受该计算机控制, 同步完成对同一个 3D对象的装入和浏览操作的功能。
本实施例的运行状态信息分别标识计算机的三种不同状态, 分别是: 对等状态、 主控状态和从属状态。 当某台计算机处于这三种状态之一时, 分别可以称之为对等机、 主机和从机。 在某一特定时刻, 某台计算机只可 能处于三种状态中的一种, 且只能有一台计算机是主机。
网络中的计算机可以由其唯一的 IP地址互相区分, 且每台计算机都有 不同的优先级, 每台计算机的优先级也是唯一的。
通常, 对 3D对象的浏览操作方法包括:
旋转操作: 在非平移状态下, 按下鼠标左键, 并向不同方向拖动鼠标。 平移操作: 在平移状态下, 按下鼠标左键, 并向不同方向拖动鼠标。 放大操作: 鼠标中键向后滚动。
缩小操作: 鼠标中键向前滚动。
显示复位操作: 单击鼠标右键(所显示的对象将恢复初始装入时的显 示位置)。
装入 3D对象数据: 打开指定的 3DS数据文件。 6
-23 - 基于以上操作, 可以将用户对计算机的控制操作分为同步控制触发操 作、 同步控制操作和非同步控制操作三类。 同步控制触发操作可以包括: 装入 3D对象数据、 开始对已装入的 3D对象的旋转、 平移、 放缩和显示复 位等; 同步控制操作可以包括: 对已装入的 3D对象的旋转、 平移、 放缩操 作; 非同步控制操作可以包括: 设置本计算机显示的背景颜色、 改变本计 算机的显示视角等。 同步控制操作是各个计算机要同时同步进行的处理; 同步控制触发操作是用户在某台处于对等状态的计算机上将要进行同步操 作的操作, 同步控制触发操作将有可能使该计算机由对等机变为主机; 非 同步操作则是某台计算机自己进行的处理。
以下对各个状态下的计算机指令操作过程进行说明:
一、 对等状态:
软件启动时, 如果网络中的计算机都处于对等状态时, 则本计算机也 将处于对等状态。
在对等状态下, 如果用户在计算机上进行中以下同步控制触发操作, 则该计算机将成为主机。 同步控制触发操作可以包括以下系统消息:
• 鼠标左键按下消息
• 鼠标右键按下消息
• 鼠标中键滑动消息
• 装入 3DS文件的菜单消息
当计算机成为主机后, 给网络内的其它计算机发送控制权请求消息。 控制权请求消息的内容包括本机响应同步控制触发操作的时间以及本机的 优先级。其它计算机收 'J控制权请求消息后即由对等状态转换为从属状态 , 并保存收到控制权请求、 % , 的时间和主机的优先级, 用以进行冲突判断。
在对等状态下对各种消息的处理方法和状态转换操作具体可以为: ( 1 ) 收到本机用户的同步控制触发操作。
处理: 本机进入主控状态; 向其它计算机发送控制权请求消息。
( 2 ) 收到其它计算机的控制权请求消息。
处理: 收到其它单个计算机的控制权请求消息时, 本机进入从属状态, 保存主机控制权请求消息的时间与主机的优先级。 同时收到其它多个计算 6
-24- 机的控制权请求消息时, 对这些控制权请求消息的同步控制时间和优先级 参数进行冲突判断, 确定主机, 保存主机控制权请求消息的时间与主机的 优先级。
( 3 ) 收到其它计算机的启动消息。
处理: 给该计算机发送控制权请求消息, 本机保持对等状态。
( 4 ) 收到其它计算机的退出消息。
处理: 断开与该计算机的连接, 本机保持对等状态。
二、 主控状态:
一台计算机成为主机后,用户就可以在该计算机上进行同步控制操作。 在进行同步控制操作的同时, 主机通过网络将控制信息发送给各从机。 各 从机响应同步控制消息, 并按消息进行相应的同步控制处理, 从而实现同 步浏览功能。
用户停止同步控制操作时, 主机可以启动一个状态转换定时器开始定 时。 同步控制操作可以包括以下系统消息:
· 旋转浏览过程中: 鼠标左键松开消息
• 平移浏览过程中: 鼠标左键松开消息
• 放缩浏览过程中: 鼠标中键停止滑动消息
• 显示复位时: 鼠标右键松开消息
• 装入 3DS文件过程中:成功打开并读入 3DS文件后如果状态转换时 间到 (通常为 0.5秒), 主机将退出主控状态, 进入对等状态, 并给各从机 发送控制权放弃信息。 各从机收到控制权放弃消息后, 将保存的主机控制 权请求消息的时间与主机的优先级丟弃。
如果在状态转换定时时间内, 用户再次进行同步控制触发操作, 则主 机将状态转换定时器复位, 进行相应的同步控制处理, 并将控制信息发送 给各从机。 主机继续保持在主控状态。
在主控状态下对各种消息的处理方法和状态转换操作具体可以为: ( 1 ) 收到本机用户的同步控制触发操作和同步控制操作。
处理: 进行相应的同步控制处理, 向各从机发送同步控制消息, 复位 状态转换定时器。 6
-25 -
( 2 ) 状态转换定时器时间到。
处理: 向各从机发送控制权放弃信息, 退出主控状态, 进入对等状态。
( 3 ) 收到其它计算机的控制权请求消息。
处理: 将控制权请求消息的同步控制时间和优先级参数与本主机的对 应参数进行冲突判断, 确定新的主机并进行相应的冲突防范处理。 (所述冲 突防范处理的方法可以参见前述多计算机同步控制实施例中方法二和方法 三的相关描述, 本发明在此不赘述。)
( 4 ) 收到其它计算机的程序启动消息。
处理: 给该计算机发送控制权请求消息, 本机保持主控状态。
( 5 ) 收到其它计算机的退出消息。
处理: 断开与该计算机的连接, 本机保持主控状态。
三、 从属状态:
某计算机启动本软件时, 网络有的其它计算机都会给该计算机发送初 始化消息, 如果网上已有主机, 则本机将成为从机。 本机还会根据收到的 初始化消息确定其优先级和显示 3D模型的视角。一台处于对等状态的计算 机收到控制权请求消息后, 也进入从属状态, 成为从机。
从机响应主机发出的同步控制命令, 控制本机进行与主机相同的同步 控制处理。 从机不会响应本机用户的同步控制触发操作。 当从机收到主机 的控制权放弃消息时, 将保存的主机控制权请求时间和主机优先级丟弃, 然后进入对等状态。
从机可以响应本机用户的非同步控制操作, 并进行相应的处理。
在从属状态下对各种消息的处理方法和状态转换操作具体可以为: ( 1 ) 收到本机用户的同步控制触发操作和同步控制操作。
处理: 不处理, 保持在从属状态。
( 2 ) 收到其它计算机的控制权请求消息。
处理: 将控制权请求消息的同步控制时间和优先级参数与当前主机的 对应参数进行冲突判断, 决定新的主机并进行相应的处理, 本机仍为从属 状态。(所述冲突防范处理的方法可以参见前述多计算机同步控制实施例中 方法二和方法三的相关描述, 本发明在此不赘述。) 6
-26-
( 3 ) 收到其它计算机的控制权放弃消息。
处理: 丟弃当前主机控制权请求消息的时间与主机的优先级, 进入对 等状态。
( 4 ) 收到其它计算机的程序启动消息。
处理: 给该计算机发送控制权请求消息, 本机保持从属状态。
( 5 ) 收到其它计算机的退出消息。
处理: 断开与该计算机的连接, 本机保持从属状态。
在实施例中,依据用户提交的同步控制操作指令进行的 3D对象绘制可 以釆用 OpenGL 绘制的方法实现, OpenGL 的英文全称是' Open Graphics Library", 顾名思义, OpenGL便是"开放的图形程序接口", OpenGL 是由 多家大计算机公司共同制定的一种开放式三维图形开发标准, 是目前较为 完善的三维图形标准。 OpenGL是一个与硬件无关的接口, 它独立于窗口系 统、操作系统和硬件系统, 可以应用于多种不同的硬件平台。 OpenGL还可 应用于各种网络环境, 在客户端运行和发布 OpenGL命令, 在服务器端接 收并且执行命令。 OpenGL作为一个图形硬件的软件接口,拥有多个不同的 函数, 利用这些函数可以创建各种二维和三维物体原形并对物体进行各种 操作, 包括对物体形状的描述、 模型变换、 视点变换、 坐标变换、 光效果 处理、 颜色设定、 纹理支持、 裁剪、 位图处理、 反走样及各种增强效果处 理等。
例如, 一种 OpenGL的绘制过程可以包括:
步骤 El、 针对所述显示窗口创建设备上下文;
步骤 E2、 依据所述设备上下文生成 OpenGL渲染上下文;
步骤 E3、 关联所述 OpenGL渲染上下文与设备上下文;
步骤 E4、 将用户输入的指令解析成所述为 OpenGL上下文环境下的绘 制命令;
步骤 E5、 根据所述绘制命令依次完成各个显示窗口的绘制。
步骤 E6、 确定绘制的目标显示窗口, 将所述显示窗口的 OpenGL上下 文环境设置为当前 OpenGL上下文环境;
步骤 E7、 在当前 OpenGL上下文环境执行所述绘制命令, 完成绘制; 6
-27- 步骤 E8、 释放所述 OpenGL上下文环境;
步骤 E9、 触发下一个绘制的目标显示窗口 (如子窗口) 。
即首先获得设备上下文, 再利用一个 OpenGL 函数 wglCreateContext 从所述设备上下文生成一个 OpenGL 的渲染上下文 (Render Context ) hGLRC; 然后调用 wglMakeCurrent把生成的渲染上下文 hGLRC跟设备上 下文 hDC关联起来。
例如, 针对主窗口和子窗口分别创建 OpenGL设备环境。 其中, 主窗 口 OpenGL 的显示处理可以在 SDI 应用程序框架的基础上实现, 主窗口 OpenGL的初始化处理可以放在 SDI视窗类的 OnCreate()函数中进行,包括 诸如建立所需的像素格式、 得到指定设备环境的象素模式索引值, 以及据 此声明一个象素模式等处理; 然后, 通过 wglCreateContext()函数, 依据本 窗口 关联的设备上下文创建一个 OpenGL 的渲染上下文, 并用 wglMakeCurrent()函数把生成的 OpenGL 渲染上下文跟设备上下文关联起 来, 将主窗口 (主窗口 3D显示)的上下文环境设置为当前 OpenGL的上下 文环境。
子窗口的 3D 显示则可以通过将之前创建的无模态对话框对应的窗口 分别与新创建的 OpenGL渲染上下文关联实现。 各子窗口 OpenGL的初始 化过程与上述主窗口的初始化过程类似,只是应放在各对话框的 OnCreate() 函数中进行。
一旦接收到用户输入的指令, 如, 用户通过各种输入设备输入的浏览 指令, 则将这些指令解析成所述三维显示上下文环境下的绘制命令。 例如, 用户在不同浏览模式下进行鼠标移动操作, 系统接收到用户的鼠标移动指 令后, 则根据当前浏览模式, 设置 OpenGL的绘制参数, 然后发出更新绘 制的消息。
例如, 基于主窗口与子窗口的 OpenGL上下文环境, 则主窗口的绘制可 以在 OnDraw()函数中进行, 子窗口的绘制可以在各自的 OnPaint()函数中进 行。 每个窗口的绘制开始时, 可以先用函数 wglMakeCurrent(Hdc , hrc)使 该窗口拥有 OpenGL上下文环境, 其中 Hdc为当前窗口的设备上下文句柄, hrc是由函数 wglCreateContext(Hdc)创建的适合本窗口的 OpenGL绘制上下 6
-28- 文句柄。 在完成本窗 口 所有的 OpenGL绘制后, 还可以用 函数 wglMakeCurrent(NULL , NULL)释放 OpenGL上下文环境。
主窗口绘制完成后, 则利用 SendMessage向第一个子窗口发送绘制消 息, 每一个子窗口收到绘制消息之后, 进行与主窗口类似的绘制过程, 子 窗口绘制完成后, 再向下一个子窗口发送绘制消息, 以此类推。
最后一个子窗口绘制完成后, 利用 SendMessage向主窗口发送绘制完 成消息。 如果此时绘制过程没有结束, 则由主窗口启动下一轮绘制; 如果 绘制过程结束, 则主窗口不再进行新的绘制, 系统回到等待接收用户指令 的状态。
当然, 本领域技术人员根据经验或需要釆用任一种绘制方法都是可行 的, 本发明对此不需要进行限定。
需要说明的是, 对于前述的各方法实施例, 为了简单描述, 故将其都 表述为一系列的动作组合, 但是本领域技术人员应该知悉, 本发明并不受 所描述的动作顺序的限制, 因为依据本发明, 某些步骤可以釆用其他顺序 或者同时进行。 其次, 本领域技术人员也应该知悉, 说明书中所描述的实 施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。 参考图 4 , 示出了本发明的一种多机多屏的 3D同步显示系统实施例的 结构框图, 所述多台计算机通过网络连接, 所述计算机的显示屏包括主窗 口和子窗口, 所述的系统可以包括以下单元:
运行信息表维护单元 401 , 用于依据进入网络连接的计算机的启动消 息, 在网络中连接的各台计算机上维护运行信息表;
其中, 所述启动消息包括: 3D对象信息和显示视角信息; 所述运行信 息表中包括: 网络中所有计算机的 IP地址及其运行状态信息; 所述运行状 态信息包括对等状态信息、 主控状态信息或从属状态信息;
启动单元 402 , 用于在所述网络中的计算机上分别依据所述启动消息 加载所述 3D对象, 并且,使各台计算机在其主窗口中分别按照对应的显示 视角信息绘制所述 3D对象, 同时, 各台计算机分别生成子窗口, 在子窗口 中绘制网络中除本计算机外的其它计算机的、 不同视角的 3D对象; 6
-29- 触发指令接收单元 403 , 用于接收用户在网络中任一台计算机上提交 的 3D对象触发指令;
主控状态转换单元 404 , 用于在所述接收指令的计算机的运行状态信 息为对等状态信息时, 将所述对等状态信息转换为主控状态信息, 并提交 控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换单元 405 , 用于在所述其它计算机接收所述控制权请求 消息时, 将其运行状态信息转换为从属状态信息;
操作指令接收单元 406 , 用于接收用户在所述具有主控状态信息的计 算机上提交的 3D对象操作指令;
主机绘制更新单元 407 , 用于根据所述操作指令在当前计算机的主窗 口和子窗口中分别更新所述 3D对象的绘制;
更新请求单元 408 , 用于依据所述更新绘制操作生成相应的操作请求 发送至对应的具有从属状态信息的计算机;
从机绘制更新单元 409 , 用于使所述具有从属状态信息的计算机依据 所述操作请求, 分别在其对应的主窗口和子窗口中更新所述 3D 对象的绘 制。
优选的, 所述运行信息表中还可以包括优先级参数, 本实施例还可以 包括第一优先级判断单元: 用于通过对比所述接收指令的计算机的优先级 参数, 选取优先级最高的一台计算机为需要执行所述状态判断步骤的计算 机。
其中, 所述优先级参数可以根据网络中计算机的启动时间和地址信息 生成。
优选的, 在本实施例中, 还可以包括以下单元:
时间记录单元, 用于在网络中各计算机的运行信息表中, 记录所述具 有主控状态信息的计算机发出控制权请求消息的时间;
第二优先级判断单元, 用于确定发出控制权请求消,包、的时间最早的计 算机, 或者, 发出控制权请求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计算机, 将相应的其它计算机的运行状态信息转换 为从属状态信息。 6
-30- 以下以一种具体的多机多屏 3D 同步显示操作过程为例进一步说明本 发明。
一、 启动处理过程:
1 )启动时没有其它计算机已启动的信息: 保持显示为空, 等待用户打 开 3D对象再按默认的视角显示。
假设网络中有 ABC三台计算机要运行本系统,每一台计算机的显示区 域分布: 右边占屏幕宽一定比例 (如 1/5 )的区域为子窗口区, 用于显示系 统上已经运行的计算机显示的屏幕, 左边为本机的 3D显示区域。
运行本步骤, A计算机先运行并打开一个 3D对象, 没有收到其它计算 机的运行消息, 因此子窗口为空, 此时, A计算机的显示示意图如图 5所 示, A计算机的主窗口显示 3D对象的正视图, 没有子窗口。 。
2 )启动时收到其它计算机的启动消息: 打开启动消息指定的 3D对象, 并按本地默认的视角显示; 同时创建对应于已启动计算机的子窗口, 并在 子窗口中按已启动计算机的视角显示 3D对象;如果已启动的计算机没有打 开 3D对象, 则保持主显示窗口和子窗口的显示为空。
即如果 B计算机运行本系统, 收到 A计算机的应答消息, 自动装入 A 打开的 3D对象, 并按默认的视角显示之, 同时绘制一个与 A计算机对应 的子窗口, 此时, B计算机的显示示意图如图 6所示, B计算机的主窗口 显示 3D对象的左侧视图, 有一个子窗口显示 A计算机主窗口对应的正视 图。 在这种情况下, A收到 B的启动消息, 按该消息绘制一个与 B计算机 对应的子窗口, 此时, A计算机的显示示意图如图 7所示, A计算机的主 窗口显示 3D对象的正视图, 有一个子窗口显示 B计算机主窗口对应的左 侧视图。 从图中可以看出, A计算机和 B计算机各自的子窗口为一个, 每 台计算机上的 3D显示视角是不同的。
3 )启动后收到其它计算机的启动信息: 从该计算机的启动信息中获得 其视角, 创建新的子窗口。 如果系统已打开 3D对象, 则在该子窗口按该计 算机的视角显示 3D对象; 否则保持子窗口的显示为空。
基于上述 、 B计算机已启动的情形, 如果还有 C计算机启动运行本 6
-31 - 系统, 则 C计算机同样载入相应的 3D对象, 并按本地默认的视角显示; 同时创建对应于 A、 B 计算机的两个子窗口, 并在子窗口中分别按 A、 B 计算机的视角显示 3D对象, 此时, C计算机的显示示意图如图 8所示, C 计算机的主窗口显示 3D对象的后视图,有两个子窗口, 第一个子窗口显示 A计算机主窗口对应的正视图, 第二个子窗口显示 B计算机主窗口对应的 左侧视图; 同时, A、 B计算机分别针创建对应该 C计算机的显示视角的 子窗口, 此时, A计算机的显示示意图如图 9所示, A计算机的主窗口显 示 3D对象的正视图, 有两个子窗口, 第一个子窗口显示 B计算机主窗口 对应的左侧视图, 第二个子窗口显示 C计算机主窗口对应的后视图; B计 算机的显示示意图如图 10所示, B计算机的主窗口显示 3D对象的左侧视 图, 有两个子窗口, 第一个子窗口显示 A计算机主窗口对应的正视图,第二 个子窗口显示 C计算机主窗口对应的后视图。
二、 对等机绘制过程:
1 )收到本地用户的同步控制触发操作: 本机进入主机状态, 向其它计 算机发送同步控制触发指令。
2 ) 收到其它计算机的同步控制触发指令: 本机进入从机状态。
三、 主机绘制过程:
1 ) 收到本地用户的同步控制启动操作: 忽略该操作。 (之前的同步控 制启动操作已经向其它计算机发送了同步控制触发指令, 且本机已进入主 机状态, 其它计算机已进入从机状态。 )
2 )收到本地用户的同步控制操作:按同步控制操作的变换设置 OpenGL 的显示参数, 更新 OpenGL的 3D显示, 并按本次变换操作的参数生成同步 控制指令, 发送给系统中的其它计算机。
四、 从机绘制过程:
1 )收到本地用户的同步控制启动操作: 忽略该操作并提醒用户, 当前 不能进行同步操作。
2 )收到本地用户的同步控制操作: 忽略该操作并提醒用户, 当前不能 进行同步操作。
3 )收到当前主机的同步控制指令: 按指令所含的控制方式和控制参数 6
-32- 及本地显示视角设置 OpneGL的显示参数, 更新 OpenGL的显示; 或打开 指令指定的 3D对象数据再按指定的参数和本地视角显示。
例如, H没 A计算机作为主机控制 3D对象向前旋转一个角度, B计 算机和 C计算机作为从机按同一个方向和角度对 3D对象进行旋转, 此时, A计算机的显示示意图如图 11所示, A计算机的主窗口显示向前旋转的 3D 对象的正顶视图, 有两个子窗口, 第一个子窗口显示 B计算机主窗口对应 的顺时针旋转的 3D对象的左侧视图, 第二个子窗口显示 C计算机主窗口 对应的向前旋转的 3D对象的后底视图。
B计算机的显示示意图如图 12所示, B计算机的主窗口显示顺时针旋 转的 3D对象的左侧视图, 有两个子窗口, 第一个子窗口显示 A计算机主 窗口对应的向前旋转的 3D对象的正顶视图,第二个子窗口显示 C计算机主 窗口对应的向前旋转的 3D对象的后底视图。
C计算机的显示示意图如图 13所示, C计算机的主窗口显示向前旋转 的 3D对象的后底视图, 有两个子窗口, 第一个子窗口显示 A计算机主窗 口对应的向前旋转的 3D对象的正视图,第二个子窗口显示 B计算机主窗口 对应的顺时针旋转的 3D对象的左侧视图。
可以理解的是, 已经启动的任一台运行本系统的计算机退出程序, 则 其它计算机与之对应的子窗口将消失。
假设上述 A计算机退出本系统, 则 B计算机的显示示意图如图 14所 示, B计算机的主窗口显示顺时针旋转的 3D对象的左侧视图, 有一个子窗 口, 显示 C计算机主窗口对应的向前旋转的 3D对象的后底视图。 C计算 机的显示示意图如图 15所示, C计算机的主窗口显示向前旋转的 3D对象 的后底视图, 有一个子窗口, 显示 B计算机主窗口对应的顺时针旋转的 3D 对象的左侧视图。
如果此时 B计算机也退出本系统, 则 C计算机的显示示意图如图 16 所示, C计算机的主窗口显示向前旋转的 3D对象的后底视图,没有子窗口。
其中, OpenGL的绘制过程具体可以包括:
步骤 Fl、 创建 OpenGL显示设备并和当前显示窗口关联。 如果有子窗 口存在, 还要为每一个子窗口创建 OpenGL显示设备并与之关联。 6
-33 - 步骤 F2、 按绘制需要, 设置各窗口的 OpenGL的绘制参数。 包括: 视 点位置 (X, Y位置将影响 3D对象的平移; Z位置将影响 3D对象的放大 和缩小)、 视角方向 (将影响 3D对象的观察视角)、 变换矩阵 (将影响 3D 对象的旋转)、 显示模式(将决定 3D对象按线模式还是面模式显示)、 光照 设置等。
步骤 F3、 调用指定窗口的 Invalidate ( ) 函数触发显示的更新。
步骤 F4、 在指定窗口的 OnDraw ( )或 OnPaint ( ) 消息响应函数中进 行如下处理:
A、 用 wglMakeCmrent(m— pDC -〉 GetSafeHdc() , hrc)将对应的 OpenGL 上下文环境设置为当前环境。
B、 进行 OpenGL的显示设置并用 Show3DS(); 完成 OpenGL对 3DS 对象的绘制处理
其中 , 包括对 glPushMatrix()、 glLoadIdentity()、 gluLookAt()、 glMultMatrixf()、 其它 OpenGL的各种绘制函数和 glPopMatrixO的调用。
C、 用 SwapBuffers(wglGetCurrentDCO)交换前后台显示緩冲区。
D、 用 wglMakeCurrent(NULL, NULL)释放 OpenGL上下文设备环境。 对于系统实施例而言, 由于其基本相应于方法实施例, 所以描述的比 较简单, 相关之处参见方法实施例的部分说明即可。
最后, 还需要说明的是, 在本文中, 诸如第一和第二等之类的关系术 语仅仅用来将一个实体或者操作与另一个实体或操作区分开来, 而不一定 要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。 而 且, 术语"包括"、 "包含"或者其任何其他变体意在涵盖非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者设备不仅包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过程、 方法、 物品或者设备所固有的要素。 在没有更多限制的情况下, 由语句"包括一 个 ... ...,,限定的要素, 并不排除在包括所述要素的过程、 方法、 物品或者设 备中还存在另外的相同要素。
以上对本发明所提供的一种多计算机的同步控制方法、 一种多计算机 的同步控制系统、 一种多机多屏的 3D同步显示方法及一种多机多屏的 3D 6
-34- 同步显示系统进行了详细介绍,
实施方式进行了阐述, 以上实施例的说明只是用于帮助理解本发明的方法 及其核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容 不应理解为对本发明的限制。

Claims

6 -35 - 权 利 要 求
1、 一种多计算机的同步控制方法, 其特征在于, 所述多台计算机通过 网络连接, 所述的方法包括:
在网络中的各台计算机上维护运行信息表, 所述运行信息表中包括: 网络中所有计算机的标识信息、 以及对应计算机的运行状态信息;
接收用户在网络中任一台计算机上输入的同步控制指令;
在所述接收指令的计算机的运行状态信息符合预置规则时, 在所述运 行信息表中记录的计算机上执行所述同步控制操作。
2、 如权利要求 1所述的方法, 其特征在于, 所述运行状态信息包括对 等状态信息、 主控状态信息或从属状态信息。
3、 如权利要求 2所述的方法, 其特征在于, 所述同步控制指令为同步 控制触发指令, 所述执行同步控制的步骤包括:
依据所述同步控制触发指令判断所述接收指令的计算机的运行状态信 息是否为对等状态信息;
若是, 则将所述对等状态信息转换为主控状态信息, 并提交控制权请 求消息至所述运行信息表中记录的其它计算机;
所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为 从属状态信息。
4、如权利要求 3所述的方法, 其特征在于, 所述运行信息表中还包括: 优先级参数, 所述执行同步控制的步骤还包括:
通过对比所述接收指令的计算机的优先级参数, 选取优先级最高的一 台计算机为需要执行所述状态判断步骤的计算机。
5、 如权利要求 4所述的方法, 其特征在于, 所述优先级参数根据网络 中计算机的启动时间和地址信息生成。
6、 如权利要求 5所述的方法, 其特征在于, 所述执行同步控制的步骤 还包括:
在网络中各计算机的运行信息表中, 记录所述具有主控状态信息的计 算机发出控制权请求消息的时间;
确定发出控制权请求消息的时间最早的计算机, 或者, 发出控制权请 6
-36- 求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计 算机, 将相应的其它计算机的运行状态信息转换为从属状态信息。
7、 如权利要求 3— 6 中任一项权利要求所述的方法, 其特征在于, 所 述同步控制指令还包括同步控制操作指令, 所述执行同步控制的步骤还包 括:
依据所述同步控制操作指令判断所述接收指令的计算机的运行状态信 息是否为主控状态信息;
若是, 则在所述具有主控状态信息的计算机上执行所述指令, 并生成 相应的控制操作请求发送至所述运行信息表中记录的具有从属状态信息的 计算机;
所述具有从属状态信息的计算机依据所述控制操作请求执行相应的操 作。
8、 如权利要求 7所述的方法, 其特征在于, 还包括:
若所述具有主控状态信息的计算机在预设的时间阔值内未接收到同步 控制指令, 则将所述计算机的主控状态信息转换为对等状态信息, 并发送 控制权放弃消息至所述运行信息表中记录的具有从属状态信息的计算机; 所述具有从属状态信息的计算机依据所述控制权放弃消息, 转换其运 行状态信息为对等状态信息。
9、 一种多计算机的同步控制系统, 其特征在于, 所述多台计算机通过 网络连接, 所述的系统包括:
运行信息表维护模块, 用于在网络中的各台计算机上维护运行信息表, 所述运行信息表中包括: 网络中所有计算机的标识信息、 以及对应计算机 的运行状态信息;
指令接收处理模块, 用于接收用户在网络中任一台计算机上输入的同 步控制指令;
同步控制操作模块, 用于在所述接收指令的计算机的运行状态信息符 合预置规则时, 对所述运行信息表中记录的计算机上执行所述同步控制操 作。
10、 如权利要求 9所述的系统, 其特征在于, 所述运行状态信息包括 6
-37- 对等状态信息、 主控状态信息或从属状态信息。
11、 如权利要求 10所述的系统, 其特征在于, 所述同步控制指令为同 步控制触发指令, 所述同步控制操作模块包括:
对等状态判断子模块, 用于依据所述同步控制触发指令判断所述接收 指令的计算机的运行状态信息是否为对等状态信息; 若是, 则触发主控状 态转换子模块;
主控状态转换子模块, 用于将所述对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换子模块, 用于所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为从属状态信息。
12、 如权利要求 11所述的系统, 其特征在于, 所述运行信息表中还包 括: 优先级参数, 所述同步控制操作模块还包括:
第一优先级判断子模块, 用于对比所述接收指令的计算机的优先级参 数 ,选取优先级最高的一台计算机为需要执行所述状态判断步骤的计算机。
13、 如权利要求 11所述的系统, 其特征在于, 所述同步控制操作模块 还包括:
时间记录子模块, 用于在网络中各计算机的运行信息表中, 记录所述 具有主控状态信, 的计算机发出控制权请求消 ,包、的时间;
第二优先级判断子模块, 用于确定发出控制权请求消息的时间最早的 计算机, 或者, 发出控制权请求消息的时间相同且优先级参数较高的计算 机, 为具有主控状态信息的计算机, 将相应的其它计算机的运行状态信息 转换为从属状态信息。
14、 如权利要求 9一 13 中任一项权利要求所述的系统, 其特征在于, 所述同步控制指令还包括同步控制操作指令, 所述同步控制操作模块还包 括:
主控状态判断子模块, 用于依据所述同步控制操作指令判断所述接收 指令的计算机的运行状态信息是否为主控状态信息; 若是, 则触发本机执 行发送子模块;
本机执行发送子模块, 用于在所述具有主控状态信息的计算机上执行 6
-38- 所述指令, 并生成相应的控制操作请求发送至对应的具有从属状态信息的 计算机;
同步操作子模块, 用于使所述具有从属状态信息的计算机依据所述控 制操作请求执行相应的操作。
15、 如权利要求 14所述的系统, 其特征在于, 还包括:
状态更新模块, 用于在所述具有主控状态信息的计算机在预设的时间 阔值内未接收到同步控制指令时, 将所述计算机的主控状态信息转换为对 等状态信息, 并发送控制权放弃消息至所述运行信息表中记录的具有从属 状态信息的计算机; 并使所述具有从属状态信息的计算机依据所述控制权 放弃消息, 转换其运行状态信息为对等状态信息。
16、 一种多机多屏的 3D同步显示方法, 其特征在于, 所述多台计算机 通过网络连接, 所述计算机的显示屏包括主窗口和子窗口, 所述的方法包 括:
依据进入网络连接的计算机的启动消息, 在网络中连接的各台计算机 上维护运行信息表; 所述启动消息包括: 3D对象信息和显示视角信息; 所 述运行信息表中包括: 网络中所有计算机的 IP地址及其运行状态信息; 所 述运行状态信息包括对等状态信息、 主控状态信息或从属状态信息;
所述网络中的计算机上分别依据所述启动消息加载所述 3D 对象, 并 且,各台计算机在其主窗口中分别按照对应的显示视角信息绘制所述 3D对 象, 同时, 各台计算机分别生成子窗口, 在子窗口中绘制网络中除本计算 机外的其它计算机的、 不同视角的 3D对象;
接收用户在网络中任一台计算机上提交的 3D对象触发指令; 若所述接收指令的计算机的运行状态信息为对等状态信息, 则将所述 对等状态信息转换为主控状态信息, 并提交控制权请求消息至所述运行信 息表中记录的其它计算机;
所述其它计算机接收所述控制权请求消息, 将其运行状态信息转换为 从属状态信息;
接收用户在所述具有主控状态信息的计算机上提交的 3D 对象操作指 令,并根据所述指令在当前计算机的主窗口和子窗口中分别更新所述 3D对 6
-39- 象的绘制;
依据所述更新绘制操作生成相应的操作请求发送至对应的具有从属状 态信息的计算机, 所述具有从属状态信息的计算机依据所述操作请求, 分 别在其对应的主窗口和子窗口中更新所述 3D对象的绘制。
17、 如权利要求 16所述的方法, 其特征在于, 所述运行信息表中还包 括: 优先级参数, 所述的方法还包括:
通过对比所述接收指令的计算机的优先级参数, 选取优先级最高的一 台计算机为需要执行所述状态判断步骤的计算机。
18、 如权利要求 17所述的方法, 其特征在于, 所述优先级参数根据网 络中计算机的启动时间和地址信息生成。
19、 如权利要求 18所述的方法, 其特征在于, 还包括:
在网络中各计算机的运行信息表中, 记录所述具有主控状态信息的计 算机发出控制权请求消息的时间;
确定发出控制权请求消息的时间最早的计算机, 或者, 发出控制权请 求消息的时间相同且优先级参数较高的计算机, 为具有主控状态信息的计 算机, 将相应的其它计算机的运行状态信息转换为从属状态信息。
20、 一种多机多屏的 3D同步显示系统, 其特征在于, 所述多台计算机 通过网络连接, 所述计算机的显示屏包括主窗口和子窗口, 所述的系统包 括:
运行信息表维护单元, 用于依据进入网络连接的计算机的启动消息, 在网络中连接的各台计算机上维护运行信息表; 所述启动消息包括: 3D对 象信息和显示视角信息; 所述运行信息表中包括: 网络中所有计算机的 IP 地址及其运行状态信息; 所述运行状态信息包括对等状态信息、 主控状态 信息或从属状态信息;
启动单元, 用于在所述网络中的计算机上分别依据所述启动消息加载 所述 3D对象, 并且,使各台计算机在其主窗口中分别按照对应的显示视角 信息绘制所述 3D对象, 同时, 各台计算机分别生成子窗口, 在子窗口中绘 制网络中除本计算机外的其它计算机的、 不同视角的 3D对象;
触发指令接收单元, 用于接收用户在网络中任一台计算机上提交的 3D 6
-40- 对象触发指令;
主控状态转换单元, 用于在所述接收指令的计算机的运行状态信息为 对等状态信息时, 将所述对等状态信息转换为主控状态信息, 并提交控制 权请求消息至所述运行信息表中记录的其它计算机;
从属状态转换单元, 用于在所述其它计算机接收所述控制权请求消息 时, 将其运行状态信息转换为从属状态信息;
操作指令接收单元, 用于接收用户在所述具有主控状态信息的计算机 上提交的 3D对象操作指令;
主机绘制更新单元, 用于根据所述操作指令在当前计算机的主窗口和 子窗口中分别更新所述 3D对象的绘制;
更新请求单元, 用于依据所述更新绘制操作生成相应的操作请求发送 至对应的具有从属状态信息的计算机;
从机绘制更新单元, 用于使所述具有从属状态信息的计算机依据所述 操作请求, 分别在其对应的主窗口和子窗口中更新所述 3D对象的绘制。
PCT/CN2009/070476 2008-05-09 2009-02-19 一种多计算机的同步控制方法及系统 WO2009135393A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US12/934,853 US8554864B2 (en) 2008-05-09 2009-02-19 System and method to synchronously display 3D object information on plural screens of plural computers
EP09741668.9A EP2276201A4 (en) 2008-05-09 2009-02-19 METHOD AND SYSTEM FOR SYNCHRONOUS CONTROL FOR A PLURALITY OF COMPUTERS

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810106253.1 2008-05-09
CN2008101062531A CN101291251B (zh) 2008-05-09 2008-05-09 一种多计算机的同步控制方法及系统

Publications (1)

Publication Number Publication Date
WO2009135393A1 true WO2009135393A1 (zh) 2009-11-12

Family

ID=40035346

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/070476 WO2009135393A1 (zh) 2008-05-09 2009-02-19 一种多计算机的同步控制方法及系统

Country Status (4)

Country Link
US (1) US8554864B2 (zh)
EP (1) EP2276201A4 (zh)
CN (1) CN101291251B (zh)
WO (1) WO2009135393A1 (zh)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291251B (zh) * 2008-05-09 2011-04-06 国网信息通信有限公司 一种多计算机的同步控制方法及系统
WO2010036983A1 (en) 2008-09-25 2010-04-01 Rockliffe Systems, Inc. (Dba Mailsite) Personal information management data synchronization
CN101853180A (zh) * 2010-05-25 2010-10-06 中兴通讯股份有限公司 一种实现应用管理的方法及非智能移动终端
CN102572103B (zh) * 2011-12-29 2013-12-04 华为终端有限公司 无线手持设备的操作方法、系统及无线手持设备
CN102571448A (zh) * 2012-02-14 2012-07-11 华为技术有限公司 参数同步的方法和装置
JP6372187B2 (ja) * 2014-06-23 2018-08-15 富士通株式会社 履歴情報管理方法、履歴情報管理装置、及び履歴情報管理プログラム
CN104331297A (zh) * 2014-11-28 2015-02-04 广东威创视讯科技股份有限公司 一种渲染引擎的绘制方法及装置
CN105117773B (zh) * 2015-08-13 2017-09-29 国网浙江省电力公司经济技术研究院 基于模糊评价算法的电力通信光传输网络综合评估方法
CN105426798B (zh) * 2015-11-03 2018-10-16 浦江县科创进出口有限公司 电子设备识别装置
CN105631518B (zh) * 2015-12-23 2018-07-03 西安理工大学 多参数多目标混沌粒子群参数寻优方法
CN105608492B (zh) * 2016-03-02 2018-03-20 东北大学 一种基于鲁棒随机权神经网络的多元铁水质量软测量方法
US10594917B2 (en) * 2017-10-30 2020-03-17 Microsoft Technology Licensing, Llc Network-controlled 3D video capture
CN108093245B (zh) * 2017-12-20 2020-05-05 浙江科澜信息技术有限公司 一种多屏融合方法、系统、装置和计算机可读存储介质
CN108241310B (zh) * 2018-01-22 2021-06-11 宁波白金汉爵酒店投资有限公司 酒店房间状态控制方法、装置及系统
CN110161972B (zh) * 2018-02-11 2021-05-11 上银科技股份有限公司 多机同步协同控制方法及系统
CN109660433B (zh) * 2018-12-21 2021-10-22 中山大学 一种智能家居的配置数据同步的冲突解决方法
WO2020228031A1 (zh) * 2019-05-16 2020-11-19 深圳市欢太科技有限公司 指令处理方法、装置、电子设备以及存储介质
CN113282257B (zh) * 2019-11-30 2022-06-07 北京城市网邻信息技术有限公司 用于同步显示的方法、终端设备、设备和可读存储介质
CN111625307B (zh) * 2019-12-03 2024-03-08 蘑菇车联信息科技有限公司 一种同步群控方法、装置、pc端及系统
CN114422353B (zh) * 2021-12-13 2024-04-19 武汉工程大学 一种多客户端数据处理系统、方法及存储介质
CN115456640A (zh) * 2022-08-17 2022-12-09 广东省第二人民医院(广东省卫生应急医院) 一种药品监控溯源方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581187A (zh) * 2003-08-05 2005-02-16 国际商业机器公司 用于协作系统的服务器装置、客户机装置以及协作系统
CN101072228A (zh) * 2006-05-12 2007-11-14 明基电通股份有限公司 一种电源状态同步的方法及其装置
CN100383774C (zh) * 2001-10-30 2008-04-23 国际商业机器公司 网络上的多个计算机之间进行合作的方法、系统
CN101291251A (zh) * 2008-05-09 2008-10-22 国网信息通信有限公司 一种多计算机的同步控制方法及系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100620289B1 (ko) * 2000-07-25 2006-09-07 삼성전자주식회사 마스터 이탈시 사설 간이 네트워크 운영 방법
US20020129128A1 (en) * 2001-03-07 2002-09-12 Stephen Gold Aggregation of multiple headless computer entities into a single computer entity group
US7337093B2 (en) * 2001-09-07 2008-02-26 Purdue Research Foundation Systems and methods for collaborative shape and design
JP2006510181A (ja) * 2002-12-16 2006-03-23 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ マスタ故障からの照明制御ネットワーク回復のシステム及び方法
US20060064730A1 (en) * 2004-09-17 2006-03-23 Jacob Rael Configurable entertainment network
US20070127791A1 (en) * 2005-11-15 2007-06-07 Sectra Ab Automated synchronization of 3-D medical images, related methods and computer products
CN100555220C (zh) * 2006-10-19 2009-10-28 英业达股份有限公司 多计算机系统及其配置方法
KR20090043142A (ko) * 2007-10-29 2009-05-06 삼성전자주식회사 영상 처리 방법 및 시스템

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100383774C (zh) * 2001-10-30 2008-04-23 国际商业机器公司 网络上的多个计算机之间进行合作的方法、系统
CN1581187A (zh) * 2003-08-05 2005-02-16 国际商业机器公司 用于协作系统的服务器装置、客户机装置以及协作系统
CN101072228A (zh) * 2006-05-12 2007-11-14 明基电通股份有限公司 一种电源状态同步的方法及其装置
CN101291251A (zh) * 2008-05-09 2008-10-22 国网信息通信有限公司 一种多计算机的同步控制方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2276201A4 *

Also Published As

Publication number Publication date
US20110029931A1 (en) 2011-02-03
CN101291251A (zh) 2008-10-22
EP2276201A4 (en) 2014-02-12
EP2276201A1 (en) 2011-01-19
US8554864B2 (en) 2013-10-08
CN101291251B (zh) 2011-04-06

Similar Documents

Publication Publication Date Title
WO2009135393A1 (zh) 一种多计算机的同步控制方法及系统
CN111597005B (zh) 一种大数据可视化三维gis云渲染项目生成系统与方法
US10817086B2 (en) Touch support for remoted applications
CN102866919B (zh) 一种基于云端绘制的大规模三维场景多人协同创作方法
US20160330208A1 (en) Method and apparatus for implementing document sharing between user groups
US20150067536A1 (en) Gesture-based Content Sharing Between Devices
WO2014121225A1 (en) Collaboration system with whitheboard with federated display
US20190102135A1 (en) Scalable interaction with multi-displays
TWI529622B (zh) Video image distribution method
WO2022028119A1 (zh) 一种屏幕共享方法、装置、设备及存储介质
US20200059498A1 (en) Minimizing productivity loss in a collaborative sharing environment
CA2765308C (en) Collaboration system and method
CN112463005A (zh) 一种多屏互动方法、装置、计算机设备及存储介质
WO2024045985A1 (zh) 屏幕控制方法、屏幕控制装置、电子设备、程序及介质
US11153473B2 (en) Control method, device and electronic apparatus for image acquisition
US20150177944A1 (en) Capturing objects in editable format using gestures
WO2018024230A1 (zh) 桌面窗口共享方法和系统
CN112272223B (zh) 应用的运行方法、装置、服务器及计算机可读存储介质
WO2012116511A1 (zh) 基于Web的协同建模处理方法及系统
CN112836158A (zh) 显示设备上的资源加载方法及显示设备
CA2927998A1 (en) System and method for virtual parallel resource management
JP6234223B2 (ja) 情報処理装置、情報処理装置の制御方法およびコンピュータプログラム
CN117880334A (zh) 设备的管理方法、主控设备和可读存储介质
WO2024060598A1 (zh) 页面切换展示方法以及相关设备
CN106843717B (zh) 即时通讯应用中预览图片的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09741668

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2009741668

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 12934853

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE