Method and system for controlling one or more signal sources via an Android terminal

Obtain the current display interface of the signal source through the Android terminal and monitor the input device events, and generate processing instructions to process the signal source, which solves the problem that the Android system cannot control the signal source and improves the user's convenience in controlling the signal source.

CN117406896BActive Publication Date: 2024-09-24ZEN-AI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311188886.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2024-09-24
Estimated Expiration
2043-09-14

AI Technical Summary

Technical Problem

The existing technology cannot control the signal source and process its image through a mobile device equipped with an Android system.

Method used

Obtain the current display interface of the signal source on the signal interactive terminal through the Android terminal, obtain the interface processing instructions of the input device based on the Android terminal interface, uniformly monitor touch events and mouse events, calculate the movement offset and zoom ratio according to the event intention, and generate the interface Processing instructions, processing the current display interface of the signal source in response to the instructions.

Benefits of technology

It realizes the control of one or more signal sources through Android mobile devices, overcomes the shortcomings of the existing technology, makes the user's control of the signal sources more convenient and faster, and increases the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117406896B
    Figure CN117406896B
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and provides a method and system for controlling one or more signal sources through an Android terminal, wherein the method is applied to a system for controlling one or more signal sources through an Android terminal, and the method comprises: obtaining the current display interface of one or more signal sources; obtaining the interface processing instruction of an input device based on the interface of the Android terminal; and processing the current display interface of one or more signal sources in response to the interface processing instruction. The method controls one or more signal sources through a mobile device equipped with an Android system, making it possible to control one or more signal sources through the mobile device, and also making it more convenient and quick for users to control one or more other signal sources, thereby increasing the user's experience of using the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for controlling one or more signal sources through an Android terminal. Background Art

[0002] In the prior art, at least one signal source image connected to a computer can be controlled by operating a mouse or touch on a computer under an ordinary Windows operating system, but there is no technology for controlling the signal source through an Android system.

[0003] Take the mouse operation on a computer as an example. As an external input device of the computer, the mouse can be connected to the computer via a USB port or Bluetooth. The computer can monitor and obtain the signals on each external input device through its internal underlying protocol and distinguish whether the input is a mouse, keyboard or touch signal. If it is separated from the underlying protocol, it is impossible to parse whether the input is a mouse, keyboard or touch signal. For the Android system, when you want to use an external device to control the Android end, you cannot control the signal source according to the instructions of the external device.

[0004] Therefore, it is very necessary to solve the problem that the prior art cannot control the signal source and process the image of the signal source through a mobile device equipped with an Android system. Summary of the invention

[0005] The present invention provides a method and system for controlling one or more signal sources through an Android terminal, so as to overcome the defect that the prior art cannot control the signal source and process the image of the signal source through a mobile device equipped with an Android system, thereby making it possible to control one or more signal sources through a mobile device, and making it more convenient and quick for users to control one or more other signal sources using an Android mobile terminal.

[0006] In one aspect, the present invention provides a method for controlling one or more signal sources through an Android terminal, which is applied to a system for controlling one or more signal sources through an Android terminal, wherein the system comprises an Android terminal, a signal interaction terminal, an input device and at least one signal source, wherein the input device, the Android terminal and the signal interaction terminal are connected in sequence, and the signal source is connected to the signal interaction terminal; the method comprises: obtaining a current display interface of one or more signal sources on the signal interaction terminal, and displaying the current display interface of one or more signal sources on the interface of the Android terminal; based on the interface of the Android terminal, obtaining an interface processing instruction input by the input device to one or more signal sources; and processing the current display interface of one or more signal sources in response to the interface processing instruction.

[0007] Furthermore, the interface based on the Android terminal obtains interface processing instructions of the input device for one or more signal sources, including: uniformly monitoring touch events and mouse events, the touch events including single-point touch events and multi-point touch events, the mouse events including mouse press events, mouse move events and mouse lift events; according to the monitored touch events or the mouse events, the interface processing instructions are obtained; wherein the interface processing instructions include reducing, enlarging, stretching, and moving the current display interface.

[0008] Furthermore, obtaining the interface processing instruction based on the monitored touch event or the mouse event includes: determining an event intent based on the touch event or the mouse event, the event intent including image movement, image scaling and image stretching; calculating a movement offset and a scaling ratio based on the event intent; generating the interface processing instruction based on the calculated movement offset and the scaling ratio; accordingly, processing the current display interface of one or more signal sources in response to the interface processing instruction, including: moving the current display interface based on the movement offset; reducing or enlarging the current display interface based on the scaling ratio; wherein, boundary restrictions are performed in the process of moving, reducing or enlarging the current display interface.

[0009] Furthermore, the calculation of the movement offset and the zoom ratio according to the event intention includes: determining that the event intention is image zooming, calculating the first average distance between the current touch point and the center point of the first touch point, and calculating the second average distance between the initial touch point and the center point of the second touch point; taking the quotient of the first average distance and the second average distance to obtain the zoom ratio; wherein the coordinates of the center point of the first touch point are obtained by accumulating the coordinates of the current touch point and dividing it by the current number of touch points, and the coordinates of the center point of the second touch point are obtained by accumulating the coordinates of the initial touch point and dividing it by the initial number of touch points.

[0010] Furthermore, calculating the movement offset and the zoom ratio according to the event intention includes: determining that the zoom ratio is 1, or determining that the event intention is image movement or image stretching; calculating the distance between the center point of the first contact and the center point of the second contact, and the distance is the movement offset.

[0011] Furthermore, the boundary limitation is performed in the process of moving, reducing or enlarging the current display interface, including: determining that the vertical coordinate of the first vertex of the current display interface is smaller than the vertical coordinate of the first vertex of the parent component, and the horizontal coordinate of the first vertex of the current display interface is larger than the horizontal coordinate of the first vertex of the parent component; determining that the vertical coordinate of the second vertex of the current display interface is larger than the vertical coordinate of the second vertex of the parent component, and the horizontal coordinate of the second vertex of the current display interface is smaller than the horizontal coordinate of the second vertex of the parent component.

[0012] Furthermore, the unified monitoring of touch events and mouse events includes: adding a Modifier.pointerInput modifier to the window component to which the current display interface belongs, starting a Kotlin coroutine in the modifier, and monitoring touch events and mouse events in a spin polling manner; if it is determined that a pressure value signal exists in the monitored event, then the monitored event is the touch event; if it is determined that no pressure value signal exists in the monitored event, then the monitored event is the mouse event.

[0013] Furthermore, in response to the interface processing instruction, the current display interface of one or more signal sources is processed, including: determining the window component combination Modifier.offset modifier and Modifier.size modifier corresponding to the current display interface, so that the window component can respond to the changes in the position and size of the current display interface; using the remember recording function to record the value changes and responding the value to the interface through the mutableStateOf state function, and displaying it; wherein the value includes the vertex coordinates of the current display interface and the size of the current display interface.

[0014] Furthermore, the signal source is a camera, which is used to transmit images or videos captured by the camera to the Android terminal.

[0015] Furthermore, the Android terminal includes a mobile device, and the input device includes a mouse, and the mouse is connected to the Android terminal via Bluetooth or a USB cable.

[0016] Furthermore, the Android end and the signal interaction end both include interactive interface elements, and the interactive interface elements are displayed when a touch or a mouse click is received, and are hidden when no touch or a mouse click is received.

[0017] In a second aspect, the present invention further provides a system for controlling one or more signal sources through an Android terminal. When the system is running, it executes any of the above-mentioned methods for controlling one or more signal sources through an Android terminal.

[0018] The method for controlling one or more signal sources through an Android terminal provided by the present invention obtains the current display interface of one or more signal sources, and based on the interface of the Android terminal, obtains the interface processing instruction of the input device, and then processes the current display interface of one or more signal sources in response to the interface processing instruction. The method controls one or more signal sources through a mobile device equipped with an Android system, overcomes the defect that the prior art cannot control one or more signal sources through a mobile device equipped with an Android system, and processes the image of the signal source, making it possible to control a computer through a mobile device. Since the mobile device is basically carried by the user on a daily basis, it also makes the user's control of one or more other signal sources more convenient and quick, and increases the user's experience of using the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A system schematic diagram of a system for controlling one or more signal sources through an Android terminal provided by the present invention;

[0021] Figure 2 A schematic diagram of an Android terminal interface of the method for controlling one or more signal sources through an Android terminal provided by the present invention;

[0022] Figure 3 A schematic flow chart of a method for controlling one or more signal sources through an Android terminal provided by the present invention;

[0023] Figure 4 A partial flow chart of a method for controlling one or more signal sources through an Android terminal provided by the present invention;

[0024] Figure 5 A schematic diagram of the overall framework of the method for controlling one or more signal sources through an Android terminal provided by the present invention;

[0025] Figure 6 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] In the present invention, all the things realized through the network are essentially intended to cover wired or wireless network connections realized through necessary firmware or software such as switches and routers, and also wired or wireless network connections realized through some servers or other computers as intermediaries. In order to simplify the description and highlight the invention points, the present invention sometimes omits the description of routers / switches when describing network connections. In the present invention, the networks involved may include Wi-Fi networks, Bluetooth networks, private area networks (PANs), local area networks (LANs), wide area networks (WANs), IEEE 802.1x, intranets, the Internet, extranets, and combinations thereof. The network may also include a digital cellular telephone network, which may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), cdmaOne, CDMA2000, Evolution-Data Optimized (EV-DO), Enhanced Data Rates for GSM Evolution (EDGE), Universal Mobile Telecommunications System (UMTS), Digital Enhanced Cordless Telecommunications (DECT), Digital AMPS (IS-136 / TDMA), Integrated Digital Enhanced Network (iDEN), WiMAX, LTE, LTE advanced, Mobile Broadband Wireless Access (MBWA), IEEE 802.20. The network may be public access, private, virtual private such as VPN.

[0028] The present invention will be exemplarily described below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0029] Figure 1 A system schematic diagram of a system for controlling one or more signal sources through an Android terminal provided by the present invention is shown.

[0030] like Figure 1 As shown, the system includes:

[0031] Android terminal 110, signal interaction terminal 120, input device 130 ( Figure 1 The input device is a mouse) and at least one signal source ( Figure 1 The case of two signal sources is shown, including signal source 141 and signal source 142);

