WO2021047135A1 - Page clicking method and apparatus, and clicking device - Google Patents
Page clicking method and apparatus, and clicking device Download PDFInfo
- Publication number
- WO2021047135A1 WO2021047135A1 PCT/CN2020/071819 CN2020071819W WO2021047135A1 WO 2021047135 A1 WO2021047135 A1 WO 2021047135A1 CN 2020071819 W CN2020071819 W CN 2020071819W WO 2021047135 A1 WO2021047135 A1 WO 2021047135A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- click
- page
- event
- clicked
- clicking
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Definitions
- One or more embodiments of this specification relate to the field of computer technology, and in particular to a method and device for automatically clicking a page on a computer through a clicking device.
- the software issues a click command without hardware assistance.
- this kind of click usually requires root permission or connected to a computer device to be controlled from the computer side, making this method may be limited in deployment methods. If you don't have root privileges, this kind of click cannot be applied to the system pop-up dialog box. When the system pop-up dialog box, it may interrupt the automated process.
- the hardware cooperates to realize the click of a fixed position, such as the click head used for scrolling the rankings.
- a fixed position such as the click head used for scrolling the rankings.
- One or more embodiments of this specification describe a page click method, device, and click device, which can realize the automatic click operation at any position on the page through the cooperation of the running device and the click device, thereby improving the effectiveness of the automatic page click .
- a page click method is provided.
- a page click method is applied to a running device that is connected to a pointing device in advance.
- the running device is used to run a target program, and the pointing device passes the first
- the communication module and the second communication module respectively establish a first communication channel and a second communication channel with the operating device, and the second communication channel is established based on the input dedicated interface of the operating device;
- the method includes: in the target program running process In the case of a page to be clicked in, an operation request is sent to the pointing device through the first communication channel, so that the pointing device can convert the operation request into an operation event, and perform the operation through the second communication channel Feedback, the operation event is used to describe the offset operation and/or the click operation indicated in the operation request; respond to the operation event to complete the click on the page to be clicked.
- the sending the operation request to the pointing device through the first communication channel includes: generating a positioning page and a first operation request, where the positioning page is used to cover the page to be clicked; And give priority to responding to the operation event sent by the pointing device, the page to be clicked corresponds to at least the first target position to be clicked and the first click mode for the first target position; and the first click mode is sent to the pointing device.
- the responding to the operation event to complete the click on the page to be clicked further includes: canceling the click position.
- the positioning page sending a second operation request to the pointing device through the first communication channel, so that the pointing device converts the second operation request into a second operation event for feedback through the second communication channel
- the second operation event is used to describe the click event corresponding to the first click mode; the second operation event is responded to through the page to be clicked, so as to complete the click on the page to be clicked.
- the responding to the operation event to complete the click on the page to be clicked further includes: respectively Acquire the coordinates of the first click position and the first target position in the same page coordinate system; determine from the first click position to the first click position according to the coordinates of the first click position and the first target position The coordinate offset of the first target position; a third operation request is generated based at least on the coordinate offset, and sent to the pointing device, so that the pointing device generates a third operation event according to the third operation request ; In response to the third operation event, complete the click on the page to be clicked.
- the generating the third operation request based at least on the coordinate offset includes: determining the offset corresponding to the pointing device according to the coordinate offset and a predetermined conversion rule, Wherein, the conversion rule is used to describe the mapping relationship between the movement distance corresponding to the clicking device and the offset distance of the click position corresponding to the clicking device on the screen; according to the offset corresponding to the clicking device and The first click mode generates the third operation request, so that the clicking device generates an offset corresponding to the movement of the clicking device according to the third operation request, and performs the first click according to the first click mode.
- Three operation events; the completion of clicking on the page to be clicked in response to the third operation event further includes: canceling the positioning page, and responding to the third operation event through the page to be clicked.
- the generating a third operation request based at least on the coordinate offset includes: using the coordinate offset as an offset corresponding to the pointing device to generate a third operation request , So that the clicking device generates a third operation event offset according to the offset; responds to the three operation events through the positioning page, and determines the second click position generated by the third operation event; Whether the second click position is consistent with the first target position, and a fourth operation request is generated according to the detection result and sent to the clicking device, and so on, until the current click position is consistent with the first target position.
- a click method is provided, which is applied to a click device that is connected to a running device in advance, and the running device is used to run a target program.
- the device has established a first communication channel and a second communication channel, and the second communication channel is established based on the input dedicated interface of the operating device; the method includes: receiving an operation sent by the operating device through the first communication channel Request, wherein the operation request is generated by the running device when a page to be clicked appears during the operation of the target program; converted into an operation event of the clicking device according to the operation request, wherein the operation event is Describe the offset operation and/or click operation indicated in the operation request; and send the operation event to the operating device.
- the operation event includes one of the following: a click event used to describe the click event performed by the clicking device according to a preset click mode; a click event used to describe the movement of the clicking device according to a predetermined offset A mobile event, and a click event performed by the clicking device according to a preset click mode.
- a page click device which is provided in a running device that runs a target program, and the device includes: a sending unit configured to communicate through a first communication when a page to be clicked appears during the running of the target program The channel sends an operation request to the pointing device for the pointing device to convert the operation request into an operation event for feedback through the second communication channel, and the operation event is used to describe the offset indicated in the operation request Operation and/or click operation, wherein the pointing device establishes a first communication channel and a second communication channel with the running device in advance through a first communication module and a second communication module, and the second communication channel is based on the running device.
- the input dedicated interface of the device is established; the response unit is configured to respond to the operation event to complete the click on the page to be clicked.
- a pointing device for clicking a page on a running device with a pre-established connection;
- the device includes: a first communication module configured to establish a first communication channel with the running device and pass the The first communication channel receives an operation request sent by the running device, where the operation request is generated by the running device when a page to be clicked appears during the running of the target program;
- the conversion module is configured to follow the operation The request is converted into an operation event of the clicking device, where the operation event is used to describe the offset operation and/or the click operation indicated in the operation request;
- the second communication module is configured to be dedicated to the input of the operation device
- the interface establishes a second communication channel with the operating device, and sends the operation event to the operating device through the second communication channel.
- a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect or the second aspect.
- a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the first aspect or the first aspect is implemented. Two-sided approach.
- the operating device during the page click process, the operating device generates an operation request according to the location and click mode that needs to be clicked, and sends it to the clicking device.
- the clicking device converts the operation request into an operation event and gives feedback. Then, respond to the operation event to complete the click on the page to be clicked.
- sending operation requests to the clicking device and receiving operation events from the clicking device are completed through different communication channels, and the communication channel for the clicking device to send operation events to the running device is realized through the input dedicated interface of the running device, thereby converting the operation event
- the operation event into the system process can be responded to by the target program.
- the above process is assisted by a click device to automatically complete page clicks in the running device, which can improve the effectiveness of page clicks.
- Figure 1 shows a schematic diagram of an implementation scenario of an embodiment disclosed in this specification
- Fig. 2 shows a flowchart of a method for page click according to an embodiment
- Fig. 3 shows a flow chart of a click method according to an embodiment
- Figure 4 shows a specific example of a schematic diagram of the interaction process between the running device and the clicking device to complete a page click
- Fig. 5 shows a schematic block diagram of a page click device according to an embodiment
- Fig. 6 shows a schematic block diagram of a clicking device according to an embodiment.
- FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification.
- operating equipment and click equipment are included.
- the operating device here can be a mobile terminal such as a mobile phone, a tablet computer, or a notebook computer, a personal computer, etc.
- the operating equipment can include system programs, test modules, and click control modules.
- the system program is usually the basic program of the computer, and the system program can serve various applications or modules loaded in the system.
- the test module and the click control module are application modules loaded in the computer system.
- the test module can be used to run the target program.
- the click control module is used to send an operation request to the clicking device, thereby controlling the generating corresponding operation event of the clicking device.
- the click control module can be integrated with the test module, or it can be a data processing module independent of the test module, which is not limited here. In the case that the click control module and the test module are integrated, the click control module can be implemented through SDK.
- the test module can trigger the operation logic of the click control module by calling.
- the test module can trigger the operation logic of the click control module by sending a notification message.
- Click devices can be used to generate click events.
- the pointing device may be a mouse, or a device similar to a mouse function, for example.
- the structure of the pointing device may be different from that of a mouse.
- the hardware composition of the pointing device can be simplified, and it may not include a button, a scroll wheel, and other structures.
- the pointing device in the embodiment of this specification includes at least two communication modules, and the two communication devices communicate with the running device through different connection channels.
- the first communication channel can be used to run the device to send information to the pointing device
- the second communication channel can be used for the click device to transfer operation events to the running device. It is worth noting that the second communication channel is established based on the input dedicated interface of the operating device and can be identified as a system-level communication channel. Among them, the first and second here only indicate the corresponding relationship, and do not limit the order or name.
- the tested target program may jump to each other by clicking between pages, and display different content by clicking positioning within the current page range, and so on. These pages can all be called pages to be clicked.
- the test module can trigger the click control module to send a click request to the click device by sending a notification or invoking, so as to complete the automatic clicking process of the page to be clicked.
- the page to be clicked may at least correspond to the first target position to be clicked and the first click mode for the first target position.
- the click control module can obtain the information of the first target position and the first click mode.
- the click control module can send an operation request to the click device through the aforementioned first communication channel to notify the click device of what operation is required.
- the click device can generate corresponding operation events according to the operation request, such as the offset event and click event corresponding to the click device.
- a mouse pointer corresponding to the mouse may be provided on the operating device that establishes a connection with the mouse.
- the relative movement can be packaged as an offset event and sent to the electronic device.
- the operating device converts the relative displacement of the clicking device into the corresponding offset distance of the mouse pointer on the screen by analyzing the offset event.
- the operation event also includes a click event
- the running device can respond to the relevant click event at the position where the mouse pointer finally moves.
- the operating device may also first generate a positioning page.
- the positioning page can be overlaid on the page to be clicked, and give priority to responding to click events received by the system program.
- the click control module may send an operation request to the click device.
- the operation request may include a preset click mode, such as a left click.
- the clicking device can generate a click event according to the click pattern included in the first click request, and send it to the running device. After the system program of the running device receives the click event, it responds to the click event through the positioning page and determines the current first click position.
- the click control module can compare the first click position with the first target position to be clicked on the page to be clicked, and according to the comparison result, determine whether it is necessary to adjust the setting of the clicking device based on the first click position of the current click. Click on the location. Further, an operation request is generated accordingly, so that the clicking device adjusts the offset distance and/or the click mode according to the operation request, and generates a new click event to complete the click operation on the page to be clicked.
- the click control module transmits the required operation information to the click device, and the click device directly generates the corresponding operation event according to the operation information without generating real and physical operations, which can improve Effectiveness of page auto-click.
- Figure 2 shows a page click method of an embodiment.
- the execution subject of the method shown in FIG. 2 may be an operating device (the operating device shown in FIG. 1), that is, a device that runs the target program. Further, the method shown in FIG. 2 may be executed by a module in the running device, such as the click control module in FIG. 1.
- the module can be implemented by software or hardware, which is not limited here. This step can be performed by a module in the running device, for example, the click control module shown in FIG. 1.
- the running device can establish a connection with the click device in advance.
- the running device and the pointing device can establish a connection through two mutually independent communication channels.
- the running device may establish a first communication channel with the first communication module in the pointing device, and establish a second communication channel with the second communication module in the pointing device.
- the communication channel here is a more vivid description method. In actual implementation, it may be in a wired manner or in a wireless manner, which is not limited here.
- the wireless method may be Bluetooth, infrared, etc., for example.
- the first communication module is a Bluetooth module
- the second communication module is an infrared connection module.
- the first communication channel may be in a Bluetooth connection mode
- the second communication channel may be in an infrared connection mode.
- the first communication channel and the second communication channel may also have different channel identifiers.
- the channel ID of the first communication channel is "4089”
- the channel ID of the second communication channel is "1078" and so on.
- computer equipment such as desktop computers, mobile terminals, etc.
- dedicated input device interfaces for the equipment.
- Devices connected through a dedicated interface are recognized as system-level input devices.
- the second communication channel may be established based on the input dedicated interface of the operating device. In this way, the information sent by the clicking device to the running device can be received and recognized by the system process.
- Step 201 when a page to be clicked appears during the running of the target program, an operation request is sent to the pointing device through the first communication channel, so that the clicking device can convert the operation request into an operation event , And feedback through the second communication channel, the operation event is used to describe the offset operation and/or click operation indicated in the operation request; step 202, respond to the above operation event to complete the click on the page to be clicked.
- step 201 when a page to be clicked appears during the running of the target program, an operation request is sent to the pointing device through the first communication channel.
- the target program is determined according to the scene.
- the target program is the program under test.
- the target program can be various scenarios that include verification information.
- the target program can be run on the running device. During the running of the target program, a page jump may occur.
- the page jump can be realized automatically through the h5 page, or through clickable elements such as hyperlinks and buttons in the current page to be clicked. It can be understood that the page to be clicked appears during the running of the target program, which means that the current page displayed by the target program contains clickable elements, such as hyperlinks, buttons, and so on.
- the element to be clicked in the page to be clicked is the object to be clicked.
- Each object to be clicked usually corresponds to its position on the current page and its click mode.
- the position in the current page can be expressed by coordinates in the screen coordinate system.
- the screen coordinate system can be the system default coordinate system.
- the coordinates in the screen coordinate system can be represented by pixels.
- (1, 2) can represent a pixel that is one pixel away from the origin of the coordinate in the horizontal direction and 2 pixels away from the origin of the coordinate in the vertical direction.
- the click mode may be left-click, left-click double-click, right-click, etc., for example.
- the current process can target one of the to-be-clicked positions and the corresponding click mode.
- the currently targeted object to be clicked is the first object to be clicked, and the corresponding position and click mode of the first object to be clicked can be recorded as the first target position and the first target position accordingly.
- the first click mode is the currently targeted object to be clicked.
- a corresponding operation request can be generated and sent to the pointing device through the first communication channel.
- the corresponding offset and/or click requirement may be indicated in the operation request. It can be understood that after the connection between the clicking device and the running device is established, any operation of the clicking device will generate a corresponding operation event and feedback to the running device. Take the mouse as an example, the relative position offset of the mouse will be reflected by the mouse pointer of the device connected with the mouse. The relative movement of the mouse and the movement distance of the mouse pointer on the screen may have a certain mapping relationship. The various click modes of the mouse will also respond to the current position of the mouse pointer.
- the pointing device may not physically move and click, but it needs to generate an operation event similar to a mouse, that is, an event corresponding to an offset operation and/or a click operation.
- the specific content of these events can be indicated by the operation request sent by the running device to the pointing device.
- the click device can convert the operation request sent by the operation device into a corresponding operation event by analyzing the operation request sent by the operation device, and use the second communication module to feed back to the operation device through the second communication channel.
- the operation event sent by the clicking device to the running device may be system-level, and the system may respond to the corresponding operation event according to the priority level of each application currently running. Therefore, in step 202, the click operation on the page to be clicked can be completed on the basis of responding to the above-mentioned operation event.
- the offset in the offset event is usually the relative offset of the clicking device.
- the relative offset corresponding to the pointing device is a virtual relative offset, that is, the pointing device does not generate a physical offset, but it has the same meaning as the relative offset generated by the pointing device.
- the unit of the relative offset of the clicking device and the offset of the click component on the screen corresponding to the clicking device in the running device may be the same or different.
- the relative offset of a common pointing device mouse may be calculated in units of dimensions such as millimeters and centimeters, while the cursor may be calculated in units of pixels.
- the position of the corresponding positioning pointer (such as the mouse pointer) of the pointing device in the running device cannot be determined, and it needs to be positioned first.
- the operation request sent to the pointing device in step 201 may be a click request.
- the purpose of this click is to determine the current click position, that is, to locate the current position of the pointer. Therefore, the current operation can only include click operations in any click mode (without offset).
- the operation request generated in this case may be referred to as the first operation request.
- the operating device may generate the first operation request according to a predetermined click pattern, or may randomly designate a click pattern to generate the first operation request, which is not limited here.
- the click device generates the first click event according to the first operation request and provides feedback.
- the positioning page may be generated before or at the same time when the first operation request is generated.
- the positioning page is an auxiliary page used to locate the click location. The function of the positioning page is to determine the current click position. Therefore, the positioning page can cover the page to be clicked and give priority to responding to the operation event sent by the clicking device. In this way, the current click position can be obtained by positioning the page.
- the click position generated by a click event can be called the first click position.
- the click on the page to be clicked can be completed.
- the comparison between the first click position and the first target position can be realized by their respective coordinates in the screen coordinate system, which will not be repeated here.
- the positioning page can be cancelled, and the second operation request is sent to the pointing device through the first communication channel.
- the second operation request here indicates the first click mode.
- the click event generated by the click device is to perform a click operation in situ according to the first click mode, which is referred to as the second operation event here.
- the second operation event here.
- the click position needs to be adjusted from the first click position to the first target position.
- the coordinates of the first click position and the first target position in the screen coordinate system can be obtained separately, and the coordinate offset from the first click position to the first target position is determined according to the coordinates of the first click position and the first target position And generate a third operation request based on at least the coordinate offset.
- the third operation request is sent to the clicking device, so that the clicking device generates a third operation event according to the third operation request, responds to the third operation event, and completes the click on the page to be clicked.
- the offset corresponding to the click device and the offset of the click position may be stored in advance, and may have a predetermined conversion rule.
- the offset of the click position is known, that is, the coordinate offset from the first click position to the first target position. In this way, in an optional implementation manner, the offset corresponding to the clicking device can be determined according to the coordinate offset and a predetermined conversion rule.
- the offset corresponding to the clicking device is the relative movement of the clicking device, and in this embodiment, the offset corresponding to the clicking device converted by the operation request is a virtual offset. , Generate an offset event consistent with the corresponding offset of the actual click device movement.
- the conversion rule is: the offset corresponding to the click device and the offset of the click position (ie The translation ratio between coordinate offset) is 1:2, then the offset corresponding to the click device is (100, 200).
- the clicking device After generating the third operation request according to the aforementioned coordinate offset and the first clicking mode, and sending it to the clicking device, the clicking device can convert it into a corresponding operation event for feedback. That is, in the foregoing example, the operation request includes a horizontal offset of 100 pixels, a vertical offset of 200 pixels, and the first click mode corresponding to the first target position.
- the operation information generated by the click device includes an offset of 100 units in the horizontal direction, an offset of 200 units in the vertical direction, and a click event performed through the first click mode. At this time, the positioning page can be cancelled, and the click on the first target position on the page to be clicked is completed by responding to the corresponding operation event through the page to be clicked.
- the pointing device does not actually have an offset, but the operation request sent by the operating device is received through the first communication module and converted into a corresponding click event.
- the offset of the clicking device is virtual in the click event. In this way, for the actual click effect of the click event, a click test is required.
- the idea of manual operation can be used for reference, and the click position is changed iteratively until the click position is consistent with the first target position.
- the coordinate offset is used as the offset corresponding to the pointing device, and the third operation request is generated.
- the third operation request may also indicate any of the aforementioned click events or click events of a predetermined click mode.
- the pointing device can generate a third operation event offset according to the offset according to the third operation request.
- Respond to the three operation events through the positioning page, and determine the second click position generated by the third operation event detect whether the second click position is consistent with the first target position, and generate a fourth operation request based on the detection result and send it to the clicking device.
- the click position corresponding to the operation event sent by the click device is consistent with the first target position.
- the click position obtained by clicking again can be used to determine the conversion between the offset corresponding to the click device and the offset of the click position (ie the offset of the positioning pointer in the running device) Rules, and click in accordance with the obtained conversion rules.
- an arbitrary offset or a coordinate offset between the first click position and the first target position is used as the offset corresponding to the clicking device, and the third operation request is generated.
- the third operation request may also indicate a click event of a predetermined click mode.
- the pointing device can generate a third operation event offset according to the offset according to the third operation request.
- Respond to the third operation event by positioning the page determine the second click position generated by the third operation event, and detect the coordinate offset between the second click position and the first click position.
- the offset in the third operation request According to the relationship between the offset in the third operation request and the coordinate offset of the second click position relative to the first click position, it can be determined between the offset corresponding to the click device and the offset of the click position Conversion rules. Afterwards, the corresponding operation event can be generated according to the conversion rule, which will not be repeated here.
- each time the operating device sends an operation request to the clicking device and responds to the operation event sent by the clicking device it can be regarded as a specific implementation process of the flow in FIG. 2 and will not be repeated here.
- the process shown in FIG. 2 has been executed at least twice.
- the coordinates of the final click position in the previous operation event may also be recorded in advance.
- the current operation event it is no longer necessary to locate the page, but according to the coordinate offset from the first click position to the first target position, the offset corresponding to the click device and the offset of the click position
- the conversion rule and the first click mode generate an operation event, and the click on the first target location according to the first click mode is completed directly according to the operation event feedback from the clicking device.
- FIG. 3 shows a click method, which is applied to a click device that is connected to a running device in advance.
- the running device is used to run the target program, and the pointing device establishes a first communication channel and a second communication channel with the running device through the first communication module and the second communication module, respectively.
- the second communication channel is established based on the input dedicated interface of the operating device, so that the operating device responds to the operation event of the click device through the system process.
- the method shown in FIG. 3 includes the following steps: step 301, receiving an operation request sent by a running device through a first communication channel, where the operation request is generated by the running device when a page to be clicked appears during the running of the target program; step 302 , The operation event is converted into the operation event of the click device according to the operation request, where the operation event is used to describe the offset operation and/or the click operation indicated in the operation request; step 303, the operation event is sent to the operation device.
- the operation request sent by the operating device is received through the first communication channel.
- the first communication channel is a channel through which the first communication module communicates with the operating equipment.
- the communication channel is a more vivid speech, and its essence is the pre-appointed communication mode between the first communication module and the operating device.
- the first communication module and the operating device may have a dedicated connection channel.
- the connection channel can be indicated by a channel identifier such as a channel number, or can be distinguished from other communication channels by an agreed specific format.
- the operation request sent by the running device can carry an agreed channel identifier or a specific format. In this way, the pointing device can recognize that it is information that needs to be received by itself through the agreed channel identifier or a specific format.
- the second communication module does not perform identification and processing. This is equivalent to establishing a dedicated first communication channel between the first communication module and the operating device.
- the operation request here can be generated by the operating device when the page to be clicked appears during the running of the target program, and indicates the offset operation and/or click operation corresponding to the clicking device.
- the operation event of the click device is converted according to the operation request, where the operation event is used to describe the offset operation and/or the click operation indicated in the operation request.
- the information in the operation request can be parsed, and information to be transmitted through the second communication channel can be generated.
- the second communication module and the operating device may have a dedicated connection channel, which is the second communication channel.
- the second communication channel may also be indicated by a channel identifier such as a channel number, or be distinguished from other communication channels by an agreed specific format.
- the operation event sent by the click device can have an agreed channel identifier or a specific format. In this way, only operating equipment can receive and recognize operating events.
- the first communication channel and the second communication channel are both wireless communication channels
- the operating device sends out the broadcast information "4089#0,0#$1$", indicating that the channel ID is 4089.
- #0, 0# means horizontal movement 0 pixels
- in $1$, 1 means left-click
- ## and $$ are all special formats, then click in the device
- the first communication module recognizes the information sent to its own channel according to the information header "4089" of the broadcast information, and can receive and parse the information.
- the package information according to the information sending format of the second communication module is: "1078% 0, 0, 1", where 1078 is the channel identifier of the second communication module,% is the special format of the agreed operation event, and the package information is "1078 "%0,0,1" is the information that expresses the operation event. It can be seen that in the conversion process, relative to the operation request, the offset and/or click information contained in the operation event remains unchanged, but only the packaging form has changed.
- Step 303 Send an operation event to the running device.
- the second communication module broadcasts the above package information "1078% 0, 0, 1".
- the operating device can identify the information as a click event through the 1078 identifier.
- the function of the click device is to transparently transmit data. That is, the data received through the first communication module is propagated through the second communication module.
- the reason for this is that in conventional technology, some terminals have a sandbox mechanism, and non-system programs have no authority to control the position and click operations of positioning components (such as mouse pointers). Therefore, a click device is needed to transfer the corresponding operation requirements through clicking The equipment is converted into an operation event and forwarded to the operating equipment.
- the connection between the pointing device and the running device through the second communication module is similar to the connection between the mouse and the computer in the conventional technology. In this way, the second communication module and the running device can communicate at the system level, that is, the information sent to the running device through the second communication module can be received by the running device through the system process, so that it can be oriented to various applications running on it. .
- FIG. 2 and FIG. 3 describe the interaction cycle from the running device and the clicking device respectively.
- the operating device is the active party, which can generate different operation information according to requirements
- the clicking device is the follower, which is converted into corresponding operation events according to the received operation request.
- Each of the specific implementation manners described in FIG. 2 and FIG. 3 can be coordinated and adapted to each other.
- FIG. 4 shows an interactive schematic diagram of a specific embodiment.
- a page to be clicked appears in the target program running on the running device.
- the page to be clicked may include at least the first target position to be clicked and the first click mode for the first target position, such as single click, double click, and so on.
- the module can be embedded in the target program, or it can be a module independent of the target program, which is not limited here.
- the module can be encapsulated by means such as SDK.
- the target program can notify the module in the form of an event when the page to be clicked appears, so that the module can trigger the method of executing the page click through the event.
- a positioning page is generated.
- the positioning page can be overlaid on the current page, giving priority to responding to click events.
- each position on the positioning page and the current page can be represented by the screen coordinate system.
- the position relationship is converted through coordinate system conversion.
- an operation request is generated and sent to the pointing device.
- the operation request here is used to instruct the clicking device to generate the first click on the current page to be clicked (for the current page to be clicked, it is not necessarily on the current page to be clicked).
- the operation request is also an operation request sent for the first time for the current page to be clicked, and it can indicate a simple click event.
- the purpose of this click is to determine the current click position. Therefore, the current click can be a click in any click mode.
- the operating device can send a click request to the pointing device according to a predetermined click mode, or it can randomly designate a click mode to send a click request to the pointing device, which is not limited here.
- the pointing device receives the operation request sent by the running device through the first communication module, and converts the operation request into the first click event.
- a traditional clicking device such as a mouse
- the pointing device may not perform relative offset and/or keystroke actions, but directly convert into operation events according to the operation request of the running device, instead of the relative offset and/or physical displacement of the pointing device. Key action.
- the relative offset and/or key action included in the first click request can be converted into the format of the click event, and then the channel identifier corresponding to the second communication module or the agreed specific format can be added.
- the pointing device may feed back the first click event to the running device through the second communication module.
- the communication mode between the second communication module and the operating device has been described above, and will not be repeated here.
- the running device may respond to the first click event through the positioning page, and locate the current first click position. Since the operating device generates a positioning page in S402 and responds to the click event first, the first click event received by the system process of the operating device here can be responded to through the positioning page. Here, instead of responding directly to the page to be clicked, the click position generated by the current click event can be avoided. If there are other buttons or hyperlinks and other elements that can respond to clicks, accidental clicks can be caused, which makes the page uncontrollable jump. Cause unnecessary confusion.
- the new operation request may only indicate a click operation at the current click position.
- the new operation request can indicate the offset operation and the click operation.
- the offset operation may be the offset from the first click position to the first target position, expressed by the offset amount
- the click operation may be expressed by the first click mode.
- the running device sends the new operation request to the pointing device through the first communication channel.
- the click device receives a new operation request, generates a new operation event accordingly, and sends the new operation information to the operating device through S410.
- the new operation request only indicates the sequential click operation
- the new operation event only includes the click event
- the new operation request indicates the offset operation and the click operation
- the new operation event can include the offset corresponding to the click device Events and click events.
- Figure 4 shows the interaction process, showing two interaction processes. It can be seen that in each interactive process, the operating device can generate different operation requests according to different needs. And perform other auxiliary operations according to the operation request, such as generating a positioning page, canceling a positioning page, and so on.
- the click device performs an information conversion operation in each process, and converts what information is received, which is equivalent to assisting the click process in the running device.
- the operating device during the page click process, the operating device generates an operation request according to the location and click mode that needs to be clicked, and sends it to the clicking device.
- the clicking device converts the operation request into an operation event and gives feedback, and then responds to the operation event to Finish clicking on the page to be clicked.
- sending operation requests to the clicking device and receiving operation events from the clicking device are completed through different communication channels, and the communication channel for the clicking device to send operation events to the running device is realized through the input dedicated interface of the running device, thereby converting the operation event
- the operation event into the system process can be responded to by the target program.
- the above process is assisted by a click device to automatically complete page clicks in the running device, which can improve the effectiveness of page clicks.
- a page click device may be installed in a running device that runs the target program.
- the apparatus 500 includes a sending unit 51 configured to send an operation request to the pointing device through the first communication channel when the page to be clicked appears during the running of the target program, so that the pointing device can convert the operation request into an operation event through the second communication channel.
- the communication channel provides feedback, and the operation event is used to describe the offset operation and/or click operation indicated in the operation request.
- the clicking device has established a first communication channel with the operating device through the first communication module and the second communication module in advance. And the second communication channel, the second communication channel is established based on the input dedicated interface of the operating device; the response unit 52 is configured to respond to the operation event to complete the click on the page to be clicked.
- the apparatus 500 shown in FIG. 5 is an apparatus embodiment corresponding to the method embodiment shown in FIG. 2, and the corresponding description in the method embodiment shown in FIG. 2 is also applicable to the apparatus 500. Go into details again.
- a pointing device is also provided.
- Fig. 6 shows a schematic block diagram of a pointing device according to an embodiment.
- the click device 600 is used to click on a page on a running device that is connected in advance.
- the pointing device 600 includes: a first communication module 61, configured to establish a first communication channel with the running device, and to receive an operation request sent by the running device through the first communication channel, wherein the operation request appears during the running of the target program by the running device Generated in the case of the page to be clicked; the conversion module 62 is configured to convert the operation event of the click device according to the operation request, wherein the operation event is used to describe the offset operation and/or the click operation indicated in the operation request; second communication The module 63 is configured to establish a second communication channel with the running device through the input dedicated interface of the running device, and send operation events to the running device through the second communication channel.
- the pointing device can be implemented with a mouse.
- the device 600 shown in FIG. 6 is a device embodiment corresponding to the method embodiment shown in FIG. 3, and the corresponding description in the method embodiment shown in FIG. 3 is also applicable to the device 600. Go into details again.
- a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method described in conjunction with FIG. 2 or FIG. 3.
- a computing device including a memory and a processor, the memory stores executable code, and when the processor executes the executable code, a combination of FIG. 2 or FIG. 3 is implemented. The method described.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
本申请要求于2019年9月11日提交中国国家知识产权局专利局、申请号为201910858821.1、发明名称为“页面点击的方法、装置及点击设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Patent Office of the State Intellectual Property Office of China, the application number is 201910858821.1, the title of the invention is "page click method, device and click device" on September 11, 2019. The entire content of the patent application is approved. The reference is incorporated in this application.
本说明书一个或多个实施例涉及计算机技术领域,尤其涉及通过点击设备自动对计算机上的页面进行点击的方法和装置。One or more embodiments of this specification relate to the field of computer technology, and in particular to a method and device for automatically clicking a page on a computer through a clicking device.
随着自动化技术的发展,越来越多的场景可以减少人工参与。对于涉及页面点击的场景,也可能存在自动化需求。例如,软件测试领域,希望测试过程自动进行。在存在多个页面的交互的情形下,这些页面之间可以通过对超链接、按钮等的点击操作进行跳转。常规技术中,移动终端页面之间的自动点击跳转通常可以通过以下方式实现:With the development of automation technology, more and more scenarios can reduce manual participation. For scenarios involving page clicks, there may also be automation requirements. For example, in the field of software testing, it is expected that the testing process will be automated. In the case of interaction of multiple pages, these pages can be jumped by clicking on hyperlinks, buttons, and the like. In conventional technology, the automatic click to jump between mobile terminal pages can usually be achieved in the following ways:
第一,软件发出点击指令,不需要硬件辅助。从功能上来说这种能满足所有点击的需求,然而这种点击通常需要root权限,或者连接计算机设备从计算机端控制,使得这种方式可能在部署方式上受到限制。如果没有root权限,这种点击无法作用于系统弹出的对话框,当系统弹出对话框时,可能会中断自动化的流程。First, the software issues a click command without hardware assistance. In terms of function, this can meet all the click requirements, but this kind of click usually requires root permission or connected to a computer device to be controlled from the computer side, making this method may be limited in deployment methods. If you don't have root privileges, this kind of click cannot be applied to the system pop-up dialog box. When the system pop-up dialog box, it may interrupt the automated process.
第二,硬件配合实现固定位置的点击,例如刷榜用的点击头等。当页面上的点击位置不一致时,可能无法自动实现正确的点击。Second, the hardware cooperates to realize the click of a fixed position, such as the click head used for scrolling the rankings. When the click position on the page is inconsistent, the correct click may not be realized automatically.
发明内容Summary of the invention
本说明书一个或多个实施例描述了一种页面点击的方法、装置及点击设备,可以通过运行设备与点击设备的配合,实现页面上任意位置的自动点击操作,进而提升自动页面点击的有效性。One or more embodiments of this specification describe a page click method, device, and click device, which can realize the automatic click operation at any position on the page through the cooperation of the running device and the click device, thereby improving the effectiveness of the automatic page click .
根据第一方面,提供了一种页面点击的方法,一种页面点击的方法,应用于预先与点击设备建立连接的运行设备,所述运行设备用于运行目标程序,所述点击设备通过第一通信模块、第二通信模块分别与运行设备建立有第一通信通道和第二通信通道,所述第二通信通道基于所述运行设备的输入专用接口建立;所述方法包括:在目标程序运行过程中出现待点击页面的情况下,通过所述第一通信通道向所述点击设备发送操作请求,以供所述点击设备将所述操作请求转换成操作事件,并通过所述第二通信通道进行反馈,所述操作 事件用于描述所述操作请求中指示出的偏移操作和/或点击操作;响应所述操作事件,以完成在所述待点击页面上的点击。According to the first aspect, a page click method is provided. A page click method is applied to a running device that is connected to a pointing device in advance. The running device is used to run a target program, and the pointing device passes the first The communication module and the second communication module respectively establish a first communication channel and a second communication channel with the operating device, and the second communication channel is established based on the input dedicated interface of the operating device; the method includes: in the target program running process In the case of a page to be clicked in, an operation request is sent to the pointing device through the first communication channel, so that the pointing device can convert the operation request into an operation event, and perform the operation through the second communication channel Feedback, the operation event is used to describe the offset operation and/or the click operation indicated in the operation request; respond to the operation event to complete the click on the page to be clicked.
在一个可能的设计中,所述通过所述第一通信通道向所述点击设备发送所述操作请求包括:生成定位页面及第一操作请求,所述定位页面用于覆盖所述待点击页面,并优先响应所述点击设备发送的操作事件,所述待点击页面至少对应有待点击的第一目标位置和针对所述第一目标位置的第一点击模式;向所述点击设备发送所述第一操作请求,以供所述点击设备根据所述第一操作请求,生成第一点击事件,所述第一点击事件用于描述所述点击设备按照预设的点击模式进行的点击操作;所述响应所述操作事件,以完成在所述待点击页面上的点击包括:通过所述定位页面响应所述第一点击事件,并确定当前点击的第一点击位置;基于所述第一点击位置和所述第一目标位置的对比,完成在所述待点击页面上的点击。In a possible design, the sending the operation request to the pointing device through the first communication channel includes: generating a positioning page and a first operation request, where the positioning page is used to cover the page to be clicked; And give priority to responding to the operation event sent by the pointing device, the page to be clicked corresponds to at least the first target position to be clicked and the first click mode for the first target position; and the first click mode is sent to the pointing device. An operation request for the pointing device to generate a first click event according to the first operation request, the first click event is used to describe a click operation performed by the pointing device according to a preset click mode; the response The operation event to complete the click on the page to be clicked includes: responding to the first click event through the positioning page, and determining the first click position of the current click; based on the first click position and the current click position; The comparison of the first target position is described, and the click on the page to be clicked is completed.
根据一个进一步的实现方式,在所述第一点击位置和所述第一目标位置一致的情况下,所述响应所述操作事件,以完成在所述待点击页面上的点击还包括:撤销所述定位页面;通过所述第一通信通道向所述点击设备发送第二操作请求,以供所述点击设备将所述第二操作请求转换成第二操作事件通过所述第二通信通道进行反馈,所述第二操作事件用于描述所述第一点击模式对应的点击事件;通过所述待点击页面响应所述第二操作事件,从而完成在所述待点击页面上的点击。According to a further implementation manner, when the first click position is consistent with the first target position, the responding to the operation event to complete the click on the page to be clicked further includes: canceling the click position. The positioning page; sending a second operation request to the pointing device through the first communication channel, so that the pointing device converts the second operation request into a second operation event for feedback through the second communication channel The second operation event is used to describe the click event corresponding to the first click mode; the second operation event is responded to through the page to be clicked, so as to complete the click on the page to be clicked.
根据另一个进一步的实现方式,在所述第一点击位置和所述第一目标位置不一致的情况下,所述响应所述操作事件,以完成在所述待点击页面上的点击还包括:分别获取所述第一点击位置与所述第一目标位置在同一页面坐标系中的坐标;按照所述第一点击位置与所述第一目标位置的坐标确定从所述第一点击位置到所述第一目标位置的坐标偏移量;至少基于所述坐标偏移量生成第三操作请求,并发送给所述点击设备,以供所述点击设备按照所述第三操作请求生成第三操作事件;响应于所述第三操作事件,完成对所述待点击页面的点击。According to another further implementation manner, in a case where the first click position and the first target position are inconsistent, the responding to the operation event to complete the click on the page to be clicked further includes: respectively Acquire the coordinates of the first click position and the first target position in the same page coordinate system; determine from the first click position to the first click position according to the coordinates of the first click position and the first target position The coordinate offset of the first target position; a third operation request is generated based at least on the coordinate offset, and sent to the pointing device, so that the pointing device generates a third operation event according to the third operation request ; In response to the third operation event, complete the click on the page to be clicked.
在一个可选的实施例中,所述至少基于所述坐标偏移量生成第三操作请求包括:按照所述坐标偏移量和预定的转换规则,确定所述点击设备对应的偏移量,其中,所述转换规则用于描述所述点击设备对应的移动距离和屏幕上与所述点击设备对应的点击位置的偏移距离之间的映射关系;按照所述点击设备对应的偏移量与所述第一点击模式生成所述第三操作请求,以供所述点击设备按照所述第三操作请求生成所述点击设备移动对应的偏移量并按照所述第一点击模式进行点击的第三操作事件;所述响应于所述第三操作事件,完 成对所述待点击页面的点击还包括:撤销所述定位页面,通过所述待点击页面响应所述第三操作事件。In an optional embodiment, the generating the third operation request based at least on the coordinate offset includes: determining the offset corresponding to the pointing device according to the coordinate offset and a predetermined conversion rule, Wherein, the conversion rule is used to describe the mapping relationship between the movement distance corresponding to the clicking device and the offset distance of the click position corresponding to the clicking device on the screen; according to the offset corresponding to the clicking device and The first click mode generates the third operation request, so that the clicking device generates an offset corresponding to the movement of the clicking device according to the third operation request, and performs the first click according to the first click mode. Three operation events; the completion of clicking on the page to be clicked in response to the third operation event further includes: canceling the positioning page, and responding to the third operation event through the page to be clicked.
在另一个可选的实施例中,所述至少基于所述坐标偏移量生成第三操作请求包括:将所述坐标偏移量作为所述点击设备对应的偏移量,生成第三操作请求,以供所述点击设备生成按照该偏移量偏移的第三操作事件;通过所述定位页面响应所述三操作事件,并确定所述第三操作事件产生的第二点击位置;检测所述第二点击位置与所述第一目标位置是否一致,并根据检测结果生成第四操作请求发送给所述点击设备,以此类推,直至当前点击位置与所述第一目标位置一致。In another optional embodiment, the generating a third operation request based at least on the coordinate offset includes: using the coordinate offset as an offset corresponding to the pointing device to generate a third operation request , So that the clicking device generates a third operation event offset according to the offset; responds to the three operation events through the positioning page, and determines the second click position generated by the third operation event; Whether the second click position is consistent with the first target position, and a fourth operation request is generated according to the detection result and sent to the clicking device, and so on, until the current click position is consistent with the first target position.
根据第二方面,提供一种点击方法,应用于预先与运行设备建立连接的点击设备,所述运行设备用于运行目标程序,所述点击设备通过第一通信模块、第二通信模块分别与运行设备建立有第一通信通道和第二通信通道,所述第二通信通道基于所述运行设备的输入专用接口建立;所述方法包括:通过所述第一通信通道接收所述运行设备发送的操作请求,其中,所述操作请求由所述运行设备在目标程序运行过程中出现待点击页面的情况下生成;按照所述操作请求转换成所述点击设备的操作事件,其中,所述操作事件用于描述所述操作请求中指示出的偏移操作和/或点击操作;向所述运行设备发送所述操作事件。According to a second aspect, a click method is provided, which is applied to a click device that is connected to a running device in advance, and the running device is used to run a target program. The device has established a first communication channel and a second communication channel, and the second communication channel is established based on the input dedicated interface of the operating device; the method includes: receiving an operation sent by the operating device through the first communication channel Request, wherein the operation request is generated by the running device when a page to be clicked appears during the operation of the target program; converted into an operation event of the clicking device according to the operation request, wherein the operation event is Describe the offset operation and/or click operation indicated in the operation request; and send the operation event to the operating device.
在一个实施例中,所述操作事件包括以下中的一种:用于描述所述点击设备按照预设的点击模式进行的点击事件;用于描述所述点击设备按照预定偏移量进行移动的移动事件,以及所述点击设备按照预设的点击模式进行的点击事件。In an embodiment, the operation event includes one of the following: a click event used to describe the click event performed by the clicking device according to a preset click mode; a click event used to describe the movement of the clicking device according to a predetermined offset A mobile event, and a click event performed by the clicking device according to a preset click mode.
根据第三方面,提供一种页面点击的装置,设置于运行目标程序的运行设备,所述装置包括:发送单元,配置为在目标程序运行过程中出现待点击页面的情况下,通过第一通信通道向所述点击设备发送操作请求,以供所述点击设备将所述操作请求转换成操作事件通过第二通信通道进行反馈,所述操作事件用于描述所述操作请求中指示出的偏移操作和/或点击操作,其中,所述点击设备预先通过第一通信模块、第二通信模块分别与运行设备建立有第一通信通道和第二通信通道,所述第二通信通道基于所述运行设备的输入专用接口建立;响应单元,配置为响应所述操作事件,以完成在所述待点击页面上的点击。According to a third aspect, there is provided a page click device, which is provided in a running device that runs a target program, and the device includes: a sending unit configured to communicate through a first communication when a page to be clicked appears during the running of the target program The channel sends an operation request to the pointing device for the pointing device to convert the operation request into an operation event for feedback through the second communication channel, and the operation event is used to describe the offset indicated in the operation request Operation and/or click operation, wherein the pointing device establishes a first communication channel and a second communication channel with the running device in advance through a first communication module and a second communication module, and the second communication channel is based on the running device. The input dedicated interface of the device is established; the response unit is configured to respond to the operation event to complete the click on the page to be clicked.
根据第四方面,提供一种点击设备,用于对预先建立连接的运行设备上的页面进行点击;所述装置包括:第一通信模块,配置为与运行设备建立第一通信通道,并通过所述第一通信通道接收所述运行设备发送的操作请求,其中,所述操作请求由所述运行设备在目标程序运行过程中出现待点击页面的情况下生成;转换模块,配置为按照所述操作请求转换成所述点击设备的操作事件,其中,所述操作事件用于描述所述操作请求中指示出的偏 移操作和/或点击操作;第二通信模块,配置为通过运行设备的输入专用接口与所述运行设备建立第二通信通道,并通过所述第二通信通道向所述运行设备发送所述操作事件。According to a fourth aspect, there is provided a pointing device for clicking a page on a running device with a pre-established connection; the device includes: a first communication module configured to establish a first communication channel with the running device and pass the The first communication channel receives an operation request sent by the running device, where the operation request is generated by the running device when a page to be clicked appears during the running of the target program; the conversion module is configured to follow the operation The request is converted into an operation event of the clicking device, where the operation event is used to describe the offset operation and/or the click operation indicated in the operation request; the second communication module is configured to be dedicated to the input of the operation device The interface establishes a second communication channel with the operating device, and sends the operation event to the operating device through the second communication channel.
根据第五方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面或第二方面的方法。According to a fifth aspect, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect or the second aspect.
根据第六方面,提供了一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面或第二方面的方法。According to a sixth aspect, there is provided a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the first aspect or the first aspect is implemented. Two-sided approach.
通过本说明书实施例提供的方法和装置,在页面点击过程中,运行设备根据需要点击的位置和点击模式,生成操作请求,发送给点击设备,由点击设备将操作请求转换成操作事件并反馈,然后,响应操作事件,以完成在待点击页面上的点击。其中,向点击设备发送操作请求和从点击设备接收操作事件通过不同的通信通道完成,并且,点击设备向运行设备发送操作事件的通信通道通过运行设备的输入专用接口实现,从而,将操作事件转换成系统进程的操作事件,可供目标程序响应。以上流程通过一个点击设备的辅助,自动完成运行设备中的页面点击,可以提高页面点击的有效性。Through the method and device provided by the embodiments of this specification, during the page click process, the operating device generates an operation request according to the location and click mode that needs to be clicked, and sends it to the clicking device. The clicking device converts the operation request into an operation event and gives feedback. Then, respond to the operation event to complete the click on the page to be clicked. Among them, sending operation requests to the clicking device and receiving operation events from the clicking device are completed through different communication channels, and the communication channel for the clicking device to send operation events to the running device is realized through the input dedicated interface of the running device, thereby converting the operation event The operation event into the system process can be responded to by the target program. The above process is assisted by a click device to automatically complete page clicks in the running device, which can improve the effectiveness of page clicks.
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
图1示出本说明书披露的一个实施例的实施场景示意图;Figure 1 shows a schematic diagram of an implementation scenario of an embodiment disclosed in this specification;
图2示出根据一个实施例的页面点击的方法流程图;Fig. 2 shows a flowchart of a method for page click according to an embodiment;
图3示出根据一个实施例的点击方法流程图;Fig. 3 shows a flow chart of a click method according to an embodiment;
图4示出一个具体例子的运行设备和点击设备完成一次页面点击的交互过程示意图;Figure 4 shows a specific example of a schematic diagram of the interaction process between the running device and the clicking device to complete a page click;
图5示出根据一个实施例的页面点击的装置的示意性框图;Fig. 5 shows a schematic block diagram of a page click device according to an embodiment;
图6示出根据一个实施例的点击装置的示意性框图。Fig. 6 shows a schematic block diagram of a clicking device according to an embodiment.
下面结合附图,对本说明书提供的方案进行描述。The following describes the solutions provided in this specification with reference to the accompanying drawings.
为了便于说明,结合图1示出的本说明书实施例的一个具体适用场景进行说明。图1为本说明书披露的一个实施例的实施场景示意图。该实施场景中,包括运行设备和点击设 备。这里的运行设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑、个人计算机等。For ease of description, description will be given in conjunction with a specific application scenario of the embodiment of this specification shown in FIG. 1. Fig. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification. In this implementation scenario, operating equipment and click equipment are included. The operating device here can be a mobile terminal such as a mobile phone, a tablet computer, or a notebook computer, a personal computer, etc.
运行设备可以包括系统程序、测试模块和点击控制模块。其中,系统程序通常是计算机的基础程序,系统程序可以为加载在系统中的各种应用或模块服务。测试模块和点击控制模块是加载在计算机系统中的应用模块。测试模块可以用于运行目标程序。点击控制模块用于向点击设备发送操作请求,从而控制点击设备生成性相应的操作事件。点击控制模块可以和测试模块集成在一起,也可以是和测试模块相互独立的数据处理模块,在此不做限定。在点击控制模块和测试模块集成在一起的情况下,点击控制模块可以通过SDK方式实现,此时,测试模块可以通过调用方式触发点击控制模块的运行逻辑。在点击控制模块和测试模块相互独立的情况下,测试模块可以通过发送通知消息的方式,触发点击控制模块的运行逻辑。The operating equipment can include system programs, test modules, and click control modules. Among them, the system program is usually the basic program of the computer, and the system program can serve various applications or modules loaded in the system. The test module and the click control module are application modules loaded in the computer system. The test module can be used to run the target program. The click control module is used to send an operation request to the clicking device, thereby controlling the generating corresponding operation event of the clicking device. The click control module can be integrated with the test module, or it can be a data processing module independent of the test module, which is not limited here. In the case that the click control module and the test module are integrated, the click control module can be implemented through SDK. At this time, the test module can trigger the operation logic of the click control module by calling. When the click control module and the test module are independent of each other, the test module can trigger the operation logic of the click control module by sending a notification message.
点击设备可以用于产生点击事件。点击设备例如可以是鼠标,或者类似鼠标功能的设备。点击设备的结构可以不同于鼠标,例如,相对于鼠标,点击设备在硬件组成上可以简化,其可以不包含按键、滚轮等结构。本说明书实施例中的点击设备至少包括两个通信模块,并且这两个通信设备通过不同的连接通道与运行设备进行通信。假设两个通信模块分别为第一通信模块和第二通信模块,相应的两个连接通道分别为第一通信通道和第二通信通道,则第一通信通道可以用于运行设备向点击设备发送信息,第二通信通道可以用于点击设备向运行设备传递操作事件。值得说明的是,第二通信通道基于运行设备的输入专用接口建立,可以被识别为系统级别的通信通道。其中,这里的第一、第二仅表示对应关系,而不对顺序或名称构成限定。Click devices can be used to generate click events. The pointing device may be a mouse, or a device similar to a mouse function, for example. The structure of the pointing device may be different from that of a mouse. For example, compared to a mouse, the hardware composition of the pointing device can be simplified, and it may not include a button, a scroll wheel, and other structures. The pointing device in the embodiment of this specification includes at least two communication modules, and the two communication devices communicate with the running device through different connection channels. Assuming that the two communication modules are the first communication module and the second communication module, and the corresponding two connection channels are the first communication channel and the second communication channel respectively, the first communication channel can be used to run the device to send information to the pointing device , The second communication channel can be used for the click device to transfer operation events to the running device. It is worth noting that the second communication channel is established based on the input dedicated interface of the operating device and can be identified as a system-level communication channel. Among them, the first and second here only indicate the corresponding relationship, and do not limit the order or name.
在对目标程序进行测试过程中,测试的目标程序可能出现页面之间通过点击相互跳转、当前页面范围内通过点击定位展示不同内容等等。这些页面都可以称为待点击页面。当测试的目标程序在运行过程中出现待点击页面时,测试模块可以通过发送通知或者调用方式,触发点击控制模块向点击设备发送点击请求,以完成对待点击页面的自动点击过程。待点击页面可以至少对应有待点击的第一目标位置和针对所述第一目标位置的第一点击模式。点击控制模块可以获取该第一目标位置和第一点击模式的信息。In the process of testing the target program, the tested target program may jump to each other by clicking between pages, and display different content by clicking positioning within the current page range, and so on. These pages can all be called pages to be clicked. When a page to be clicked appears during the running of the test target program, the test module can trigger the click control module to send a click request to the click device by sending a notification or invoking, so as to complete the automatic clicking process of the page to be clicked. The page to be clicked may at least correspond to the first target position to be clicked and the first click mode for the first target position. The click control module can obtain the information of the first target position and the first click mode.
点击控制模块响应于目标程序中出现待点击页面的情况下,可以通过前述的第一通信通道向点击设备发送操作请求,通知点击设备需要怎样的操作。点击设备可以根据操作请求生成相应的操作事件,例如点击设备对应的偏移事件、点击事件等。以鼠标为例,与鼠标建立连接的运行设备上可以设有与鼠标对应的鼠标指针。鼠标移动时,产生相对移动距 离,相对位移可以被包装成偏移事件发送给电子设备,运行设备通过解析偏移事件,将点击设备的相对位移转换成屏幕上的鼠标指针的相应偏移距离。当操作事件中还包括点击事件时,运行设备可以在鼠标指针最终移动到的位置响应相关点击事件。In response to the situation where the page to be clicked appears in the target program, the click control module can send an operation request to the click device through the aforementioned first communication channel to notify the click device of what operation is required. The click device can generate corresponding operation events according to the operation request, such as the offset event and click event corresponding to the click device. Taking a mouse as an example, a mouse pointer corresponding to the mouse may be provided on the operating device that establishes a connection with the mouse. When the mouse moves, a relative movement distance is generated. The relative movement can be packaged as an offset event and sent to the electronic device. The operating device converts the relative displacement of the clicking device into the corresponding offset distance of the mouse pointer on the screen by analyzing the offset event. When the operation event also includes a click event, the running device can respond to the relevant click event at the position where the mouse pointer finally moves.
在可选的实现方式中,运行设备还可以先生成一个定位页面。定位页面可以覆盖在待点击页面之上,并优先响应系统程序接收到的点击事件。生成定位页面之后,或者同时,点击控制模块可以向点击设备发送一个操作请求。该操作请求中可以包括一个预先设定的点击模式,例如左键单击。点击设备可以根据该第一点击请求中包含的点击模式,生成点击事件,并发送至运行设备。运行设备的系统程序接收到点击事件后,通过定位页面响应点击事件并确定当前的第一点击位置。进一步地,点击控制模块可以将第一点击位置与待点击页面上待点击的第一目标位置进行对比,并根据对比结果确定是否需要在当前点击的第一点击位置的基础上,调整点击设备的点击位置。进一步地,据此生成操作请求,以供点击设备根据该操作请求调整偏移距离和/或点击模式,生成新的点击事件,以完成对待点击页面的点击操作。In an optional implementation manner, the operating device may also first generate a positioning page. The positioning page can be overlaid on the page to be clicked, and give priority to responding to click events received by the system program. After the positioning page is generated, or at the same time, the click control module may send an operation request to the click device. The operation request may include a preset click mode, such as a left click. The clicking device can generate a click event according to the click pattern included in the first click request, and send it to the running device. After the system program of the running device receives the click event, it responds to the click event through the positioning page and determines the current first click position. Further, the click control module can compare the first click position with the first target position to be clicked on the page to be clicked, and according to the comparison result, determine whether it is necessary to adjust the setting of the clicking device based on the first click position of the current click. Click on the location. Further, an operation request is generated accordingly, so that the clicking device adjusts the offset distance and/or the click mode according to the operation request, and generates a new click event to complete the click operation on the page to be clicked.
如此,在图1示出的实施场景中,通过点击控制模块向点击设备传递需要的操作信息,点击设备根据操作信息直接生成相应的操作事件,无需产生真实的、物理上的操作,从而可以提高页面自动点击的有效性。In this way, in the implementation scenario shown in Figure 1, the click control module transmits the required operation information to the click device, and the click device directly generates the corresponding operation event according to the operation information without generating real and physical operations, which can improve Effectiveness of page auto-click.
下面分别从运行设备的角度和点击设备的角度,描述本说明书的技术构思。The following describes the technical ideas of this specification from the perspective of the operating device and the point of view of the clicking device.
图2示出了一个实施例的页面点击的方法。图2所示的方法的执行主体可以是运行设备(如图1示出的运行设备),即运行目标程序的设备。进一步地,图2所示的方法可以由运行设备中的一个模块执行,如图1中的点击控制模块。该模块可以通过软件实现,也可以通过硬件实现,在此不作限定。该步骤可以由运行设备中的一个模块执行,例如图1示出的点击控制模块。Figure 2 shows a page click method of an embodiment. The execution subject of the method shown in FIG. 2 may be an operating device (the operating device shown in FIG. 1), that is, a device that runs the target program. Further, the method shown in FIG. 2 may be executed by a module in the running device, such as the click control module in FIG. 1. The module can be implemented by software or hardware, which is not limited here. This step can be performed by a module in the running device, for example, the click control module shown in FIG. 1.
运行设备预先可以和点击设备建立连接。其中,运行设备和点击设备可以通过两个相互独立的通信通道建立连接。具体地,运行设备可以和点击设备中的第一通信模块建立第一通信通道,和点击设备中的第二通信模块建立第二通信通道。可以理解,这里的通信通道是比较形象的描述方法。实际实现中,可以通过有线方式,也可以通过无线方式,在此不作限定。无线方式例如可以是蓝牙、红外等。在一个实施例中,第一通信模块为蓝牙模块,第二通信模块为红外连接模块,相应地,第一通信通道可以是蓝牙连接模式,第二可以是红外连接模式。在第一通信模块和第二通信模块是相同类型的通信模块的情况下,第一通信通道和第二通信通道还可以具有不同的通道标识。例如,第一通信通道的通道标识 为“4089”,第二通信通道的通道标识为“1078”等。The running device can establish a connection with the click device in advance. Among them, the running device and the pointing device can establish a connection through two mutually independent communication channels. Specifically, the running device may establish a first communication channel with the first communication module in the pointing device, and establish a second communication channel with the second communication module in the pointing device. Understandably, the communication channel here is a more vivid description method. In actual implementation, it may be in a wired manner or in a wireless manner, which is not limited here. The wireless method may be Bluetooth, infrared, etc., for example. In one embodiment, the first communication module is a Bluetooth module, and the second communication module is an infrared connection module. Accordingly, the first communication channel may be in a Bluetooth connection mode, and the second communication channel may be in an infrared connection mode. In the case where the first communication module and the second communication module are the same type of communication modules, the first communication channel and the second communication channel may also have different channel identifiers. For example, the channel ID of the first communication channel is "4089", the channel ID of the second communication channel is "1078" and so on.
值得说明的是,计算机设备,例如台式计算机、移动终端等,通常会为设备预留专用的输入设备接口。通过专用接口连接的设备被识别为系统级别的输入设备。在本说明书的实施架构中,第二通信通道可以是基于运行设备的输入专用接口建立的。这样,点击设备向运行设备发送的信息可以被系统进程接收和识别。It is worth noting that computer equipment, such as desktop computers, mobile terminals, etc., usually reserve dedicated input device interfaces for the equipment. Devices connected through a dedicated interface are recognized as system-level input devices. In the implementation architecture of this specification, the second communication channel may be established based on the input dedicated interface of the operating device. In this way, the information sent by the clicking device to the running device can be received and recognized by the system process.
图2示出的方法包括以下步骤:步骤201,在目标程序运行过程中出现待点击页面的情况下,通过第一通信通道向点击设备发送操作请求,以供点击设备将操作请求转换成操作事件,并通过第二通信通道进行反馈,操作事件用于描述操作请求中指示出的偏移操作和/或点击操作;步骤202,响应上述操作事件,以完成在待点击页面上的点击。The method shown in FIG. 2 includes the following steps: Step 201, when a page to be clicked appears during the running of the target program, an operation request is sent to the pointing device through the first communication channel, so that the clicking device can convert the operation request into an operation event , And feedback through the second communication channel, the operation event is used to describe the offset operation and/or click operation indicated in the operation request;
首先,在步骤201中,在目标程序运行过程中出现待点击页面的情况下,通过第一通信通道向点击设备发送操作请求。First, in
这里,目标程序依据场景确定。例如,在自动测试场景中,目标程序是测试的程序。在自动验证等场景中,目标程序可以是各种包括验证信息的场景。运行设备上可以运行目标程序。目标程序运行过程中,可能出现页面跳转,页面跳转可以通过h5页面实现自动跳转,也可以通过当前页面中的超链接、按钮等可点击元素被点击实现。可以理解,目标程序运行过程中出现待点击页面,就是说目标程序展示的当前页面上包含有可点击元素,例如超链接、按钮等等。Here, the target program is determined according to the scene. For example, in an automated test scenario, the target program is the program under test. In scenarios such as automatic verification, the target program can be various scenarios that include verification information. The target program can be run on the running device. During the running of the target program, a page jump may occur. The page jump can be realized automatically through the h5 page, or through clickable elements such as hyperlinks and buttons in the current page to be clicked. It can be understood that the page to be clicked appears during the running of the target program, which means that the current page displayed by the target program contains clickable elements, such as hyperlinks, buttons, and so on.
可以理解,待点击页面中的待点击元素,也就是待点击对象。每个待点击对象通常对应有在当前页面上的位置和点击模式。其中,在当前页面中的位置可以通过在屏幕坐标系中的坐标表示。屏幕坐标系可以是系统默认的坐标系。可选地,屏幕坐标系中的坐标可以通过像素表示,例如(1,2)可以表示一个像素,该像素在横向上距离坐标原点一个像素、纵向上距离坐标原点2个像素。点击模式例如可以是左键单击、左键双击、右键单击等等。It can be understood that the element to be clicked in the page to be clicked is the object to be clicked. Each object to be clicked usually corresponds to its position on the current page and its click mode. Among them, the position in the current page can be expressed by coordinates in the screen coordinate system. The screen coordinate system can be the system default coordinate system. Optionally, the coordinates in the screen coordinate system can be represented by pixels. For example, (1, 2) can represent a pixel that is one pixel away from the origin of the coordinate in the horizontal direction and 2 pixels away from the origin of the coordinate in the vertical direction. The click mode may be left-click, left-click double-click, right-click, etc., for example.
当待点击页面中有多个点击对象时,当前流程可以针对其中一个待点击位置及其对应的点击模式。在本说明书中,为了描述方便,可以假设当前针对的待点击对象为第一待点击对象,第一待点击对象对应的位置和点击模式相应地可以记为第一目标位置和针对第一目标位置的第一点击模式。When there are multiple click objects on the page to be clicked, the current process can target one of the to-be-clicked positions and the corresponding click mode. In this specification, for the convenience of description, it can be assumed that the currently targeted object to be clicked is the first object to be clicked, and the corresponding position and click mode of the first object to be clicked can be recorded as the first target position and the first target position accordingly. The first click mode.
在目标程序运行过程中出现待点击页面的情况下,可以生成相应的操作请求,通过第一通信通道发送给点击设备。操作请求中可以指示出相应的偏移和/或点击需求。可以理解,点击设备和运行设备建立连接后,点击设备的任何操作,都会产生相应操作事件反馈给运行设备。以鼠标为例,鼠标的相对位置偏移,会通过与鼠标建立连接的设备的鼠标指针体 现出来。鼠标的相对移动和鼠标指针在屏幕上的移动距离可以具有一定映射关系。鼠标的各种点击模式也会在鼠标指针的当前位置产生响应。在本说明书的技术构思下,点击设备可以不进行物理上的移动和点击,但需要产生与鼠标类似的操作事件,即偏移操作和/或点击操作对应的事件。而这些事件的具体内容(例如如何偏移、如何点击),可以通过运行设备向点击设备发送的操作请求进行指示。When a page to be clicked appears during the running of the target program, a corresponding operation request can be generated and sent to the pointing device through the first communication channel. The corresponding offset and/or click requirement may be indicated in the operation request. It can be understood that after the connection between the clicking device and the running device is established, any operation of the clicking device will generate a corresponding operation event and feedback to the running device. Take the mouse as an example, the relative position offset of the mouse will be reflected by the mouse pointer of the device connected with the mouse. The relative movement of the mouse and the movement distance of the mouse pointer on the screen may have a certain mapping relationship. The various click modes of the mouse will also respond to the current position of the mouse pointer. Under the technical concept of this specification, the pointing device may not physically move and click, but it needs to generate an operation event similar to a mouse, that is, an event corresponding to an offset operation and/or a click operation. The specific content of these events (such as how to offset, how to click) can be indicated by the operation request sent by the running device to the pointing device.
点击设备通过解析运行设备发送来的操作请求,可以转换成相应的操作事件,利用第二通信模块通过第二通信通道反馈给运行设备。可以理解,点击设备向运行设备发送的操作事件可以是系统级的,系统可以按照当前运行的各个应用的优先级别响应相应操作事件。因此,在步骤202中,可以在响应上述的操作事件的基础上,完成在待点击页面上的点击操作。The click device can convert the operation request sent by the operation device into a corresponding operation event by analyzing the operation request sent by the operation device, and use the second communication module to feed back to the operation device through the second communication channel. It can be understood that the operation event sent by the clicking device to the running device may be system-level, and the system may respond to the corresponding operation event according to the priority level of each application currently running. Therefore, in
可以理解,在实践中,点击设备产生的操作事件包括偏移事件的情况下,偏移事件中的偏移量通常是点击设备的相对偏移量。在本说明书的技术构思中,点击设备对应的相对偏移量是虚拟的相对偏移量,即点击设备不产生物理实体上的偏移,但与点击设备产生相对偏移量具有同等意义。点击设备的相对偏移量和运行设备中与点击设备相对应的点击组件在屏幕上的偏移量的单位可能是相同的,也可能是不同的。例如,常见的点击设备鼠标,其相对偏移量可以是以毫米、厘米等尺寸单位计算的,而光标则可能是以像素为单位计算的。在操作事件中,如果传递的数据没有同一衡量标准,则两者之间需要一个转换规则。这个转换规则在人工操作过程中,由于是可视的,因此可以忽略,然而,对于自动点击场景而言,需要运行设备指示出相应的偏移量。对于各种不同的情形,在生成操作请求时,可以具有不同的实施方式,并对应有不同的对操作事件的相应方式。It can be understood that, in practice, when the operation event generated by the clicking device includes an offset event, the offset in the offset event is usually the relative offset of the clicking device. In the technical concept of this specification, the relative offset corresponding to the pointing device is a virtual relative offset, that is, the pointing device does not generate a physical offset, but it has the same meaning as the relative offset generated by the pointing device. The unit of the relative offset of the clicking device and the offset of the click component on the screen corresponding to the clicking device in the running device may be the same or different. For example, the relative offset of a common pointing device mouse may be calculated in units of dimensions such as millimeters and centimeters, while the cursor may be calculated in units of pixels. In an operational event, if the passed data does not have the same measurement standard, a conversion rule is required between the two. In the manual operation process, this conversion rule can be ignored because it is visible. However, for the automatic click scenario, the operating device needs to indicate the corresponding offset. For a variety of different situations, when generating an operation request, there may be different implementation manners, and there may be different corresponding ways to the operation event.
根据一个实施方式,点击设备在运行设备中对应的定位指针(如鼠标指针)的位置不能确定,需要先对其进行定位。则在步骤201中向点击设备发送的操作请求可以是一个点击请求。该次点击的目的在于确定当前的点击位置,也就是定位指针当前指向的位置。因此,当前次操作可以仅包含任意点击模式的点击操作(无需偏移)。为了描述方便,在这里可以将这种情况下生成的操作请求称为第一操作请求。运行设备可以按照预先确定的点击模式生成第一操作请求,也可以随机指定一个点击模式生成第一操作请求,在此不作限定。点击设备根据第一操作请求生成第一点击事件,并进行反馈。According to one embodiment, the position of the corresponding positioning pointer (such as the mouse pointer) of the pointing device in the running device cannot be determined, and it needs to be positioned first. Then, the operation request sent to the pointing device in
可以理解,如果通过当前的待点击页面响应第一点击事件,由于第一点击事件对应的点击位置不能事先确定,假设当前待点击的是待点击页面上的第一目标位置,点击模式为第一点击模式,那么,直接通过待点击页面响应操作事件,可能的点击位置可能是第一目 标位置之外待点击的第二目标位置等,容易造成误点击。为了防止误点击,可以在生成第一操作请求之前,或者同时,生成定位页面。顾名思义,定位页面,也就是用于定位点击位置的辅助页面。定位页面的作用就是进行当前点击位置的确定,因此,定位页面可以覆盖待点击页面,并优先响应点击设备发送的操作事件。这样一来,就可以通过定位页面获取当前的点击位置。这里可以称一点击事件产生的点击位置为第一点击位置。It can be understood that if the first click event is responded to through the current page to be clicked, since the click position corresponding to the first click event cannot be determined in advance, it is assumed that the current to be clicked is the first target position on the page to be clicked, and the click mode is first Click mode, then, directly respond to the operation event through the page to be clicked, the possible click position may be the second target position to be clicked other than the first target position, etc., which may easily cause accidental clicks. In order to prevent accidental clicks, the positioning page may be generated before or at the same time when the first operation request is generated. As the name implies, the positioning page is an auxiliary page used to locate the click location. The function of the positioning page is to determine the current click position. Therefore, the positioning page can cover the page to be clicked and give priority to responding to the operation event sent by the clicking device. In this way, the current click position can be obtained by positioning the page. Here, the click position generated by a click event can be called the first click position.
然后,可以基于第一点击位置和第一目标位置的对比,完成在待点击页面上的点击。其中,第一点击位置和第一目标位置的对比可以通过它们分别在屏幕坐标系中的坐标实现,在此不再赘述。Then, based on the comparison between the first click position and the first target position, the click on the page to be clicked can be completed. Wherein, the comparison between the first click position and the first target position can be realized by their respective coordinates in the screen coordinate system, which will not be repeated here.
进一步地,在一个实施例中,第一点击位置和第一目标位置一致,则可以撤销定位页面,通过第一通信通道向点击设备发送第二操作请求。这里的第二操作请求指示出第一点击模式。这样,点击设备生成的点击事件就是按照第一点击模式在原地进行点击操作,这里称为第二操作事件。此时,通过待点击页面响应第二操作事件即可完成对第一目标位置按照第一点击模式的点击。Further, in one embodiment, if the first click position is consistent with the first target position, the positioning page can be cancelled, and the second operation request is sent to the pointing device through the first communication channel. The second operation request here indicates the first click mode. In this way, the click event generated by the click device is to perform a click operation in situ according to the first click mode, which is referred to as the second operation event here. At this time, by responding to the second operation event through the page to be clicked, clicking on the first target location according to the first click mode can be completed.
在另一个实施例中,第一点击位置和第一目标位置不一致,则需要将点击位置从第一点击位置调整到第一目标位置。此时,可以分别获取第一点击位置与第一目标位置在屏幕坐标系中的坐标,按照第一点击位置与第一目标位置的坐标确定从第一点击位置到第一目标位置的坐标偏移量,并至少基于坐标偏移量生成第三操作请求。将第三操作请求发送给点击设备,以供点击设备按照第三操作请求生成第三操作事件,响应第三操作事件,完成对待点击页面的点击。In another embodiment, if the first click position and the first target position are inconsistent, the click position needs to be adjusted from the first click position to the first target position. At this time, the coordinates of the first click position and the first target position in the screen coordinate system can be obtained separately, and the coordinate offset from the first click position to the first target position is determined according to the coordinates of the first click position and the first target position And generate a third operation request based on at least the coordinate offset. The third operation request is sent to the clicking device, so that the clicking device generates a third operation event according to the third operation request, responds to the third operation event, and completes the click on the page to be clicked.
可以理解,在实践中,可以预先存储有点击设备对应的偏移量与点击位置的偏移量(即点击组件在运行设备中的偏移量)可以具有预定的转换规则。例如,平移比例1:2,即点击设备对应的偏移量为1个单位(如毫米)时,点击位置的偏移量为2个单位(如像素)。在本实施例中,点击位置的偏移量是已知的,即为从第一点击位置到第一目标位置的坐标偏移量。这样,在一个可选的实现方式中,可以根据该坐标偏移量和预定的转换规则,确定点击设备对应的偏移量。值得说明的是,常规技术中,点击设备对应的偏移量是点击设备相对移动量,而在本实施例中,通过操作请求转换的点击设备对应的偏移量,是一个虚拟的偏移量,产生与实际点击设备移动相应偏移量一致的偏移事件。It can be understood that, in practice, the offset corresponding to the click device and the offset of the click position (ie, the offset of the click component in the running device) may be stored in advance, and may have a predetermined conversion rule. For example, when the translation ratio is 1:2, that is, when the offset corresponding to the click device is 1 unit (such as millimeter), the offset of the click position is 2 units (such as pixels). In this embodiment, the offset of the click position is known, that is, the coordinate offset from the first click position to the first target position. In this way, in an optional implementation manner, the offset corresponding to the clicking device can be determined according to the coordinate offset and a predetermined conversion rule. It is worth noting that in the conventional technology, the offset corresponding to the clicking device is the relative movement of the clicking device, and in this embodiment, the offset corresponding to the clicking device converted by the operation request is a virtual offset. , Generate an offset event consistent with the corresponding offset of the actual click device movement.
作为一个简单的示例,假设第一点击位置与第一目标位置之间的坐标偏移量为(200,400),转换规则为:点击设备对应的偏移量与点击位置的偏移量(即坐标偏移量)之间的平移比例为1:2,则,点击设备对应的偏移量为(100,200)。As a simple example, suppose that the coordinate offset between the first click position and the first target position is (200, 400), and the conversion rule is: the offset corresponding to the click device and the offset of the click position (ie The translation ratio between coordinate offset) is 1:2, then the offset corresponding to the click device is (100, 200).
按照上述坐标偏移量和第一点击模式生成第三操作请求,并发送给点击设备后,点击设备可以将其转换成相应的操作事件进行反馈。也就是说,前述例子中,操作请求中包含横向偏移100像素,纵向偏移200像素,以及第一目标位置对应的第一点击模式。点击设备生成的操作信息包含横向100个单位的偏移,纵向200个单位的偏移,以及通过第一点击模式进行的点击事件。此时,可以撤销定位页面,通过待点击页面响应相应操作事件,就完成了对待点击页面上的第一目标位置的点击。After generating the third operation request according to the aforementioned coordinate offset and the first clicking mode, and sending it to the clicking device, the clicking device can convert it into a corresponding operation event for feedback. That is, in the foregoing example, the operation request includes a horizontal offset of 100 pixels, a vertical offset of 200 pixels, and the first click mode corresponding to the first target position. The operation information generated by the click device includes an offset of 100 units in the horizontal direction, an offset of 200 units in the vertical direction, and a click event performed through the first click mode. At this time, the positioning page can be cancelled, and the click on the first target position on the page to be clicked is completed by responding to the corresponding operation event through the page to be clicked.
实践中,如果预先没有存储点击设备对应的偏移量与点击位置的偏移量(即定位指针在运行设备中的偏移量)的转换规则,则无法直接指示出准确的操作。在本说明书的发明构思下,点击设备实际没有发生偏移,而是通过第一通信模块接收运行设备发送来的操作请求,转换成相应的点击事件,点击事件中虚拟了点击设备的偏移。这样,对于点击事件的实际点击效果,需要进行点击试验。In practice, if the conversion rule between the offset corresponding to the clicking device and the offset of the click position (that is, the offset of the positioning pointer in the running device) is not stored in advance, accurate operations cannot be directly indicated. Under the inventive concept of this specification, the pointing device does not actually have an offset, but the operation request sent by the operating device is received through the first communication module and converted into a corresponding click event. The offset of the clicking device is virtual in the click event. In this way, for the actual click effect of the click event, a click test is required.
在一个可选的实现方式中,可以借鉴手动操作的思想,迭代执行变换点击位置,直至点击位置与第一目标位置一致。具体地,将坐标偏移量作为点击设备对应的偏移量,生成第三操作请求。第三操作请求还可以指示出前述的任意点击事件或者预定点击模式的点击事件。这样,可供点击设备按照第三操作请求生成按照该偏移量偏移的第三操作事件。通过定位页面响应三操作事件,并确定第三操作事件产生的第二点击位置,检测第二点击位置与第一目标位置是否一致,并根据检测结果生成第四操作请求发送给点击设备,以此类推,直至点击设备发送的操作事件对应的点击位置与第一目标位置一致。In an alternative implementation manner, the idea of manual operation can be used for reference, and the click position is changed iteratively until the click position is consistent with the first target position. Specifically, the coordinate offset is used as the offset corresponding to the pointing device, and the third operation request is generated. The third operation request may also indicate any of the aforementioned click events or click events of a predetermined click mode. In this way, the pointing device can generate a third operation event offset according to the offset according to the third operation request. Respond to the three operation events through the positioning page, and determine the second click position generated by the third operation event, detect whether the second click position is consistent with the first target position, and generate a fourth operation request based on the detection result and send it to the clicking device. By analogy, until the click position corresponding to the operation event sent by the click device is consistent with the first target position.
在另一个可选的实现方式中,可以通过再次点击得到的点击位置,确定出点击设备对应的偏移量与点击位置的偏移量(即定位指针在运行设备中的偏移量)的转换规则,并按照得到的转换规则进行点击。具体地,将任意偏移量或者第一点击位置与第一目标位置的坐标偏移量,作为点击设备对应的偏移量,生成第三操作请求。第三操作请求还可以指示出预定点击模式的点击事件。这样,可供点击设备按照第三操作请求生成按照该偏移量偏移的第三操作事件。通过定位页面响应第三操作事件,并确定第三操作事件产生的第二点击位置,检测第二点击位置与第一点击位置的坐标偏移量。根据第三操作请求中的偏移量与第二点击位置相对于第一点击位置的坐标偏移量之间的关系,可以确定出点击设备对应的偏移量与点击位置的偏移量之间的转换规则。之后可以按照该转换规则生成相应操作事件,在此不再赘述。In another alternative implementation, the click position obtained by clicking again can be used to determine the conversion between the offset corresponding to the click device and the offset of the click position (ie the offset of the positioning pointer in the running device) Rules, and click in accordance with the obtained conversion rules. Specifically, an arbitrary offset or a coordinate offset between the first click position and the first target position is used as the offset corresponding to the clicking device, and the third operation request is generated. The third operation request may also indicate a click event of a predetermined click mode. In this way, the pointing device can generate a third operation event offset according to the offset according to the third operation request. Respond to the third operation event by positioning the page, determine the second click position generated by the third operation event, and detect the coordinate offset between the second click position and the first click position. According to the relationship between the offset in the third operation request and the coordinate offset of the second click position relative to the first click position, it can be determined between the offset corresponding to the click device and the offset of the click position Conversion rules. Afterwards, the corresponding operation event can be generated according to the conversion rule, which will not be repeated here.
其中,上述各个实施例中,每一次运行设备向点击设备发送操作请求,并响应点击设备发送来的操作事件的过程,都可以看作图2流程的一个具体实施过程,在此不再赘述。 上述实施方式中的各个实施例,都至少执行了两次图2示出的流程。Among them, in each of the foregoing embodiments, each time the operating device sends an operation request to the clicking device and responds to the operation event sent by the clicking device, it can be regarded as a specific implementation process of the flow in FIG. 2 and will not be repeated here. In each of the above-mentioned embodiments, the process shown in FIG. 2 has been executed at least twice.
根据另一个实施方式,还可以预先记录有前一次的操作事件中,最终的点击位置的坐标。此时,在当前生成操作事件,不在需要定位页面,而是按照从第一点击位置到第一目标位置的坐标偏移量、点击设备对应的偏移量与点击位置的偏移量之间的转换规则,以及第一点击模式,生成操作事件,直接根据点击设备反馈的操作事件完成对第一目标位置按照第一点击模式的点击。According to another embodiment, the coordinates of the final click position in the previous operation event may also be recorded in advance. At this point, when the current operation event is generated, it is no longer necessary to locate the page, but according to the coordinate offset from the first click position to the first target position, the offset corresponding to the click device and the offset of the click position The conversion rule and the first click mode generate an operation event, and the click on the first target location according to the first click mode is completed directly according to the operation event feedback from the clicking device.
接着,请参考图3所示,图3示出了一种点击方法,应用于预先与运行设备建立连接的点击设备。运行设备用于运行目标程序,点击设备通过第一通信模块、第二通信模块分别与运行设备建立有第一通信通道和第二通信通道。第二通信通道基于运行设备的输入专用接口建立,以供运行设备通过系统进程响应点击设备的操作事件。Next, please refer to FIG. 3, which shows a click method, which is applied to a click device that is connected to a running device in advance. The running device is used to run the target program, and the pointing device establishes a first communication channel and a second communication channel with the running device through the first communication module and the second communication module, respectively. The second communication channel is established based on the input dedicated interface of the operating device, so that the operating device responds to the operation event of the click device through the system process.
图3示出的方法包括以下步骤:步骤301,通过第一通信通道接收运行设备发送的操作请求,其中,操作请求由运行设备在目标程序运行过程中出现待点击页面的情况下生成;步骤302,按照操作请求转换成点击设备的操作事件,其中,操作事件用于描述操作请求中指示出的偏移操作和/或点击操作;步骤303,向运行设备发送操作事件。The method shown in FIG. 3 includes the following steps:
首先,在步骤301中,通过第一通信通道接收运行设备发送的操作请求。这里,第一通信通道是通过第一通信模块与运行设备通信的通道。其中通信通道是一个比较形象的说话,其实质是第一通信模块和运行设备之间预先约定的通信方式。以蓝牙为例,第一通信模块与运行设备可以具有专用的连接通道。该连接通道可以通过诸如通道编号之类的通道标识表示,也可以通过约定的特定格式与其他通信通道进行区分。运行设备发送的操作请求,可以带有约定的通道标识,或者特定格式。如此,点击设备可以通过约定的通道标识,或者特定格式识别到是需要自己接收的信息。而按照与第一通信模块约定的通道标识,或者特定格式的信息,第二通信模块不进行识别、处理。这就相当于在第一通信模块和运行设备之间建立了专用的第一通信通道。First, in
在自动点击场景下,这里的操作请求可以由运行设备在目标程序运行过程中出现待点击页面的情况下生成,并指示出点击设备对应的偏移操作和/或点击操作。In the automatic click scenario, the operation request here can be generated by the operating device when the page to be clicked appears during the running of the target program, and indicates the offset operation and/or click operation corresponding to the clicking device.
之后,在步骤302中,按照操作请求转换成点击设备的操作事件,其中,操作事件用于描述操作请求中指示出的偏移操作和/或点击操作。在本步骤中,可以解析操作请求中的信息,并生成通过第二通信通道进行传递的信息。其中,与第一通信模块类似地,第二通信模块与运行设备可以具有专用的连接通道,就是第二通信通道。第二通信通道也可以通过诸如通道编号之类的通道标识表示,或者通过约定的特定格式与其他通信通道进行区分。 点击设备发送的操作事件,可以带有约定的通道标识,或者特定格式。如此,仅运行设备可以接收、识别操作事件。Then, in
作为一个具体例子,在第一通信通道和第二通信通道都是无线方式的通信通道的情况下,假设运行设备发出广播信息“4089#0,0#$1$”,表示发送给通道标识为4089的通信模块的请求,#0,0#表示横向移动0个像素,纵向移动0个像素,$1$中,1表示左键单击,##、$$均为特殊格式,则点击设备中的第一通信模块根据广播信息的信息头“4089”识别出发送给自身通道的信息,可以接收并解析该信息。接着,按照第二通信模块的信息发送格式封装信息为:“1078%0,0,1”,其中1078是第二通信模块的通道标识,%为约定的操作事件的特殊格式,封装信息“1078%0,0,1”就是表达操作事件的信息。可以看出,在转换过程中,相对于操作请求,操作事件包含的偏移和/或点击信息不变,仅仅是封装形式发生了改变。As a specific example, in the case that the first communication channel and the second communication channel are both wireless communication channels, suppose the operating device sends out the broadcast information "4089#0,0#$1$", indicating that the channel ID is 4089. For the request of the communication module, #0, 0# means horizontal movement 0 pixels, vertical movement 0 pixels, in $1$, 1 means left-click, ## and $$ are all special formats, then click in the device The first communication module recognizes the information sent to its own channel according to the information header "4089" of the broadcast information, and can receive and parse the information. Then, the package information according to the information sending format of the second communication module is: "1078% 0, 0, 1", where 1078 is the channel identifier of the second communication module,% is the special format of the agreed operation event, and the package information is "1078 "%0,0,1" is the information that expresses the operation event. It can be seen that in the conversion process, relative to the operation request, the offset and/or click information contained in the operation event remains unchanged, but only the packaging form has changed.
步骤303,向运行设备发送操作事件。例如第二通信模块将以上封装信息“1078%0,0,1”广播出去。此时,运行设备可以通过1078标识将该信息识别为一个点击事件。Step 303: Send an operation event to the running device. For example, the second communication module broadcasts the above package information "1078% 0, 0, 1". At this time, the operating device can identify the information as a click event through the 1078 identifier.
通过以上过程可知,图3示出的点击方法的流程中,点击设备的作用是对数据进行透传。亦即,通过第二通信模块将通过第一通信模块接收的数据传播出去。这样做的原因是,常规技术中,一些终端有沙盒机制,非系统程序没有权限控制定位组件(如鼠标指针)的位置和点击操作,因此,需要借助一个点击设备,将相应操作需求通过点击设备转换成操作事件,转发到运行设备。可以理解的是,点击设备通过第二通信模块与运行设备的连接,类似于常规技术中鼠标和计算机的连接。这样,第二通信模块与运行设备可以进行系统级别的通信,也就是说,通过第二通信模块发送给运行设备的信息,运行设备可以通过系统进程接收,从而可以面向其上运行的各种应用。From the above process, it can be seen that in the flow of the click method shown in FIG. 3, the function of the click device is to transparently transmit data. That is, the data received through the first communication module is propagated through the second communication module. The reason for this is that in conventional technology, some terminals have a sandbox mechanism, and non-system programs have no authority to control the position and click operations of positioning components (such as mouse pointers). Therefore, a click device is needed to transfer the corresponding operation requirements through clicking The equipment is converted into an operation event and forwarded to the operating equipment. It can be understood that the connection between the pointing device and the running device through the second communication module is similar to the connection between the mouse and the computer in the conventional technology. In this way, the second communication module and the running device can communicate at the system level, that is, the information sent to the running device through the second communication module can be received by the running device through the system process, so that it can be oriented to various applications running on it. .
值得说明的是,图2和图3所描述的实施例,分别从运行设备和点击设备对交互周期进行描述。在各个交互周期中,运行设备是主动方,可以根据需求生成不同的操作信息,点击设备是从动方,根据接收到的操作请求转换成相应的操作事件。分别针对图2和图3描述的每一种具体的实施方式,可以相互配合和适应。It is worth noting that the embodiments described in FIG. 2 and FIG. 3 describe the interaction cycle from the running device and the clicking device respectively. In each interaction cycle, the operating device is the active party, which can generate different operation information according to requirements, and the clicking device is the follower, which is converted into corresponding operation events according to the received operation request. Each of the specific implementation manners described in FIG. 2 and FIG. 3 can be coordinated and adapted to each other.
为了更清楚地描述运行设备执行的流程和点击设备执行的流程之间的相互配合和适应,请参考图4,给出了一个具体实施例的交互示意图。In order to more clearly describe the interaction and adaptation between the flow executed by the running device and the flow executed by the clicking device, please refer to FIG. 4, which shows an interactive schematic diagram of a specific embodiment.
如图4所示,首先,在S401中,运行设备上运行的目标程序出现了待点击页面。待点击页面中可以至少包括待点击的第一目标位置和针对第一目标位置的第一点击模式,例如单击、双击等等。As shown in Figure 4, first, in S401, a page to be clicked appears in the target program running on the running device. The page to be clicked may include at least the first target position to be clicked and the first click mode for the first target position, such as single click, double click, and so on.
值得说明的是,在页面点击的方法的执行主体是运行设备中的一个模块的情况下,该模块可以嵌入目标程序,也可以是独立于目标程序的模块,在此不作限定。当该模块嵌入目标程序中时,其可以通过诸如SDK的方式封装,当目标程序中出现待点击页面时,将第一目标位置和第一点击模式作为传递参数,调用该模块执行页面点击的方法。当该模块独立于目标程序时,目标程序在出现待点击页面时,可以以事件形式通知该模块,以供该模块通过事件触发执行页面点击的方法。It is worth noting that, in the case that the execution subject of the page click method is a module in the running device, the module can be embedded in the target program, or it can be a module independent of the target program, which is not limited here. When the module is embedded in the target program, it can be encapsulated by means such as SDK. When the page to be clicked appears in the target program, the first target position and the first click mode are passed as parameters, and the method of calling the module to execute the page click . When the module is independent of the target program, the target program can notify the module in the form of an event when the page to be clicked appears, so that the module can trigger the method of executing the page click through the event.
接着,在S402中,生成定位页面。定位页面可以覆盖在当前页面之上,优先响应点击事件。为了定位方便,定位页面和当前页面上的各个位置都可以通过屏幕坐标系来表示。在定位页面和当前页面位于不同坐标系的情况下,通过坐标系转换换算位置关系。Next, in S402, a positioning page is generated. The positioning page can be overlaid on the current page, giving priority to responding to click events. In order to facilitate positioning, each position on the positioning page and the current page can be represented by the screen coordinate system. When the positioning page and the current page are located in different coordinate systems, the position relationship is converted through coordinate system conversion.
在S402进行的同时,或之后,在S403中,生成操作请求,并发送给点击设备。其中,这里的操作请求用于指示点击设备针对当前的待点击页面(针对当前的待点击页面不一定是在当前待点击页面上)产生第一次点击。该操作请求也是针对当前的待点击页面第一次发送的操作请求,其可以指示一个单纯的点击事件。While S402 is being performed, or afterwards, in S403, an operation request is generated and sent to the pointing device. The operation request here is used to instruct the clicking device to generate the first click on the current page to be clicked (for the current page to be clicked, it is not necessarily on the current page to be clicked). The operation request is also an operation request sent for the first time for the current page to be clicked, and it can indicate a simple click event.
该次点击的目的在于确定当前的点击位置。因此,当前次点击可以是任意点击模式的点击。运行设备可以按照预先确定的点击模式向点击设备发送点击请求,也可以随机指定一个点击模式向点击设备发送点击请求,在此不作限定。The purpose of this click is to determine the current click position. Therefore, the current click can be a click in any click mode. The operating device can send a click request to the pointing device according to a predetermined click mode, or it can randomly designate a click mode to send a click request to the pointing device, which is not limited here.
进一步地,在S404中,点击设备通过第一通信模块接收运行设备发送的操作请求,将该操作请求转换成第一点击事件。可以理解,传统的点击设备,例如鼠标,通过物理上的相对偏移和/或按键动作,产生点击事件。在本说明书的发明构思下,点击设备可以不进行相对偏移和/或按键动作,而是根据运行设备的操作请求,直接转换成操作事件,来代替点击设备物理上的相对偏移和/或按键动作。Further, in S404, the pointing device receives the operation request sent by the running device through the first communication module, and converts the operation request into the first click event. It can be understood that a traditional clicking device, such as a mouse, generates a click event through a physical relative offset and/or key press action. Under the inventive concept of this specification, the pointing device may not perform relative offset and/or keystroke actions, but directly convert into operation events according to the operation request of the running device, instead of the relative offset and/or physical displacement of the pointing device. Key action.
在本步骤中,可以将第一点击请求中包含的相对偏移和/或按键动作转换成点击事件的格式,然后加上第二通信模块对应的通道标识,或者约定的特定格式。In this step, the relative offset and/or key action included in the first click request can be converted into the format of the click event, and then the channel identifier corresponding to the second communication module or the agreed specific format can be added.
接着,在S405中,点击设备可以通过第二通信模块向运行设备反馈第一点击事件。第二通信模块与运行设备的通信方式在前面已经进行了描述,在此不再赘述。Then, in S405, the pointing device may feed back the first click event to the running device through the second communication module. The communication mode between the second communication module and the operating device has been described above, and will not be repeated here.
然后,在S406中,运行设备可以通过定位页面响应第一点击事件,定位当前的第一点击位置。由于运行设备在S402中生成了定位页面,并优先响应点击事件,因此,这里的运行设备系统进程接收到的第一点击事件,可以通过定位页面响应。这里,不通过待点击页面直接响应,可以避免当前点击事件所产生的点击位置,存在其他按钮或超链接等能够响应点击的元素的情况下,造成误点击,使得页面产生不可控的跳转,造成不必要的混 乱。Then, in S406, the running device may respond to the first click event through the positioning page, and locate the current first click position. Since the operating device generates a positioning page in S402 and responds to the click event first, the first click event received by the system process of the operating device here can be responded to through the positioning page. Here, instead of responding directly to the page to be clicked, the click position generated by the current click event can be avoided. If there are other buttons or hyperlinks and other elements that can respond to clicks, accidental clicks can be caused, which makes the page uncontrollable jump. Cause unnecessary confusion.
接着,在S407中,可以对比第一点击位置是否与第一目标位置一致,并根据对比结果生成新的操作请求。在本步骤中,可以对比第一点击位置与第一目标位置在屏幕坐标系中的坐标是否一致。如果第一点击位置与第一目标位置通过不同的坐标系中的坐标表示,还可以先将其坐标转换成同一个坐标系中的坐标表示,再进行对比。Next, in S407, it is possible to compare whether the first click position is consistent with the first target position, and generate a new operation request according to the comparison result. In this step, it is possible to compare whether the coordinates of the first click position and the first target position in the screen coordinate system are consistent. If the first click position and the first target position are represented by coordinates in different coordinate systems, the coordinates can also be converted into coordinate representations in the same coordinate system before comparison.
可以理解,在两者一致的情况下,新的操作请求可以仅指示一次当前点击位置的点击操作。在两者不一致的情况下,新的操作请求可以指示出偏移操作和点击操作两个部分。这里,偏移操作可以是第一点击位置到第一目标位置的偏移,通过偏移量表示,点击操作可以通过第一点击模式表示。It can be understood that when the two are consistent, the new operation request may only indicate a click operation at the current click position. When the two are inconsistent, the new operation request can indicate the offset operation and the click operation. Here, the offset operation may be the offset from the first click position to the first target position, expressed by the offset amount, and the click operation may be expressed by the first click mode.
在S408中,运行设备通过第一通信通道将新的操作请求发送给点击设备。In S408, the running device sends the new operation request to the pointing device through the first communication channel.
然后,在S409中,点击设备接收新的操作请求,并相应生成新的操作事件,并通过S410将新的操作信息发送至运行设备。其中新的操作请求仅指示依次点击操作时,新的操作事件仅包括点击事件,新的操作请求指示出偏移操作和点击操作两个部分时,新的操作事件可以包括点击设备对应的偏移事件和点击事件。Then, in S409, the click device receives a new operation request, generates a new operation event accordingly, and sends the new operation information to the operating device through S410. When the new operation request only indicates the sequential click operation, the new operation event only includes the click event, and the new operation request indicates the offset operation and the click operation, the new operation event can include the offset corresponding to the click device Events and click events.
进一步地,在S411中,撤销定位页面,根据新的操作请求完成对第一目标位置的点击。Further, in S411, the positioning page is cancelled, and the click on the first target position is completed according to the new operation request.
图4示出的交互流程,示出了两个交互过程。可以看出,在每个交互流程中,运行设备可以根据不同需求生成不同的操作请求。并根据操作请求进行其他辅助操作,如生成定位页面、撤销定位页面等。而点击设备在每个流程中都进行一个信息转换的操作,收到什么信息就转换什么信息,相当于是对运行设备中的点击流程的辅助。Figure 4 shows the interaction process, showing two interaction processes. It can be seen that in each interactive process, the operating device can generate different operation requests according to different needs. And perform other auxiliary operations according to the operation request, such as generating a positioning page, canceling a positioning page, and so on. The click device performs an information conversion operation in each process, and converts what information is received, which is equivalent to assisting the click process in the running device.
回顾以上过程,在页面点击过程中,运行设备根据需要点击的位置和点击模式,生成操作请求,发送给点击设备,由点击设备将操作请求转换成操作事件并反馈,然后,响应操作事件,以完成在待点击页面上的点击。其中,向点击设备发送操作请求和从点击设备接收操作事件通过不同的通信通道完成,并且,点击设备向运行设备发送操作事件的通信通道通过运行设备的输入专用接口实现,从而,将操作事件转换成系统进程的操作事件,可供目标程序响应。以上流程通过一个点击设备的辅助,自动完成运行设备中的页面点击,可以提高页面点击的有效性。Recalling the above process, during the page click process, the operating device generates an operation request according to the location and click mode that needs to be clicked, and sends it to the clicking device. The clicking device converts the operation request into an operation event and gives feedback, and then responds to the operation event to Finish clicking on the page to be clicked. Among them, sending operation requests to the clicking device and receiving operation events from the clicking device are completed through different communication channels, and the communication channel for the clicking device to send operation events to the running device is realized through the input dedicated interface of the running device, thereby converting the operation event The operation event into the system process can be responded to by the target program. The above process is assisted by a click device to automatically complete page clicks in the running device, which can improve the effectiveness of page clicks.
根据另一方面的实施例,还提供一种页面点击的装置。图5示出根据一个实施例的页面点击的装置的示意性框图。装置500可以设置于运行目标程序的运行设备。装置500包括:发送单元51,配置为在目标程序运行过程中出现待点击页面的情况下,通过第一通信 通道向点击设备发送操作请求,以供点击设备将操作请求转换成操作事件通过第二通信通道进行反馈,操作事件用于描述操作请求中指示出的偏移操作和/或点击操作,其中,点击设备预先通过第一通信模块、第二通信模块分别与运行设备建立有第一通信通道和第二通信通道,第二通信通道基于运行设备的输入专用接口建立;响应单元52,配置为响应操作事件,以完成在待点击页面上的点击。According to another embodiment, there is also provided a page click device. Fig. 5 shows a schematic block diagram of a page click device according to an embodiment. The
值得说明的是,图5所示的装置500是与图2示出的方法实施例相对应的装置实施例,图2示出的方法实施例中的相应描述同样适用于装置500,在此不再赘述。It is worth noting that the
根据另一方面的实施例,还提供一种点击设备。图6示出根据一个实施例的点击设备的示意性框图。点击设备600用于对预先建立连接的运行设备上的页面进行点击。点击设备600包括:第一通信模块61,配置为与运行设备建立第一通信通道,并通过第一通信通道接收运行设备发送的操作请求,其中,操作请求由运行设备在目标程序运行过程中出现待点击页面的情况下生成;转换模块62,配置为按照操作请求转换成点击设备的操作事件,其中,操作事件用于描述操作请求中指示出的偏移操作和/或点击操作;第二通信模块63,配置为通过运行设备的输入专用接口与运行设备建立第二通信通道,并通过第二通信通道向运行设备发送操作事件。According to another embodiment, a pointing device is also provided. Fig. 6 shows a schematic block diagram of a pointing device according to an embodiment. The
在一个可能的设计中,点击设备可以通过鼠标实现。In a possible design, the pointing device can be implemented with a mouse.
值得说明的是,图6所示的装置600是与图3示出的方法实施例相对应的装置实施例,图3示出的方法实施例中的相应描述同样适用于装置600,在此不再赘述。It is worth noting that the
根据另一方面的实施例,还提供一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行结合图2或图3所描述的方法。According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method described in conjunction with FIG. 2 or FIG. 3.
根据再一方面的实施例,还提供一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现结合图2或图3所述的方法。According to an embodiment of still another aspect, there is also provided a computing device, including a memory and a processor, the memory stores executable code, and when the processor executes the executable code, a combination of FIG. 2 or FIG. 3 is implemented. The method described.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本说明书实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。Those skilled in the art should be aware that, in one or more of the foregoing examples, the functions described in the embodiments of this specification can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
以上所述的具体实施方式,对本说明书的技术构思的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本说明书的技术构思的具体实施方式而已,并不用于限定本说明书的技术构思的保护范围,凡在本说明书实施例的技术方案的 基础之上,所做的任何修改、等同替换、改进等,均应包括在本说明书的技术构思的保护范围之内。The specific implementations described above further describe the purpose, technical solutions, and beneficial effects of the technical concept of this specification in further detail. It should be understood that the above are only specific implementations of the technical concept of this specification, and It is not used to limit the protection scope of the technical concept of this specification. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the embodiments of this specification shall be included in the protection scope of the technical concept of this specification within.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910858821.1A CN110569195B (en) | 2019-09-11 | 2019-09-11 | Page clicking method and device and clicking equipment |
| CN201910858821.1 | 2019-09-11 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021047135A1 true WO2021047135A1 (en) | 2021-03-18 |
Family
ID=68779252
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/071819 Ceased WO2021047135A1 (en) | 2019-09-11 | 2020-01-13 | Page clicking method and apparatus, and clicking device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110569195B (en) |
| WO (1) | WO2021047135A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110569195B (en) * | 2019-09-11 | 2020-11-24 | 杨凯 | Page clicking method and device and clicking equipment |
| CN111600995A (en) * | 2020-05-15 | 2020-08-28 | 上海莉莉丝科技股份有限公司 | Mobile device and method for correcting deviation of game user interface of mobile device |
| CN113886231B (en) * | 2021-09-28 | 2025-05-23 | 厦门立林科技有限公司 | A continuous clicking method, system and storage medium for APP interface elements |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105740148A (en) * | 2016-01-29 | 2016-07-06 | 博雅网信(北京)科技有限公司 | Script engine system of mobile terminal automation test and testing method |
| US20160337053A1 (en) * | 2014-12-05 | 2016-11-17 | W2Bi, Inc. | Smart box for automatic feature testing of smart phones and other devices |
| CN108089754A (en) * | 2017-12-29 | 2018-05-29 | 百度在线网络技术(北京)有限公司 | A kind of touch-control simulator |
| CN209373548U (en) * | 2018-10-19 | 2019-09-10 | 成都极飓力网络科技有限公司 | Screen taps device |
| CN110569195A (en) * | 2019-09-11 | 2019-12-13 | 杨凯 | Page clicking method and device and clicking equipment |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB9930851D0 (en) * | 1999-12-24 | 2000-02-16 | Koninkl Philips Electronics Nv | Apparatus control system and method |
| CN101655765A (en) * | 2008-08-22 | 2010-02-24 | 深圳富泰宏精密工业有限公司 | Electronic device utilizing virtual direction keys to operate and corresponding operation method |
| CN106155760B (en) * | 2015-03-31 | 2019-09-17 | 北京奇虎科技有限公司 | The method and device of key mouse script playback |
| CN107632706B (en) * | 2017-09-08 | 2021-01-22 | 北京光年无限科技有限公司 | Application data processing method and system of multi-modal virtual human |
-
2019
- 2019-09-11 CN CN201910858821.1A patent/CN110569195B/en active Active
-
2020
- 2020-01-13 WO PCT/CN2020/071819 patent/WO2021047135A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160337053A1 (en) * | 2014-12-05 | 2016-11-17 | W2Bi, Inc. | Smart box for automatic feature testing of smart phones and other devices |
| CN105740148A (en) * | 2016-01-29 | 2016-07-06 | 博雅网信(北京)科技有限公司 | Script engine system of mobile terminal automation test and testing method |
| CN108089754A (en) * | 2017-12-29 | 2018-05-29 | 百度在线网络技术(北京)有限公司 | A kind of touch-control simulator |
| CN209373548U (en) * | 2018-10-19 | 2019-09-10 | 成都极飓力网络科技有限公司 | Screen taps device |
| CN110569195A (en) * | 2019-09-11 | 2019-12-13 | 杨凯 | Page clicking method and device and clicking equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110569195A (en) | 2019-12-13 |
| CN110569195B (en) | 2020-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109144396B (en) | A touch information processing method, device, device and storage medium | |
| US20220086600A1 (en) | Method for activating service based on user scenario perception, terminal device, and system | |
| US5448263A (en) | Interactive display system | |
| US20220004316A1 (en) | Touch control method and apparatus | |
| US20040263488A1 (en) | Projection display system with pressure sensing at screen, and computer assisted alignment implemented by applying pressure at displayed calibration marks | |
| WO2021047135A1 (en) | Page clicking method and apparatus, and clicking device | |
| CN108804302A (en) | A kind of remote test method, system and relevant device | |
| CN113360116A (en) | Method, device and equipment for controlling terminal and storage medium | |
| US10126879B2 (en) | Testing method of touch device and system thereof | |
| US9293108B2 (en) | Transmission apparatus and system of using the same | |
| WO2017051171A1 (en) | Private access to human interface devices | |
| CN103218162B (en) | Terminal operation method and device | |
| US10073586B2 (en) | Method and system for mouse pointer to automatically follow cursor | |
| US20140359631A1 (en) | Information processing system, information processing method, and information processing terminal | |
| CN111078104B (en) | Redirection method of multi-point touch equipment on cloud desktop and computer equipment | |
| CN103559809B (en) | Computer-based on-site interaction demonstration system | |
| CN108946370A (en) | Elevator faults information processing method, system, equipment and readable storage medium storing program for executing | |
| US11481180B2 (en) | System and method for simultaneous management of a plurality of designation peripherals | |
| CN111090529A (en) | Method and electronic device for sharing information | |
| US20150227214A1 (en) | Input apparatus, input method and computer-executable program | |
| CN108427392B (en) | Interface control method and diagnostic equipment | |
| TWI792712B (en) | Cursor marking method and switching device | |
| CN112114762B (en) | Method and device for controlling screen display | |
| CN117215937A (en) | Application remote debugging method, device, equipment and storage medium | |
| JP2015076041A (en) | Erroneous input detection device and erroneous input detection program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20863583 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20863583 Country of ref document: EP Kind code of ref document: A1 |