WO2020034652A1 - System and method for synchronizing user interface, terminal, and server - Google Patents

System and method for synchronizing user interface, terminal, and server Download PDF

Info

Publication number
WO2020034652A1
WO2020034652A1 PCT/CN2019/082702 CN2019082702W WO2020034652A1 WO 2020034652 A1 WO2020034652 A1 WO 2020034652A1 CN 2019082702 W CN2019082702 W CN 2019082702W WO 2020034652 A1 WO2020034652 A1 WO 2020034652A1
Authority
WO
WIPO (PCT)
Prior art keywords
type
event
message
operation type
page
Prior art date
Application number
PCT/CN2019/082702
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201810925386.5A external-priority patent/CN109032452A/en
Priority claimed from CN201810924812.3A external-priority patent/CN109117287A/en
Priority claimed from CN201810925387.XA external-priority patent/CN109257414A/en
Priority claimed from CN201810924815.7A external-priority patent/CN109286658A/en
Priority claimed from CN201810924814.2A external-priority patent/CN109240780A/en
Priority claimed from CN201810924645.2A external-priority patent/CN109032451A/en
Priority claimed from CN201810924811.9A external-priority patent/CN109246196A/en
Priority claimed from CN201810924813.8A external-priority patent/CN109284158A/en
Application filed by 北京大米科技有限公司 filed Critical 北京大米科技有限公司
Publication of WO2020034652A1 publication Critical patent/WO2020034652A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Definitions

  • the present invention relates to the field of multimedia technology, and in particular, to a user interface synchronization system, method, terminal, and server.
  • embodiments of the present invention provide a user interface synchronization system, method, terminal, and server, the main purpose of which is to reduce the problems caused by high concurrent writing.
  • the present invention mainly provides the following technical solutions:
  • an embodiment of the present invention provides a user interface synchronization system, including a first terminal, a second terminal, and a server, where
  • a second terminal configured to synchronize the operation message broadcasted.
  • an embodiment of the present invention provides a user interface synchronization method, including the following steps:
  • the first terminal sends an operation event generated based on an operation acting on a user interface, where the operation event includes an operation message and an operation type;
  • the server receives the operation event, and broadcasts the operation message or stores and broadcasts the operation message according to the operation type;
  • the second terminal synchronously broadcasts the operation message.
  • an embodiment of the present invention provides a user interface synchronization terminal.
  • the terminal includes:
  • Monitoring unit for monitoring operations acting on the user interface
  • a response unit configured to respond to the operation
  • An operation event generating unit configured to generate an operation event based on a response to the operation, where the operation event includes an operation message and an operation type;
  • the sending unit is configured to send the operation event, so as to broadcast the operation message or store and broadcast the operation message according to the operation type.
  • an embodiment of the present invention provides a user interface synchronization method, including the following steps:
  • the operation event including an operation message and an operation type
  • an embodiment of the present invention provides a user interface synchronization server, where the server includes:
  • a receiving unit configured to receive an operation event, where the operation event includes an operation message and an operation type
  • Operation type judging unit for judging the operation type
  • the storage unit is configured to store corresponding operation messages when the operation type is a write operation.
  • an embodiment of the present invention provides a user interface synchronization method, including the following steps:
  • the operation event including an operation message and an operation type
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the steps of the foregoing method are implemented.
  • an embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor implements the foregoing method when the program is executed. step.
  • the user interface synchronization system provided by the embodiment of the present invention classifies operations and processes operation messages differently according to different operation types. For example, for some operation types, only operation messages are broadcast without being written to the database, and for other operation types, For some operation types, the operation message is written to the database and the message is broadcast, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
  • FIG. 1 is a schematic diagram of an embodiment of a user interface synchronization system according to the present invention.
  • FIG. 2 is a schematic diagram of an embodiment of a user interface synchronization terminal according to the present invention.
  • FIG. 3 is a flowchart of an embodiment of a user interface synchronization terminal according to the present invention.
  • FIG. 4 shows a flowchart of an embodiment of a user interface synchronization method according to the present invention.
  • FIG. 5 shows a flowchart of an embodiment of a user interface synchronization server according to the present invention.
  • FIG. 1 shows a schematic diagram of an embodiment of the user interface synchronization system of the present invention.
  • a user interface synchronization system according to an embodiment of the present invention includes a first terminal 10, a second terminal 20, and a server 30.
  • the first terminal 10 is configured to send an operation event generated based on an operation acting on a user interface, and the operation event includes an operation message and an operation type;
  • the server 30 is configured to receive an operation event, and broadcast or store and broadcast an operation message according to an operation type
  • the second terminal 20 synchronizes the broadcast operation message.
  • the user interface synchronization system provided by the embodiment of the present invention classifies operations and processes operation messages differently according to different operation types. For example, for some operation types, only operation messages are broadcast without being written to a database, and other For some operation types, the operation message is written to the database and broadcast the message, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
  • the operation type may be divided into two types.
  • the operation type includes a first operation type and a second operation type.
  • the server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type.
  • a part of operations are classified into the first operation type.
  • the operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
  • the first operation type may include a process operation of an operation event
  • the second operation type may include a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • the first terminal determines the operation type, and the operation of the user interface includes, but is not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
  • the operation is mobile, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
  • the operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position.
  • the operation message in the operation event sent includes the return, operation type. Is the first operation type.
  • the option prompt is displayed, and the option prompt is to display the judgment result.
  • the operation message in the operation event sent includes page turning, and the operation type is the second operation type.
  • the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
  • the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally.
  • the operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent.
  • the operation message includes the end of the movement, and the operation type is the second operation type.
  • the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • the operation of stopping the movement is set to the second type of operation and can be written into the database.
  • the dragging process moving operation
  • the specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations.
  • the first terminal when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted.
  • "Delete" is triggered through detection and judgment.
  • the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted .
  • the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
  • certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance.
  • the operation when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold.
  • This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
  • the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision.
  • the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%.
  • the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
  • the first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
  • An embodiment of the present invention provides a user interface synchronization method.
  • the method in this embodiment can be implemented by the foregoing system. Therefore, the description of the above system embodiment can be used to understand the method of the present invention.
  • the user interface synchronization method according to the embodiment of the present invention includes the following steps:
  • the first terminal sends an operation event generated based on an operation acting on its operation interface, and the operation event includes an operation message and an operation type;
  • the server receives the operation event and broadcasts the operation message or stores and broadcasts the operation message according to the operation type;
  • the second terminal synchronously broadcasts the operation message.
  • the user interface synchronization method categorizes operations and processes different response operation messages according to different operation types. For example, for the first operation type, only operation messages are broadcast without being written to the database.
  • the second operation type writes to the database and broadcasts the message, thereby reducing the pressure on the server and greatly improving the service performance loss caused by the high concurrent write data.
  • the operation type may be divided into two types.
  • the operation type includes a first operation type and a second operation type.
  • the server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type.
  • a part of operations are classified into the first operation type.
  • the operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
  • the first operation type includes a process operation of an operation event
  • the second operation type includes a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • User interface operations include, but are not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
  • the operation is mobile, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
  • the operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position.
  • the operation message in the operation event sent includes the return, operation type. Is the first operation type.
  • the option prompt is displayed, and the option prompt is to display the judgment result.
  • the operation message in the operation event sent includes page turning, and the operation type is the second operation type.
  • the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
  • the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally.
  • the operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent.
  • the operation message includes the end of the movement, and the operation type is the second operation type.
  • the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • the operation of stopping the movement is set to the second type of operation and can be written into the database.
  • the dragging process moving operation
  • the specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations.
  • the first terminal when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted.
  • "Delete" is triggered through detection and judgment.
  • the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted .
  • the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
  • certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance.
  • the operation when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold.
  • This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
  • the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision.
  • the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%.
  • the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
  • the first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
  • FIG. 2 shows a schematic diagram of an embodiment of the user interface synchronization terminal of the present invention.
  • the user interface synchronization terminal of the embodiment of the present invention includes:
  • a monitoring unit 11 configured to monitor operations of an operation interface acting on the terminal
  • An operation event generating unit 13 is configured to generate an operation event based on a response operation, and the operation event includes an operation message and an operation type;
  • the sending unit 14 is configured to send an operation event, so as to broadcast the operation message or store and broadcast the operation message according to the operation type.
  • the user interface synchronization terminal categorizes operations, and the operation events sent include operation type information, so as to perform different processing on corresponding operation messages according to different operation types, for example, only broadcast operation messages. Does not write to the database, writes the operation message to the database and broadcasts the message, because some operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data .
  • operation types may be divided into two types.
  • operation types include a first operation type and a second operation type, an operation message that broadcasts an operation event of the first operation type, and an operation that stores and broadcasts a second operation type.
  • Action message for the event In the embodiment of the present invention, a part of operations are divided into the first operation type, so that only operation messages of this type are broadcast but not exist, reducing data writing, reducing server pressure, and greatly improving services brought by high concurrent writing. Performance loss.
  • the first operation type may include a process operation of an operation event
  • the second operation type may include a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • User interface operations include, but are not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
  • the operation is mobile, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
  • the operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position.
  • the operation message in the operation event sent includes the return, operation type. Is the first operation type.
  • the option prompt is displayed, and the option prompt is to display the judgment result.
  • the operation message in the operation event sent includes page turning, and the operation type is the second operation type.
  • the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
  • the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally.
  • the operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent.
  • the operation message includes the end of the movement, and the operation type is the second operation type.
  • the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • the operation of stopping the movement is set to the second type of operation and can be written into the database.
  • the dragging process moving operation
  • the specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations.
  • the first terminal when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted.
  • "Delete" is triggered through detection and judgment.
  • the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted .
  • the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
  • the terminal further includes an interval judging unit 15, which determines whether the time interval of the operation event generated based on the mobile operation is greater than a set threshold. If the time interval between the last generated operation event and the generated threshold is greater than the set threshold, the currently generated operation event is sent. This embodiment sets the threshold for sending click operation events.
  • the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision.
  • the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%.
  • the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
  • the first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
  • FIG. 4 shows a flowchart of an embodiment of the user interface synchronization method of the present invention.
  • the user interface synchronization of the embodiment of the present invention The method includes the following steps:
  • Operation events include operation messages and operation types.
  • the user interface synchronization terminal categorizes operations, and the operation events sent include operation type information, so as to perform different processing on corresponding operation messages according to different operation types, for example, only broadcast operation messages. Does not write to the database, writes the operation message to the database and broadcasts the message, because some operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data .
  • operation types may be divided into two types.
  • operation types include a first operation type and a second operation type, an operation message that broadcasts an operation event of the first operation type, and an operation that stores and broadcasts a second operation type.
  • Action message for the event In the embodiment of the present invention, a part of operations are divided into the first operation type, so that only operation messages of this type are broadcast but not exist, reducing data writing, reducing server pressure, and greatly improving services brought by high concurrent writing. Performance loss.
  • the first operation type may include a process operation of an operation event
  • the second operation type may include a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • User interface operations include, but are not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
  • the operation is mobile, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
  • the operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position.
  • the operation message in the operation event sent includes the return, operation type. Is the first operation type.
  • the option prompt is displayed, and the option prompt is to display the judgment result.
  • the operation message in the operation event sent includes page turning, and the operation type is the second operation type.
  • the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
  • the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally.
  • the operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position.
  • the operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent.
  • the operation message includes the end of the movement, and the operation type is the second operation type.
  • the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • operation messages are broadcasted or stored and broadcast according to different operation types for synchronization.
  • the operation of stopping the movement is set to the second type of operation and can be written into the database.
  • the dragging process moving operation
  • the specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations.
  • the first terminal when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted.
  • "Delete" is triggered through detection and judgment.
  • the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted .
  • the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
  • the server After receiving the corresponding operation event, the server stores the playback status of the audio and broadcasts the message, so that the second terminal can perform synchronization.
  • certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance.
  • the operation when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold.
  • This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
  • the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision.
  • the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%.
  • the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
  • the first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
  • FIG. 5 shows a flowchart of an embodiment of the user interface synchronization server of the present invention.
  • the server according to the embodiment of the present invention includes:
  • the receiving unit 31 receives an operation event, and the operation event includes an operation message and an operation type;
  • Operation type judgment unit 32 which judges the operation type
  • the storage unit 34 stores an operation message when the operation type is a write operation.
  • the user interface synchronization server provided by the embodiment of the present invention performs different processing on the corresponding operation message according to different operation types, such as broadcasting only the operation message without writing to the database, and writing the operation message to the database and broadcasting the message. Partial operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
  • the operation type may be divided into two types.
  • the operation type includes a first operation type and a second operation type.
  • the server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type.
  • a part of operations are classified into the first operation type.
  • the operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
  • the first operation type may include a process operation of an operation event
  • the second operation type may include a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • User interface operations include, but are not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • An embodiment of the present invention provides a user interface synchronization method.
  • the method in this embodiment can be implemented by the server in the foregoing embodiment. Therefore, the description of the foregoing server embodiment can be used to understand that the method of the embodiment of the present invention includes the following steps:
  • Receive operation events, operation events include operation messages and operation types
  • Broadcast operation messages or store and broadcast operation messages according to the operation type are broadcast operation messages or store and broadcast operation messages according to the operation type.
  • the user interface synchronization server provided by the embodiment of the present invention performs different processing on the corresponding operation message according to different operation types, such as broadcasting only the operation message without writing to the database, and writing the operation message to the database and broadcasting the message. Partial operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
  • the operation type may be divided into two types.
  • the operation type includes a first operation type and a second operation type.
  • the server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type.
  • a part of operations are classified into the first operation type.
  • the operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
  • the first operation type includes a process operation of an operation event
  • the second operation type includes a result operation of the operation event.
  • the data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced.
  • the second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
  • User interface operations include, but are not limited to:
  • the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating.
  • the first operation type includes drawing a line.
  • the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
  • the operation interface may be an audio operation interface, and the specific operation may be clicking audio, which specifically includes: judging an audio type, where
  • the audio playback status is judged.
  • the audio is in the playback state, the audio is paused.
  • the operation message in the operation event sent includes the pause of the playback.
  • the operation type is the second operation type. Audio, the operation message in the operation event sent includes playback, and the operation type is the second operation type;
  • the operation message in the operation event sent includes playback, and the operation type is the second operation type.
  • different operation events are generated according to the click operation.
  • the click operation is to change the current playback state, that is, when the current operation is playing, the click operation is used to pause, and when the current operation is paused, the click operation is used to cause Its playing.
  • the server After receiving the corresponding operation event, the server stores the playback status of the audio and broadcasts the message, so that the second terminal can perform synchronization.
  • the operation may specifically be dragging an element (for example, a picture, etc.), and the operation process of the dragging may specifically include hovering the cursor on the element, clicking to move, or stopping the movement ( (That is, the end of dragging) specifically includes: if the operation is hovering, the animation is displayed locally, and the operation message in the operation event sent may include the specific operation (hovering), and the operation type is the first operation type; if the operation is moving , The coordinates of the element are set locally according to the mouse position.
  • the operation message in the operation event sent includes the movement (the coordinate of the element).
  • the operation type is the first operation type. There is no need to write the coordinate data of the element during the movement. It is the end of dragging, and the operation message in the operation event sent includes the end of dragging (element coordinates), the operation type is the second operation type, and the coordinate data of the element at the end of dragging needs to be written.
  • the specific operation interface is a multiple choice operation interface.
  • the specific operation may be hovering or clicking on an option, where the hovering is the first operation type and the click is the second operation type.
  • the operation is to perform an animation display when hovering over the option.
  • the animation display may be temporarily enlarged, that is, when the mouse is hovering over the option, the option is animated to temporarily display the enlarged display effect.
  • the page displays an option prompt that determines whether the result is right or wrong. Select the correct one to recount.
  • the operation interface may be a matching operation interface, and the matching operation may specifically be moving or stopping moving.
  • the matching operation is to stop moving, it is judged whether it is the correct option. If it is the correct option, the correct option prompt is executed. If it is not the correct option, the move operation is executed. After the correct option prompt is executed, it is determined whether all the matching selections are completed correctly, and if all the matching selections are completed correctly, a prompt is given for answering.
  • the movement operation is to move a word or a word to a corresponding position in the picture.
  • the word or the word corresponds to the picture, it is prompted that the answer is correct, and the word or word is parked at the corresponding position in the picture; if If the word or word does not correspond to the picture, the word or word returns to its original position.
  • the number of pictures may be three, and the number of words may be three. If all three words correspond to the corresponding picture If the match is correct, the prompt is completely correct and ends.
  • the correct way to prompt the answer can be to display the prompt, such as displaying ⁇ , the text "correct”, “yes”, “good”, etc., it can also be a voice prompt, or an animation prompt, here
  • the method of prompting is not specifically limited, as long as the prompt can be answered correctly; for the matching object, it is not limited to the matching of pictures and words, but also animation matching; the number of words and pictures can be equal or different.
  • the number of pictures and words is not specifically limited in the present invention, as long as the learner can learn by comparing words with pictures.
  • the operation interface may be a scribing interface, and the specific operation may be drawing a line.
  • the first terminal obtains the drawn line data, and performs the line data processing. Compression, delete the original drawing lines, generate lines based on the compressed line data and send the lines. Drawing lines is continuous, and at this time, data needs to be continuously transmitted, affecting service performance.
  • This embodiment sets the operating event sending conditions. Only the currently generated operating event and the previous sent operating event are completed, the currently generated operating event is sent, the operating event sending frequency is reduced, throttling is achieved, and service performance is further avoided. The problem of attrition.
  • the drawn line data is obtained, and the line data is compressed, the original drawn line is deleted, the line is generated based on the compressed line data, and the line is sent.
  • the compression of the line data reduces the amount of data written during interactive transmission, thereby reducing the pressure on the server and greatly improving the service performance loss caused by the high concurrent writing data.
  • the operation interface may be an interface for operating a page, and the specific operation may be clicking a page to turn or entering a page to jump.
  • the operation is to click to turn the page
  • the local operation is to turn the page.
  • the operation message in the operation event sent includes page turning, and the operation type is the second operation type.
  • the operation is to enter the page jump
  • the local operation is to jump to Enter the page number
  • the operation message of the operation event sent includes jumping to the input page number; the operation type is the second operation type. If the teacher-controlled terminal input jumps to page 10, the student-controlled terminal jumps to page 10. Similarly, in this embodiment, throttling can also be performed.
  • the click operation will not generate a page turning or input page jump event, but will end the operation directly; if it is not in throttling control, click The operation is to jump to the specified page number.
  • the server After receiving the corresponding operation event, the server stores the page number information after the jump and broadcasts the message.
  • the operation interface may be an interface with a clear page button, and the specific operation may be clicking a clear page button. After the operation event of clicking the clear page button is completed, all data on the page is cleared, the page is restored to the initial state, and the clear page operation is sent.
  • This embodiment also involves a click operation, so throttling control may be performed to avoid transmitting operation events generated by meaningless frequent operations.
  • the network connection status is monitored.
  • the network between the terminal and the server is disconnected, For example, when the message feedback is that the socket is disconnected or the listen event disconnect is triggered, a retry mechanism is started, and when the cumulative number of failures reaches a set value (for example, 3 times), it prompts to re-enter the operation interface.
  • An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the foregoing method are implemented.
  • An embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor implements the steps of the foregoing method when the program is executed.
  • the “unit” or “module” in this specification refers to software and / or hardware capable of completing specific functions independently or in cooperation with other components, where the hardware may be, for example, FPGA (Field-Programmable Gate Array). , IC (Integrated Circuit), etc.
  • An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method of any of the foregoing embodiments are implemented.
  • the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, and flash memory devices. , Magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
  • An embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the program, the steps of the method of any of the foregoing embodiments are implemented.
  • the processor is a control center of a computer system, and may be a processor of a physical machine or a processor of a virtual machine.
  • the terms “first”, “second”, etc. are used for descriptive purposes only, and cannot be understood to indicate or imply relative importance or order; the term “plurality” means two or more, Unless otherwise clearly defined.
  • the terms “installation”, “connected”, “connected”, “fixed” and the like should be understood in a broad sense. For example, “connected” can be a fixed connection, a detachable connection, or an integral connection; “connected” can It is directly connected or indirectly connected through an intermediate medium.
  • the specific meanings of the above terms in the present invention can be understood according to specific situations.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present invention relates to the field of multimedia technology capable of solving the problem in which service performance degrades in a process of operating a user interface. Disclosed are a system and method for synchronizing a user interface, a terminal, and a server. The system for synchronizing a user interface comprises a first terminal, a second terminal and a server. The first terminal transmits an operation event generated on the basis of an operation performed on a user interface. The operation event comprises an operation message and an operation type. The server receives the operation event, and broadcasts, or stores and broadcasts, the operation message according to the operation type. The second terminal synchronizes the broadcasted operation message. The present invention mitigates the problem of service performance degradation caused by a high concurrent write operation.

Description

一种用户界面同步系统、方法、终端以及服务器User interface synchronization system, method, terminal and server
本申请要求了2018年8月14日提交的、申请号为201810924811.9、发明名称为“远程操作内容同步系统及方法”,2018年8月14日提交的、申请号为201810924645.2、发明名称为“图库操作内容同步系统及方法”,2018年8月14日提交的、申请号为201810924814.2、发明名称为“音频操作内容同步系统及方法”,2018年8月14日提交的、申请号为201810924813.8、发明名称为“远程拖动操作内容同步系统、方法、设备及存储介质”,2018年8月14日提交的、申请号为201810924815.7、发明名称为“远程选择操作同步系统、方法、设备及存储介质”,2018年8月14日提交的、申请号为201810924812.3、发明名称为“匹配选择操作内容同步系统及方法”,2018年8月14日提交的、申请号为201810925386.5、发明名称为“页面操作内容同步系统及方法”以及2018年8月14日提交的、申请号为201810925387.X、发明名称为“清屏同步系统及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the application number 201810924811.9 filed on August 14, 2018, the invention name as "Remote Operation Content Synchronization System and Method", and the application number 201810924645.2, and the invention name filed on August 14, 2018 Operating Content Synchronization System and Method ", filed on August 14, 2018, with application number 201810924814.2, and the invention name is" Audio Operating Content Synchronization System and Method, "and filed on August 14, 2018, with application number 201810924813.8, invention The name is "Remote drag operation content synchronization system, method, device and storage medium", which was filed on August 14, 2018, with application number 201810924815.7, and the invention name is "Remote selection operation synchronization system, method, device and storage medium" , Filed on August 14, 2018, with application number 201810924812.3, and the invention name is "matching and selecting operation content synchronization system and method", and filed on August 14, 2018, with application number 201810925386.5, and the invention name is "page operation content Synchronization System and Method "and application number 201810925387.X and invention name" Qing Synchronization systems and methods, "the Chinese Priority Patent Application, the entire content of which is incorporated by reference in the present application.
技术领域Technical field
本发明涉及多媒体技术领域,特别涉及一种用户界面同步系统、方法、终端以及服务器。The present invention relates to the field of multimedia technology, and in particular, to a user interface synchronization system, method, terminal, and server.
背景技术Background technique
本发明对于背景技术的描述属于与本发明相关的相关技术,仅仅是用于说明和便于理解本发明的发明内容,不应理解为申请人明确认为或推定申请人认为是本发明在首次提出申请的申请日的现有技术。The description of the background technology of the present invention belongs to the related technology related to the present invention, and is only used to explain and facilitate the understanding of the inventive content of the present invention. It should not be understood that the applicant explicitly thinks or presumes that the applicant thinks that the present invention is the first application Prior art at the filing date.
随着网络的发展,为会议和授课等提供了极大的便利。会议或授课等 活动会需要互动,因此任何一端进行操作要进行同步。但现有的用户界面操作同步中,会由于高并发写入数据库操作而带来服务性能损耗。With the development of the Internet, great convenience has been provided for meetings and lectures. Events such as meetings or lectures require interaction, so operations at either end need to be synchronized. However, in the existing synchronization of user interface operations, service performance will be lost due to high concurrent write operations to the database.
发明内容Summary of the Invention
有鉴于此,本发明实施例提供一种用户界面同步系统、方法、终端以及服务器,主要目的是减少高并发写入带来的问题。In view of this, embodiments of the present invention provide a user interface synchronization system, method, terminal, and server, the main purpose of which is to reduce the problems caused by high concurrent writing.
为达到上述目的,本发明主要提供如下技术方案:To achieve the above object, the present invention mainly provides the following technical solutions:
第一方面,本发明实施例提供了一种用户界面同步系统,包括第一终端、第二终端和服务器,其中In a first aspect, an embodiment of the present invention provides a user interface synchronization system, including a first terminal, a second terminal, and a server, where
第一终端,用于发送基于作用于用户界面的操作生成的操作事件,所述操作事件包括操作消息和操作类型;A first terminal for sending an operation event generated based on an operation acting on a user interface, the operation event including an operation message and an operation type;
服务器,用于接收所述操作事件,根据所述操作类型对所述操作消息广播或对所述操作消息存储和广播;A server for receiving the operation event, broadcasting the operation message or storing and broadcasting the operation message according to the operation type;
第二终端,用于同步广播的所述操作消息。A second terminal, configured to synchronize the operation message broadcasted.
第二方面,本发明实施例提供了一种用户界面同步方法,包括如下步骤:In a second aspect, an embodiment of the present invention provides a user interface synchronization method, including the following steps:
第一终端发送基于作用于用户界面的操作生成的操作事件,所述操作事件包括操作消息和操作类型;The first terminal sends an operation event generated based on an operation acting on a user interface, where the operation event includes an operation message and an operation type;
服务器接收所述操作事件,根据所述操作类型对所述操作消息广播或对所述操作消息存储和广播;The server receives the operation event, and broadcasts the operation message or stores and broadcasts the operation message according to the operation type;
第二终端同步广播的所述操作消息。The second terminal synchronously broadcasts the operation message.
第三方面,本发明实施例提供了一种用户界面同步终端,所述终端包括:According to a third aspect, an embodiment of the present invention provides a user interface synchronization terminal. The terminal includes:
监测单元,用于监测作用于用户界面的操作;Monitoring unit for monitoring operations acting on the user interface;
响应单元,用于响应所述操作;A response unit, configured to respond to the operation;
操作事件生成单元,用于基于响应所述操作生成操作事件,所述操作事件包括操作消息和操作类型;An operation event generating unit, configured to generate an operation event based on a response to the operation, where the operation event includes an operation message and an operation type;
发送单元,用于发送所述操作事件,以便于根据所述操作类型对所述操作消息广播或对所述操作消息存储和广播。The sending unit is configured to send the operation event, so as to broadcast the operation message or store and broadcast the operation message according to the operation type.
第四方面,本发明实施例提供了一种用户界面同步方法,包括如下步骤:In a fourth aspect, an embodiment of the present invention provides a user interface synchronization method, including the following steps:
监测作用于用户界面的操作;Monitor operations on the user interface;
响应所述操作;In response to said operation;
基于响应所述操作生成操作事件,所述操作事件包括操作消息和操作类型;Generating an operation event based on the operation, the operation event including an operation message and an operation type;
发送所述操作事件,以便于根据所述操作类型对所述操作消息广播或对所述操作消息存储和广播。And sending the operation event so as to broadcast the operation message or store and broadcast the operation message according to the operation type.
第五方面,本发明实施例提供了一种用户界面同步服务器,所述服务器包括:In a fifth aspect, an embodiment of the present invention provides a user interface synchronization server, where the server includes:
接收单元,用于接收操作事件,所述操作事件包括操作消息和操作类型;A receiving unit, configured to receive an operation event, where the operation event includes an operation message and an operation type;
操作类型判断单元,用于判断操作类型;Operation type judging unit, for judging the operation type;
广播单元,用于广播操作消息,以便同步;A broadcasting unit for broadcasting operation messages for synchronization;
存储单元,用于当操作类型为写入型操作时,存储相应的操作消息。The storage unit is configured to store corresponding operation messages when the operation type is a write operation.
第六方面,本发明实施例提供了一种用户界面同步方法,包括如下步骤:According to a sixth aspect, an embodiment of the present invention provides a user interface synchronization method, including the following steps:
接收操作事件,所述操作事件包括操作消息和操作类型;Receiving an operation event, the operation event including an operation message and an operation type;
根据所述操作类型对所述操作消息广播或对所述操作消息存储和广播。Broadcasting the operation message or storing and broadcasting the operation message according to the operation type.
第七方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的方法的步骤。According to a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the foregoing method are implemented.
第八方面,本发明实施例提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述的方法的步骤。According to an eighth aspect, an embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements the foregoing method when the program is executed. step.
与现有技术相比,本发明实施例的有益效果在于:Compared with the prior art, the beneficial effects of the embodiments of the present invention are:
本发明实施例提供的用户界面同步系统通过对操作进行分类,根据不同的操作类型对操作消息进行不同处理,如对于某些操作类型,仅对操作消息进行广播而不写入数据库,而对于另外的一些操作类型,操作消息写 入数据库并广播该消息,从而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization system provided by the embodiment of the present invention classifies operations and processes operation messages differently according to different operation types. For example, for some operation types, only operation messages are broadcast without being written to the database, and for other operation types, For some operation types, the operation message is written to the database and the message is broadcast, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1示出了本发明用户界面同步系统的一实施例的示意图。FIG. 1 is a schematic diagram of an embodiment of a user interface synchronization system according to the present invention.
图2示出了本发明用户界面同步终端的一实施例的示意图。FIG. 2 is a schematic diagram of an embodiment of a user interface synchronization terminal according to the present invention.
图3示出了本发明用户界面同步终端的一实施例的流程图。3 is a flowchart of an embodiment of a user interface synchronization terminal according to the present invention.
图4示出了本发明用户界面同步方法的一实施例的流程图。FIG. 4 shows a flowchart of an embodiment of a user interface synchronization method according to the present invention.
图5示出了本发明用户界面同步服务器的一实施例的流程图。FIG. 5 shows a flowchart of an embodiment of a user interface synchronization server according to the present invention.
具体实施方式detailed description
下面结合具体实施例对本发明作进一步详细描述,但不作为对本发明的限定。在下述说明中,不同的“一实施例”或“实施例”指的不一定是同一实施例。此外,一或多个实施例中的特定特征、结构、或特点可由任何合适形式组合。The present invention is described in further detail below with reference to specific embodiments, but is not intended to limit the present invention. In the following description, different "one embodiment" or "an embodiment" does not necessarily mean the same embodiment. Furthermore, the particular features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
本发明实施例提供了一种用户界面同步系统,图1示出了本发明用户界面同步系统的一实施例的示意图。参见图1,本发明实施例的用户界面同步系统包括第一终端10、第二终端20和服务器30,其中An embodiment of the present invention provides a user interface synchronization system. FIG. 1 shows a schematic diagram of an embodiment of the user interface synchronization system of the present invention. Referring to FIG. 1, a user interface synchronization system according to an embodiment of the present invention includes a first terminal 10, a second terminal 20, and a server 30.
第一终端10,用于发送基于作用于用户界面的操作生成的操作事件,操作事件包括操作消息和操作类型;The first terminal 10 is configured to send an operation event generated based on an operation acting on a user interface, and the operation event includes an operation message and an operation type;
服务器30,用于接收操作事件,根据操作类型对操作消息广播或对操作消息存储和广播;The server 30 is configured to receive an operation event, and broadcast or store and broadcast an operation message according to an operation type;
第二终端20,同步广播的操作消息。The second terminal 20 synchronizes the broadcast operation message.
本发明实施例提供的用户界面同步系统通过对操作进行分类,根据不同的操作类型对操作消息进行不同处理,如对于某些操作类型,仅对操作消息进行广播而不写入数据库,对另外的一些操作类型,操作消息写入数据库并广播该消息,从而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization system provided by the embodiment of the present invention classifies operations and processes operation messages differently according to different operation types. For example, for some operation types, only operation messages are broadcast without being written to a database, and other For some operation types, the operation message is written to the database and broadcast the message, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,服务器30广播第一操作类型的操作事件的操作消息,服务器30存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, the operation type may be divided into two types. For example, the operation type includes a first operation type and a second operation type. The server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type. In the embodiment of the present invention, a part of operations are classified into the first operation type. The operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型可以包括操作事件的过程操作;第二操作类型可以包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type may include a process operation of an operation event; the second operation type may include a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无数据写入进行同步。第一终端判断操作类型,用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of data writing. The first terminal determines the operation type, and the operation of the user interface includes, but is not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
可选的,若操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作。Optionally, if the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
若操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型,若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is mobile, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
若操作为停止移动,判断停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型。If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinate setting of the operation object is performed locally according to the stop position. The operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, operation type. Is the first operation type.
若操作为点击时,显示选项提示,选项提示是显示判断结果。If the operation is clicking, the option prompt is displayed, and the option prompt is to display the judgment result.
若操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型。If the operation is page turning, the local operation is page turning. The operation message in the operation event sent includes page turning, and the operation type is the second operation type.
若操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型。If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is floating, an animation is displayed, and the animation is temporarily enlarged.
例如,操作为对操作对象进行拖动,第一终端判断操作类型,其中,若操作是悬停,则本地进行动画展示,发送的操作事件中的操作消息包括悬停,操作类型为第一操作类型;若操作是移动,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;若操作是移动结束,则发送的操作事件中的操作消息包括移动结束,操作类型为第二操作类型。For example, the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally. The operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent. The operation message includes the end of the movement, and the operation type is the second operation type.
该实施例中,将用户界面具体操作划分不同操作类型,根据不同操作类型广播或存储并广播操作消息进行同步。例如在拖动图片时,只有停止移动的操作(drop操作)才对图片最终的展现位置有影响,因此将停止移动的操作设置为第二类型操作,写入数据库即可。对于拖动的过程(移动操作),只需同步即可,无需写入数据库(仅广播,不写入)。上述操作的具体动作不作限定。例如,“删除”可以是点击界面上的删除按钮,也可以是由其他操作触发“删除”。在一个实施例中,作用于第一终端的图库界面的操作为停止移动时,第一终端检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素。本实施例中通过检测及判断,触发“删除”,在拖动文件时,检测被移动元素的最终位置,即当停止移动时,若被移动元素的坐标位于垃圾桶范围内,将该元素删除。例如悬停 (hover)操作时,可以动画展示该元素,此时仅需广播进行同步,而无需写入数据库。In this embodiment, the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization. For example, when dragging an image, only the operation of stopping the movement (drop operation) will affect the final display position of the image. Therefore, the operation of stopping the movement is set to the second type of operation and can be written into the database. For the dragging process (moving operation), you only need to synchronize without writing to the database (broadcast only, not writing). The specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations. In one embodiment, when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted. In this embodiment, "Delete" is triggered through detection and judgment. When the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted . For example, during a hover operation, the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
可选的,在本公开的实施例中,考虑到某些操作有可能是持续的(例如点击确认等)或者频率较高(例如频繁点击等)或者,此时就需要不断传输数据,影响服务性能。考虑到该因素,在本公开的一个实施例中,操作为点击确认时,第一终端发送相邻两个操作事件的时间间隔大于设定阈值。本实施例设定点击操作事件发送间隔阈值,只有当前生成的操作事件与上一个发送的操作事件的时间间隔大于设定的阈值时,才发送当前生成的操作事件,如此防止用户高频度点击同一选项带来的服务资源消耗和无用的消息同步,减少操作事件发送频率,实现了节流,进一步避免了服务性能损耗的问题。Optionally, in the embodiments of the present disclosure, it is considered that certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance. Considering this factor, in an embodiment of the present disclosure, when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold. This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
进一步地,阈值的设置应该考虑同步效果,以不影响视觉的连续性为宜。在一个实施例中,阈值可以为100ms左右。将时间间隔为100ms内的操作事件抛弃,不进行传输和广播,不会影响使用者的感知。本公开实施例中的左右可以是在一定百分比范围内。例如上下浮动在1%、2%、3%、4%、5%或10%等。当然,阈值的具体设置也可以是其他时间值,例如40ms、50ms、60ms、70ms、80ms、85ms、90ms等。Further, the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision. In one embodiment, the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%. Of course, the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
本发明实施例中的第一终端既可以是老师控制的终端,也可以是学生控制的终端。The first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
本发明实施例提供了一种用户界面同步方法,本实施例的方法可通过上述的系统来实现。因此,上述系统实施例的说明部分可用于理解本发明方法。本发明实施例的用户界面同步方法包括如下步骤:An embodiment of the present invention provides a user interface synchronization method. The method in this embodiment can be implemented by the foregoing system. Therefore, the description of the above system embodiment can be used to understand the method of the present invention. The user interface synchronization method according to the embodiment of the present invention includes the following steps:
第一终端发送基于作用于其操作界面的操作生成的操作事件,操作事件包括操作消息和操作类型;The first terminal sends an operation event generated based on an operation acting on its operation interface, and the operation event includes an operation message and an operation type;
服务器接收操作事件,根据操作类型对操作消息广播或对操作消息存储和广播;The server receives the operation event and broadcasts the operation message or stores and broadcasts the operation message according to the operation type;
第二终端同步广播的操作消息。The second terminal synchronously broadcasts the operation message.
本发明实施例提供的用户界面同步方法通过对操作进行分类,根据不同的操作类型对响应的操作消息进行不同处理,如对于第一操作类型,仅对操作消息进行广播而不写入数据库,对第二操作类型写入数据库并广播该消息,从而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization method provided by the embodiment of the present invention categorizes operations and processes different response operation messages according to different operation types. For example, for the first operation type, only operation messages are broadcast without being written to the database. The second operation type writes to the database and broadcasts the message, thereby reducing the pressure on the server and greatly improving the service performance loss caused by the high concurrent write data.
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,服务器30广播第一操作类型的操作事件的操作消息,服务器30存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, the operation type may be divided into two types. For example, the operation type includes a first operation type and a second operation type. The server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type. In the embodiment of the present invention, a part of operations are classified into the first operation type. The operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型包括操作事件的过程操作;第二操作类型包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type includes a process operation of an operation event; the second operation type includes a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无数据写入进行同步。用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of data writing. User interface operations include, but are not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
可选的,若操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作。Optionally, if the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
若操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型,若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is mobile, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
若操作为停止移动,判断停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型。If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinate setting of the operation object is performed locally according to the stop position. The operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, operation type. Is the first operation type.
若操作为点击时,显示选项提示,选项提示是显示判断结果。If the operation is clicking, the option prompt is displayed, and the option prompt is to display the judgment result.
若操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型。If the operation is page turning, the local operation is page turning. The operation message in the operation event sent includes page turning, and the operation type is the second operation type.
若操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型。If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is floating, an animation is displayed, and the animation is temporarily enlarged.
例如,操作为对操作对象进行拖动,第一终端判断操作类型,其中,若操作是悬停,则本地进行动画展示,发送的操作事件中的操作消息包括悬停,操作类型为第一操作类型;若操作是移动,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;若操作是移动结束,则发送的操作事件中的操作消息包括移动结束,操作类型为第二操作类型。For example, the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally. The operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent. The operation message includes the end of the movement, and the operation type is the second operation type.
该实施例中,将用户界面具体操作划分不同操作类型,根据不同操作类型广播或存储并广播操作消息进行同步。例如在拖动图片时,只有停止移动的操作(drop操作)才对图片最终的展现位置有影响,因此将停止移动的操作设置为第二类型操作,写入数据库即可。对于拖动的过程(移动操作),只需同步即可,无需写入数据库(仅广播,不写入)。上述操作 的具体动作不作限定。例如,“删除”可以是点击界面上的删除按钮,也可以是由其他操作触发“删除”。在一个实施例中,作用于第一终端的图库界面的操作为停止移动时,第一终端检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素。本实施例中通过检测及判断,触发“删除”,在拖动文件时,检测被移动元素的最终位置,即当停止移动时,若被移动元素的坐标位于垃圾桶范围内,将该元素删除。例如悬停(hover)操作时,可以动画展示该元素,此时仅需广播进行同步,而无需写入数据库。In this embodiment, the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization. For example, when dragging an image, only the operation of stopping the movement (drop operation) will affect the final display position of the image. Therefore, the operation of stopping the movement is set to the second type of operation and can be written into the database. For the dragging process (moving operation), you only need to synchronize without writing to the database (broadcast only, not writing). The specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations. In one embodiment, when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted. In this embodiment, "Delete" is triggered through detection and judgment. When the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted . For example, during a hover operation, the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
可选的,在本公开的实施例中,考虑到某些操作有可能是持续的(例如点击确认等)或者频率较高(例如频繁点击等)或者,此时就需要不断传输数据,影响服务性能。考虑到该因素,在本公开的一个实施例中,操作为点击确认时,第一终端发送相邻两个操作事件的时间间隔大于设定阈值。本实施例设定点击操作事件发送间隔阈值,只有当前生成的操作事件与上一个发送的操作事件的时间间隔大于设定的阈值时,才发送当前生成的操作事件,如此防止用户高频度点击同一选项带来的服务资源消耗和无用的消息同步,减少操作事件发送频率,实现了节流,进一步避免了服务性能损耗的问题。Optionally, in the embodiments of the present disclosure, it is considered that certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance. Considering this factor, in an embodiment of the present disclosure, when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold. This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
进一步地,阈值的设置应该考虑同步效果,以不影响视觉的连续性为宜。在一个实施例中,阈值可以为100ms左右。将时间间隔为100ms内的操作事件抛弃,不进行传输和广播,不会影响使用者的感知。本公开实施例中的左右可以是在一定百分比范围内。例如上下浮动在1%、2%、3%、4%、5%或10%等。当然,阈值的具体设置也可以是其他时间值,例如40ms、50ms、60ms、70ms、80ms、85ms、90ms等。Further, the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision. In one embodiment, the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%. Of course, the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
本发明实施例中的第一终端既可以是老师控制的终端,也可以是学生控制的终端。The first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
本发明实施例提供了一种用户界面同步终端,图2示出了本发明用户界面同步终端的一实施例的示意图,参见图2,本发明实施例的用户界面同步终端包括:An embodiment of the present invention provides a user interface synchronization terminal. FIG. 2 shows a schematic diagram of an embodiment of the user interface synchronization terminal of the present invention. Referring to FIG. 2, the user interface synchronization terminal of the embodiment of the present invention includes:
监测单元11,用于监测作用于终端的操作界面的操作;A monitoring unit 11 configured to monitor operations of an operation interface acting on the terminal;
响应单元12,用于响应操作;A response unit 12 for responding to an operation;
操作事件生成单元13,用于基于响应操作生成操作事件,操作事件包括操作消息和操作类型;An operation event generating unit 13 is configured to generate an operation event based on a response operation, and the operation event includes an operation message and an operation type;
发送单元14,用于发送操作事件,以便于根据操作类型对操作消息广播或对操作消息存储和广播。The sending unit 14 is configured to send an operation event, so as to broadcast the operation message or store and broadcast the operation message according to the operation type.
本发明实施例提供的用户界面同步终端通过对操作进行分类,发送的操作事件中包括操作类型信息,以便于根据不同的操作类型对相应的操作消息进行不同处理,例如仅对操作消息进行广播而不写入数据库,以及对操作消息写入数据库并广播该消息,由于将部分操作类型不进行写入,因而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization terminal provided by the embodiment of the present invention categorizes operations, and the operation events sent include operation type information, so as to perform different processing on corresponding operation messages according to different operation types, for example, only broadcast operation messages. Does not write to the database, writes the operation message to the database and broadcasts the message, because some operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data .
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,广播第一操作类型的操作事件的操作消息,存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,以便于对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, operation types may be divided into two types. For example, operation types include a first operation type and a second operation type, an operation message that broadcasts an operation event of the first operation type, and an operation that stores and broadcasts a second operation type. Action message for the event. In the embodiment of the present invention, a part of operations are divided into the first operation type, so that only operation messages of this type are broadcast but not exist, reducing data writing, reducing server pressure, and greatly improving services brought by high concurrent writing. Performance loss.
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型可以包括操作事件的过程操作;第二操作类型可以包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type may include a process operation of an operation event; the second operation type may include a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无写入进行同步。用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of writing. User interface operations include, but are not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者 第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
可选的,若操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作。Optionally, if the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
若操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型,若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is mobile, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
若操作为停止移动,判断停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型。If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinate setting of the operation object is performed locally according to the stop position. The operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, operation type. Is the first operation type.
若操作为点击时,显示选项提示,选项提示是显示判断结果。If the operation is clicking, the option prompt is displayed, and the option prompt is to display the judgment result.
若操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型。If the operation is page turning, the local operation is page turning. The operation message in the operation event sent includes page turning, and the operation type is the second operation type.
若操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型。If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is floating, an animation is displayed, and the animation is temporarily enlarged.
例如,操作为对操作对象进行拖动,第一终端判断操作类型,其中,若操作是悬停,则本地进行动画展示,发送的操作事件中的操作消息包括悬停,操作类型为第一操作类型;若操作是移动,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类 型为第一操作类型;若操作是移动结束,则发送的操作事件中的操作消息包括移动结束,操作类型为第二操作类型。For example, the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally. The operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent. The operation message includes the end of the movement, and the operation type is the second operation type.
该实施例中,将用户界面具体操作划分不同操作类型,根据不同操作类型广播或存储并广播操作消息进行同步。例如在拖动图片时,只有停止移动的操作(drop操作)才对图片最终的展现位置有影响,因此将停止移动的操作设置为第二类型操作,写入数据库即可。对于拖动的过程(移动操作),只需同步即可,无需写入数据库(仅广播,不写入)。上述操作的具体动作不作限定。例如,“删除”可以是点击界面上的删除按钮,也可以是由其他操作触发“删除”。在一个实施例中,作用于第一终端的图库界面的操作为停止移动时,第一终端检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素。本实施例中通过检测及判断,触发“删除”,在拖动文件时,检测被移动元素的最终位置,即当停止移动时,若被移动元素的坐标位于垃圾桶范围内,将该元素删除。例如悬停(hover)操作时,可以动画展示该元素,此时仅需广播进行同步,而无需写入数据库。In this embodiment, the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization. For example, when dragging an image, only the operation of stopping the movement (drop operation) will affect the final display position of the image. Therefore, the operation of stopping the movement is set to the second type of operation and can be written into the database. For the dragging process (moving operation), you only need to synchronize without writing to the database (broadcast only, not writing). The specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations. In one embodiment, when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted. In this embodiment, "Delete" is triggered through detection and judgment. When the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted . For example, during a hover operation, the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
可选的,在本公开的实施例中,考虑到某些操作有可能是持续的(例如点击确认等)或者频率较高(例如频繁点击等)或者,此时就需要不断传输数据,影响服务性能。图3示出了本发明用户界面同步终端的一实施例的流程图。参见图3,本发明的一个实施例中,该终端还包括间隔判断单元15,间隔判断单元15判断基于移动操作生成的操作事件的时间间隔时间间隔是否大于设定阈值,若当前生成的操作事件与上一发送的操作事件生成的时间间隔大于设定阈值,则发送当前生成的操作事件。本实施例设定点击操作事件发送间隔阈值,只有当前生成的操作事件与上一个发送的操作事件的时间间隔大于设定的阈值时,才发送当前生成的操作事件,如此防止用户高频度点击同一选项带来的服务资源消耗和无用的消息同步,减少操作事件发送频率,实现了节流,进一步避免了服务性能损耗的问题。Optionally, in the embodiments of the present disclosure, it is considered that certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance. 3 is a flowchart of an embodiment of a user interface synchronization terminal according to the present invention. Referring to FIG. 3, in an embodiment of the present invention, the terminal further includes an interval judging unit 15, which determines whether the time interval of the operation event generated based on the mobile operation is greater than a set threshold. If the time interval between the last generated operation event and the generated threshold is greater than the set threshold, the currently generated operation event is sent. This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
进一步地,阈值的设置应该考虑同步效果,以不影响视觉的连续性为宜。在一个实施例中,阈值可以为100ms左右。将时间间隔为100ms内的操作事件抛弃,不进行传输和广播,不会影响使用者的感知。本公开实施 例中的左右可以是在一定百分比范围内。例如上下浮动在1%、2%、3%、4%、5%或10%等。当然,阈值的具体设置也可以是其他时间值,例如40ms、50ms、60ms、70ms、80ms、85ms、90ms等。Further, the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision. In one embodiment, the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%. Of course, the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
本发明实施例中的第一终端既可以是老师控制的终端,也可以是学生控制的终端。The first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
本发明实施例提供了一种用户界面同步方法,本实施例的方法可通过上述的终端来实现。因此,上述终端实施例的说明部分可用于理解本发明实施例的方法,图4示出了本发明用户界面同步方法的一实施例的流程图,参见图4,本发明实施例的用户界面同步方法包括如下步骤:An embodiment of the present invention provides a user interface synchronization method. The method in this embodiment may be implemented by using the foregoing terminal. Therefore, the description of the foregoing terminal embodiment can be used to understand the method of the embodiment of the present invention. FIG. 4 shows a flowchart of an embodiment of the user interface synchronization method of the present invention. Referring to FIG. 4, the user interface synchronization of the embodiment of the present invention The method includes the following steps:
监测作用于操作界面的操作;Monitor operations on the operation interface;
响应监测到的操作;Responding to monitored operations;
基于响应监测到的操作生成操作事件,操作事件包括操作消息和操作类型;Generate operation events based on the operations monitored in response. Operation events include operation messages and operation types.
发送操作事件,以便于根据操作类型对操作消息广播或对操作消息存储和广播。Send operation events to facilitate broadcasting or storing and broadcasting operation messages based on the type of operation.
本发明实施例提供的用户界面同步终端通过对操作进行分类,发送的操作事件中包括操作类型信息,以便于根据不同的操作类型对相应的操作消息进行不同处理,例如仅对操作消息进行广播而不写入数据库,以及对操作消息写入数据库并广播该消息,由于将部分操作类型不进行写入,因而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization terminal provided by the embodiment of the present invention categorizes operations, and the operation events sent include operation type information, so as to perform different processing on corresponding operation messages according to different operation types, for example, only broadcast operation messages. Does not write to the database, writes the operation message to the database and broadcasts the message, because some operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data .
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,广播第一操作类型的操作事件的操作消息,存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,以便于对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, operation types may be divided into two types. For example, operation types include a first operation type and a second operation type, an operation message that broadcasts an operation event of the first operation type, and an operation that stores and broadcasts a second operation type. Action message for the event. In the embodiment of the present invention, a part of operations are divided into the first operation type, so that only operation messages of this type are broadcast but not exist, reducing data writing, reducing server pressure, and greatly improving services brought by high concurrent writing. Performance loss.
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型可以包括操作事件的过程操作;第二操作类型可以包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type may include a process operation of an operation event; the second operation type may include a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无数据写入进行同步。用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of data writing. User interface operations include, but are not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
可选的,若操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作。Optionally, if the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation.
若操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型,若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is mobile, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes the movement, and the operation type is the first operation type. If the operation is suspended, an animation display is performed. It is temporarily enlarged.
若操作为停止移动,判断停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型。If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinate setting of the operation object is performed locally according to the stop position. The operation message in the operation event sent includes the stop movement, the operation type is the second operation type, Detect the coordinates of the moved element. If the coordinates of the moved element are within the trash bin, delete the element; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, operation type. Is the first operation type.
若操作为点击时,显示选项提示,选项提示是显示判断结果。If the operation is clicking, the option prompt is displayed, and the option prompt is to display the judgment result.
若操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型。If the operation is page turning, the local operation is page turning. The operation message in the operation event sent includes page turning, and the operation type is the second operation type.
若操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型。If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type.
若操作为悬浮式时,进行动画展示,动画展示是暂时放大。If the operation is floating, an animation is displayed, and the animation is temporarily enlarged.
例如,操作为对操作对象进行拖动,第一终端判断操作类型,其中,若操作是悬停,则本地进行动画展示,发送的操作事件中的操作消息包括悬停,操作类型为第一操作类型;若操作是移动,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;若操作是移动结束,则发送的操作事件中的操作消息包括移动结束,操作类型为第二操作类型。For example, the operation is to drag the operation object, and the first terminal determines the operation type. If the operation is hovering, the animation is displayed locally. The operation message in the operation event sent includes hovering, and the operation type is the first operation. Type; if the operation is a movement, the coordinates of the operation object are set locally according to the mouse position. The operation message in the operation event sent includes movement, and the operation type is the first operation type. If the operation is the end of the movement, the operation event is sent. The operation message includes the end of the movement, and the operation type is the second operation type.
该实施例中,将用户界面具体操作划分不同操作类型,根据不同操作类型广播或存储并广播操作消息进行同步。例如在拖动图片时,只有停止移动的操作(drop操作)才对图片最终的展现位置有影响,因此将停止移动的操作设置为第二类型操作,写入数据库即可。对于拖动的过程(移动操作),只需同步即可,无需写入数据库(仅广播,不写入)。上述操作的具体动作不作限定。例如,“删除”可以是点击界面上的删除按钮,也可以是由其他操作触发“删除”。在一个实施例中,作用于第一终端的图库界面的操作为停止移动时,第一终端检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素。本实施例中通过检测及判断,触发“删除”,在拖动文件时,检测被移动元素的最终位置,即当停止移动时,若被移动元素的坐标位于垃圾桶范围内,将该元素删除。例如悬停(hover)操作时,可以动画展示该元素,此时仅需广播进行同步,而无需写入数据库。In this embodiment, the specific operation of the user interface is divided into different operation types, and operation messages are broadcasted or stored and broadcast according to different operation types for synchronization. For example, when dragging an image, only the operation of stopping the movement (drop operation) will affect the final display position of the image. Therefore, the operation of stopping the movement is set to the second type of operation and can be written into the database. For the dragging process (moving operation), you only need to synchronize without writing to the database (broadcast only, not writing). The specific actions of the above operations are not limited. For example, "Delete" can be a click on the delete button on the interface, or it can be triggered by other operations. In one embodiment, when the operation on the gallery interface of the first terminal is to stop moving, the first terminal detects the coordinates of the moved element, and if the coordinates of the moved element are within the range of the trash can, the element is deleted. In this embodiment, "Delete" is triggered through detection and judgment. When the file is dragged, the final position of the moved element is detected, that is, when the movement is stopped, if the coordinates of the moved element are within the range of the trash can, the element is deleted . For example, during a hover operation, the element can be animated. At this time, only broadcasting is required for synchronization without writing to the database.
改变当前的播放状态,即当前为播放时,点击操作使其暂停,当前为暂停时,点击操作使其播放。服务器收到相应的操作事件后,存储音频的播放状态,并广播该消息,这样,第二终端即可进行同步。Change the current playback state, that is, when the current is playing, click to make it pause, and when the current is paused, click to make it play. After receiving the corresponding operation event, the server stores the playback status of the audio and broadcasts the message, so that the second terminal can perform synchronization.
可选的,在本公开的实施例中,考虑到某些操作有可能是持续的(例如点击确认等)或者频率较高(例如频繁点击等)或者,此时就需要不断传输数据,影响服务性能。考虑到该因素,在本公开的一个实施例中,操作为点击确认时,第一终端发送相邻两个操作事件的时间间隔大于设定阈值。本实施例设定点击操作事件发送间隔阈值,只有当前生成的操作事件与上一个发送的操作事件的时间间隔大于设定的阈值时,才发送当前生成的操作事件,如此防止用户高频度点击同一选项带来的服务资源消耗和无用的消息同步,减少操作事件发送频率,实现了节流,进一步避免了服务性能损耗的问题。Optionally, in the embodiments of the present disclosure, it is considered that certain operations may be continuous (such as click confirmation, etc.) or high frequency (such as frequent clicks, etc.) or, at this time, data needs to be continuously transmitted to affect services performance. Considering this factor, in an embodiment of the present disclosure, when the operation is a click confirmation, the time interval between the first terminal sending two adjacent operation events is greater than a set threshold. This embodiment sets the threshold for sending click operation events. Only when the time interval between the currently generated operation event and the last operation event sent is greater than the set threshold, the currently generated operation event is sent. This prevents users from clicking frequently. Consumption of service resources and useless message synchronization brought by the same option reduce the frequency of sending operational events, achieve throttling, and further avoid the problem of service performance loss.
进一步地,阈值的设置应该考虑同步效果,以不影响视觉的连续性为宜。在一个实施例中,阈值可以为100ms左右。将时间间隔为100ms内的操作事件抛弃,不进行传输和广播,不会影响使用者的感知。本公开实施例中的左右可以是在一定百分比范围内。例如上下浮动在1%、2%、3%、4%、5%或10%等。当然,阈值的具体设置也可以是其他时间值,例如40ms、50ms、60ms、70ms、80ms、85ms、90ms等。Further, the setting of the threshold value should consider the synchronization effect, and it is appropriate not to affect the continuity of vision. In one embodiment, the threshold may be about 100 ms. Discard operation events within a time interval of 100ms, without transmission and broadcast, and will not affect the user's perception. Left and right in the embodiments of the present disclosure may be within a certain percentage range. For example, it fluctuates between 1%, 2%, 3%, 4%, 5%, or 10%. Of course, the specific setting of the threshold can also be other time values, such as 40ms, 50ms, 60ms, 70ms, 80ms, 85ms, 90ms, and so on.
本发明实施例中的第一终端既可以是老师控制的终端,也可以是学生控制的终端。The first terminal in the embodiment of the present invention may be a terminal controlled by a teacher or a terminal controlled by a student.
本发明实施例提供了一种用户界面同步服务器,图5示出了本发明用户界面同步服务器的一实施例的流程图,参见图5,本发明实施例的服务器包括:An embodiment of the present invention provides a user interface synchronization server. FIG. 5 shows a flowchart of an embodiment of the user interface synchronization server of the present invention. Referring to FIG. 5, the server according to the embodiment of the present invention includes:
接收单元31,接收操作事件,操作事件包括操作消息和操作类型;The receiving unit 31 receives an operation event, and the operation event includes an operation message and an operation type;
操作类型判断单元32,判断操作类型;Operation type judgment unit 32, which judges the operation type;
广播单元33,广播操作消息,以便同步;A broadcasting unit 33 for broadcasting an operation message for synchronization;
存储单元34,当操作类型为写入型操作时,存储操作消息。The storage unit 34 stores an operation message when the operation type is a write operation.
本发明实施例提供的用户界面同步服务器根据不同的操作类型对相应的操作消息进行不同处理,例如仅对操作消息进行广播而不写入数据库,以及对操作消息写入数据库并广播该消息,由于将部分操作类型不进行写 入,因而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization server provided by the embodiment of the present invention performs different processing on the corresponding operation message according to different operation types, such as broadcasting only the operation message without writing to the database, and writing the operation message to the database and broadcasting the message. Partial operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,服务器30广播第一操作类型的操作事件的操作消息,服务器30存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, the operation type may be divided into two types. For example, the operation type includes a first operation type and a second operation type. The server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type. In the embodiment of the present invention, a part of operations are classified into the first operation type. The operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型可以包括操作事件的过程操作;第二操作类型可以包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type may include a process operation of an operation event; the second operation type may include a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无写入进行同步。用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of writing. User interface operations include, but are not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
本实施例中未详细描述的装置、功能以及方法步骤以及所能达到的相应技术效果等均与上文实施例中的相应内容相同,在此不再赘述。The devices, functions, and method steps that are not described in detail in this embodiment, and the corresponding technical effects that can be achieved are the same as the corresponding contents in the above embodiments, and are not described herein again.
本发明实施例提供了一种用户界面同步方法,本实施例的方法可通过上述实施例的服务器来实现。因此,上述服务器实施例的说明部分可用于理解本发明实施例的方法包括如下步骤:An embodiment of the present invention provides a user interface synchronization method. The method in this embodiment can be implemented by the server in the foregoing embodiment. Therefore, the description of the foregoing server embodiment can be used to understand that the method of the embodiment of the present invention includes the following steps:
接收操作事件,操作事件包括操作消息和操作类型;Receive operation events, operation events include operation messages and operation types;
根据操作类型对操作消息广播或对操作消息存储和广播。Broadcast operation messages or store and broadcast operation messages according to the operation type.
本发明实施例提供的用户界面同步服务器根据不同的操作类型对相应的操作消息进行不同处理,例如仅对操作消息进行广播而不写入数据库,以及对操作消息写入数据库并广播该消息,由于将部分操作类型不进行写入,因而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。The user interface synchronization server provided by the embodiment of the present invention performs different processing on the corresponding operation message according to different operation types, such as broadcasting only the operation message without writing to the database, and writing the operation message to the database and broadcasting the message. Partial operation types are not written, which reduces the pressure on the server and greatly improves the service performance loss caused by the high concurrent write data.
本发明实施例中,操作类型可以分为两种,例如,操作类型包括第一操作类型和第二操作类型,服务器30广播第一操作类型的操作事件的操作消息,服务器30存储和广播第二操作类型的操作事件的操作消息。本发明实施例将一部分操作划分为第一操作类型,对该类型的操作消息仅广播而不存在,减少数据写入,降低了服务器压力,极大改善了高并发写入带来的服务性能损耗。In the embodiment of the present invention, the operation type may be divided into two types. For example, the operation type includes a first operation type and a second operation type. The server 30 broadcasts an operation message of an operation event of the first operation type, and the server 30 stores and broadcasts a second operation type. Operation message for operation event of operation type. In the embodiment of the present invention, a part of operations are classified into the first operation type. The operation messages of this type are only broadcast and do not exist. This reduces data writing, reduces server pressure, and greatly improves service performance loss caused by high concurrent writing. .
本发明实施例中,可以根据实际情况将哪些操作划入第一操作类型,哪些操作划入第二操作类型。例如,第一操作类型包括操作事件的过程操作;第二操作类型包括操作事件的结果操作。对于操作过程产生的数据可以不进行存储,而仅对结果数据进行存储。例如拖动文件时,仅记录最终位置即可,而从原始位置至最终位置的过程不必存储,这样就可以减少数据写入。第二操作类型还可以包括删除操作(del)、清屏操作(clear)等。In the embodiment of the present invention, which operations can be classified into the first operation type and which operations are classified into the second operation type according to actual conditions. For example, the first operation type includes a process operation of an operation event; the second operation type includes a result operation of the operation event. The data generated during the operation process may not be stored, and only the result data may be stored. For example, when dragging a file, it is only necessary to record the final position, and the process from the original position to the final position does not need to be stored, so that data writing can be reduced. The second operation type may further include a delete operation (del), a clear screen operation (clear), and the like.
本发明实施例中,具体的操作不做限定,均可以按照有无写入进行同步。用户界面的操作包括但不限于:In the embodiment of the present invention, the specific operations are not limited, and they can be synchronized according to the presence or absence of writing. User interface operations include, but are not limited to:
第一终端界面的选择界面的操作,或者第一终端的操作界面的操作,或者第一终端的图库界面的操作,或者第一终端的音频界面的操作,或者第一终端的匹配选择界面的操作,或者第一终端的页面操作界面作用于其界面的操作,或者第一终端的具有清空页面按钮界面的操作。Operation of the selection interface of the first terminal interface, or operation of the first terminal's operation interface, or operation of the first terminal's gallery interface, or operation of the first terminal's audio interface, or operation of the first terminal's matching selection interface , Or the page operation interface of the first terminal acts on the operation of its interface, or the operation of the first terminal with the clear page button interface.
具体的,用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,第一操作类型包括画线、创建、移动和悬浮中的任意一种或多种,第二操作类型包括翻页、跳页、清屏、点击、停止移动和删除中的任意一种或多种。Specifically, the operation of the user interface includes any one or more of clearing the screen, drawing a line, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating. The first operation type includes drawing a line. , Create, move and hover any one or more, the second operation type includes any one or more of page turning, page jumping, clearing the screen, clicking, stopping moving and deleting.
本实施例中未详细描述的装置、功能以及方法步骤以及所能达到的相应技术效果等均与上文实施例中的相应内容相同,在此不再赘述。The devices, functions, and method steps that are not described in detail in this embodiment, and the corresponding technical effects that can be achieved are the same as the corresponding contents in the above embodiments, and are not described herein again.
下面结合不同的具体操作界面对本发明进一步说明。The present invention is further described below in combination with different specific operation interfaces.
在本发明的一些实施例中,操作界面可以是音频操作界面,具体的操作可以是点击音频,具体包括:判断音频类型,其中In some embodiments of the present invention, the operation interface may be an audio operation interface, and the specific operation may be clicking audio, which specifically includes: judging an audio type, where
若是长音频,则判断音频播放状态,当音频为播放状态时,暂停播放音频,发送的操作事件中的操作消息包括暂停播放,操作类型为第二操作类型,当音频为非播放状态时,播放音频,发送的操作事件中的操作消息包括播放,操作类型为第二操作类型;If it is long audio, the audio playback status is judged. When the audio is in the playback state, the audio is paused. The operation message in the operation event sent includes the pause of the playback. The operation type is the second operation type. Audio, the operation message in the operation event sent includes playback, and the operation type is the second operation type;
若是短音频,则判断音频播放状态,当音频为播放状态时,继续播放,当音频为非播放状态时,播放音频,发送的操作事件中的操作消息包括播放,操作类型为第二操作类型。If it is short audio, judge the audio playing status, continue playing when the audio is playing, and play the audio when the audio is not playing. The operation message in the operation event sent includes playback, and the operation type is the second operation type.
该实施例中,根据点击操作生成不同的操作事件,如音频为长音频时,点击操作为改变当前的播放状态,即当前为播放时,点击操作使其暂停,当前为暂停时,点击操作使其播放。服务器收到相应的操作事件后,存储音频的播放状态,并广播该消息,这样,第二终端即可进行同步。In this embodiment, different operation events are generated according to the click operation. For example, when the audio is long audio, the click operation is to change the current playback state, that is, when the current operation is playing, the click operation is used to pause, and when the current operation is paused, the click operation is used to cause Its playing. After receiving the corresponding operation event, the server stores the playback status of the audio and broadcasts the message, so that the second terminal can perform synchronization.
在本发明的另一些实施例中,操作具体可以是对元素(例如图片等)进行拖动,该拖动的操作过程具体可以包括光标悬停在该元素上、点击后进行移动、停止移动(即拖动结束),具体包括:若操作是悬停,则本地进行动画展示,发送的操作事件中的操作消息可以包括具体操作(悬停),操作类型为第一操作类型;若操作是移动,则本地根据鼠标位置对元素进行坐标设置,发送的操作事件中的操作消息包括移动(元素的坐标),操作类型为第一操作类型,无需写入移动过程中元素经历的坐标数据;若操作是拖动结束,则发送的操作事件中的操作消息包括拖动结束 (元素的坐标),操作类型为第二操作类型,需要写入拖动结束时元素的坐标数据。In other embodiments of the present invention, the operation may specifically be dragging an element (for example, a picture, etc.), and the operation process of the dragging may specifically include hovering the cursor on the element, clicking to move, or stopping the movement ( (That is, the end of dragging) specifically includes: if the operation is hovering, the animation is displayed locally, and the operation message in the operation event sent may include the specific operation (hovering), and the operation type is the first operation type; if the operation is moving , The coordinates of the element are set locally according to the mouse position. The operation message in the operation event sent includes the movement (the coordinate of the element). The operation type is the first operation type. There is no need to write the coordinate data of the element during the movement. It is the end of dragging, and the operation message in the operation event sent includes the end of dragging (element coordinates), the operation type is the second operation type, and the coordinate data of the element at the end of dragging needs to be written.
在本发明的另一些实施例中,具体的操作界面为选择题操作界面,具体的操作可以是在选项上悬浮或点击,其中悬浮为第一操作类型,点击为第二操作类型。操作为在选项上悬浮时,进行动画展示,动画展示例如可以是暂时放大,即,鼠标悬浮在该选项时,该选项作暂时放大显示效果的动画展示;操作为点击选项时,显示选项提示,例如,页面显示判断结果是对或是错的选项提示。选择正确则重计数。In other embodiments of the present invention, the specific operation interface is a multiple choice operation interface. The specific operation may be hovering or clicking on an option, where the hovering is the first operation type and the click is the second operation type. The operation is to perform an animation display when hovering over the option. For example, the animation display may be temporarily enlarged, that is, when the mouse is hovering over the option, the option is animated to temporarily display the enlarged display effect. For example, the page displays an option prompt that determines whether the result is right or wrong. Select the correct one to recount.
在本发明的一些实施例中,操作界面可以是匹配操作界面,匹配操作具体可以是移动或停止移动。匹配操作为停止移动时,判断是否是正确选项,若是正确选项,则执行正确选项提示,若不是正确选项,则执行移动操作。执行正确选项提示后,判断是否所有的匹配选择均正确作答完毕,若所有的匹配选择均正确作答完毕,则进行作答提示。具体的,在本发明的一些实施例中,移动操作为将单词或词语移动到图片的对应位置,若词语或单词与图片对应,则提示作答正确,单词或词语停放在图片的对应位置;若词语或单词与图片不对应,则单词或词语返回原位置;在本发明的一些实施例中,图片的数量可以是3个,单词的数量可以是3个,若3个单词均与相应的图片匹配正确,则提示完全正确,结束。这里要说明的是:提示作答正确的方式可以是显示提示,如显示√,也可以是文字“正确”、“对”、“good”等,也可以是语音提示,还可以是动画提示,这里对提示的方式不作具体限定,只要能够提示作答正确即可;对于匹配的对象,不局限于图片和单词的匹配,还可以是动画匹配等;单词与图片的数量可以相等也可以不等,对于图片和词语的数量,本发明不作具体限定,只要可以通过单词与图片的比对让学习者学习即可。In some embodiments of the present invention, the operation interface may be a matching operation interface, and the matching operation may specifically be moving or stopping moving. When the matching operation is to stop moving, it is judged whether it is the correct option. If it is the correct option, the correct option prompt is executed. If it is not the correct option, the move operation is executed. After the correct option prompt is executed, it is determined whether all the matching selections are completed correctly, and if all the matching selections are completed correctly, a prompt is given for answering. Specifically, in some embodiments of the present invention, the movement operation is to move a word or a word to a corresponding position in the picture. If the word or the word corresponds to the picture, it is prompted that the answer is correct, and the word or word is parked at the corresponding position in the picture; if If the word or word does not correspond to the picture, the word or word returns to its original position. In some embodiments of the present invention, the number of pictures may be three, and the number of words may be three. If all three words correspond to the corresponding picture If the match is correct, the prompt is completely correct and ends. What needs to be explained here: the correct way to prompt the answer can be to display the prompt, such as displaying √, the text "correct", "yes", "good", etc., it can also be a voice prompt, or an animation prompt, here The method of prompting is not specifically limited, as long as the prompt can be answered correctly; for the matching object, it is not limited to the matching of pictures and words, but also animation matching; the number of words and pictures can be equal or different. The number of pictures and words is not specifically limited in the present invention, as long as the learner can learn by comparing words with pictures.
在本发明的另一些实施例中,操作界面可以是划线的界面,具体的操作可以是绘画线条,绘画线条的操作事件完成后,第一终端获取绘画出的线条数据,并对线条数据进行压缩,删除原绘画的线条,根据压缩后线条数据生成线条并发送该线条。绘制线条是持续的,此时就需要不断传输数据,影响服务性能。本实施例设定操作事件发送条件,只有当前生成的操 作事件与上一个发送的操作事件的完成,才发送当前生成的操作事件,减少操作事件发送频率,实现了节流,进一步避免了服务性能损耗的问题。在本发明的一个实施例中,当前生成的操作事件完成后,获取绘画出的线条数据,并对线条数据进行压缩,删除原绘画的线条,根据压缩后线条数据生成线条并发送该线条,对线条的数据进行压缩,减少了交互的发送时数据的写入量,从而减少了服务器的压力,极大改善了由于高并发写入数据带来的服务性能损耗。In other embodiments of the present invention, the operation interface may be a scribing interface, and the specific operation may be drawing a line. After the operation event of drawing a line is completed, the first terminal obtains the drawn line data, and performs the line data processing. Compression, delete the original drawing lines, generate lines based on the compressed line data and send the lines. Drawing lines is continuous, and at this time, data needs to be continuously transmitted, affecting service performance. This embodiment sets the operating event sending conditions. Only the currently generated operating event and the previous sent operating event are completed, the currently generated operating event is sent, the operating event sending frequency is reduced, throttling is achieved, and service performance is further avoided. The problem of attrition. In one embodiment of the present invention, after the currently generated operation event is completed, the drawn line data is obtained, and the line data is compressed, the original drawn line is deleted, the line is generated based on the compressed line data, and the line is sent. The compression of the line data reduces the amount of data written during interactive transmission, thereby reducing the pressure on the server and greatly improving the service performance loss caused by the high concurrent writing data.
在本发明的另一些实施例中,操作界面可以是对页面进行操作的界面,具体的操作可以是点击翻页或输入跳页。操作是点击翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型;操作是输入跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型。如老师控制的终端输入跳转至第10页,学生控制的终端也跳转至第10页。同样,本实施例也可以进行节流,如处在节流控制中,则点击操作不会产生翻页或输入跳页事件,而是直接结束操作;如不处在节流控制中,则点击操作为跳转至指定页码。服务器收到相应的操作事件后,存储跳转后的页码信息,并广播该消息。In other embodiments of the present invention, the operation interface may be an interface for operating a page, and the specific operation may be clicking a page to turn or entering a page to jump. When the operation is to click to turn the page, the local operation is to turn the page. The operation message in the operation event sent includes page turning, and the operation type is the second operation type. When the operation is to enter the page jump, the local operation is to jump to Enter the page number, and the operation message of the operation event sent includes jumping to the input page number; the operation type is the second operation type. If the teacher-controlled terminal input jumps to page 10, the student-controlled terminal jumps to page 10. Similarly, in this embodiment, throttling can also be performed. If it is in throttling control, the click operation will not generate a page turning or input page jump event, but will end the operation directly; if it is not in throttling control, click The operation is to jump to the specified page number. After receiving the corresponding operation event, the server stores the page number information after the jump and broadcasts the message.
在本发明的另一些实施例中,操作界面可以是具有清空页面按钮界面,具体的操作可以是点击清空页面按钮。其中点击清空页面按钮的操作事件完成后,清空页面上的所有数据,将页面还原为初始状态,并发送清空页面操作。本实施例中也涉及点击操作,所以可可进行节流控制,避免传输无意义的频繁操作产生的操作事件。In other embodiments of the present invention, the operation interface may be an interface with a clear page button, and the specific operation may be clicking a clear page button. After the operation event of clicking the clear page button is completed, all data on the page is cleared, the page is restored to the initial state, and the clear page operation is sent. This embodiment also involves a click operation, so throttling control may be performed to avoid transmitting operation events generated by meaningless frequent operations.
由网络状态的相关不稳定因素可能导致消息同步丢失,为了减少此类状态导致不同步,在本发明的一个实施例中,监听网络连接状态,当监听到终端与服务器之间的网络断开时,例如消息反馈信息为socket断连或者触发监听事件disconnect时,则启动重试机制,当累计失败次数达到设定值(例如3次)时,提示重新进入操作界面。Messages may be lost due to instability related to the network status. In order to reduce such statuses leading to out-of-sync, in one embodiment of the invention, the network connection status is monitored. When the network between the terminal and the server is disconnected, For example, when the message feedback is that the socket is disconnected or the listen event disconnect is triggered, a retry mechanism is started, and when the cumulative number of failures reaches a set value (for example, 3 times), it prompts to re-enter the operation interface.
为了同步断连操作消息,使其不丢失,可以使用用户localstorage缓存策略进行数据merge,再次进入教室时将丢失消息进行同步。In order to synchronize disconnected operation messages so that they are not lost, you can use the user's localstorage cache strategy for data merge, and synchronize the lost messages when you enter the classroom again.
本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的方法的步骤。An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the foregoing method are implemented.
本发明实施例提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述的方法的步骤。An embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements the steps of the foregoing method when the program is executed.
本领域的技术人员可以清楚地了解到本发明实施例的技术方案可借助软件和/或硬件来实现。本说明书中的“单元”或“模块”是指能够独立完成或与其他部件配合完成特定功能的软件和/或硬件,其中硬件例如可以是FPGA(Field-Programmable Gate Array,现场可编程门阵列)、IC(Integrated Circuit,集成电路)等。Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present invention can be implemented by software and / or hardware. The “unit” or “module” in this specification refers to software and / or hardware capable of completing specific functions independently or in cooperation with other components, where the hardware may be, for example, FPGA (Field-Programmable Gate Array). , IC (Integrated Circuit), etc.
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一实施例方法的步骤。其中,计算机可读存储介质可以包括但不限于任何类型的盘,包括软盘、光盘、DVD、CD-ROM、微型驱动器以及磁光盘、ROM、RAM、EPROM、EEPROM、DRAM、VRAM、闪速存储器设备、磁卡或光卡、纳米系统(包括分子存储器IC),或适合于存储指令和/或数据的任何类型的媒介或设备。An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method of any of the foregoing embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, and flash memory devices. , Magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述任一实施例方法的步骤。在本发明实施例中,处理器为计算机系统的控制中心,可以是实体机的处理器,也可以是虚拟机的处理器。An embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method of any of the foregoing embodiments are implemented. In the embodiment of the present invention, the processor is a control center of a computer system, and may be a processor of a physical machine or a processor of a virtual machine.
在本发明中,术语“第一”、“第二”等仅用于描述的目的,而不能理解为指示或暗示相对重要性或顺序;术语“多个”则指两个或两个以上,除非另有明确的限定。术语“安装”、“相连”、“连接”、“固定”等术语均应做广义理解,例如,“连接”可以是固定连接,也可以是可拆卸连接,或一体地连接;“相连”可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the present invention, the terms "first", "second", etc. are used for descriptive purposes only, and cannot be understood to indicate or imply relative importance or order; the term "plurality" means two or more, Unless otherwise clearly defined. The terms "installation", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can It is directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
本发明的描述中,需要理解的是,术语“上”、“下”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或单元必须具有特定的方向、以特定的方位构造和操作,因此,不能理解为对本发明的限制。In the description of the present invention, it should be understood that the orientations or positional relationships indicated by the terms “up” and “down” are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description. It is not an indication or implied that the device or unit referred to must have a specific direction, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present invention. It should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (29)

  1. 一种用户界面同步系统,其特征在于,包括第一终端、第二终端和服务器,其中A user interface synchronization system, comprising a first terminal, a second terminal, and a server, wherein
    第一终端,用于发送基于作用于用户界面的操作生成的操作事件,所述操作事件包括操作消息和操作类型;A first terminal for sending an operation event generated based on an operation acting on a user interface, the operation event including an operation message and an operation type;
    服务器,用于接收所述操作事件,根据所述操作类型对所述操作消息广播和/或对所述操作消息存储和广播;A server for receiving the operation event, broadcasting the operation message and / or storing and broadcasting the operation message according to the operation type;
    第二终端,用于同步广播的所述操作消息。A second terminal, configured to synchronize the operation message broadcasted.
  2. 根据权利要求1所述的系统,其特征在于,所述操作类型包括第一操作类型和第二操作类型,所述服务器广播所述第一操作类型的操作事件的操作消息,所述服务器存储和广播所述第二操作类型的操作事件的操作消息。The system according to claim 1, wherein the operation type includes a first operation type and a second operation type, the server broadcasts an operation message of an operation event of the first operation type, and the server stores and Broadcasting an operation message of the operation event of the second operation type.
  3. 根据权利要求2所述的系统,其特征在于,所述第一操作类型包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The system according to claim 2, wherein the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  4. 根据权利要求2所述的系统,其特征在于,所述作用于用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,所述第一操作类型包括所述画线、所述创建、所述移动和所述悬浮中的任意一种或多种,所述第二操作类型包括所述翻页、所述跳页、所述清屏、所述点击、所述停止移动和所述删除中的任意一种或多种。The system according to claim 2, wherein the operations acting on the user interface include any one of screen clearing, line drawing, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating Or more, wherein the first operation type includes any one or more of the line drawing, the creation, the movement, and the suspension, and the second operation type includes the page turning , Any one or more of the page jump, the clear screen, the click, the stop moving, and the delete.
  5. 根据权利要求4所述的系统,其特征在于,The system according to claim 4, wherein:
    若所述操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作;If the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation;
    若所述操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;If the operation is moving, coordinate setting is performed locally on the operation object according to the mouse position, and the operation message in the operation event sent includes movement, and the operation type is the first operation type;
    若操作为停止移动,判断所述停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型;If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinates of the operation object are set locally according to the stop position. The operation message in the operation event sent includes the movement stop, and the operation type is the second operation type. And, the coordinates of the moved element are detected. If the coordinates of the moved element are within the range of the trash can, the element is deleted; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, Operation type is the first operation type;
    若所述操作为点击时,显示选项提示,所述选项提示是显示判断结果;If the operation is clicking, an option prompt is displayed, and the option prompt is to display a judgment result;
    若所述操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型;If the operation is a page turning, the local operation is a page turning operation, and the operation message in the operation event sent includes page turning, and the operation type is the second operation type;
    若所述操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型;If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type;
    若所述操作为悬浮式时,进行动画展示,所述动画展示是暂时放大。If the operation is a floating type, an animation display is performed, and the animation display is temporarily enlarged.
  6. 根据权利要求5所述的系统,其特征在于,若所述操作为点击或者移动操作生成的操作,则所述第一终端发送相邻两个操作事件的时间间隔大于设定阈值。The system according to claim 5, wherein if the operation is an operation generated by a click or a movement operation, a time interval between the first terminal sending two adjacent operation events is greater than a set threshold.
  7. 一种用户界面同步方法,其特征在于,包括如下步骤:A user interface synchronization method includes the following steps:
    第一终端发送基于作用于用户界面的操作生成的操作事件,所述操作事件包括操作消息和操作类型;The first terminal sends an operation event generated based on an operation acting on a user interface, where the operation event includes an operation message and an operation type;
    服务器接收所述操作事件,根据所述操作类型对所述操作消息广播和/或对所述操作消息存储和广播;The server receives the operation event, and broadcasts the operation message and / or stores and broadcasts the operation message according to the operation type;
    第二终端同步广播的所述操作消息。The second terminal synchronously broadcasts the operation message.
  8. 根据权利要求7所述的方法,其特征在于,所述操作类型包括第一操作类型和第二操作类型,所述服务器广播所述第一操作类型的操作事件的操作消息,所述服务器存储和广播所述第二操作类型的操作事件的操作消息。The method according to claim 7, wherein the operation type includes a first operation type and a second operation type, the server broadcasts an operation message of an operation event of the first operation type, and the server stores and Broadcasting an operation message of the operation event of the second operation type.
  9. 根据权利要求8所述的方法,其特征在于,所述第一操作类型的操作包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The method according to claim 8, wherein the operation of the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  10. 根据权利要求8所述的方法,其特征在于,所述作用于用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,所述第一操作类型包括所述画线、所述创建、所述移动和所述悬浮中的任意一种或多种,所述第二操作类型包括所述翻页、所述跳页、所述清屏、所述点击、所述停止移动和所述删除的任意一种或多种。The method according to claim 8, wherein the operations acting on the user interface include any one of screen clearing, line drawing, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating Or more, wherein the first operation type includes any one or more of the line drawing, the creation, the movement, and the suspension, and the second operation type includes the page turning , Any one or more of the page jump, the clear screen, the click, the stop moving, and the delete.
  11. 根据权利要求10所述的方法,其特征在于,The method according to claim 10, wherein:
    若所述操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作;If the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation;
    若所述操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;If the operation is moving, coordinate setting is performed locally on the operation object according to the mouse position, and the operation message in the operation event sent includes movement, and the operation type is the first operation type;
    若操作为停止移动,判断所述停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型;If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinates of the operation object are set locally according to the stop position. The operation message in the operation event sent includes the movement stop, and the operation type is the second operation type. And, the coordinates of the moved element are detected. If the coordinates of the moved element are within the range of the trash can, the element is deleted; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return, Operation type is the first operation type;
    若所述操作为点击时,显示选项提示,所述选项提示是显示判断结果;If the operation is clicking, an option prompt is displayed, and the option prompt is to display a judgment result;
    若所述操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型;If the operation is a page turning, the local operation is a page turning operation, and the operation message in the operation event sent includes page turning, and the operation type is the second operation type;
    若所述操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型;If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type;
    若所述操作为悬浮式时,进行动画展示,所述动画展示是暂时放大。If the operation is a floating type, an animation display is performed, and the animation display is temporarily enlarged.
  12. 根据权利要求11所述的方法,其特征在于,若所述操作为点击或者移动操作生成的操作,则所述第一终端发送相邻两个操作事件的时间间隔大于设定阈值。The method according to claim 11, wherein if the operation is an operation generated by a click or a movement operation, a time interval at which the first terminal sends two adjacent operation events is greater than a set threshold.
  13. 一种用户界面同步终端,其特征在于,所述终端包括:A user interface synchronization terminal is characterized in that the terminal includes:
    监测单元,用于监测作用于用户界面的操作;Monitoring unit for monitoring operations acting on the user interface;
    响应单元,用于响应所述操作;A response unit, configured to respond to the operation;
    操作事件生成单元,用于基于响应所述操作生成操作事件,所述操作事件包括操作消息和操作类型;An operation event generating unit, configured to generate an operation event based on a response to the operation, where the operation event includes an operation message and an operation type;
    发送单元,用于发送所述操作事件,以便于根据所述操作类型对所述操作消息广播和/或对所述操作消息存储和广播。The sending unit is configured to send the operation event, so as to broadcast the operation message and / or store and broadcast the operation message according to the operation type.
  14. 根据权利要求13所述的终端,其特征在于,所述操作类型包括第一操作类型和第二操作类型,广播所述第一操作类型的操作事件的操作消息,存储和广播所述第二操作类型的操作事件的操作消息。The terminal according to claim 13, wherein the operation type comprises a first operation type and a second operation type, an operation message broadcasting an operation event of the first operation type, and storing and broadcasting the second operation An action message of type action event.
  15. 根据权利要求14所述的终端,其特征在于,所述第一操作类型的操作包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The terminal according to claim 14, wherein the operation of the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  16. 一种用户界面同步方法,其特征在于,包括如下步骤:A user interface synchronization method includes the following steps:
    监测作用于用户界面的操作;Monitor operations on the user interface;
    响应所述操作;In response to said operation;
    基于响应所述操作生成操作事件,所述操作事件包括操作消息和操作类型;Generating an operation event based on the operation, the operation event including an operation message and an operation type;
    发送所述操作事件,以便于根据所述操作类型对所述操作消息广播和/或对所述操作消息存储和广播。And sending the operation event so as to broadcast the operation message and / or store and broadcast the operation message according to the operation type.
  17. 根据权利要求16所述的方法,其特征在于,所述操作类型包括第一操作类型和第二操作类型,所述服务器广播所述第一操作类型的操作事件的操作消息,所述服务器存储和广播所述第二操作类型的操作事件的操作消息。The method according to claim 16, wherein the operation type includes a first operation type and a second operation type, the server broadcasts an operation message of an operation event of the first operation type, and the server stores and Broadcasting an operation message of the operation event of the second operation type.
  18. 根据权利要求17所述的方法,其特征在于,所述第一操作类型的操作包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The method according to claim 17, wherein the operation of the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  19. 根据权利要求17所述的方法,其特征在于,所述作用于用户界面的操作包括清屏、画线、创建、移动、停止移动、点击、翻页、跳页、删除和悬浮中的任意一种或多种,其中,所述第一操作类型包括所述画线、所述创建、所述移动和所述悬浮中的任意一种或多种,所述第二操作类型包括所述翻页、所述跳页、所述清屏、所述点击、所述停止移动和所述删除中的任意一种或多种。The method according to claim 17, wherein the operations acting on the user interface include any one of screen clearing, line drawing, creating, moving, stopping moving, clicking, page turning, page jumping, deleting, and floating Or more, wherein the first operation type includes any one or more of the line drawing, the creation, the movement, and the suspension, and the second operation type includes the page turning , Any one or more of the page jump, the clear screen, the click, the stop moving, and the delete.
  20. 根据权利要求19所述的方法,其特征在于,The method according to claim 19, wherein:
    若所述操作为清屏时,点击清空页面按钮的操作事件完成后,第一终端清空页面上的所有数据将页面还原为初始状态,并发送清空页面操作;If the operation is to clear the screen, after the operation event of clicking the clear page button is completed, the first terminal clears all data on the page, restores the page to the initial state, and sends the clear page operation;
    若所述操作为移动时,则本地根据鼠标位置对操作对象进行坐标设置,发送的操作事件中的操作消息包括移动,操作类型为第一操作类型;If the operation is moving, coordinate setting is performed locally on the operation object according to the mouse position, and the operation message in the operation event sent includes movement, and the operation type is the first operation type;
    若操作为停止移动,判断所述停止移动的位置是否正确,若正确,则本地根据停止位置对操作对象进行坐标设置,发送的操作事件中的操作消 息包括停止移动,操作类型为第二操作类型,以及,检测被移动元素的坐标,若被移动元素的坐标位于垃圾桶范围内,则删除该元素;若不正确,则操作对象返回原坐标位置,发送的操作事件中的操作消息包括返回,操作类型为第一操作类型;If the operation is to stop the movement, determine whether the position where the movement is stopped is correct. If it is correct, the coordinates of the operation object are set locally according to the stop position. The operation message in the operation event sent includes the movement stop, and the operation type is the second operation type. And, the coordinates of the moved element are detected. If the coordinates of the moved element are within the range of the trash can, the element is deleted; if it is not correct, the operation object returns to the original coordinate position. The operation message in the operation event sent includes the return Operation type is the first operation type;
    若所述操作为点击时,显示选项提示,所述选项提示是显示判断结果;If the operation is clicking, an option prompt is displayed, and the option prompt is to display a judgment result;
    若所述操作为翻页时,则本地操作为进行翻页操作,发送的操作事件中的操作消息包括翻页,操作类型为第二操作类型;If the operation is a page turning, the local operation is a page turning operation, and the operation message in the operation event sent includes page turning, and the operation type is the second operation type;
    若所述操作为跳页时,则本地操作为跳转至输入页码,发送的操作事件的操作消息包括跳转至输入页码;操作类型为第二操作类型;If the operation is a page jump, the local operation is to jump to the input page number, and the operation message of the operation event sent includes the jump to the input page number; the operation type is the second operation type;
    若所述操作为悬浮式时,进行动画展示,所述动画展示是暂时放大。If the operation is a floating type, an animation display is performed, and the animation display is temporarily enlarged.
  21. 根据权利要求20所述的方法,其特征在于,若所述操作为点击或者移动操作生成的操作,则所述第一终端发送相邻两个操作事件的时间间隔大于设定阈值。The method according to claim 20, wherein if the operation is an operation generated by a click or a movement operation, a time interval at which the first terminal sends two adjacent operation events is greater than a set threshold.
  22. 一种用户界面同步服务器,其特征在于,包括:A user interface synchronization server includes:
    接收单元,用于接收操作事件,所述操作事件包括操作消息和操作类型;A receiving unit, configured to receive an operation event, where the operation event includes an operation message and an operation type;
    操作类型判断单元,用于判断操作类型;Operation type judging unit, for judging the operation type;
    广播单元,用于广播操作消息,以便同步;A broadcasting unit for broadcasting operation messages for synchronization;
    存储单元,用于当操作类型为写入型操作时,存储相应的操作消息。The storage unit is configured to store corresponding operation messages when the operation type is a write operation.
  23. 根据权利要求22所述的服务器,其特征在于,所述操作类型包括第一操作类型和第二操作类型,所述服务器广播所述第一操作类型的操作事件的操作消息,所述服务器存储和广播所述第二操作类型的操作事件的操作消息。The server according to claim 22, wherein the operation type includes a first operation type and a second operation type, the server broadcasts an operation message of an operation event of the first operation type, and the server stores and Broadcasting an operation message of the operation event of the second operation type.
  24. 根据权利要求23所述的服务器,其特征在于,所述第一操作类型的操作包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The server according to claim 23, wherein the operation of the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  25. 一种用户界面同步方法,其特征在于,包括如下步骤:A user interface synchronization method includes the following steps:
    接收操作事件,所述操作事件包括操作消息和操作类型;Receiving an operation event, the operation event including an operation message and an operation type;
    根据所述操作类型对所述操作消息广播和/或对所述操作消息存储和广播。Broadcasting the operation message and / or storing and broadcasting the operation message according to the operation type.
  26. 根据权利要求25所述的方法,其特征在于,所述操作类型包括第一操作类型和第二操作类型,所述服务器广播所述第一操作类型的操作事件的操作消息,所述服务器存储和广播所述第二操作类型的操作事件的操作消息。The method according to claim 25, wherein the operation type includes a first operation type and a second operation type, the server broadcasts an operation message of an operation event of the first operation type, and the server stores and Broadcasting an operation message of the operation event of the second operation type.
  27. 根据权利要求26所述的方法,其特征在于,所述第一操作类型的操作包括所述操作事件的过程操作;所述第二操作类型包括所述操作事件的结果操作。The method according to claim 26, wherein the operation of the first operation type includes a process operation of the operation event; and the second operation type includes a result operation of the operation event.
  28. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,该程序被处理器执行时实现权利要求7-12、16-21、25-27任一项所述方法的步骤。A computer-readable storage medium, characterized in that a computer program is stored thereon, and when the program is executed by a processor, the steps of the method according to any one of claims 7-12, 16-21, 25-27 are implemented.
  29. 一种计算机设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求7-12、16-21、25-27任一项所述方法的步骤。A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, claims 7-12, 16-21, Steps of the method of any of 25-27.
PCT/CN2019/082702 2018-08-14 2019-04-15 System and method for synchronizing user interface, terminal, and server WO2020034652A1 (en)

Applications Claiming Priority (16)

Application Number Priority Date Filing Date Title
CN201810925386.5A CN109032452A (en) 2018-08-14 2018-08-14 Page operation contents synchronization system and method
CN201810924812.3A CN109117287A (en) 2018-08-14 2018-08-14 Match selection operation content synchronization system and method
CN201810925387.XA CN109257414A (en) 2018-08-14 2018-08-14 Clear screen synchronization system and method
CN201810924813.8 2018-08-14
CN201810924815.7A CN109286658A (en) 2018-08-14 2018-08-14 Remote Selection operates synchronization system, method, equipment and storage medium
CN201810924814.2A CN109240780A (en) 2018-08-14 2018-08-14 Audio operation contents synchronization system and method
CN201810925387.X 2018-08-14
CN201810924645.2A CN109032451A (en) 2018-08-14 2018-08-14 Picture library operation content synchronization system and method
CN201810925386.5 2018-08-14
CN201810924811.9A CN109246196A (en) 2018-08-14 2018-08-14 Remote control description synchronization system and method
CN201810924814.2 2018-08-14
CN201810924645.2 2018-08-14
CN201810924815.7 2018-08-14
CN201810924811.9 2018-08-14
CN201810924813.8A CN109284158A (en) 2018-08-14 2018-08-14 Long-range drag operation contents synchronization system, method, equipment and storage medium
CN201810924812.3 2018-08-14

Publications (1)

Publication Number Publication Date
WO2020034652A1 true WO2020034652A1 (en) 2020-02-20

Family

ID=69524819

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082702 WO2020034652A1 (en) 2018-08-14 2019-04-15 System and method for synchronizing user interface, terminal, and server

Country Status (1)

Country Link
WO (1) WO2020034652A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816188A (en) * 2022-05-05 2022-07-29 Oppo广东移动通信有限公司 Page control method and device, electronic equipment, chip and readable storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
US20140300537A1 (en) * 2013-04-08 2014-10-09 Jani Turkia Device Relay Control System and Method
CN104158901A (en) * 2014-08-26 2014-11-19 天脉聚源(北京)教育科技有限公司 Method, device and system of synchronous page turning
CN106375296A (en) * 2016-08-30 2017-02-01 杭州施强教育科技有限公司 Multimedia courseware teaching live broadcast method
CN108197329A (en) * 2011-11-01 2018-06-22 微软技术许可有限责任公司 It is synchronized by the Real-time document demonstration data of generic service
CN109032452A (en) * 2018-08-14 2018-12-18 北京大米科技有限公司 Page operation contents synchronization system and method
CN109032451A (en) * 2018-08-14 2018-12-18 北京大米科技有限公司 Picture library operation content synchronization system and method
CN109067885A (en) * 2018-08-14 2018-12-21 北京大米科技有限公司 painting line synchronization system and method
CN109117287A (en) * 2018-08-14 2019-01-01 北京大米科技有限公司 Match selection operation content synchronization system and method
CN109167821A (en) * 2018-08-14 2019-01-08 北京大米科技有限公司 A kind of system and method that remote control description is synchronous
CN109246196A (en) * 2018-08-14 2019-01-18 北京大米科技有限公司 Remote control description synchronization system and method
CN109240780A (en) * 2018-08-14 2019-01-18 北京大米科技有限公司 Audio operation contents synchronization system and method
CN109257414A (en) * 2018-08-14 2019-01-22 北京大米科技有限公司 Clear screen synchronization system and method
CN109286658A (en) * 2018-08-14 2019-01-29 北京大米科技有限公司 Remote Selection operates synchronization system, method, equipment and storage medium
CN109284158A (en) * 2018-08-14 2019-01-29 北京大米科技有限公司 Long-range drag operation contents synchronization system, method, equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197329A (en) * 2011-11-01 2018-06-22 微软技术许可有限责任公司 It is synchronized by the Real-time document demonstration data of generic service
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
US20140300537A1 (en) * 2013-04-08 2014-10-09 Jani Turkia Device Relay Control System and Method
CN104158901A (en) * 2014-08-26 2014-11-19 天脉聚源(北京)教育科技有限公司 Method, device and system of synchronous page turning
CN106375296A (en) * 2016-08-30 2017-02-01 杭州施强教育科技有限公司 Multimedia courseware teaching live broadcast method
CN109032451A (en) * 2018-08-14 2018-12-18 北京大米科技有限公司 Picture library operation content synchronization system and method
CN109032452A (en) * 2018-08-14 2018-12-18 北京大米科技有限公司 Page operation contents synchronization system and method
CN109067885A (en) * 2018-08-14 2018-12-21 北京大米科技有限公司 painting line synchronization system and method
CN109117287A (en) * 2018-08-14 2019-01-01 北京大米科技有限公司 Match selection operation content synchronization system and method
CN109167821A (en) * 2018-08-14 2019-01-08 北京大米科技有限公司 A kind of system and method that remote control description is synchronous
CN109246196A (en) * 2018-08-14 2019-01-18 北京大米科技有限公司 Remote control description synchronization system and method
CN109240780A (en) * 2018-08-14 2019-01-18 北京大米科技有限公司 Audio operation contents synchronization system and method
CN109257414A (en) * 2018-08-14 2019-01-22 北京大米科技有限公司 Clear screen synchronization system and method
CN109286658A (en) * 2018-08-14 2019-01-29 北京大米科技有限公司 Remote Selection operates synchronization system, method, equipment and storage medium
CN109284158A (en) * 2018-08-14 2019-01-29 北京大米科技有限公司 Long-range drag operation contents synchronization system, method, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816188A (en) * 2022-05-05 2022-07-29 Oppo广东移动通信有限公司 Page control method and device, electronic equipment, chip and readable storage medium

Similar Documents

Publication Publication Date Title
US10872535B2 (en) Facilitating facial recognition, augmented reality, and virtual reality in online teaching groups
CN103413471B (en) Method and system for controlling network synchronous classroom
US10444955B2 (en) Selectable interaction elements in a video stream
US20040143630A1 (en) Method and system for sending questions, answers and files synchronously and asynchronously in a system for enhancing collaboration using computers and networking
US20040153504A1 (en) Method and system for enhancing collaboration using computers and networking
US20090259711A1 (en) Synchronization of Media State Across Multiple Devices
US20040143603A1 (en) Method and system for synchronous and asynchronous note timing in a system for enhancing collaboration using computers and networking
WO2018166173A1 (en) Remote cooperation method and system
US11750541B2 (en) Method for transmitting live message, apparatus, electronic device and medium
CN111935532A (en) Video interaction method and device, electronic equipment and storage medium
WO2020034652A1 (en) System and method for synchronizing user interface, terminal, and server
US10462531B2 (en) Methods, systems, and media for presenting an advertisement while buffering a video
CN105511754A (en) Page jump method and device based on page pull-down operation
WO2020034651A1 (en) Remote operation content synchronization system and method
WO2022089131A1 (en) Automatic message reply method and apparatus of intelligent terminal, and computer device and storage medium
JP6083245B2 (en) Information processing system, information processing apparatus, and program
JP2013201623A (en) Communication control device, communication system, method for controlling communication control device, program for making computer execute the control method, and communication device
CN109246196A (en) Remote control description synchronization system and method
WO2021159645A1 (en) Initiation and synchronization methods and systems for dynamic arrangement of multiple video windows
CN113676761B (en) Multimedia resource playing method and device and main control equipment
CN103677500A (en) Data processing method and electronic device
CN114237482A (en) Handwriting display processing method, device, system, equipment and storage medium
CN109067885B (en) Drawing line synchronization system and method
CN112099747A (en) Centralized control management system, storage device and terminal equipment
CN105912205A (en) Advertisement information display method and apparatus

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: 19850294

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19850294

Country of ref document: EP

Kind code of ref document: A1