[0032] The Android terminal 110 includes a mobile device equipped with an Android system;

[0033] The signal interaction terminal 120 is connected to one or more signal sources to obtain the current display interface from the signal source and display it on the signal interaction terminal 120;

[0034] The signal interaction terminal 120 is in communication connection with the Android terminal 110, and the Android terminal 110 obtains its current display interface from the signal interaction terminal 120 through the communication connection and displays it on the interface of the Android terminal 110;

[0035] The Android terminal 110 is also used to respond to an interface processing instruction inputted by a user through the input device 130 on the interface of the Android terminal 110 to one or more signal sources, and forward the interface processing instruction to the signal interaction terminal 120;

[0036] The signal interaction terminal 120 is also used to convert the control instructions from the Android terminal 110 into local control instructions through screen coordinate conversion, so as to control each signal source respectively.

[0037] The signal exchange terminal 120 refers to a personal computer, a laptop, and other computer devices installed with a Windows system, a Linux system, etc.

[0038] The Android terminal 110 may be a mobile device equipped with an Android system, and the input device may include a keyboard, a mouse, or a touch display screen. In a specific embodiment, the Android terminal 110 is a vehicle-mounted device equipped with an Android system.

[0039] In another embodiment, the Android terminal 110 is a mobile phone equipped with an Android system. In this case, the input device may include a keyboard, a mouse, or a touch screen built into the mobile phone.

[0040] The signal source may be a camera, which is used to transmit images or videos captured by the camera to the signal interaction terminal 120 , and then to the Android terminal 110 .

[0041] Taking controlling two signal sources through an Android terminal as an example, the signal interaction terminal 120 is connected to the two signal sources 141 and 142 , and the current display interface can be obtained from the signal source 141 and the signal source 142 , and displayed on the signal interaction terminal 120 .

[0042] Specifically, Figure 2 The following is a schematic diagram of an Android terminal interface of the method for controlling one or more signal sources through an Android terminal provided by the present invention. Specifically, Figure 2 As shown, it shows the current display interfaces A and B displayed by the signal source 141 and the signal source 142 on the interface (screen) of the Android terminal 110.

[0043] The signal interaction terminal 120 is connected to the Android terminal 110 in communication, and the Android terminal 110 can obtain the current display interface from the signal interaction terminal 120 through the communication connection, and display it on the interface (i.e., screen) of the Android terminal 110. Therefore, when the signal interaction terminal 120 can display the current display interface of the signal source 141 and the signal source 142, the Android terminal 110 can also display the current display interface of the signal source 141 and the signal source 142. Figure 2 According to some other embodiments of the present invention, the Android terminal 110 may also directly obtain its current display interface from the signal source 141 and the signal source 142 through the network according to the instruction of the signal interaction terminal 120 .

[0044] According to some embodiments of the present invention, the signal interaction terminal 120 and the Android terminal 110 may further add some UI interaction interface elements, which may be displayed by touch or mouse click when needed and may be hidden when not needed.

[0045] The Android terminal 110 is used to further respond to the interface processing instructions input by the user through the input device 130 on the Android terminal 110 interface for one or more signal sources, and forward the interface processing instructions to the signal interaction terminal 120.

[0046] When the Android terminal 110 is connected to the mouse 130, the user can input interface processing instructions by referring to the current display interface of the Android terminal 110 and performing actions such as mouse clicking. The interface processing instructions include a first interface processing instruction for processing the current display interface of the signal source 141 and a second interface processing instruction for processing the current display interface of the signal source 142.

[0047] For example, the user can operate the signal source 141 at the signal source 141 position on the Android terminal 110 interface, and operate the signal source 142 at the signal source 142 position on the Android terminal 110 interface. The mouse 130 can be connected to the Android terminal 110 via Bluetooth or a USB cable. The input of the input device can also include touch input.

[0048] As an Android system developed for mobile devices, the common way of thinking in the prior art is to use it as a mobile terminal or portable use, but it is not thought of connecting a mouse to it so that it can be used as a control device.

[0049] The Android terminal 110 may further forward the interface processing instructions to the signal interaction terminal 120 . The signal interaction terminal 120 converts the interface processing instructions from the Android terminal 110 into local control instructions through screen coordinate conversion to control the signal source 141 and the signal source 142 respectively.

[0050] For example, there is a certain proportional relationship between the screen on the Android terminal 110 and the screen on the signal interaction terminal 120. The signal interaction terminal 120 can transform the coordinates of the interface processing instructions at a certain position on the Android terminal 110, and convert them into interface processing instructions at the corresponding position on the signal interaction terminal 120. The signal interaction terminal 120 controls one or more signal sources. This solution also covers the situation where the signal interaction terminal 120 directly forwards the interface processing instructions to one or more signal sources, and one or more signal sources respond.

[0051] According to some embodiments of the present invention, the signal interaction terminal 120 can obtain its current display interface from the signal source 141 and the signal source 142 through a video line or a network, and send an interface processing instruction to the signal source 141 and the signal source 142 through a USB line or a network or forward an interface processing instruction from the Android terminal 110. The signal interaction terminal 120 can be equipped with an input device and a display device, and can also be equipped with a touch screen display, through which the user touch and output interface can be received.

