CN114637571B - Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium - Google Patents

Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium Download PDF

Info

Publication number
CN114637571B
CN114637571B CN202210536846.1A CN202210536846A CN114637571B CN 114637571 B CN114637571 B CN 114637571B CN 202210536846 A CN202210536846 A CN 202210536846A CN 114637571 B CN114637571 B CN 114637571B
Authority
CN
China
Prior art keywords
ios
coordinate
terminal
key value
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210536846.1A
Other languages
Chinese (zh)
Other versions
CN114637571A (en
Inventor
李嘉隆
黄德安
陈子文
姜亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Imyfone Technology Co ltd
Original Assignee
Shenzhen Imyfone Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Imyfone Technology Co ltd filed Critical Shenzhen Imyfone Technology Co ltd
Priority to CN202210536846.1A priority Critical patent/CN114637571B/en
Publication of CN114637571A publication Critical patent/CN114637571A/en
Application granted granted Critical
Publication of CN114637571B publication Critical patent/CN114637571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • 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/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03543Mice or pucks
    • 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

Abstract

The invention discloses a method and a device for controlling an IOS terminal by a computer terminal, an intelligent terminal and a storage medium, wherein the method comprises the following steps: acquiring mouse data of a computer terminal, wherein the mouse data comprises a key state and coordinate data; acquiring an IOS version of an IOS terminal; if the IOS version is larger than or equal to a set threshold, converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, wherein the IOS coordinate set comprises a plurality of pairs of IOS coordinates; transmitting the key state and the IOS coordinate set to the IOS terminal; otherwise, acquiring the screen orientation of the IOS terminal; converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation; and transmitting the key state and the IOS coordinate to the IOS terminal. Compared with the prior art, the IOS terminal is operated through the mouse of the computer terminal, and the IOS terminal is controlled by the computer terminal simply and safely.

Description

Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for controlling an IOS terminal by a computer terminal, an intelligent terminal and a storage medium.
Background
Although mobile phones play an increasingly important role in people's life and communication, people are still used to use computers to complete various tasks in various office places. When a worker working with a computer operates the computer, the worker needs to check the mobile phone or operate the mobile phone frequently, and the working efficiency is affected.
At present, the display content of the mobile phone screen can be projected to a computer screen through various projection software, so that the mobile phone screen can be conveniently checked on a computer, and new information on the mobile phone can be timely obtained. However, the mobile phone still needs to be picked up to operate the mobile phone, and the problems of work interruption and low work efficiency cannot be solved.
Although some mobile phone applications also have corresponding computer-side software, the mobile phone applications can be operated on a computer. But only a designated mobile phone application can be operated, and the same application needs to be installed on both the computer and the mobile phone. However, the software which is the same as the mobile phone application is installed on the computer one by one, so that the operation is complicated, resources are occupied, and the distribution of private information is not beneficial to protecting personal information; and many applications on mobile phones only aim at the version of the mobile phone and do not aim at the version of a computer.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The invention mainly aims to provide a method and a device for controlling an IOS terminal by a computer terminal, an intelligent terminal and a storage medium, aiming at solving the problems that the IOS terminal controlled by the computer terminal in the prior art is complicated to operate and cannot be controlled by the computer terminal simply and safely.
In order to achieve the above object, a first aspect of the present invention provides a method for controlling an IOS terminal by a computer terminal, wherein the method comprises:
acquiring mouse data of a computer terminal, wherein the mouse data comprises a key state and coordinate data;
obtaining an IOS version of an IOS terminal;
if the IOS version is larger than or equal to a set threshold, converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, wherein the IOS coordinate set comprises a plurality of pairs of IOS coordinates and is used for positioning a coordinate point on the IOS terminal;
transmitting the key state and the IOS coordinate set to the IOS terminal;
otherwise, acquiring the screen orientation of the IOS terminal;
converting the coordinate data into IOS coordinates for an IOS terminal based on the screen orientation;
transmitting the key state and the IOS coordinate to the IOS terminal;
the converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table includes: acquiring a first screen size of a computer terminal and a second screen size of an IOS terminal, converting the coordinate data into a screen coordinate corresponding to the IOS terminal based on the first screen size and the second screen size, and converting the screen coordinate into the IOS coordinate set based on a coordinate mapping table;
the converting the screen coordinates to the IOS coordinate set based on a coordinate mapping table includes: analyzing the coordinate mapping table to obtain a coordinate mapping sequence, setting an X coordinate of the screen coordinate as a query key value, converting the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, setting the key value sequence as an X coordinate in the IOS coordinate set in sequence, setting a Y coordinate of the screen coordinate as a query key value, converting the query key value into a key value sequence according to the comparison algorithm based on the coordinate mapping sequence, setting the key value sequence as a Y coordinate in the IOS coordinate set in sequence, and outputting the IOS coordinate set;
the converting the query key value into a key value sequence according to an alignment algorithm based on the coordinate mapping sequence comprises: and sequentially comparing the query key value with a second key value in the coordinate mapping sequence to obtain a first key value in the coordinate mapping sequence corresponding to the query key value, storing the first key value in the key value sequence, updating the query key value into a difference value between the query key value and the second key value in the coordinate mapping sequence, and repeating the steps until the difference value is less than or equal to zero.
Optionally, before obtaining the mouse data of the computer terminal, the method further includes:
based on a low-power-consumption Bluetooth protocol, a channel for communication between the computer terminal and the IOS terminal is established in advance;
and based on the channel, projecting the screen of the IOS terminal on the screen of the computer terminal in real time.
Optionally, the converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation includes:
acquiring the size of a screen of a computer terminal;
converting the X-coordinate and the Y-coordinate of the coordinate data into proportional values with respect to the size, respectively, based on the size;
if the screen orientation is a horizontal screen, saving the X coordinate of the coordinate data as the Y coordinate of the IOS coordinate, and saving the difference value between the Y coordinate of the coordinate data and a preset value as the X coordinate of the IOS coordinate.
Optionally, the method further includes:
acquiring a key value of a keyboard of a computer terminal;
analyzing a preset keyboard mapping table to obtain a key value mapping sequence;
converting the key value into an IOS key value based on the key value mapping sequence;
and transmitting the IOS key value to the IOS terminal.
The second aspect of the present invention provides a computer terminal controlled IOS terminal device, wherein the device comprises:
the data acquisition module is used for acquiring mouse data of the computer terminal, wherein the mouse data comprises key states and coordinate data;
the version acquisition module is used for acquiring the IOS version of the IOS terminal;
the screen orientation acquisition module is used for acquiring the screen orientation of the IOS terminal;
an IOS coordinate set obtaining module, configured to obtain a first screen size of a computer terminal and a second screen size of the IOS terminal, convert the coordinate data into screen coordinates corresponding to the IOS terminal based on the first screen size and the second screen size, analyze a coordinate mapping table to obtain a coordinate mapping sequence, set an X coordinate of the screen coordinates as a query key value, convert the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, set the key value sequence as X coordinates in the IOS coordinate set in sequence, set a Y coordinate of the screen coordinates as a query key value, convert the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, set the key value sequence as Y coordinates in the IOS coordinate set in sequence, output the IOS coordinate set, where the IOS coordinate set includes a plurality of pairs of IOS coordinates, the method is used for positioning a coordinate point on the IOS terminal, and the query key value is converted into a key value sequence based on the coordinate mapping sequence according to a comparison algorithm, and comprises the following steps: sequentially comparing the query key value with a second key value in the coordinate mapping sequence to obtain a first key value in the coordinate mapping sequence corresponding to the query key value, storing the first key value in the key value sequence, updating the query key value into a difference value between the query key value and the second key value in the coordinate mapping sequence, and repeating the steps until the difference value is less than or equal to zero;
the IOS coordinate acquisition module is used for converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation;
and the transmission module is used for transmitting the key state and the IOS coordinate set or the IOS coordinate to the IOS terminal.
A third aspect of the present invention provides an intelligent terminal, where the intelligent terminal includes a memory, a processor, and a computer terminal control IOS terminal program stored in the memory and executable on the processor, and the computer terminal control IOS terminal program, when executed by the processor, implements any one of the steps of the computer terminal control IOS terminal method.
A fourth aspect of the present invention provides a computer-readable storage medium, where a computer terminal controlled IOS terminal program is stored on the computer-readable storage medium, and when the computer terminal controlled IOS terminal program is executed by a processor, the computer terminal controlled IOS terminal program implements any one of the steps of the method for controlling an IOS terminal by a computer terminal.
Therefore, compared with the prior art, according to the scheme of the invention, the mouse data of the computer terminal is obtained, the coordinate data in the mouse data is converted into the IOS coordinate or IOS coordinate set corresponding to the IOS terminal according to the IOS version and the screen orientation of the IOS terminal, and then the coordinate data and the key state in the mouse data are transmitted to the IOS terminal together, so that the IOS terminal is operated by the mouse of the computer terminal, and the control of the IOS terminal by the computer terminal is realized simply and safely.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating a method for controlling an IOS terminal by a computer terminal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a coordinate mapping table of the embodiment of FIG. 1;
FIG. 3 is a flowchart illustrating the detailed step of step S300 in the embodiment of FIG. 1;
FIG. 4 is a flowchart illustrating a specific step of step S330 in FIG. 3;
FIG. 5 is a schematic structural diagram of an IOS terminal device controlled by a computer terminal according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when …" or "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted depending on the context to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings of the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Although mobile phones play an increasingly important role in people's life and communication, people are still used to use computers to complete various tasks in various office places. Therefore, for the workers working with computers, when operating the computers, the workers need to check the mobile phones or operate the mobile phones frequently, and the working efficiency is affected.
At present, the display content of the mobile phone screen can be projected to a computer screen through various screen projection software, so that the mobile phone screen can be conveniently checked on a computer, and new information on the mobile phone can be timely known. However, the mobile phone still needs to be picked up to operate the mobile phone, and the problems of work interruption and low work efficiency cannot be solved.
Although some mobile phone applications also have corresponding computer-side software, the effect of operating the mobile phone applications on a computer can be realized. But only a specific application can be operated, and the same application needs to be installed on both the computer and the mobile phone. However, the same software as the mobile phone application is installed on the computer one by one, the operation is complicated, and many applications on the mobile phone only aim at the version of the mobile phone and do not aim at the version of the computer.
According to the scheme, the mouse data of the computer terminal is obtained, and the coordinate data in the mouse data is converted into the IOS coordinate or the IOS coordinate set corresponding to the IOS terminal according to the IOS version and the screen orientation of the IOS terminal, and then is transmitted to the IOS terminal together with the key state in the mouse data, so that the IOS terminal is operated through the mouse of the computer terminal, and the control of the IOS terminal by the computer terminal is simply and safely realized.
Exemplary method
As shown in fig. 1, an embodiment of the present invention provides a method for controlling an IOS terminal by a computer terminal, and specifically, the method includes the following steps:
step S100: acquiring mouse data of a computer terminal, wherein the mouse data comprises a key state and coordinate data;
specifically, the method for controlling the IOS terminal by the computer terminal of the embodiment is executed on the computer terminal. The method comprises the steps that a key state of a mouse and coordinate data of the mouse are obtained through an operating system operated by a computer terminal, wherein the key state of the mouse means whether a mouse clicking event is generated or not, the coordinate data comprise an X coordinate and a Y coordinate of the mouse on a screen of the computer terminal, and the coordinate data and the key state form mouse data.
Step S200: acquiring an IOS version of an IOS terminal;
step S300: if the IOS version is larger than or equal to a set threshold value, converting coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, wherein the IOS coordinate set comprises a plurality of pairs of IOS coordinates;
specifically, after the computer terminal is connected to the IOS terminal, the system version is acquired through the IOS system interface, that is, the IOS version is acquired. Through practical tests, the threshold is set to be 13.4, namely, the steps of converting the obtained coordinate data are different for two situations that the IOS version is less than IOS13.4 and the IOS version is greater than or equal to IOS 13.4.
When the IOS version is greater than or equal to IOS13.4, according to the coordinate mapping table shown in fig. 2, the X coordinate and the Y coordinate in the coordinate data are respectively searched in the coordinate mapping table in a progressive manner, the X coordinate sequence and the Y coordinate sequence in the corresponding IOS coordinate are obtained, the values of the same sequence number in the X coordinate sequence and the Y coordinate sequence are combined in sequence, and a plurality of pairs of IOS coordinates are obtained and form an IOS coordinate set. Specifically, when the progressive search is performed in the coordinate mapping table according to the X coordinate and the Y coordinate in the coordinate data, the IOS coordinate may be obtained by searching according to the comparison algorithm after the coordinate mapping table is resolved into the coordinate mapping sequence data as in this embodiment; or drawing a two-dimensional curve according to a coordinate mapping table, and obtaining the IOS coordinate through the curve; or a non-linear function can be established according to the coordinate mapping table, and the IOS coordinate can be obtained according to the function.
When the IOS version is less than IOS13.4, go to step S500.
Step S400: transmitting the key state and the IOS coordinate set to the IOS terminal;
specifically, after the coordinate data is converted into the corresponding IOS coordinate set on the IOS terminal, and the key state and the IOS coordinate set are transmitted to the IOS terminal, the same operation effect as that on the IOS terminal can be realized on the computer terminal, such as sliding, touch clicking and other operations on the IOS terminal.
Step S500: otherwise, acquiring the screen orientation of the IOS terminal;
step S600: converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation;
specifically, when the IOS version is smaller than the IOS13.4, the screen orientation is first obtained through the UIDevice interface or the UIApplication interface of the IOS system. And then, according to different screen orientations, carrying out different conversions on the coordinate data to obtain IOS coordinates for the IOS terminal.
The specific conversion steps include: firstly, acquiring the screen size of a computer terminal through a system interface of the computer terminal; the X-coordinate and the Y-coordinate of the coordinate data are divided by the width and the height of the screen size, respectively, to convert the X-coordinate and the Y-coordinate in the coordinate data into percentage coordinates with respect to the screen size.
When the screen is oriented as a landscape screen, further operations are required on the X coordinate and the Y coordinate in the coordinate data: first, the X coordinate of the coordinate data is saved as the Y coordinate of the IOS coordinate, and the difference between the constant value 1 and the Y coordinate of the coordinate data is saved as the X coordinate of the IOS coordinate.
Step S700: and transmitting the key state and the IOS coordinates to the IOS terminal.
Specifically, after the coordinate data is converted into the corresponding IOS coordinate, namely the percentage coordinate, on the IOS terminal, the key state and the IOS coordinate are transmitted to the IOS terminal, and then the same sliding, touch clicking and other operation effects on the IOS terminal can be realized on the computer terminal.
Further, the present invention also includes: acquiring a key value of a keyboard of a computer terminal; analyzing a preset key value mapping table to obtain a key value mapping sequence; converting the key value into an IOS key value based on the key value mapping sequence; and transmitting the IOS key value to the IOS terminal. By simply using the key value mapping table, the keys of the keyboard of the computer terminal can be further converted into the keys of the IOS terminal, and the information input on the IOS terminal can be completed through the keyboard of the computer terminal. The key value mapping table can be configured in a personalized manner according to actual needs.
In this embodiment, the computer terminal and the IOS terminal are connected wirelessly, and the IOS terminal projects the display interface to the computer terminal in real time, so as to synchronously display the interface of the IOS terminal on the display of the computer terminal. The computer terminal and the IOS terminal are also connected through a Bluetooth protocol, after the computer terminal operates a keyboard and a mouse, operation events of the keyboard and the mouse are converted into mobile phone events of the IOS terminal according to a preset conversion rule, the mobile phone events are sent to the IOS terminal through the Bluetooth protocol, the operation of the IOS terminal is completed, and an interface of the IOS terminal is synchronously displayed on the computer terminal when the IOS terminal is operated. Namely: the method comprises the steps that before mouse data of a computer terminal are obtained, a channel for communication between the computer terminal and an IOS terminal is established in advance; initializing a Bluetooth protocol, a keyboard descriptor, a mouse descriptor and a touch digital descriptor, then issuing GATT (Generic Attribute profile) service, monitoring IOS Bluetooth connection, and waiting for establishing a channel with an IOS terminal; and after the connection is established, the screen of the IOS terminal is projected on the screen of the computer terminal in real time based on the channel. Specifically, the bluetooth protocol is a low-power-consumption bluetooth protocol, and for an IOS version smaller than IOS13.4, the key state and the IOS coordinate are transmitted to the IOS terminal through the hiddenmousedigitzervent; and for the IOS version which is more than or equal to the IOS13.4, transmitting the key state and the IOS coordinate set to the IOS terminal through HIDSendMouseEvent.
In the scheme, after the coordinate data in the mouse data is converted into the coordinate data corresponding to the IOS terminal and transmitted to the IOS terminal, the IOS terminal can be operated by the mouse of the computer terminal, and the control of the IOS terminal by the computer terminal is simply and safely realized. By converting the keyboard event of the computer terminal into the mobile phone event of the IOS terminal, the chatting, the playing and the like of the IOS terminal can be carried out on the computer terminal, and a better operation effect is obtained.
In some implementation scenarios, as shown in fig. 3, in step S300, the coordinate data is converted into an IOS coordinate set for the IOS terminal based on the coordinate mapping table, and the specific steps include:
step S310: acquiring a first screen size of a computer terminal and a second screen size of an IOS terminal;
specifically, a first screen size is obtained according to a system interface of the computer terminal and a second screen size is obtained according to a system interface of the IOS terminal. The specific method for acquiring the screen size is a conventional technical means in the field, and is not described herein again.
Step S320: converting the coordinate data into a screen coordinate corresponding to the IOS terminal based on the first screen size and the second screen size;
specifically, the X coordinate in the coordinate data is divided by the width of the first screen size to obtain an X percentage coordinate corresponding to the first screen size, and then the X percentage coordinate is multiplied by the width of the second screen size to obtain an X coordinate corresponding to the IOS terminal.
And dividing the Y coordinate in the coordinate data by the height of the first screen size to obtain a Y percentage coordinate relative to the first screen size, and multiplying the Y percentage coordinate by the height of the second screen size to obtain a Y coordinate relative to the IOS terminal.
And multiplying the X coordinate and the Y coordinate of the IOS terminal by 10 respectively to obtain the screen coordinate corresponding to the IOS terminal.
Step S330: and converting the screen coordinates into an IOS coordinate set based on the coordinate mapping table.
Specifically, in this embodiment, after the coordinate mapping sequence is obtained by analyzing the coordinate mapping table, the X coordinate and the Y coordinate in the screen coordinate are respectively compared with the data in the coordinate mapping sequence to obtain the IOS coordinate set. The method comprises the following specific steps: the coordinate mapping table as described in fig. 2 is first analyzed to obtain a coordinate mapping sequence. Then setting the X coordinate of the screen coordinate as a query key value; inquiring the coordinate mapping sequence according to a comparison algorithm to convert the inquiry key value into a key value sequence; setting the key value sequence as an X coordinate in the IOS coordinate set according to the sequence number; performing similar operation on the Y coordinate of the screen coordinate; setting a Y coordinate of the screen coordinate as a query key value; inquiring the coordinate mapping sequence according to a comparison algorithm to convert the inquiry key value into a key value sequence; and sequentially setting the key value sequence as a Y coordinate in the IOS coordinate set to obtain the IOS coordinate set.
The coordinate mapping table can be calibrated according to a specific IOS terminal, namely after a mouse is clicked on a computer screen, simulated clicking can be realized on the IOS terminal through a Bluetooth peripheral protocol, the coordinates of the simulated clicking position on the screen are obtained in a system of the IOS terminal, and the coordinates of the simulated clicking position are stored in a file, so that the coordinate mapping table relative to the IOS terminal can be obtained.
Further, since screen parameters of the IOS terminal are different from each other, it takes a lot of time to establish the coordinate mapping table associated with the IOS terminal one by one. Therefore, the coordinate mapping table of the embodiment fits the coordinate data of the simulated click position, so that the established coordinate mapping table can be suitable for various IOS terminals.
The specific steps of establishing the coordinate mapping table comprise: the screen of the IOS terminal is divided into 128 areas, the initial coordinate corresponding to the upper left corner of the screen is (0,0), and simulated clicking is sequentially realized in each group through a simulated Bluetooth peripheral protocol. Because screen parameters of each IOS terminal are different, and coordinate values of the same group of click positions on different IOS terminals are different, the coordinates of the click positions cannot be directly obtained, and coordinate offset of the click positions relative to the previous group of click positions in each IOS terminal needs to be fitted so as to calculate the coordinates of the click positions of the current group. The coordinate value of the current group is obtained by adding the coordinate value of the previous group of click positions to the fitted value of the offset of the current group of click positions relative to the previous group of click positions, and the fitted value of the current group of click positions is used as a second key value in the coordinate mapping and is stored in the coordinate mapping table together with the serial number of the current group, so that the coordinate mapping table is obtained. Due to the difference in screen size of the respective IOS terminals, the offset needs to be fitted according to the offset measured in each IOS terminal. Through actual measurement, although a little deviation may exist between the actual measurement coordinate value of a single IOS terminal, the coordinate of the simulated click position can be well positioned, and the method can be universally used on various IOS terminals.
Because the offset is fitted, errors exist, the error is larger as more groups of simulated clicks exist, and the offset is too far away to obtain the fitted offset. Therefore, in this embodiment, when the tenth group is simulated and clicked, that is, after the fitting value of the offset amount of the ten groups is calculated, the coordinate value of the next group is obtained and reset, that is, the coordinate fitting value of the group of click positions relative to the initial coordinate point is directly obtained, and then the coordinate offset amount relative to the group is calculated to obtain the coordinate value of the next group.
Therefore, the coordinate mapping table which can be commonly used in various IOS devices is established through screen grouping, simple coordinate value fitting and offset fitting, and the computer terminal can control various IOS terminals more simply and conveniently.
In some implementation scenarios, as shown in fig. 4, in the step S330, the query key value is converted into a key value sequence by querying the coordinate mapping sequence according to an alignment algorithm, and the specific steps include:
step S331: sequentially comparing the query key value with a second key value in the coordinate mapping sequence to obtain a first key value in the coordinate mapping sequence corresponding to the query key value;
step S332: storing a first key value to a key value sequence;
step S333: and updating the query key value into a difference value between the query key value and a second key value in the coordinate mapping sequence, and repeating the steps until the difference value is less than or equal to zero.
Specifically, each row in the coordinate mapping table corresponds to a data pair in the coordinate mapping sequence, and the data pair includes a first key value and a second key value. For example, for a row of contents in the coordinate mapping table: "0 x225,/(0 x20,0x225) (32,549)", where the first key value is 32 and the second key value is 549.
In the following, assuming that the X coordinate of the IOS coordinate is 570, taking this as an example, the X coordinate in the IOS coordinate set obtained from the coordinate mapping table will be described in detail:
comparing the X coordinate value with the second key value of the coordinate mapping sequence in sequence, wherein the value of the first X coordinate is 32, which is obtained because 549 < 570 < 582, i.e. the first X coordinate corresponds to the content of the row below the coordinate mapping table of "0X 225,// (0X20,0X225) (32,549)"; subtracting the second key value 549 of the row from the coordinate value 570 to obtain a first difference value of 21;
and repeatedly searching in the coordinate mapping table according to the first difference value in the steps to obtain a second X coordinate value. I.e. the behavior corresponding to the second X-coordinate value: "0X 10,// (0X04,0X10) (4, 16)", a second X coordinate value of 4 is obtained; subtracting the second key value 16 of the row from the difference value 21 to obtain a second difference value of 5;
repeatedly searching to obtain the corresponding behavior of the coordinate mapping table: "0X 03,// (0X01,0X03) (1, 3)", obtaining a third X coordinate value of 1, subtracting 5 from the second key value 3 of the row to obtain a third difference value of 2;
and repeating the process until the subtraction result of the coordinate values and the difference values is a negative value or is smaller than the minimum second key value in the coordinate mapping sequence. Obtaining a final X coordinate set: namely, the first coordinate value 32, the second coordinate value 4, and the third coordinate value 1.
Exemplary device
As shown in fig. 5, corresponding to the method for controlling an IOS terminal by a computer terminal, an embodiment of the present invention further provides a computer terminal controlled IOS terminal apparatus, where the computer terminal controlled IOS terminal apparatus includes:
the data acquisition module 600 is configured to acquire mouse data of the computer terminal, where the mouse data includes a button state and coordinate data;
specifically, the computer terminal of the embodiment controls the IOS terminal device to be installed on the computer terminal. The method comprises the steps that a key state of a mouse and coordinate data of the mouse are obtained through an operating system operated by a computer terminal, wherein the key state of the mouse means whether a mouse click event occurs or not, the coordinate data comprise an X coordinate and a Y coordinate of the mouse on a screen of the computer terminal, and the coordinate data and the key state form the mouse data.
A version obtaining module 610, configured to obtain an IOS version of the IOS terminal;
a screen orientation obtaining module 620, configured to obtain a screen orientation of the IOS terminal;
an IOS coordinate set obtaining module 630, configured to convert the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, where the IOS coordinate set includes a plurality of pairs of IOS coordinates;
specifically, when the IOS version is greater than or equal to IOS13.4, according to the coordinate mapping table shown in fig. 2, the X coordinate and the Y coordinate in the coordinate data are respectively searched in the coordinate mapping table in a progressive manner, so as to obtain an X coordinate sequence and a Y coordinate sequence in the corresponding IOS coordinate, and values with the same sequence number in the X coordinate sequence and the Y coordinate sequence are sequentially combined, so as to obtain a plurality of pairs of IOS coordinates and form an IOS coordinate set.
An IOS coordinate obtaining module 640 for converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation;
specifically, when the IOS version is smaller than the IOS13.4, the screen orientation is first obtained through the UIDevice interface or the UIApplication interface of the IOS system. And then, according to different screen orientations, carrying out different conversions on the coordinate data to obtain IOS coordinates for the IOS terminal.
A transmission module 650, configured to transmit the key status and the IOS coordinate set or the IOS coordinate to the IOS terminal.
Specifically, in this embodiment, the specific functions of each module of the IOS terminal device controlled by the computer terminal may refer to the corresponding descriptions in the method for controlling the IOS terminal by the computer terminal, which are not described herein again.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 6. The intelligent terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer terminal control IOS terminal program. The internal memory provides an environment for an operating system in the nonvolatile storage medium and a computer terminal to control the running of the IOS terminal program. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. When the computer terminal control IOS terminal program is executed by the processor, the steps of any one of the computer terminal control IOS terminal methods are realized. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram of fig. 6 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one embodiment, an intelligent terminal is provided, where the intelligent terminal includes a memory, a processor, and a computer terminal control IOS terminal program stored in the memory and executable on the processor, and the computer terminal control IOS terminal program performs the following operation instructions when executed by the processor:
acquiring mouse data of a computer terminal, wherein the mouse data comprises a key state and coordinate data;
obtaining an IOS version of an IOS terminal;
if the IOS version is larger than or equal to a set threshold value, converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, wherein the IOS coordinate set comprises a plurality of pairs of IOS coordinates;
transmitting the key state and the IOS coordinate set to the IOS terminal;
otherwise, acquiring the screen orientation of the IOS terminal;
converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation;
and transmitting the key state and the IOS coordinates to the IOS terminal.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer terminal control IOS terminal program is stored on the computer-readable storage medium, and when the computer terminal control IOS terminal program is executed by a processor, the steps of any computer terminal control IOS terminal method provided by the embodiment of the invention are realized.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (7)

1. The method for controlling the IOS terminal by the computer terminal is characterized by comprising the following steps:
acquiring mouse data of a computer terminal, wherein the mouse data comprises a key state and coordinate data;
acquiring an IOS version of an IOS terminal;
if the IOS version is larger than or equal to a set threshold, converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table, wherein the IOS coordinate set comprises a plurality of pairs of IOS coordinates and is used for positioning a coordinate point on the IOS terminal;
transmitting the key state and the IOS coordinate set to the IOS terminal;
otherwise, acquiring the screen orientation of the IOS terminal;
converting the coordinate data into IOS coordinates for an IOS terminal based on the screen orientation;
transmitting the key state and the IOS coordinate to the IOS terminal;
the converting the coordinate data into an IOS coordinate set for the IOS terminal based on a coordinate mapping table includes: acquiring a first screen size of a computer terminal and a second screen size of an IOS terminal, converting the coordinate data into a screen coordinate corresponding to the IOS terminal based on the first screen size and the second screen size, and converting the screen coordinate into the IOS coordinate set based on a coordinate mapping table;
the converting the screen coordinates to the IOS coordinate set based on a coordinate mapping table includes: analyzing the coordinate mapping table to obtain a coordinate mapping sequence, setting an X coordinate of the screen coordinate as a query key value, converting the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, sequentially setting the key value sequence as an X coordinate in the IOS coordinate set, setting a Y coordinate of the screen coordinate as the query key value, converting the query key value into the key value sequence according to the comparison algorithm based on the coordinate mapping sequence, sequentially setting the key value sequence as a Y coordinate in the IOS coordinate set, and outputting the IOS coordinate set;
the converting the query key value into a key value sequence according to an alignment algorithm based on the coordinate mapping sequence comprises: and sequentially comparing the query key value with a second key value in the coordinate mapping sequence to obtain a first key value in the coordinate mapping sequence corresponding to the query key value, storing the first key value in the key value sequence, updating the query key value into a difference value between the query key value and the second key value in the coordinate mapping sequence, and repeating the steps until the difference value is less than or equal to zero.
2. The method for controlling an IOS terminal according to claim 1, wherein before the obtaining mouse data of the computer terminal, further comprising:
based on a low-power-consumption Bluetooth protocol, a channel for communication between the computer terminal and the IOS terminal is established in advance;
and based on the channel, projecting the screen of the IOS terminal on the screen of the computer terminal in real time.
3. The method of claim 1, wherein the converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation comprises:
acquiring the size of a screen of a computer terminal;
converting the X-coordinate and the Y-coordinate of the coordinate data into proportional values with respect to the size, respectively, based on the size;
and if the screen orientation is a cross screen, storing the X coordinate of the coordinate data as the Y coordinate of the IOS coordinate, and storing the difference value between the Y coordinate of the coordinate data and a preset value as the X coordinate of the IOS coordinate.
4. The method of controlling an IOS terminal by a computer terminal of claim 1, further comprising:
acquiring a key value of a keyboard of a computer terminal;
analyzing a preset keyboard mapping table to obtain a key value mapping sequence;
converting the key value into an IOS key value based on the key value mapping sequence;
and transmitting the IOS key value to the IOS terminal.
5. Computer terminal control IOS terminal device, its characterized in that, the device includes:
the data acquisition module is used for acquiring mouse data of the computer terminal, wherein the mouse data comprises key states and coordinate data;
the version acquisition module is used for acquiring the IOS version of the IOS terminal;
the screen orientation acquisition module is used for acquiring the screen orientation of the IOS terminal;
an IOS coordinate set obtaining module, configured to obtain a first screen size of a computer terminal and a second screen size of the IOS terminal, convert the coordinate data into screen coordinates corresponding to the IOS terminal based on the first screen size and the second screen size, analyze a coordinate mapping table to obtain a coordinate mapping sequence, set an X coordinate of the screen coordinates as a query key value, convert the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, set the key value sequence as X coordinates in the IOS coordinate set in sequence, set a Y coordinate of the screen coordinates as a query key value, convert the query key value into a key value sequence according to a comparison algorithm based on the coordinate mapping sequence, set the key value sequence as Y coordinates in the IOS coordinate set in sequence, output the IOS coordinate set, where the IOS coordinate set includes a plurality of pairs of IOS coordinates, the method is used for positioning a coordinate point on the IOS terminal, and the query key value is converted into a key value sequence based on the coordinate mapping sequence according to a comparison algorithm, and comprises the following steps: sequentially comparing the query key value with a second key value in the coordinate mapping sequence to obtain a first key value in the coordinate mapping sequence corresponding to the query key value, storing the first key value in the key value sequence, updating the query key value into a difference value between the query key value and the second key value in the coordinate mapping sequence, and repeating the steps until the difference value is less than or equal to zero;
the IOS coordinate acquisition module is used for converting the coordinate data into IOS coordinates for the IOS terminal based on the screen orientation;
and the transmission module is used for transmitting the key state and the IOS coordinate set or the IOS coordinate to the IOS terminal.
6. An intelligent terminal, characterized in that the intelligent terminal comprises a memory, a processor and a computer terminal control IOS terminal program stored on the memory and operable on the processor, and the computer terminal control IOS terminal program, when executed by the processor, implements the steps of the computer terminal control IOS terminal method according to any one of claims 1 to 4.
7. A computer-readable storage medium, having stored thereon a computer terminal-controlled IOS terminal program, which when executed by a processor, performs the steps of the computer terminal-controlled IOS terminal method of any of claims 1-4.
CN202210536846.1A 2022-05-18 2022-05-18 Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium Active CN114637571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210536846.1A CN114637571B (en) 2022-05-18 2022-05-18 Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210536846.1A CN114637571B (en) 2022-05-18 2022-05-18 Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium

Publications (2)

Publication Number Publication Date
CN114637571A CN114637571A (en) 2022-06-17
CN114637571B true CN114637571B (en) 2022-09-02

Family

ID=81952743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210536846.1A Active CN114637571B (en) 2022-05-18 2022-05-18 Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114637571B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3588201B2 (en) * 1996-08-30 2004-11-10 アルプス電気株式会社 Coordinate input device and control method thereof
CN104808810B (en) * 2015-05-08 2017-12-01 三星电子(中国)研发中心 Carry out the method and mobile terminal of mouse input
US20170337148A1 (en) * 2016-05-23 2017-11-23 I/O Interconnect, Ltd. Method for Synchronizing Touch Control Functions for Smartphone and Tablet Computer
CN108616643A (en) * 2016-12-12 2018-10-02 阿里巴巴集团控股有限公司 The method, apparatus and system of mobile phone are controlled by computing device
CN108958569B (en) * 2017-05-19 2023-04-07 腾讯科技(深圳)有限公司 Control method, device, system and terminal of smart television and smart television
US11762932B2 (en) * 2020-06-30 2023-09-19 Amazon Technologies, Inc. Spatial search using key-value store
CN113391782A (en) * 2021-06-30 2021-09-14 深圳市斯博科技有限公司 Method, system, electronic device and storage medium for controlling mobile terminal by computer
CN114461123A (en) * 2022-01-30 2022-05-10 深圳创维-Rgb电子有限公司 Screen projection control method and device, screen projector and computer readable storage medium

Also Published As

Publication number Publication date
CN114637571A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
US7065461B2 (en) Point cloud measuring system and method
CN102970657B (en) Systems and methods for sharing group status within a social network
CN103282869A (en) Finger identification on a touchscreen
CN109376758B (en) Pattern-based component identification method, system, device and storage medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN110828017A (en) Information processing method and information processing system for nuclear power plant
CN114637571B (en) Method and device for controlling IOS terminal by computer terminal, intelligent terminal and storage medium
CN112286386B (en) Touch screen point stabilization processing method, system, device and medium
CN110446256B (en) Method and equipment for realizing positioning of base station based on ultra wide band
CN112929734A (en) Screen projection method and device and electronic equipment
CN111857672A (en) Business development method, device, equipment and medium based on SQL configuration
CN110392115B (en) Block chain node management method, device and readable storage medium
CN117971397A (en) Model processing method, device, terminal equipment and storage medium
WO2019232966A1 (en) Operation and maintenance method, device, terminal apparatus, and medium
CN114996369A (en) Method and device for constructing data warehouse index library
CN114812576A (en) Map matching method and device and electronic equipment
CN114840565A (en) Sampling query method, device, electronic equipment and computer readable storage medium
CN100582659C (en) Complex position degree computing system and method
CN111222739A (en) Task allocation method and task allocation system of nuclear power station
CN113038405B (en) Pipe network facility positioning method, pipe network facility positioning device and mobile terminal
CN112600976B (en) Volume adjusting method and device and electronic equipment
CN114706498B (en) Method and device for displaying pressing position of touch screen through touch screen software
CN115277487B (en) Communication processing system of electronic terminal
CN110738258B (en) Image classification method and device and terminal equipment
CN116629980B (en) Pricing method of software engineering, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant