Equipment remote debugging method, device and system, computer equipment and storage medium
By obtaining and analyzing the page information of the remote device, generating and refactoring pages and sending operation parameters, the problem of high bandwidth usage in traditional remote device debugging is solved, efficient remote device debugging is achieved, and cost is reduced.
Patent Information
- Application Number
- CN202310729916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-17
AI Technical Summary
In traditional remote device debugging methods, video streaming occupies a large bandwidth, resulting in high costs.
By obtaining the page information matching the current display page of the remote device, performing view structure analysis, determining the view hierarchy relationship, generating a reconstructed page, and responding to debugging operations, sending matching operation parameters to the remote device to realize page synchronization and manipulation. Transport less bandwidth resources.
It realizes remote debugging of equipment while saving bandwidth resources, reducing costs, and improving debugging efficiency and accuracy.
Smart Images

Figure CN119149308A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, system, computer equipment, computer-readable storage medium, and computer program product for remote debugging of a device. Background Art
[0002] With the rapid development of electronic manufacturing technology, various smart devices such as mobile phones, tablet computers, and smart wearable devices have emerged. In order to avoid problems during use, it is usually necessary to debug the device. Remote debugging methods represented by online debugging are widely used due to their convenient operation.
[0003] In traditional technology, the recorded screen data of the debugged remote device is first fed back to the server through a video stream, and then the debugging device obtains the video stream sent by the server and displays the video stream to achieve synchronization between the remote device and the debugging device in display, and then perform subsequent debugging. Since a large bandwidth is required during the video stream transmission process, there is a disadvantage of high cost. Summary of the invention
[0004] Based on this, it is necessary to provide a remote device debugging method, apparatus, system, computer equipment, computer-readable storage medium and computer program product that can reduce costs in response to the above technical problems.
[0005] In a first aspect, the present application provides a device remote debugging method. The method comprises:
[0006] Get the page information that matches the currently displayed page of the remote device;
[0007] Performing a view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views;
[0008] Reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page;
[0009] In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
[0010] In a second aspect, the present application also provides a device remote debugging apparatus. The apparatus comprises:
[0011] A page information acquisition module, used to acquire page information matching the currently displayed page of the remote device;
[0012] A view structure analysis module, configured to perform a view structure analysis on the currently displayed page based on the page information, and determine a plurality of views included in the currently displayed page, and a hierarchical relationship between the views;
[0013] A page reconstruction module, configured to perform page reconstruction based on the multiple views according to the hierarchical relationship between the views, and generate a reconstructed page corresponding to the currently displayed page;
[0014] The operation parameter sending module is used to send the operation parameters matching the debugging operation to the remote device in response to the debugging operation on the reconstructed page, so that the remote device triggers the operation event corresponding to the operation parameter on the current display page.
[0015] In a third aspect, the present application also provides a device remote debugging method. The method comprises:
[0016] Determine the page information that matches the currently displayed page;
[0017] Sending the page information to a debugging device; the page information is used to generate a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views;
[0018] An operation parameter fed back by the debugging device is acquired, and an operation event corresponding to the operation parameter is triggered on the current display page; the operation parameter matches the debugging operation for the reconstructed page.
[0019] In a fourth aspect, the present application also provides a device remote debugging apparatus. The apparatus comprises:
[0020] A page information determination module, used to determine page information matching the currently displayed page;
[0021] An information sending module, used for sending the page information to a debugging device; the page information is used for generating a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views;
[0022] An event triggering module is used to obtain the operation parameters fed back by the debugging device, and trigger an operation event corresponding to the operation parameters on the current display page; the operation parameters match the debugging operation for the reconstructed page.
[0023] In a fifth aspect, the present application also provides a device remote debugging system. The system includes a debugging device and a remote device debugged by the debugging device;
[0024] The remote device determines page information matching the currently displayed page, and sends the page information to the debugging device;
[0025] The debugging device acquires the page information, performs view structure analysis on the currently displayed page based on the page information, determines a plurality of views included in the currently displayed page and a hierarchical relationship between the views, and reconstructs the page based on the plurality of views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page; the debugging device also sends an operation parameter matching the debugging operation to the remote device in response to a debugging operation on the reconstructed page;
[0026] The remote device obtains the operation parameter, and triggers an operation event corresponding to the operation parameter on the current display page.
[0027] In a sixth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0028] Get the page information that matches the currently displayed page of the remote device;
[0029] Performing a view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views;
[0030] Reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page;
[0031] In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
[0032] In a seventh aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0033] Determine the page information that matches the currently displayed page;
[0034] Sending the page information to a debugging device; the page information is used to generate a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views;
[0035] An operation parameter fed back by the debugging device is acquired, and an operation event corresponding to the operation parameter is triggered on the current display page; the operation parameter matches the debugging operation for the reconstructed page.
[0036] In an eighth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Get the page information that matches the currently displayed page of the remote device;
[0038] Performing a view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views;
[0039] Reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page;
[0040] In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
[0041] In a ninth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Determine the page information that matches the currently displayed page;
[0043] Sending the page information to a debugging device; the page information is used to generate a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views;
[0044] An operation parameter fed back by the debugging device is acquired, and an operation event corresponding to the operation parameter is triggered on the current display page; the operation parameter matches the debugging operation for the reconstructed page.
[0045] In a tenth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0046] Get the page information that matches the currently displayed page of the remote device;
[0047] Performing a view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views;
[0048] Reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page;
[0049] In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
[0050] In an eleventh aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0051] Determine the page information that matches the currently displayed page;
[0052] Sending the page information to a debugging device; the page information is used to generate a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views;
[0053] An operation parameter fed back by the debugging device is acquired, and an operation event corresponding to the operation parameter is triggered on the current display page; the operation parameter matches the debugging operation for the reconstructed page.
[0054] The above-mentioned device remote debugging method, apparatus, system, computer device, computer-readable storage medium and computer program product obtain page information matching the current display page of the remote device; perform view structure analysis on the current display page based on the page information to determine the multiple views contained in the current display page and the hierarchical relationship between the views; perform page reconstruction based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the current display page; in response to the debugging operation on the reconstructed page, send the operation parameter matching the debugging operation to the remote device so that the remote device triggers the operation event corresponding to the operation parameter on the current display page. In the above-mentioned debugging process, the page is reconstructed based on the page information matching the current display page of the remote device, and only less bandwidth resources are needed to transmit the page information, so that the page synchronization between the debugging device and the remote device can be achieved; by sending the operation parameter matching the debugging operation on the reconstructed page to the remote device, so that the remote device triggers the operation event corresponding to the operation parameter on the current display page, it also only needs to occupy less bandwidth resources to transmit the operation parameter, so that the debugging device can control the remote device. Therefore, the above-mentioned device remote debugging method can save bandwidth resources while realizing device remote debugging, which is conducive to cost saving. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 An application environment diagram of a device remote debugging method in an embodiment;
[0056] Figure 2 It is an application environment diagram of a device remote debugging method in another embodiment;
[0057] Figure 3 A schematic diagram of a flow chart of a device remote debugging method in one embodiment;
[0058] Figure 4 This is a schematic diagram of an interface of a currently displayed page in an embodiment;
[0059] Figure 5 for Figure 4 A schematic diagram of the hierarchical relationship between the views in the page shown in ;
[0060] Figure 6 For Figure 4 Schematic diagram of the reconstructed page corresponding to the currently displayed page;
[0061] Figure 7 A schematic diagram of a page reconstruction process in an embodiment;
[0062] Figure 8 A schematic diagram of a flow chart of a device remote debugging method in another embodiment;
[0063] Fig. 9A schematic diagram of a page information collection process in an embodiment;
[0064] Fig.10 A schematic diagram of the composition of page information collection software in one embodiment;
[0065] Fig.11 A schematic diagram of the composition of remote device operation software in one embodiment;
[0066] Fig.12 A schematic diagram of a page synchronization process between a remote device and a debugging device in one embodiment;
[0067] Fig.13 A schematic diagram of an interactive process of remote debugging of a device in one embodiment;
[0068] Fig.14 A structural block diagram of a device remote debugging apparatus in an embodiment;
[0069] Fig.15 It is a structural block diagram of a device remote debugging apparatus in another embodiment;
[0070] Fig.16 is an internal structure diagram of a computer device in one embodiment;
[0071] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0073] The device remote debugging method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the debugging device 102 can communicate with the debugged remote device 104 through a communication network. The communication network can be a wired network or a wireless network. Therefore, the debugging device 102 and the remote device 104 can be directly or indirectly connected through wired or wireless communication. For example, the debugging device 102 can be indirectly connected to the remote device 104 through a wireless access point, or the debugging device 102 is directly connected to the remote device 104 through the Internet, and this application does not limit this.
[0074] Among them, the debugging device 102 and the remote device 104 can be a terminal or a server. The terminal includes but is not limited to various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc., and the portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Further, the debugging device 102 and the remote device 104 both include a display device. The debugging device 102 can respond to the debugging operation for the page displayed on the display device, and obtain the corresponding operation information by parsing the debugging operation; the remote device 104 can obtain the operation parameters for the page displayed on the display device, and trigger the operation event corresponding to the operation parameter. The display device can be a built-in display device or an external display device.
[0075] During the debugging of the remote device 104, the debugging device 102 obtains page information matching the current display page of the remote device 104, performs view structure analysis on the current display page based on the page information, determines multiple views contained in the current display page and the hierarchical relationship between the views, reconstructs the page based on the multiple views according to the hierarchical relationship between the views, and generates a reconstructed page corresponding to the current display page, thereby achieving page synchronization between the debugging device 102 and the remote device 104; on this basis, the debugging device 102 responds to the debugging operation on the reconstructed page and sends an operation parameter matching the debugging operation to the remote device 104, so that the remote device 104 triggers an operation event corresponding to the operation parameter on the current display page, so as to achieve the control of the remote device 104 by the debugging device 102. It can be understood that after the remote device 104 triggers the operation event, it may cause the view of the current display page of the remote device 104 to change, then the debugging device 102 can obtain page information matching the current display page of the remote device 104 again, and perform the next round of debugging based on the page information.
[0076] In one embodiment, the debugging device 102 and the remote device 104 can achieve network communication through a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Specifically, the debugging device 102 and the remote device 104 can achieve interaction by establishing connections with the server respectively, with the server as the intermediate.
[0077] In a specific implementation, such as Figure 2As shown, the debugging device 102 and the remote device 104 can respectively establish a connection with the cloud server 106, use the cloud server 106 as a transfer to realize data transmission, and then realize the debugging device 102 to debug the remote device 106. Among them, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool, which is used on demand and is flexible and convenient. The background service of the technical network system requires a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0078] In some embodiments, Figure 3 As shown, a device remote debugging method is provided, which can be executed by a computer device, and the computer device can be Figure 1 The debugging device 102 shown includes the following steps:
[0079] Step S302: Acquire page information matching the currently displayed page of the remote device.
[0080] Among them, the remote device refers to the device that needs to be debugged, that is, what is implemented in the present application is the debugging of the remote device by the debugging device. As mentioned above, the remote device can be various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices, portable wearable devices and other devices including display devices. The current display page of the remote device refers to the page displayed on the display device of the remote device. The display device includes a display screen, which can be, for example, a display screen or a touch screen; the current display page can be, for example, a program page of the application currently running on the remote device, or it can be a system page of the operating system of the remote device. It can be understood that when the current display page is a program page, the debugging of the remote device is essentially the debugging of the currently running application, and when the current display page is a system page, the debugging of the remote device is essentially the debugging of the operating system.
[0081] Page information refers to information used to describe the characteristics of a page, and the page information may include, for example, page size, shape, color, layout of view nodes of the page, and attribute values of each view node. Furthermore, the number of currently displayed pages of the remote device may be one or more. Exemplarily, one currently displayed page may be displayed on the display screen; or multiple currently displayed pages may be displayed on the display screen simultaneously in the form of overlapping or split screens.
[0082] Specifically, during the debugging of the remote device, the debugging device needs to obtain page information that matches the current display page of the remote device. The specific way for the debugging device to obtain the page information can be active acquisition or passive reception.
[0083] In one embodiment, when establishing a communication connection with a remote device, the debugging device sends a page information acquisition request to the remote device, and the remote device responds to the page information acquisition request and feeds back page information matching the currently displayed page to the debugging device.
[0084] In one embodiment, the page information collection software running on the remote device runs in the background after the remote device is successfully started. When the remote device and the debugging device establish a communication connection, the page information collection software constructs a Window Manager Global Proxy object based on the Window Manager Global object of the Hook system Window Manager, and in the WindowManager Global Proxy object, by monitoring the call of view-related functions such as the setView function and the updateViewLayout function, the page view change monitoring is realized, and when the current display page changes, the update page information matching the current display page is sent to the debugging device. The debugging device receives the update page information, and the update page information and the initial page information matching the display page before the change together constitute the page information matching the current display page of the remote device.
[0085] Step S304: performing view structure analysis on the currently displayed page based on the page information to determine multiple views included in the currently displayed page and the hierarchical relationship between the views.
[0086] Among them, a page can include multiple views, that is, a page can be understood as a container of views, which is used to provide a display area for views. A view is a visual image that fills at least a part of the area of a page. The view elements displayed in the view can include, for example, a combination of one or more images, text, or shapes. For example, Figure 4 As shown, the current display page of the remote device includes multiple views, wherein the display content of view 410 is time and weather forecast, the display content of view 420 is a picture, and the display content of views 430 and 440 is icons.
[0087] The hierarchical relationship between views refers to the parent-child inheritance relationship between views. When a view contains other views, a parent-child inheritance relationship is established between the two views. The contained view is the child view, and the containing view is the parent view. For example, Figure 4 The parent view 430 includes subviews 431, 432, 433, and 434, and the parent view 440 includes subviews 441, 442, 443, and 444. It can be understood that a view has only one parent view, but can contain multiple subviews. In other words, a view can also be used as a container. By adding subviews to a view, a view structure containing multiple levels can be formed. Furthermore, views at the same level can be regarded as a view group. Exemplarily, Figure 4 View 410 , view 420 , view 430 , and view 440 are at the same level and constitute a view group.
[0088] Specifically, the debugging device can perform view structure analysis on the current display page based on the page information to obtain a hierarchical diagram or view tree representing the view structure, and then determine the multiple views included in the current display page and the hierarchical relationship between the views. Furthermore, the specific method of performing view structure analysis is not unique.
[0089] In one embodiment, the debugging device can determine the multiple views contained in the currently displayed page based on the view node information contained in the page information, and then determine the root view in each view based on the attribute value of each view node, and take the root node corresponding to the root view as the starting point to loop through each view node to obtain the hierarchical relationship between the views. Among them, the view corresponds to the view node one by one. Taking the case where the hierarchical relationship between views is represented by the view tree as an example, Figure 4 The view tree of the page is shown in Figure 5 As shown. Among them, Figure 5 and Figure 4 The corresponding relationship is: Figure 1 correspond Figure 4 410, video Figure 2 correspond Figure 4 420 in the view group 2 corresponds to Figure 4 430, view group 3 corresponds to Figure 4 440 in the video Figure 3 To Vision Figure 6 Corresponding to Figure 4431 to 434, see Figure 7 To Vision Fig.10 Corresponding to Figure 4 441 to 444 of the.
[0090] In one embodiment, a training sample including page information and view hierarchical relationship can be used to train the model, and a machine learning model for view structure analysis can be obtained. The input of the machine learning model is page information, and the output is the view hierarchical relationship of the page. During the application process, the debugging device can call the trained machine learning model, input the acquired page information into the machine learning model, and determine the multiple views contained in the currently displayed page and the hierarchical relationship between the views based on the output of the machine learning model.
[0091] Step S306 , performing page reconstruction based on multiple views according to the hierarchical relationship between the views, and generating a reconstructed page corresponding to the currently displayed page.
[0092] Among them, page reconstruction is the process from view to page, and the reconstructed page is the result of page reconstruction. The reconstructed page corresponds to the currently displayed page, which means that the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views. In other words, the reconstructed page and the currently displayed page can be exactly the same, or there can be differences. For example, the view used as the background in the currently displayed page can correspond to the blank view box in the reconstructed page; for another example, the icons in the view contained in the currently displayed page can correspond to the same icons in the reconstructed page; for another example, due to the different screen sizes of the remote device and the debugging device, the sizes of the current display page and the reconstructed page may be different. Figure 6 As shown, Figure 4 A reconstructed page corresponding to the currently displayed page, in which view 410 displaying time and weather is simplified to obtain corresponding view 610, view 420 displaying pictures is simplified to obtain corresponding view 620, and at the same time, the background image in view 430 is simplified to obtain view 630.
[0093] Specifically, the debugging device can construct a blank page object, and based on the hierarchical relationship between the views, add each view to the page object to obtain a reconstructed page corresponding to the currently displayed page. Further, in one embodiment, the page information includes view node layout information, and the debugging device can determine the layout information of each of the multiple views contained in the currently displayed page based on the view node layout information, and determine the relative position of each view in the currently displayed page based on the layout information, and then based on the hierarchical relationship between the views, add each view to the page object according to the relative position to obtain a reconstructed page, so as to ensure that the relative positions between the views in the reconstructed page are consistent with the currently displayed page.
[0094] In a specific application, the page information includes the page shape and the page size. Based on the page size and its own screen size, the debugging device constructs a page object with the same shape as the currently displayed page by proportional scaling, and based on the hierarchical relationship between the views, adds each view to the page object to obtain a reconstructed page corresponding to the currently displayed page, so as to ensure the consistency of the reconstructed page with the currently displayed page in page shape. Furthermore, the page can be reconstructed in combination with the view node layout information and the page shape to generate a reconstructed page that is consistent with the currently displayed page in both page shape and view layout, so as to ensure that the debugging process can simulate the actual use process and improve the accuracy of the debugging results.
[0095] It should be noted that when there are multiple current page information, the debugging device can obtain page information matching each currently displayed page respectively, and perform view structure analysis and page reconstruction based on each page information respectively to obtain the reconstructed page corresponding to each currently displayed page.
[0096] Step S308: In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
[0097] Among them, the debugging operation for the reconstructed page can be an information input operation, a motion operation, a touch operation, etc. Correspondingly, the operation parameters can be determined based on the input information of the debugger, or based on the sensor information collected by the sensor of the debugging device, or based on the touch information collected by the touch screen of the debugging device. The sensor can be an acceleration sensor, a magnetic sensor or a gyroscope, etc., and the sensor information can be data information such as acceleration, angular velocity or rotation angle. Exemplarily, the debugger can control the debugging device to move, rotate, etc., so that the sensor of the debugging device collects the corresponding sensor information, and then obtains the operation parameters; the debugger can also touch the touch screen of the debugging device so that the debugging device collects the corresponding touch information, and then obtains the operation parameters corresponding to the touch operation. The touch operation can include gesture actions such as sliding left, sliding right, and drawing a pre-pattern. In a specific implementation, the operation type of the debugging operation supported by the debugging device includes the operation type supported by the remote device. In this way, it can be ensured that the debugging process can cover all operation types supported by the remote device, thereby ensuring the comprehensiveness of the debugging and improving the accuracy of the debugging results. The operation type may include, for example, a touch operation, an information input operation, and the like.
[0098] Specifically, the debugging device can respond to the debugging operation on the reconstructed page, obtain the operation information on the reconstructed page, and based on the association relationship between the reconstructed page and the current display page, perform data processing on the operation information to obtain the operation parameters matching the remote device. Then, the debugging device sends the operation parameters to the remote device, so that the remote device triggers the operation event corresponding to the operation parameters on the current display page, and realizes the control of the remote device by the debugging device. Among them, the association relationship between the reconstructed page and the current display page, for example, can include at least one of the size correspondence, view element correspondence, element position correspondence, etc. The size correspondence can be, for example, that the reconstructed page is reduced to half of the original page size relative to the current display page, or that the length of the reconstructed page is twice the length of the current display page, and so on. The view elements displayed on the reconstructed page and the current display page correspond one to one, and the view element correspondence represents the correspondence between the view elements displayed on the reconstructed page and the current display page. The element position correspondence represents the position information of the corresponding view elements on the reconstructed page and the current display page. The specific method of data processing can include data format conversion, data calculation, and so on.
[0099] Taking the case of collecting operation parameters based on the touch screen as an example, the debugging device can provide an Input Channel Proxy to replace the original Input Channel by hooking the Input Channel object of WindowManager, so as to monitor the touch events of the debugger on the reconstructed page, and then collect the corresponding touch information, and obtain the corresponding operation parameters by performing data processing on the touch information. Among them, the process of obtaining the operation parameters by performing data processing on the touch information can be, for example, scaling the sliding distance in the touch information based on the scaled size of the reconstructed page relative to the current display page to obtain the sliding distance corresponding to the current display page; or it can be based on the corresponding relationship between the controls of the reconstructed page and the current display page. After obtaining the click operation parameters for the A1 control in the reconstructed page, the click operation position is adjusted based on the position of the A2 control corresponding to the A1 control in the current display page to obtain the operation parameters corresponding to the current display page.
[0100] It can be understood that when a triggering operation event causes a view change of the currently displayed page, the page information matching the currently displayed page of the remote device can be re-acquired, the page can be reconstructed based on the latest acquired page information, and the next round of remote debugging can be performed based on the latest generated reconstructed page.
[0101] In actual applications, multiple remote devices can be debugged synchronously. Specifically, the debugging device can obtain the page information of the currently displayed pages of multiple remote devices, and reconstruct the pages based on the page information to generate the reconstructed pages corresponding to each remote device. Each reconstructed page can be displayed in split screen or superimposed on the debugging device. During the debugging process, the debugger can select the active page, and the debugging device can respond to the active page determination event, determine the active page from each reconstructed page, and then respond to the debugging operation for the active page, and send the operation parameters matching the debugging operation to the active remote device corresponding to the active page, so that the active remote device triggers the operation event matching the operation parameters, thereby debugging the active remote device.
[0102] In the above-mentioned device remote debugging method, page information matching the current display page of the remote device is obtained; based on the page information, a view structure analysis is performed on the current display page to determine the multiple views contained in the current display page and the hierarchical relationship between the views; according to the hierarchical relationship between the views, the page is reconstructed based on the multiple views to generate a reconstructed page corresponding to the current display page; in response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device so that the remote device triggers an operation event corresponding to the operation parameter on the current display page. In the above-mentioned debugging process, page reconstruction is performed based on the page information matching the current display page of the remote device, and only less bandwidth resources are required to transmit the page information, so that the page synchronization between the debugging device and the remote device can be achieved; by sending the operation parameter matching the debugging operation on the reconstructed page to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the current display page, it also only takes less bandwidth resources to transmit the operation parameter, so that the debugging device can control the remote device. Therefore, the above-mentioned device remote debugging method can save bandwidth resources while realizing device remote debugging, which is conducive to cost saving.
[0103] In one embodiment, step S302 includes: obtaining encrypted page information that matches the currently displayed page of the remote device; and decrypting the encrypted page information to obtain page information that matches the currently displayed page.
[0104] In practical applications, during the data interaction between the debugging device and the remote device, data can be encrypted to improve security. Among them, the specific algorithm for implementing data encryption can be, for example, symmetric encryption or asymmetric encryption. The execution subject of data encryption can be, for example, a remote device or a server serving as a message transfer station. Correspondingly, the execution subject of data decryption can be, for example, a server or a debugging device. Taking the remote device as the execution subject of data encryption and the debugging device as the execution subject of data decryption as an example, the remote device can determine the encryption key and decryption key through key negotiation with the debugging device. After acquiring the page information of the currently displayed page, the remote device uses the negotiated encryption key to encrypt the page information, obtains and transmits the encrypted page information to the debugging device. Then, the debugging device obtains the encrypted page information, decrypts the encrypted page information using the negotiated decryption key, and obtains the page information matching the currently displayed page.
[0105] It should be noted that in other embodiments, the remote device may also encrypt the page information of the currently displayed page, obtain the encrypted page information and send it to the server, and the server may decrypt the encrypted page information to obtain and send the page information to the debugging device.
[0106] In the above embodiment, by encrypting and transmitting the page information, it is possible to prevent the page information from being tampered with during the transmission process, thereby ensuring the accuracy of the debugging result.
[0107] In one embodiment, the page information includes initial page information and updated page information. In this embodiment, step S304 includes: determining an initial view tree of the initial page corresponding to the current display page based on the initial page information; updating the initial view tree based on the updated page information to obtain an updated view tree representing multiple views included in the current display page and the hierarchical relationship between the views.
[0108] Among them, the initial view tree is used to represent the multiple initial views contained in the initial page and the hierarchical relationship between each initial view; the updated view tree is used to represent the multiple views contained in the current display page and the hierarchical relationship between each view. The initial page corresponding to the current display page refers to the page displayed by the remote device before the current display page. The view information displayed by the current display page has changed relative to the initial page, and the corresponding page information has also changed accordingly. Among them, the changed page information may include at least one of the information such as the view contained in the page, the view layout, and the hierarchical relationship between each view. It can be understood that in the process of debugging the remote device, multiple rounds of debugging can be performed continuously, and each round of debugging is performed on the basis of the previous round, that is, the initial page corresponding to the next round of debugging is the current display page corresponding to the previous round of debugging; the current display page corresponding to the next round of debugging is the updated page displayed after the operation event is triggered in the previous round of debugging.
[0109] Specifically, the debugging device can obtain initial page information that matches the initial page of the remote device, perform view structure analysis on the initial page based on the initial page information, and determine an initial view tree that represents multiple initial views contained in the initial page and the hierarchical relationship between the initial views. When the display page of the remote device changes, the updated view information of the current display page after the change is obtained, and the initial view tree is updated based on the updated view information to obtain an updated view tree that represents multiple views contained in the current display page and the hierarchical relationship between the views.
[0110] Exemplarily, the remote device can monitor the changes of page views by monitoring the calls of view-related functions such as the setView function and the updateViewLayout function, and send updated page information matching the current display page to the debugging device when the current display page changes. The process of updating the view tree (View Tree) can be: when the setView method is called, the View parameter of the setView method is obtained (the parameter is the rootView of the current page view), and the current ViewTree can be constructed by traversing this rootView; when the updateViewLayout method is called, the view parameter and layoutParams parameter of the updateViewLayout method are obtained to obtain the layout information and attribute values of the ViewTree node, so as to monitor the changes of the ViewTree node attributes, and then the view tree can be updated based on the changes of the ViewTree node attributes.
[0111] In the above embodiment, a view tree is used to represent the hierarchical relationship between views, and the view tree is updated based on the initial view tree, which can reduce the workload of view structure analysis in each round of debugging and help improve efficiency.
[0112] In one embodiment, step S306 includes: determining the view elements corresponding to each view; determining the relative positions between the view elements based on the hierarchical relationship between the views; and performing page reconstruction processing using each view element according to the relative positions to generate a reconstructed page corresponding to the currently displayed page.
[0113] Among them, the view element refers to the display element in the view, which may include a combination of one or more images, text or shapes. As mentioned above, the page information may include the attribute values of each view node. Based on this, the debugging device can determine the view attributes of each view contained in the current display page according to the page information, and determine the image semantics corresponding to each view. For example, Figure 4 The image semantics corresponding to view 410 are weather and time; view 420 is a view for displaying pictures, and the image semantics corresponding to it is the game scene view; the image semantics corresponding to view 431 is email. After determining the image semantics corresponding to each view, the debugging device can select the view element corresponding to the image semantics from the view element library as the view element corresponding to each view. In other words, the view elements of the reconstructed page and the currently displayed page can be different, as long as the image semantics represented by the corresponding view elements are the same. In this way, the requirements for the view element library can be reduced and the reconstruction process can be simplified.
[0114] After determining the view elements, the debugging device can further determine the relative positions of the view elements based on the hierarchical relationship between the views. It can be understood that the subviews of the next level are usually superimposed on the upper layer of the parent view of the previous level, and the views of the same level are usually located in different positions in the same area. Based on this, the debugging device can use each view element to perform page reconstruction processing according to the determined relative position to generate a reconstructed page corresponding to the currently displayed page.
[0115] In this embodiment, the view elements corresponding to each view are first determined, and then the view elements are laid out according to the hierarchical relationship between the views, and a reconstructed page corresponding to the current display page is generated, so that the reconstructed page can be different from the current display page, which can improve the page reconstruction efficiency to a certain extent.
[0116] In one embodiment, page reconstruction is performed using each view element according to relative position to generate a reconstructed page corresponding to the currently displayed page, including: adding each view element to the original page that matches the currently displayed page according to the relative position to obtain a view page; rendering the view page to obtain a reconstructed page corresponding to the currently displayed page.
[0117] The original page matches the current display page, which may refer to at least one of the non-view page information such as page size and page shape of the two pages matching. Specifically, the debugging device can construct an original page that matches the current display page as a container for each view element, and then, according to the relative position of each view element, add each view element to the original page to obtain a view page with the view element added, and then render the view page to obtain a reconstructed page corresponding to the current display page.
[0118] For example, Figure 7 As shown, the process of page reconstruction is essentially the process of restoring the acquired page information to a page and rendering it. Take the debugging device for debugging a remote device based on a cloud server as an example. Specifically, the debugging device can obtain encrypted page information from the cloud server. The page information matches the current display page of the debugged remote device, and the page information can be, for example, ViewTree information. Then, the debugging device decrypts the encrypted page information and constructs a view tree based on the decryption result. Each child node in the view tree can represent multiple views contained in the page, and the inheritance relationship between each child node in the view tree can represent the hierarchical relationship between each view. Then, the debugging device creates a blank window (Window) object, adds view elements to the window object based on the constructed view tree, that is, calls the addView method to add ViewTree to the Window object. Finally, the debugging device opens a new page, adds the Window with the added view element to the page, and calls the invalidate method of Window to force rendering and refresh the page to obtain a reconstructed page corresponding to the current display page of the remote device.
[0119] In this embodiment, rendering is performed after all page elements are added, which can ensure that the reconstructed page can be obtained after only one rendering, thereby reducing the computing resource usage of the page reconstruction process.
[0120] In one embodiment, step S308 includes: in response to a debugging operation on a reconstructed page, adding operation information of the debugging operation to an information queue; obtaining each operation information in sequence according to the respective order of each operation information in the information queue; and based on the obtained operation information, sending operation parameters matching the operation information to a remote device.
[0121] Specifically, when the debugger triggers multiple debugging operations on the reconstructed page, the debugging device can record the operation information corresponding to each debugging operation through the information queue, and then obtain each operation information in sequence according to the order of each operation information in the information queue. For each piece of operation information obtained, the debugging device combines the differences between the current display page and the reconstructed page in terms of page size, element position, etc., performs data processing on the operation parameter, determines the operation parameter corresponding to the operation information, and sends the operation parameter to the remote device, so that the remote device triggers the operation event corresponding to the operation parameter on the current display page.
[0122] Exemplarily, after generating the reconstruction page corresponding to the current display page, the debugging device can provide an Input Channel Proxy to replace the original Input Channel by hooking the Input Channel object of the Window Manager, so as to monitor the debugging operation of the debugger on the reconstruction page. When the debugging device triggers the debugging operation, the system will call back the event to the InputQueue of the Input Channel Proxy, and then collect the corresponding operation information. Then, in the order of first-in-first-out, each operation information is taken out from the InputQueue in turn, and the taken out operation information is converted into the operation parameter for the current display page, and the operation parameter is sent to the remote device.
[0123] In this embodiment, by recording the operation information of the debugging operation for the reconstructed page in a queue, it can be ensured that each debugging operation can be responded to on the remote device side, thereby ensuring the accuracy of the debugging result.
[0124] The technical solution of the present application can support application scenarios of synchronous debugging of multiple remote devices. This application scenario can be, for example, a scenario of synchronous debugging of multiple remote real machines on a cloud real machine product line. It can be understood that for multiple remote devices with different current display pages, if one debugging device is used for synchronous debugging, the debugging device needs to collect page information and reconstruct the page for each remote device separately, and obtain the reconstructed page corresponding to each remote device. Then, targeted debugging operations are performed on different reconstructed pages to send operation parameters matching the debugging operation to the corresponding remote device, so as to realize the control of the remote device by the debugging device.
[0125] In one embodiment, there are multiple remote devices, and the current display page of each remote device is the same. In this embodiment, the device remote debugging method further includes: for each remote device, when the triggering operation event causes the view of the current display page to change, obtaining the update page information of the remote device, and updating the reconstruction page corresponding to the remote device based on the update page information; based on the reconstruction page corresponding to each remote device, determining the debugging result of each remote device.
[0126] Specifically, since the current display page of each remote device is the same, it is possible to obtain only the page information of the current display page of any remote device, reconstruct the page based on the page information to obtain the reconstructed page, perform debugging operations on the reconstructed page, and send operation parameters matching the debugging operation to each remote device, so that each remote device triggers an operation event corresponding to the operation parameter on its current display page. Then, for each remote device, when the triggering operation event causes the view of the current display page to change, obtain the update page information of the remote device, update the reconstructed page corresponding to the remote device based on the update page information, and then determine the debugging results of each remote device based on the reconstructed page corresponding to each remote device. If the reconstructed page corresponding to the remote device is consistent with the expected page, it means that the debugging result of the remote device is passed; if the reconstructed page corresponding to the remote device is inconsistent with the expected page, it means that the debugging result of the remote device is not passed.
[0127] Among them, the reconstructed page corresponding to the remote device is inconsistent with the expected page, including the missing of the reconstructed page or the reconstructed page error. The missing of the reconstructed page means that when the triggering operation event theoretically causes the view change of the current display page, it actually does not cause the view change, resulting in the failure to generate the reconstructed page corresponding to the remote device. The reconstructed page error means that the actual view change between the current reconstructed page and the previous reconstructed page is inconsistent with the expected view change.
[0128] In the above embodiment, debugging is performed synchronously on multiple remote devices that currently display the same page, which is equivalent to performing page information collection and page reconstruction once to achieve debugging of multiple remote devices, which is beneficial to improving debugging efficiency.
[0129] In some embodiments, Figure 8 As shown, another device remote debugging method is provided, which can be executed by a computer device, and the computer device can be Figure 1 The remote device 104 shown includes the following steps:
[0130] Step S802: Determine page information matching the currently displayed page.
[0131] Among them, the currently displayed page refers to the page displayed on the display device of the debugged remote device. The currently displayed page can be, for example, a program page of the application currently running on the remote device, or a system page of the operating system of the remote device. It can be understood that when the currently displayed page is a program page, the debugging of the remote device is essentially the debugging of the currently running application, and when the currently displayed page is a system page, the debugging of the remote device is essentially the debugging of the operating system. Page information refers to information used to describe the characteristics of the page, and the page information can include, for example, page size, shape, color, layout of view nodes of the page, and attribute values of each view node. Further, the number of currently displayed pages of the remote device can be one or more. Exemplarily, one currently displayed page can be displayed on the display screen; or multiple currently displayed pages can be displayed on the display screen at the same time in the form of overlapping or split screen.
[0132] In one embodiment, the page information collection software running on the remote device runs in the background after the remote device is successfully started. When the remote device and the debugging device establish a communication connection, the page information collection software constructs a Window Manager Global Proxy object based on the Window Manager Global object of the Hook system Window Manager, and in the WindowManager Global Proxy object, by monitoring the call of view-related functions such as the setView function and the updateViewLayout function, the page view change monitoring is realized, and when the current display page changes, the debugging device sends the update page information matching the current display page. The update page information and the initial page information matching the display page before the change together constitute the page information matching the current display page of the remote device.
[0133] Step S804: Send page information to the debugging device.
[0134] Among them, the page information is used to generate a reconstructed page corresponding to the currently displayed page, and the reconstructed page has the same views contained in the currently displayed page and the hierarchical relationship between the views. A page can include multiple views, that is, the page can be understood as a container for views, which is used to provide a display area for views. A view is a visual image that fills at least a part of the area in a page. The view elements displayed in the view may include a combination of one or more pictures, text, or shapes. The hierarchical relationship between views refers to the parent-child inheritance relationship between views. When a view contains other views, a parent-child inheritance relationship is established between the two views. The contained view is the subview, and the containing view is the parent view. In other words, a view can also be used as a container. By adding subviews to a view, a view structure containing multiple levels can be formed.
[0135] Specifically, the remote device determines the page information that matches the currently displayed page, and sends the page information to the debugging device. The debugging device can perform a view structure analysis on the currently displayed page based on the page information, obtain a hierarchical diagram or view tree that represents the view structure, and then determine the multiple views contained in the currently displayed page, as well as the hierarchical relationship between the views, and perform page reconstruction based on the multiple views according to the hierarchical relationship between the views, and generate a reconstructed page corresponding to the currently displayed page. For the specific limitations on view structure analysis and page reconstruction, please refer to the above and will not be repeated here.
[0136] Step S806: acquiring the operation parameters fed back by the debugging device, and triggering an operation event matching the operation parameters on the current display page.
[0137] The operation parameters match the debugging operation for the reconstructed page. Specifically, when the debugging device generates a reconstructed page that matches the currently displayed page of the remote device, it can respond to the debugging operation for the reconstructed page, obtain the operation information for the reconstructed page, and based on the association relationship between the reconstructed page and the currently displayed page, perform data processing on the operation information to obtain and send the operation parameters matching the debugging operation to the remote device. The remote device obtains the operation parameters fed back by the debugging device, writes the operation parameters into the event node, and triggers the operation event matching the operation parameters on the currently displayed page.
[0138] The association relationship between the reconstructed page and the currently displayed page may include, for example, at least one of a size correspondence, a view element correspondence, an element position correspondence, and the like. The size correspondence may, for example, be that the reconstructed page is reduced to half of the original page size relative to the currently displayed page, or that the length of the reconstructed page is twice the length of the currently displayed page, and so on. The view elements displayed on the reconstructed page and the currently displayed page correspond one-to-one, and the view element correspondence represents the correspondence between the view elements displayed on the reconstructed page and the currently displayed page. The element position correspondence represents the position information of the corresponding view elements on the reconstructed page and the currently displayed page. Specific methods of data processing may include data format conversion, data calculation, and the like.
[0139] In practical applications, during the data interaction process between the debugging device and the remote device, data can be encrypted to improve security. The specific algorithm for implementing data encryption can be, for example, symmetric encryption or asymmetric encryption. The execution subject for performing data encryption can be, for example, the debugging device or a server as a message transfer station. Correspondingly, the execution subject for performing data decryption can be, for example, a server or a remote device. In a specific embodiment, the process of obtaining the operation parameters fed back by the debugging device includes: obtaining the encrypted operation parameters matching the debugging operation of the reconstructed page; decrypting the encrypted operation parameters to obtain the operation parameters. Taking the debugging device as the execution subject of data encryption and the remote device as the execution subject of data decryption as an example, the remote device can determine the encryption key and the decryption key through key negotiation with the debugging device. In response to the debugging operation for the reconstructed page, the debugging device determines the operation parameters matching the debugging operation, and encrypts the operation parameters using the negotiated encryption key to obtain and transmit the encrypted operation parameters to the remote device. Then, the remote device obtains the encrypted operation parameters, decrypts the encrypted operation parameters using the negotiated decryption key to obtain the operation parameters matching the debugging operation for the reconstructed page.
[0140] In the above-mentioned device remote debugging method, page information matching the currently displayed page is sent to the debugging device, so that the debugging device can reconstruct the page based on the page information, which is equivalent to only occupying less bandwidth resources to transmit the page information, thereby realizing page synchronization between the debugging device and the remote device; by obtaining the operation parameters matched with the debugging operation for the reconstructed page fed back by the debugging device, and triggering the operation event corresponding to the operation parameter on the currently displayed page, it is also only necessary to occupy less bandwidth resources to transmit the operation parameter, thereby realizing the control of the remote device by the debugging device. Therefore, the above-mentioned device remote debugging method can save bandwidth resources while realizing remote debugging of the device, which is conducive to cost saving.
[0141] In one embodiment, step S802 includes: obtaining initial page information of the initial page; in response to a page update event of switching from the initial page to the currently displayed page, obtaining update page information matching the currently displayed page; and determining page information including the initial page information and the update page information.
[0142] Among them, the page update event refers to an event that causes the page information of the displayed page to change. The changed page information may include at least one of the information such as the views contained in the page, the view layout, and the hierarchical relationship between the views. It can be understood that in the process of debugging the remote device, multiple rounds of debugging can be performed continuously, and each round of debugging is performed on the basis of the previous round, that is, the initial page corresponding to the next round of debugging is the current display page corresponding to the previous round of debugging; the current display page corresponding to the next round of debugging is the updated page displayed after the operation event is triggered in the previous round of debugging.
[0143] Specifically, the remote device can obtain the initial page information of the initial page, and in response to the page update event of switching from the initial page to the currently displayed page, obtain the updated page information matching the currently displayed page, and then determine the page information including the initial page information and the updated page information. In other words, the remote device can update the page information by monitoring the changes in the page view.
[0144] In a specific embodiment, the remote device can monitor the changes of page views by monitoring the call of view-related functions such as the setView function (method) and the updateViewLayout function (method), and send updated page information matching the current display page to the debugging device when the current display page changes. Specifically, the remote device can hook the system's Window Manager Server (window management service), construct a Window Manager Global Proxy object through reflection, and rewrite its setView and updateViewLayout methods. The purpose of the rewriting method is to intercept ViewTree information in these two methods. Then, call the get SystemService method to obtain the system's WindowManagerService object. Through reflection, replace the WindowManagerGlobal object in the WindowManagerService object with the WindowManagerGlobalProxy object. When the setView method of WindowManagerGlobalProxy is called, the view root node of the page can be obtained through the rootView parameter in setView, and the ViewTree and its node information of the current page can be obtained by traversing the tree composed of the root nodes. When the updateViewLayout method of WindowManagerGlobalProxy is called, the current page view and layout (layout information) can be obtained, and the node and attribute data of the current ViewTree can be obtained through the view and layout information.
[0145] Take the case where the debugging device and the remote device interact with each other through the cloud server as an example. Fig. 9 As shown, by adding a hook monitoring for the updateViewLayout or setView method, when the above method is called, it will trigger the collection of page information such as view information and node information. In addition, after the remote terminal collects the above page information, it uploads the collected page information to the cloud server so that the debugging device can obtain the page information from the cloud server and reconstruct the page.
[0146] In the above embodiment, based on the initial page information, the updated page information is obtained by monitoring the page update event to obtain the page information matching the currently displayed page. This is equivalent to only needing to update a part of the page information during each round of debugging, which is conducive to improving efficiency.
[0147] In one embodiment, the device remote debugging method also includes: in response to an operation parameter sending event, determining multiple candidate nodes for carrying the operation parameters; based on the parameter type of the operation parameter, determining an event node that matches the parameter type from each candidate node; writing the operation parameter into the event node to obtain an operation event that matches the operation parameter.
[0148] Among them, the candidate node, namely the event node, is an event-based interface. Specifically, after receiving the operation parameters from the debugging device, the remote device can start InputInjectService (input injection service). InputInjectService determines the corresponding event type according to the parameter type of the operation parameters, and determines the event node that matches the parameter type from each candidate node based on the event type, and then writes the operation parameters into the event node to obtain an operation event that matches the operation parameters. Exemplarily, the operation parameters corresponding to the touch operation can be written into the touch event node to obtain a touch operation event, and the corresponding touch driver is generated by initializing the touch operation event to trigger the touch operation event.
[0149] In this embodiment, an operation event matching the operation parameter is obtained based on the event node, so that a real operation scenario can be simulated, which is beneficial to improving the accuracy of the debugging result.
[0150] Based on the same concept, the embodiment of the present application also provides a device remote debugging system for implementing the device remote debugging method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more device remote debugging system embodiments provided below can refer to the limitations on the device remote debugging method above, and will not be repeated here.
[0151] In one embodiment, a device remote debugging system includes a debugging device and a remote device debugged by the debugged device. The remote device determines the page information matching the current display page and sends the page information to the debugging device; the debugging device obtains the page information, performs view structure analysis on the current display page based on the page information, determines the multiple views contained in the current display page and the hierarchical relationship between the views, reconstructs the page based on the multiple views according to the hierarchical relationship between the views, and generates a reconstructed page corresponding to the current display page; the debugging device also responds to the debugging operation for the reconstructed page and sends the operation parameters matching the debugging operation to the remote device. The remote device obtains the operation parameters and triggers an operation event corresponding to the operation parameters on the current display page.
[0152] The above-mentioned device remote debugging system, during the process of remote debugging, reconstructs the page based on the page information matching the current display page of the remote device, and only needs to occupy a small amount of bandwidth resources to transmit the page information, so as to achieve page synchronization between the debugging device and the remote device; by sending operation parameters matching the debugging operation for the reconstructed page to the remote device, so that the remote device triggers the operation event corresponding to the operation parameter on the current display page, and similarly only needs to occupy a small amount of bandwidth resources to transmit the operation parameter, so as to achieve the control of the remote device by the debugging device. Therefore, the above-mentioned device remote debugging method can save bandwidth resources while realizing device remote debugging, which is conducive to cost saving.
[0153] In one embodiment, the device remote debugging system further includes a server. The server sends device information of the device to be debugged to the debugging device; the debugging device determines the remote device to be debugged from the device to be debugged, and feeds back the device information of the remote device to the server; the server establishes a communication connection with the remote device based on the device information of the remote device; the debugging device obtains page information matching the current display page of the remote device through the server.
[0154] Specifically, the debugger can start the remote device operating software of the debugging device, obtain the list of devices to be debugged from the server, and determine the remote device to be debugged from the devices to be debugged. The debugging device responds to the device selection operation and feeds back the device information of the selected remote device to the server. The device information can be, for example, a device identification (ID) or a device communication address. The server then starts the remote device management service based on the device information and establishes a long link with the remote device. After the long link is successfully established, the server can notify the debugging device so that the debugging device starts debugging the remote device to which the connection is established, specifically by obtaining page information matching the currently displayed page of the remote device through the server.
[0155] In a specific embodiment, the server may be a cloud server deployed in the cloud, which can communicate with the remote device and the debugging device through the Http protocol. The cloud server operation includes remote device service and debugging device service. The remote device service is mainly used to process and manage the service request of the remote device, and the debugging device service is mainly used to process the service request of the debugging device.
[0156] Among them, cloud servers, remote devices and debugging devices can be components of the Internet of Things (IOT). The Internet of Things refers to the real-time collection of any object or process that needs to be connected and interacted through various devices and technologies such as various information sensors, radio frequency identification technology, global positioning system, infrared sensor, laser scanner, etc., and the collection of various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, location, etc., and the realization of ubiquitous connection between objects and objects, objects and people through various possible network access, and the realization of intelligent perception, identification and management of objects and processes. The Internet of Things is an information carrier based on the Internet, traditional telecommunications networks, etc., which allows all ordinary physical objects that can be independently addressed to form an interconnected network. Cloud IOT aims to connect the information sensed and instructions received by sensor devices in traditional IoT to the Internet, truly realize networking, and achieve massive data storage and computing through cloud computing technology. Due to the characteristics of IoT, objects are connected to each other and the current operating status of each "object" is perceived in real time. A large amount of data information will be generated in this process. How to aggregate this information and how to filter out useful information from the massive information to support decision-making for subsequent development have become key issues affecting the development of IoT. IoT cloud based on cloud computing and cloud storage technology has therefore become a strong support for IoT technology and applications.
[0157] In the above embodiment, with the server as a transfer, the debugging device can interact with multiple remote devices, which is beneficial to improving the working efficiency of the remote debugging process.
[0158] The technical solution of the present application can be applied to the application scenario of remote debugging of real machine devices produced in the cloud real machine product line. The real machine device can be, for example, a mobile phone terminal to be debugged after the assembly and installation of the program. The remote device can be connected to the cloud server via WIFI, using Http with long link communication, and the remote device needs to be pre-implanted with page information collection software, which starts with the device and stays resident. The debugging device can be a mobile phone terminal used by the debugger. The debugging device needs to install and run the remote device operation software, so that the debugger can control the remote device through the remote device operation end software, and synchronize the display with the remote device in real time.
[0159] In one embodiment, Fig.10As shown, the page information collection software of the remote device includes a communication service module, a window hook service (WindowHookService) module, and an input injection service (InputInjectService) module. Among them, the communication service includes an Http channel and a long link channel; the Http channel is used for data transmission related to ViewTree data, touch events, etc.; the long link channel is used to transmit device connection-related data synchronization (such as the connection status between the device and the cloud server, and the synchronous transmission of the connection request when the debugging device initiates a connection). The window hook service injects the Hook proxy object on the remote device to monitor the changes of the window (Window), obtains the attribute information of the current ViewTree and its nodes through the Window object, and realizes the view information collection functions such as node status collection and view tree collection. The input injection service is a proxy object that injects touch input and other event input on the remote device, and simulates and triggers the touch and other events of the system at the proxy layer.
[0160] In one embodiment, Fig.11 As shown, the remote device operating software of the debugging device may include: a communication service module, which is used to communicate with the cloud service end service, obtain the attribute information of the ViewTree and its nodes from the cloud server, and report the collected touch events and other system events to the cloud server; it is also responsible for data synchronization of the connection status information of the debugging device; a window manager, which is used to manage the life cycle of the Window, maintain and manage the application window hierarchy of the terminal operating software and update the view information of different hierarchies; a view reconstruction module, which is responsible for reading the ViewTree, i.e., its node attribute data, from the communication module, adding the ViewTree to the window, calling related functions to complete the drawing of the window view, realizing page reconstruction, and obtaining the reconstructed page corresponding to the current display page of the remote device; The component preprocessing module is used to filter out redundant and repeated parameters of the system touch events (such as ACTION_MOVE events in touch events); the touch interception module is used to inject a touch event monitor into the window after the window object is created. When the debugger uses the remote device operation software to generate a touch event, the touch interception module will intercept the touch event and extract the required touch information from the touch event, such as the touch starting point coordinate information, the touch path and the touch end point coordinate information, etc.; the link management module is used to provide an operation page and process the establishment of a link relationship between the terminal operation software and the remote device; the system event interception module is mainly responsible for intercepting other system events except touch events, such as volume adjustment, return button, multi-tasking button, lock screen and other system events.
[0161] In one embodiment, Fig.12 As shown in the figure, the specific process of achieving real-time synchronization between the debugging device and the remote device includes:
[0162] Step 1: The page information collection software running on the remote device runs in the background after the remote device is successfully started. When the remote device and the debugging device establish a communication connection, the page information collection software constructs a Window Manager Global Proxy object based on the Window Manager Global object of the Hook system Window Manager, and in the Window Manager GlobalProxy object, monitors the call of view-related functions such as the setView function and the updateViewLayout function to realize the monitoring of page view changes, and sends the debugging device updated page information matching the current display page when the current display page changes. The updated page information and the initial page information matching the display page before the change together constitute the page information matching the current display page of the remote device.
[0163] Step 2: The data processing logic running on the cloud server encapsulates the page information such as ViewTree and node attribute data collected from the remote device into json format, and encrypts the page information using the public key based on asymmetric encryption; after the encryption is completed, the cloud server sends the encrypted page information to the debugging device through the return value of the Http request.
[0164] Step 3: After obtaining the encrypted page information, the debugging device uses the built-in public key to decrypt it and obtain page information such as ViewTree and node attribute data.
[0165] Step 4: After getting the page information, build an empty window object, then use the ViewTree information to build a real ViewTree, and call the addView method to add the ViewTree to the empty window object. After adding the Viewtree object, call the invalidate method to force rendering and refresh the page, and get the reconstructed page corresponding to the current display page of the remote device.
[0166] In one embodiment, device remote debugging can be achieved through three-way interaction between the debugging device, the remote device, and the cloud server. Fig.13As shown, the debugger opens the application corresponding to the remote device operating software on one end of the debugging device. When the application is started, the debugging device can obtain the current list of remote devices to be debugged from the cloud server through the remote device operating software. Then, the debugger selects the remote device to be debugged from the remote device list. The debugging device sends the device ID of the remote device to the cloud server and requests the cloud server to establish a link with the remote device. The cloud server finds the corresponding device intranet address (ip: port) through the device ID, and starts the remote device service to establish a long link with the remote device. After the long link between the cloud server and the remote device is successfully established, the debugging device is notified to synchronize the link status. Then, the debugging device initiates a request to obtain page information. The cloud server sends the page information acquisition request to the corresponding remote device.
[0167] After receiving the page information acquisition request, the remote device starts WindowHookService (window hook service), obtains the ViewTree, ViewTree nodes and node attribute values of the current display page of the remote device through the WindowManager of the Hook system, and obtains the page information that matches the current display page; at the same time, page update event monitoring is added. In this way, when the remote device page update event is triggered, the latest page information can be collected. After the remote device obtains the page information, it reports the page information to the cloud server through Http. The cloud service encrypts the page information and forwards the encrypted information to the debugging device.
[0168] The debugging device receives the encrypted information forwarded by the cloud server and decrypts the information; uses the decrypted page information to construct a view object, fills in the properties of the view object, adds it to the window, calls the forced rendering method to render the page, and obtains a reconstructed page that matches the current display page of the remote device.
[0169] After the page rendering is completed, the debugging device can provide an Input Channel Proxy to replace the original Input Channel by hooking the InputChannel object of the Window Manager, so as to monitor the debugging operations of the debugger on the reconstructed page, and then collect the corresponding operation information, and obtain the corresponding operation parameters by processing the operation information. Exemplarily, when the debugging device triggers a touch event, the system will call back the event to the InputQueue of the InputChannelProxy, and collect the touch events of the debugging device by taking out the touch events from the InputQueue. After the debugging operation event collection of the debugging device is completed, the determined operation parameters will be forwarded to the corresponding remote device through the cloud server. The remote device handles the operation parameters in a similar way to the page information. The cloud server encrypts and transmits the data, and the receiving end decrypts the data.
[0170] After receiving the operation parameters from the debugging device, the remote device starts InputInjectService. InputInjectServiec selects different Event nodes according to the event type corresponding to the operation parameters, writes the operation parameters into the corresponding type of nodes, and completes the triggering of the operation event corresponding to the operation parameters on the remote device. After the remote device event is triggered, if it causes a page change, the page update event monitoring can be used to obtain the updated page information, and the subsequent page information synchronization process can be triggered to achieve page refresh of the debugging device.
[0171] Using the device remote debugging method provided in this application, on the one hand, compared with the video streaming transmission method, it is possible to reduce the server bandwidth occupancy to 1 / 50 of the original bandwidth; on the other hand, by directly collecting the debugger's interaction data (touch, buttons, etc.) through the debugging device, it is possible to solve the problems of false touch and inaccurate touch, thereby improving the debugging efficiency while improving the accuracy of the debugging results.
[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0173] Based on the same inventive concept, the embodiment of the present application also provides a device remote debugging apparatus for implementing the device remote debugging method involved above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more device remote debugging apparatus embodiments provided below can refer to the limitations of the device remote debugging method above, and will not be repeated here.
[0174] In one embodiment, Fig.14 As shown, a device remote debugging apparatus 1400 is provided, comprising: a page information acquisition module 1401, a view structure analysis module 1402, a page reconstruction module 1403 and an operation parameter sending module 1404, wherein:
[0175] The page information acquisition module 1401 is used to acquire page information matching the currently displayed page of the remote device;
[0176] The view structure analysis module 1402 is used to perform view structure analysis on the current display page based on the page information, and determine the multiple views included in the current display page and the hierarchical relationship between the views;
[0177] A page reconstruction module 1403 is used to reconstruct a page based on multiple views according to the hierarchical relationship between the views, and generate a reconstructed page corresponding to the currently displayed page;
[0178] The operation parameter sending module 1404 is used to send the operation parameters matching the debugging operation to the remote device in response to the debugging operation on the reconstructed page, so that the remote device triggers the operation event corresponding to the operation parameters on the current display page.
[0179] In one embodiment, the page information acquisition module 1401 is specifically used to: acquire encrypted page information matching the currently displayed page of the remote device; and decrypt the encrypted page information to obtain page information matching the currently displayed page.
[0180] In one embodiment, the page information includes initial page information and updated page information. In this embodiment, the view structure analysis module 1402 is specifically used to: determine the initial view tree of the initial page corresponding to the current display page based on the initial page information; update the initial view tree based on the updated page information to obtain an updated view tree representing multiple views included in the current display page and the hierarchical relationship between the views. The initial view tree is used to represent multiple initial views included in the initial page and the hierarchical relationship between the initial views.
[0181] In one embodiment, the page reconstruction module 1403 includes: a view element determination unit, used to determine the view elements corresponding to each view; a relative position determination unit, used to determine the relative positions between the view elements based on the hierarchical relationship between the views; and a reconstruction unit, used to perform page reconstruction processing using each view element according to the relative position, and generate a reconstructed page corresponding to the currently displayed page.
[0182] In one embodiment, the reconstruction unit is specifically used to: add each view element to the original page matching the current display page according to the relative position to obtain the view page; render the view page to obtain the reconstructed page corresponding to the current display page.
[0183] In one embodiment, the operation parameter sending module 1404 is specifically used to: in response to a debugging operation on a reconstructed page, add the operation information of the debugging operation to the information queue; obtain each operation information in sequence according to the order of each operation information in the information queue; based on the obtained operation information, send the operation parameters matching the operation information to the remote device.
[0184] In one embodiment, there are multiple remote devices, and the current display page of each remote device is the same. In this embodiment, the device remote debugging apparatus 1400 further includes: a page update module, which is used to obtain the update page information of each remote device when the triggering operation event causes the current display page to change the view, and update the reconstruction page corresponding to the remote device based on the update page information; a debugging result determination module, which is used to determine the debugging result of each remote device based on the reconstruction page corresponding to each remote device.
[0185] In one embodiment, Fig.15 As shown, a device remote debugging apparatus 1500 is provided, comprising: a page information determination module 1501, an information sending module 1502 and an event triggering module 1503, wherein:
[0186] The page information determination module 1501 is used to determine the page information matching the currently displayed page;
[0187] The information sending module 1502 is used to send page information to the debugging device; the page information is used to generate a reconstructed page corresponding to the current display page; the views contained in the reconstructed page and the current display page are the same, as well as the hierarchical relationship between the views;
[0188] The event triggering module 1503 is used to obtain the operation parameters fed back by the debugging device, and trigger an operation event corresponding to the operation parameters on the current display page; the operation parameters match the debugging operation for the reconstructed page.
[0189] In one embodiment, the page information determination module 1501 is specifically used to: obtain the initial page information of the initial page; in response to a page update event switching from the initial page to the currently displayed page, obtain the updated page information matching the currently displayed page; and determine the page information including the initial page information and the updated page information.
[0190] In one embodiment, the device remote debugging apparatus 1500 also includes an event injection module, which is used to: send an event in response to an operation parameter, determine multiple candidate nodes for carrying the operation parameter; based on the parameter type of the operation parameter, determine an event node that matches the parameter type from each candidate node; write the operation parameter into the event node to obtain an operation event that matches the operation parameter.
[0191] Each module in the above-mentioned device remote debugging apparatus can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0192] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.16As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the remote debugging process of the above-mentioned device. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a device remote debugging method is implemented.
[0193] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.17 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a device remote debugging method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0194] Those skilled in the art will understand that Fig.16 and Fig.17The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0195] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0196] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0197] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in the above method embodiments.
[0198] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions and areas. In addition, the subject can choose not to authorize the subject information and related data, or refuse or conveniently refuse to push information, etc.
[0199] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0200] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0201] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A device remote debugging method, characterized in that: The method comprises: Get the page information that matches the currently displayed page of the remote device; Performing a view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views; Reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page; In response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation is sent to the remote device, so that the remote device triggers an operation event corresponding to the operation parameter on the currently displayed page.
2. The method according to claim 1, characterized in that The page information includes initial page information and updated page information; The performing view structure analysis on the currently displayed page based on the page information to determine a plurality of views included in the currently displayed page and a hierarchical relationship between the views includes: Based on the initial page information, determining an initial view tree of the initial page corresponding to the currently displayed page; the initial view tree is used to represent multiple initial views included in the initial page and the hierarchical relationship between the initial views; The initial view tree is updated based on the update page information to obtain an updated view tree representing multiple views included in the current display page and the hierarchical relationship between the views.
3. The method according to claim 1, characterized in that The step of reconstructing a page based on the multiple views according to the hierarchical relationship between the views to generate a reconstructed page corresponding to the currently displayed page includes: Determine the view elements corresponding to each of the views; Determining relative positions of elements of each view based on a hierarchical relationship between the views; According to the relative positions, each of the view elements is used to perform page reconstruction processing to generate a reconstructed page corresponding to the currently displayed page.
4. The method according to claim 3, characterized in that The step of performing page reconstruction processing using each of the view elements according to the relative positions to generate a reconstructed page corresponding to the currently displayed page includes: According to the relative position, each of the view elements is added to an original page matching the currently displayed page to obtain a view page; The view page is rendered to obtain a reconstructed page corresponding to the currently displayed page.
5. The method according to claim 1, characterized in that The acquiring of page information matching the currently displayed page of the remote device includes: Get the encrypted page information that matches the current display page of the remote device; The encrypted page information is decrypted to obtain page information matching the currently displayed page.
6. The method according to any one of claims 1 to 5, characterized in that In response to the debugging operation on the reconstructed page, sending an operation parameter matching the debugging operation to the remote device includes: In response to a debugging operation on the reconstructed page, adding operation information of the debugging operation to an information queue; Obtaining each piece of operation information in sequence according to the respective order of each piece of operation information in the information queue; Based on the acquired operation information, an operation parameter matching the operation information is sent to the remote device.
7. The method according to any one of claims 1 to 5, characterized in that There are multiple remote devices, and the current display page of each remote device is the same; The method further comprises: For each of the remote devices, when the operation event is triggered to cause the view of the currently displayed page to change, acquiring update page information of the remote device, and updating the reconstruction page corresponding to the remote device based on the update page information; Based on the reconstruction pages corresponding to the remote devices, respective debugging results of the remote devices are determined.
8. A device remote debugging method, characterized in that: The method comprises: Determine the page information that matches the currently displayed page; Sending the page information to a debugging device; the page information is used to generate a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views; An operation parameter fed back by the debugging device is acquired, and an operation event corresponding to the operation parameter is triggered on the current display page; the operation parameter matches the debugging operation for the reconstructed page.
9. The method according to claim 8, characterized in that The determining of page information matching the currently displayed page includes: Get the initial page information of the initial page; In response to a page update event of switching from the initial page to the currently displayed page, acquiring update page information matching the currently displayed page; Page information including the initial page information and the updated page information is determined.
10. The method according to claim 8, characterized in that The method further comprises: In response to an operation parameter sending event, determining a plurality of candidate nodes for carrying the operation parameters; Based on the parameter type of the operation parameter, determining an event node matching the parameter type from each of the candidate nodes; The operation parameters are written into the event node to obtain an operation event matching the operation parameters.
11. A device remote debugging system, characterized in that: The system includes a debugging device, and a remote device debugged by the debugging device; The remote device determines page information matching the currently displayed page, and sends the page information to the debugging device; The debugging device acquires the page information, performs view structure analysis on the currently displayed page based on the page information, determines multiple views included in the currently displayed page and the hierarchical relationship between the views, reconstructs the page based on the multiple views according to the hierarchical relationship between the views, and generates a reconstructed page corresponding to the currently displayed page; The debugging device also sends, in response to the debugging operation on the reconstructed page, an operation parameter matching the debugging operation to the remote device; The remote device obtains the operation parameter, and triggers an operation event corresponding to the operation parameter on the current display page.
12. The system according to claim 11, characterized in that The system also includes a server; The server sends device information of the device to be debugged to the debugging device; The debugging device determines a remote device to be debugged from the devices to be debugged, and feeds back device information of the remote device to the server; The server establishes a communication connection with the remote device based on the device information of the remote device; The debugging device obtains page information matching the currently displayed page of the remote device through the server.
13. A device remote debugging apparatus, characterized in that: The device comprises: A page information acquisition module, used to acquire page information matching the currently displayed page of the remote device; A view structure analysis module, configured to perform view structure analysis on the currently displayed page based on the page information, and determine a plurality of views included in the currently displayed page, and a hierarchical relationship between the views; A page reconstruction module, configured to perform page reconstruction based on the multiple views according to the hierarchical relationship between the views, and generate a reconstructed page corresponding to the currently displayed page; The operation parameter sending module is used to send the operation parameters matching the debugging operation to the remote device in response to the debugging operation on the reconstructed page, so that the remote device triggers the operation event corresponding to the operation parameter on the current display page.
14. A device remote debugging apparatus, characterized in that: The device comprises: A page information determination module, used to determine page information matching the currently displayed page; An information sending module, used for sending the page information to a debugging device; the page information is used for generating a reconstructed page corresponding to the currently displayed page; the views contained in the reconstructed page and the currently displayed page are the same, as well as the hierarchical relationship between the views; An event triggering module is used to obtain the operation parameters fed back by the debugging device, and trigger an operation event corresponding to the operation parameters on the current display page; the operation parameters match the debugging operation for the reconstructed page.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