[0052] In one embodiment, the signal source is a camera, and the image captured by the camera is sent to the Android terminal 110, and the transmitted image is cropped twice on the Android terminal 110.

[0053] In another embodiment, annotations or markings are added to the image of the signal source displayed on the Android terminal 110, and the new image with the annotations or markings is sent to other terminals.

[0054] In another embodiment, the video of the signal source is displayed on the Android terminal 110, and the correspondence between each frame in the video and the moment of the frame is collected. When the user clicks on the Android terminal 110 to obtain a certain frame of the picture, the frame image will be retrieved from the video.

[0055] Through the above-mentioned embodiments of the present invention, the control of one or more other signal sources and the processing of corresponding images can be realized through the Android system. Since the Android system can be installed on mobile devices, it also makes it possible to control the computer through the mobile device. Since the mobile device is basically carried by the user on a daily basis, it also makes it more convenient and quick for the user to control one or more other signal sources and process images.

[0056] In addition, in the prior art, taking the mouse operation on a computer as an example, the mouse 130, as an external input device of the computer, can be connected to the computer via a USB port or Bluetooth. The computer can monitor and obtain signals on various external input devices through its internal underlying protocol and distinguish whether the input is a mouse, keyboard or touch signal. If it is separated from the underlying protocol, it is impossible to parse whether the input is a mouse 130, keyboard or touch signal. Similarly, as an external developer of the Android system application layer, since it is impossible to obtain various protocol codes of the Android underlying layer, when the external developer of the application layer prepares to connect an external device on the Android side, such as connecting a mouse 130 via USB (or connecting a mouse 130 via a Bluetooth adapter), the developer can only obtain an event feedback from the Android system at most, but cannot know whether the event is a mouse event or a touch event.

[0057] Therefore, the present invention further proposes how to enable the Android terminal to normally respond to the control instructions input by the user to one or more signal sources on the interface of the Android terminal, especially the instructions input through the mouse and touch, without enabling the underlying protocol of the Android terminal.

[0058] According to some embodiments of the present invention, when the touch and mouse press events are monitored and collected, they are analyzed, including analyzing the pressure value signal at this time, the pressure value signal is the value generated by pressing a finger on the touch screen, if there is no pressure value signal, the input event is predicted to be a mouse event, if there is a pressure value signal, the input event is predicted to be a touch event. After determining the touch event, the single-point touch (single-finger touch) event and the multi-point touch (multi-finger touch) event are further distinguished by analyzing the number of touch points in the touch event.

[0059] Based on the above system for controlling one or more signal sources through an Android terminal, the present invention also proposes a method for controlling one or more signal sources through an Android terminal, specifically, Figure 3 The flowchart of the method for controlling one or more signal sources through an Android terminal provided by the present invention is shown. Figure 3 As shown, the method includes:

[0060] S310, obtaining a current display interface of one or more signal sources;

[0061] S320, based on the current display interface, obtaining an interface processing instruction of the input device;

[0062] S330, in response to the interface processing instruction, processing the current display interface of one or more signal sources.

[0063] In step S310, there is a communication connection between the signal interaction end and at least one signal source, so the signal interaction end can obtain the corresponding current display interface from at least one signal source, and then forward the current display interface of the signal source obtained by it to the Android end based on the communication connection between the signal interaction end and the Android end.

[0064] The communication connection may be a video line connection or a network connection, which is not specifically limited here.

[0065] In step S320, after receiving the current display interface of the signal source, the Android terminal displays it and interacts visually with the user. The user determines the interface processing instructions based on the current display interface, and the interface processing instructions include at least one or a combination of reducing, enlarging, stretching, moving, cropping, annotating, and marking the current display interface.

[0066] After the user confirms the interface processing instruction, the interface processing instruction is transmitted to the Android terminal through the input device connected to the Android terminal. The connection between the input device and the Android terminal can be a Bluetooth connection or a USB cable connection, which is not specifically limited here.

[0067] The interface processing instructions are conveyed to the Android side through the input device. Specifically, it can be implemented by touch, mouse or keyboard input of the input device. The Android side will uniformly monitor and collect the touch events, mouse events or keyboard events input by the input device.

[0068] The Android terminal can obtain corresponding interface processing instructions by analyzing the touch events, mouse events or keyboard events that are monitored and collected.

[0069] In step S330, based on the interface processing instructions of the input device obtained in step S320, further, in response to the interface processing instructions, the current display interface of one or more signal sources is processed, and the processing here includes but is not limited to reducing, enlarging, stretching, moving, cropping, annotating and plotting the current display interface.

[0070] It is easy to understand that the Android end will forward the interface processing instructions to the signal interaction end. There is a certain proportional relationship between the screen on the Android end and the screen on the signal interaction end. The signal interaction end can transform the coordinates of the interface processing instructions at a certain position on the Android end, and convert it into the interface processing instructions at the corresponding position on the signal interaction end. The signal interaction end controls one or more signal sources and processes their current display interface. This solution also covers the situation where the signal interaction end forwards the interface processing instructions to one or more signal sources, and one or more signal sources respond on their own.

[0071] In this embodiment, the current display interface of one or more signal sources is obtained, and based on the current display interface, the interface processing instruction of the input device is obtained, and then the current display interface of one or more signal sources is processed in response to the interface processing instruction. This method controls one or more signal sources through a mobile device equipped with an Android system, which overcomes the defect that the prior art cannot control one or more signal sources through a mobile device equipped with an Android system and process the image of the signal source. It becomes possible to control one or more signal sources through a mobile device, and also makes it more convenient and quick for users to control one or more other signal sources, increasing the user's experience of using it.

[0072] Through the above-mentioned embodiments of the present invention, one or more other signal sources can be controlled through the Android system. Since the Android system can be installed on a mobile device, it is possible to control a computer through a mobile device. Since the mobile device is basically carried by the user on a daily basis, it also makes it more convenient and quick for the user to control one or more other signal sources.

[0073] Furthermore, when the current display interface of the signal source is being played on the signal interaction end, and the current display interface of the same or multiple signal sources is also being played on the Android end, the interface processing instructions input by the user on the Android end interface for one or more signal sources may also include interface processing instructions for adjusting the window (streaming media playback window) for playing the signal source on the Android end. The following further explains how to bypass the underlying Android system to implement a method for responding to interface processing instructions for mouse and touch input.

[0074] It can be understood that first, based on the current display interface, the interface processing instructions of the input device are obtained. Specifically, touch events and mouse events are monitored uniformly. Touch events include single-point touch events and multi-point touch events, and mouse events include mouse press events, mouse move events, and mouse lift events; according to the monitored touch events or mouse events, the interface processing instructions are obtained.

[0075] Specifically, Figure 4 A partial flow chart of the method for controlling one or more signal sources through an Android terminal provided by the present invention is shown. Figure 4 As shown, Figure 4 The steps of obtaining the interface processing instruction according to the monitored touch event or mouse event are further limited, and specifically include the following steps:

[0076] S410, determining an event intention according to a touch event or a mouse event, where the event intention includes image movement, image scaling, and image stretching.

[0077] In this step, the touch and mouse press, move and lift events are uniformly monitored, the input events are collected in groups, and the event intent is predicted.

[0078] In the event collection stage, touch events and mouse events are uniformly monitored, that is, touch and mouse press, move and lift events are uniformly monitored, which can include adding the Modifier.pointerInput modifier to the window component of the current display interface, starting the Kotlin coroutine in the modifier, and monitoring touch events and mouse events in a spin polling manner. When the user's press event (including one or more touch events or mouse events) is monitored, the current round of event group starts to collect work.

[0079] An event group starts with a press event PointerEventType.Press and ends with a release event PointerEventType.Release, which may contain zero to multiple move events PointerEventType.Move), for example, the mouse moves from one position to another or to multiple positions.

[0080] When the touch (press) and mouse press events are monitored and collected, they are analyzed, including the pressure value signal at this time. The pressure value is the value generated when a finger presses on the touch screen. If there is no pressure value signal, the input event is predicted to be a mouse event. If there is a pressure value signal, the input event is predicted to be a touch event. After the touch event is determined, the single-point touch event and the multi-point touch event are further distinguished by analyzing the number of touch points in the touch event.

[0081] When the input event is a single-point touch event or a mouse event, further analysis of the coordinates of the single-point touch event or the mouse event and the positional relationship of the window component can predict whether the event intention is to move the window or stretch the window (stretching the window includes enlarging or shrinking the window, and the window is the current display interface).

[0082] According to some embodiments of the present invention, when the coordinates of the press event are not at the edge of the window, it is considered to be an intention to move the window, otherwise it is considered to be an intention to stretch the window. For example, when the distance between the coordinates of the press event and the edge of the window is greater than a threshold pixel (such as 40 pixels), it is considered to be an intention to move the window, otherwise it is considered to be an intention to stretch the window. The specific threshold is configurable. When it is predicted that the user's intention is to stretch the window, the stretching direction and stretching size are further predicted.

[0083] According to some embodiments of the present invention, eight possible directions, namely left, upper left, upper, upper right, right, lower right, lower, and lower left, are determined according to the relative relationship between the input event coordinates and the edge position.

[0084] When the input event is a multi-touch event, the operation may be predicted to be moving the window or scaling the window (moving or scaling the current display interface).

[0085] Through the early prediction operation, it is no longer necessary to repeatedly judge and analyze the mouse or touch commands in each subsequent monitoring and response process, but only to obtain its movement coordinates, thereby simplifying the calculation process and improving the response speed.

[0086] S420, calculating a movement offset and a scaling ratio according to the event intention.

[0087] Then continue to monitor subsequent input events, and combine with the predicted event intentions to enter the calculation phase, which includes calculating the movement offset and scaling ratio of the touch point. In the present invention, for the sake of simplicity and clarity in description, when calculating mouse movement and touch movement, the mouse movement point and the touch movement point are both referred to as touch points. Therefore, calculating the mouse movement distance is also referred to as calculating the touch point movement distance. When referring to touch events, it still refers to single-point touch events or multi-point touch events, rather than mouse click events.

[0088] When the input event is predicted to be a multi-touch event, the scaling ratio (Scale) is calculated, including first calculating the first average distance between the current touch point and the center point of the first touch point. The coordinates of the center point of the first touch point can be obtained by summing up the coordinates of the current touch point and dividing it by the current number of touch points. The distance between the coordinates of the current touch point and the coordinates of the center point of the first touch point can be accumulated and divided by the current number of touch points to obtain the first average distance between the current touch point and the center point of the first touch point. The same steps are then used to calculate the second average distance between the initial touch point and the center point of the second touch point. The quotient of the first average distance and the second average distance is calculated to obtain the scaling ratio of the window. When the ratio is less than 1, it is zoomed out, otherwise it is zoomed in. When the ratio is 1, there is no zooming or unzooming, which may correspond to two or more fingers maintaining a fixed relative distance in the moving window. At this time, the moving offset (Offset) of the touch point can be further calculated.

[0089] Calculate the moving offset of the touch point. Specifically, the first touch point center point is obtained by summing up the coordinates of the current touch point and dividing it by the current number of touch points. The second touch point center point is obtained by summing up the coordinates of the initial touch point and dividing it by the initial number of touch points. The distance between the first touch point center point and the second touch point center point is calculated. This distance corresponds to the moving offset (x, y) (Offset) of the touch point. When the x value of the moving offset is positive, it means moving to the right, otherwise it means moving to the left. When the y value of the moving offset is positive, it means moving downward, otherwise it means moving upward.

[0090] When the predicted event is intended to be a mouse movement or a window stretch under single-touch (single-finger movement) or a window movement, the moving offset of the touch point is further calculated. Specifically, the first touch center point is obtained by summing up the coordinates of the current touch point and dividing it by the current number of touch points, and the second touch center point is obtained by summing up the coordinates of the initial touch point and dividing it by the initial number of touch points. The distance between the first touch center point and the second touch center point is calculated, and the distance corresponds to the moving offset (x, y) of the touch point. When the x value of the moving offset is positive, it means moving to the right, otherwise it means moving to the left. When the y value of the moving offset is positive, it means moving downward, otherwise it means moving upward.

[0091] S430, generating the interface processing instruction according to the calculated movement offset and scaling ratio;

[0092] S440, in response to the interface processing instruction, processing the current display interface of one or more signal sources.

[0093] Make the window responsive to movement offset and scaling values ​​to achieve window size and position changes.

[0094] In the present invention, the window exists as a component. When the scaling ratio is responded to the window component, the width and height of the window component can be adjusted respectively. The window component is used to display the current display interface of the signal source. Using the screen ratio of 16:9, the change factor of the width and height is calculated (such as the factor formula of the width is f(n) = 16*Scale). When Scale is greater than 1, the width and height of the window component are adjusted positively (added to the factor), that is, enlarged; when Scale is less than 1, the width and height of the window component are adjusted negatively (subtracted from the factor), that is, reduced.

[0095] According to some embodiments of the present invention, when responding to the moving offset to the window component, it is necessary to adjust the vertices (upper left and / or lower right diagonals) of the window component respectively. According to some embodiments of the present invention, the adjustment is differentiated according to the predicted event intention. When the prediction is the intention to move the window (that is, moving rather than enlarging or reducing the window, the movement may include single-point touch movement and mouse movement), it is sufficient to adjust the position of the upper left vertex of the window component; when the prediction is the intention to stretch the window, the size of the window component will change with the moving offset, and the starting point of the window component needs to be differentiated again: when the predicted direction is left, upper left, or upper, the starting point moves to the upper left; when it is right, lower right, or lower, the starting point remains unchanged; when it is upper right, the Y axis of the starting point moves upward; when it is lower left, the X axis of the starting point moves left.

[0096] S450, performing boundary restrictions during the process of moving, reducing or enlarging the current display interface.

[0097] Specifically, in one embodiment, boundary restrictions are performed, specifically including: determining that the vertical coordinate of the first vertex of the current display interface is smaller than the vertical coordinate of the first vertex of the parent component, and the horizontal coordinate of the first vertex of the current display interface is larger than the horizontal coordinate of the first vertex of the parent component; determining that the vertical coordinate of the second vertex of the current display interface is larger than the vertical coordinate of the second vertex of the parent component, and the horizontal coordinate of the second vertex of the current display interface is smaller than the horizontal coordinate of the second vertex of the parent component.

[0098] In this embodiment, the lower left corner of the Android terminal is taken as the origin, and the first quadrant of the coordinate system established thereby is the screen area. At this time, the horizontal coordinate of the first vertex (upper left corner), the vertical coordinate of the first vertex, the horizontal coordinate of the second vertex (lower right corner), and the vertical coordinate of the second vertex are all positive.

[0099] It should be noted that the determination of the first vertex and the second vertex is closely related to the construction of the coordinate system and can be adjusted according to the constructed coordinate system, and is not specifically limited here.

[0100] For example, in another embodiment, while responding to changes in the contact point, the adjustment of the window component is further restricted by boundaries, including: comparing the window vertices (the first vertex and the second vertex of the current display interface) with the vertices of the parent component (the grid area divided for each signal source in the Android screen), and limiting the window's top left vertex (topLeft) to not be larger than the parent's top left vertex, and the bottom right (bottomRight) vertex to not be smaller than the parent's bottom right vertex, so as to confine the window component to the parent component, avoid overflowing the screen or being cut off by the parent component when the position and size of the window component change, thereby reducing the interface friendliness and interaction efficiency. This ensures the friendliness of the interface and further interaction efficiency while achieving the function.

[0101] In this embodiment, the upper left corner of the Android terminal is taken as the origin, and the fourth quadrant of the coordinate system established thereby is the screen area. At this time, the horizontal coordinate of the first vertex coordinate and the horizontal coordinate of the second vertex coordinate are positive, and the vertical coordinate of the first vertex coordinate and the vertical coordinate of the second vertex coordinate are negative.

[0102] According to some embodiments of the present invention, in order to enable the window component under the Android end to respond to changes in position and size, the window component corresponding to the current display interface combines the Modifier.offset modifier and the Modifier.size modifier. In addition, the remember recording function is reused in the window component to record the change of the value, and the mutableStateOf state function is used to respond the value to the interface (the interface of the Android end), and the value includes the vertex coordinates of the current display interface and the window size of the current display interface. When the interface is redrawn, the previously stored values, such as the vertex coordinates of the current display interface and the size of the current display interface, will be read. By remembering the change of the recorded value, subsequent changes can be based on the previously stored value as the reference starting point value, rather than the initial initialization value as the reference starting point value, thereby ensuring calculation efficiency, response speed and correct response method.

[0103] According to some embodiments of the present invention, when multiple (signal source) windows are displayed on the Android terminal, the Modifier.offset modifier and the Modifier.size modifier can be combined for the window component corresponding to each window. And the remember recording function is used in each window component to record the value change, and the value is responded to the interface (the small grid area / interface divided by the Android terminal for the corresponding signal source) through the mutableStateOf state function, and the value includes the vertex coordinates of the current display interface and the size of the current display interface. By using the offset position modifier of Modifier and the size size modifier of Modifier, in conjunction with the remember recording function and the mutableStateOf state function, responding to user input events (mouse, gestures, etc.) and calculating the corresponding results, it is possible to solve the problems of window overlap, window being too small, and window being covered, thereby avoiding the problem of low content visibility. At the same time, it can also adapt to the needs of any window layout, achieve precise adjustment effects, and have high event response sensitivity (for example, the window can be dragged diagonally in the same frame without having to move horizontally and then vertically for two frames), the picture is smooth and non-sticky, and the window can be moved as soon as it is dragged and is visible as soon as it moves.

[0104] Figure 5 The overall framework diagram of the method for controlling one or more signal sources through an Android terminal provided by the present invention is shown. Figure 5 As shown, specifically including:

[0105] Event collection includes implementing modifier monitoring and continuing to monitor modifiers in a coroutine polling manner. During the monitoring process, a press event may occur. After the press event occurs, on the one hand, the number of contacts (single point or multi-point) and type (mouse, single-point touch or multi-point touch) in the press event are analyzed to predict the event intention. On the other hand, mobile events continue to be monitored. After the mobile event is monitored, the mobile event is analyzed and calculated with reference to the predicted event intention. After that, the response change is implemented according to the analysis and calculation results. During the change process, the response change is prevented from overflowing (i.e., boundary limiting). When a lift event occurs, event collection ends. For details on some of the steps in the above process, please refer to the previous section about Figure 4 The description made will not be repeated here.

[0106] Through the above embodiments of the present invention, it is possible to control the Android terminal with a mouse, and thus control various signal sources through the Android terminal. The introduction of the mouse also makes the Android terminal more compatible with the daily interaction habits of general users, thereby further improving the interaction efficiency of the Android terminal with the signal source.

[0107] The above description of the input device being a mouse is also applicable to the case where the input device is a keyboard, wherein the two keyboard symbols on the mouse can be mapped to the left and right buttons of the mouse. For the sake of simplicity, it will not be repeated here.

[0108] The present invention also provides a system for controlling one or more signal sources through an Android terminal. When the system is running, it executes each step of the above-mentioned method for controlling one or more signal sources through an Android terminal.

[0109] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the mouse control method, which includes: obtaining the current display interface of one or more signal sources on the signal interaction end, and displaying the current display interface of one or more signal sources on the interface of the Android end; based on the interface of the Android end, obtaining the interface processing instruction input by the input device to one or more signal sources; and processing the current display interface of one or more signal sources in response to the interface processing instruction.

[0110] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0111] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the mouse control method provided by the above-mentioned methods, the method comprising: obtaining the current display interface of one or more signal sources on the signal interaction end, and displaying the current display interface of one or more signal sources on the interface of the Android end; based on the interface of the Android end, obtaining the interface processing instructions input by the input device to one or more signal sources; and in response to the interface processing instructions, processing the current display interface of one or more signal sources.

[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling one or more signal sources through an Android terminal, It is characterized in that A system applied to control one or more signal sources through an Android terminal, the system comprising an Android terminal, a signal interaction terminal, an input device and at least one signal source, the input device, the Android terminal and the signal interaction terminal are connected in sequence, and the signal source is connected to the signal interaction terminal; The method comprises: Acquire the current display interface of one or more signal sources on the signal interaction terminal, and display the current display interface of one or more signal sources on the interface of the Android terminal; Based on the interface of the Android terminal, obtaining the interface processing instruction of the input device for one or more signal sources input; In response to the interface processing instruction, the current display interface of one or more signal sources is processed; wherein the Android end forwards the interface processing instruction to the signal interaction end, and the signal interaction end controls the one or more signal sources and processes their current display interface; The step of obtaining, based on the interface of the Android terminal, an interface processing instruction of the input device for one or more signal sources includes: Add a setting modifier to the window component to which the current display interface belongs, and start a setting coroutine in the setting modifier to uniformly monitor touch events and mouse events in a spinning polling manner, wherein the touch events include single-point touch events and multi-point touch events, and the mouse events include mouse press events, mouse move events, and mouse lift events; Acquire the interface processing instruction according to the monitored touch event or the mouse event; The interface processing instructions include one or more combinations of reducing, enlarging, stretching, moving, cropping, annotating and marking the current display interface.

2. The method for controlling one or more signal sources through an Android terminal according to claim 1, It is characterized in that The acquiring the interface processing instruction according to the monitored touch event or the mouse event includes: Determine an event intention according to the touch event or the mouse event, wherein the event intention includes image movement, image scaling, and image stretching; According to the event intention, calculate the movement offset and the scaling ratio; Generate the interface processing instruction according to the calculated movement offset and the scaling ratio; Accordingly, in response to the interface processing instruction, processing the current display interface of one or more signal sources includes: Moving the current display interface according to the movement offset; According to the zoom ratio, reduce or enlarge the current display interface; Wherein, boundary restrictions are performed during the process of moving, reducing or enlarging the current display interface.

3. The method for controlling one or more signal sources through an Android terminal according to claim 2, It is characterized in that The calculating the movement offset and the scaling ratio according to the event intention includes: Determining that the event intention is image zooming, calculating a first average distance between the current touch point and a center point of the first touch point, and calculating a second average distance between the initial touch point and a center point of the second touch point; Taking a quotient of the first average distance and the second average distance to obtain the scaling ratio; The coordinates of the center point of the first touch point are obtained by summing up the coordinates of the current touch point and dividing it by the current number of touch points, and the coordinates of the center point of the second touch point are obtained by summing up the coordinates of the initial touch point and dividing it by the initial number of touch points.

4. The method for controlling one or more signal sources through an Android terminal according to claim 3, It is characterized in that The calculating the movement offset and the scaling ratio according to the event intention includes: Determine that the zoom ratio is 1, or determine that the event intention is image movement or image stretching; The distance between the center point of the first touch point and the center point of the second touch point is calculated, and the distance is the movement offset.

5. The method for controlling one or more signal sources through an Android terminal according to claim 2, It is characterized in that The performing boundary restriction in the process of moving, reducing or enlarging the current display interface includes: Determine that the vertical coordinate of the first vertex of the current display interface is smaller than the vertical coordinate of the first vertex of the parent component, and the horizontal coordinate of the first vertex of the current display interface is larger than the horizontal coordinate of the first vertex of the parent component; It is determined that the ordinate of the second vertex of the current display interface is greater than the ordinate of the second vertex of the parent component, and the abscissa of the second vertex of the current display interface is less than the abscissa of the second vertex of the parent component.

6. The method for controlling one or more signal sources through an Android terminal according to claim 1, It is characterized in that The unified monitoring of touch events and mouse events includes: Add the Modifier.pointerInput modifier to the window component to which the current display interface belongs, start the Kotlin coroutine in the modifier, and listen to touch events and mouse events in a spin polling manner; Determining that the monitored event has a pressure value signal, then the monitored event is the touch event; If it is determined that there is no pressure value signal in the monitored event, then the monitored event is the mouse event.

7. The method for controlling one or more signal sources through an Android terminal according to claim 2, It is characterized in that The processing of the current display interface of one or more signal sources in response to the interface processing instruction includes: Determine a window component combination Modifier.offset modifier and Modifier.size modifier corresponding to the current display interface, so that the window component can respond to changes in the position and size of the current display interface; Use the remember recording function to record the value changes and use the mutableStateOf state function to respond to the value to the interface and display it; The values ​​include vertex coordinates of the current display interface and the size of the current display interface.

8. The method for controlling one or more signal sources through an Android terminal according to any one of claims 1 to 7, It is characterized in that The signal source is a camera, which is used to transmit the image or video captured by the camera to the Android terminal.

9. The method for controlling one or more signal sources through an Android terminal according to any one of claims 1 to 7, It is characterized in that The Android terminal includes a mobile device, and the input device includes a mouse, which is connected to the Android terminal via Bluetooth or a USB cable.

10. The method for controlling one or more signal sources through an Android terminal according to any one of claims 1 to 7, It is characterized in that The Android end and the signal interaction end both include interactive interface elements, which are displayed when a touch or a mouse click is received, and are hidden when no touch or a mouse click is received.

11. A system for controlling one or more signal sources through an Android terminal. It is characterized in that When the system is running, it executes the method for controlling one or more signal sources through an Android terminal as described in any one of claims 1 to 10.