Method, electronic device and storage medium for reading device log in remote debugging

By reading device logs in the smart home system, the problem of difficulty in locating device faults in the smart home system is solved, debugging efficiency is improved, and rapid fault location is achieved.

CN115529200BActive Publication Date: 2024-10-29QINGDAO HAIER INTELLIGENT HOME APPLIANCE TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210237897.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2024-10-29
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

In smart home systems, it is difficult to locate equipment faults, resulting in low debugging efficiency. Especially during remote debugging, it is difficult for professional technicians to quickly locate problems because user descriptions are not accurate enough and surface problems may correspond to multiple faults.

Method used

By reading device logs in remote debugging, monitor the connection between the server and the device, receive log reading instructions, transmit and execute the log reading instructions, obtain device logs, and send the logs to the Web for analysis by professional technicians .

Benefits of technology

It improves debugging efficiency, helps professional technicians quickly locate equipment faults, and reduces the need for on-site debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115529200B_ABST
    Figure CN115529200B_ABST
Patent Text Reader

Abstract

The present application relates to the field of smart home technology, and discloses a method for reading device logs in remote debugging. The method includes: the server monitors the current connection between the server and the first APP of the current device and obtains the current session control of the current connection; the Web end obtains the log reading instruction; the Web end sends the log reading instruction to the server; the server sends the log reading instruction to the current device through the current session control; the current device monitors the current connection between the first APP and the server through the second APP; after the current device monitors the log reading instruction sent by the server through the second APP, the log reading instruction is executed to obtain the device log corresponding to the log reading instruction; the current device sends the device log to the server through the current connection; the Web end receives and displays the device log sent by the server. The use of this method is conducive to improving debugging efficiency. The present application also discloses an electronic device and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and for example, to a method for reading device logs in remote debugging, an electronic device, and a storage medium. Background Art

[0002] At present, with the popularization of smart homes, more and more smart devices are connected to personal homes. Multiple smart devices are connected to the server. The server is configured with multiple control programs corresponding to the smart home system to realize the control of multiple smart devices and bring a more comfortable experience to users.

[0003] In actual application, different households have different server configuration parameters, different types and models of smart devices connected to the server, and different control programs of smart home systems. When a new smart device is connected to a personal home, or when the server configuration parameters are changed, or when the control program of the smart home system is changed, the smart home system often fails, causing one or more smart devices in the smart home system to fail to operate normally. In this case, professional technicians are required to provide remote guidance, and if necessary, professional technicians are required to go on site for debugging to ensure the normal operation of the smart home system.

[0004] In the process of implementing the embodiments of the present application, it is found that there are at least the following problems in the related technology:

[0005] During the remote guidance process, professional technicians usually draw conclusions based on their own experience and the surface problems described by users. On the one hand, the user's description of the surface problem is not accurate enough, and on the other hand, one surface problem usually corresponds to multiple faults, which increases the difficulty for professional technicians to locate the fault and reduces the debugging efficiency. Summary of the invention

[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0007] The embodiments of the present application provide a method, electronic device and storage medium for reading device logs during remote debugging, so as to read the log files of the device, provide a basis for professional technicians to locate device failures, and improve debugging efficiency.

[0008] In some embodiments, a method for reading device logs in remote debugging is applied to a server, and the method for reading device logs in remote debugging includes: when debugging the current device, monitoring the current connection between the server and a first application (Application, APP) of the current device, and obtaining the current session control (session) of the current connection; receiving a log reading instruction sent by a global wide area network (Web) end; sending the log reading instruction to the current device through the current session control, so that a second APP of the current device that monitors the current session control obtains and executes the log reading instruction to obtain a device log corresponding to the log reading instruction; receiving the device log through the current session control, and sending the device log to the Web end.

[0009] Optionally, after obtaining the current session control of the current connection, the method for reading device logs in remote debugging also includes: storing the current session control to a remote dictionary service (Redis); before sending the log reading instruction to the current device through the current session control, the method for reading device logs in remote debugging also includes: obtaining the current session control in the Redis.

[0010] Optionally, the confirmation of the current connection includes: monitoring multiple connections between the server and the device, and obtaining a device identifier corresponding to each connection; and determining the connection corresponding to the device identifier of the current device as the current connection.

[0011] In some embodiments, a method for reading device logs in remote debugging is applied to a Web side, and the method for reading device logs in remote debugging includes: when debugging the current device, obtaining a log reading instruction; sending the log reading instruction to a server, so that the server sends the log reading instruction to the current device through a current session control, and then the second APP of the current device that monitors the current connection obtains and executes the log reading instruction to obtain a device log corresponding to the log reading instruction, and sends the device log to the server; the current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device; receiving and displaying the device log sent by the server.

[0012] Optionally, sending the log reading instruction to the server includes: sending the log reading instruction to the server via a HyperText Transfer Protocol (HTTP) instruction.

[0013] In some embodiments, a method for reading device logs in remote debugging is applied to the current device, and the method for reading device logs in remote debugging includes: when debugging the current device, monitoring the current connection between the first APP and the server through the second APP; after the second APP monitors the log reading instruction sent by the server, executing the log reading instruction to obtain the device log corresponding to the log reading instruction; wherein the log reading instruction is obtained by the Web end and sent to the server, and the server sends the log reading instruction to the current device through the current session control, and the current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device; sending the device log to the server through the current connection, so that the server sends the device log to the Web end, and the Web displays the device log.

[0014] Optionally, the second APP is loaded when debugging the current device.

[0015] In some embodiments, a method for reading a device log during remote debugging includes: when debugging the current device, the server monitors the current connection between the server and the first APP of the current device, and obtains the current session control of the current connection; the Web end obtains a log reading instruction; the Web end sends the log reading instruction to the server; the server sends the log reading instruction to the current device through the current session control; the current device monitors the current connection between the first APP and the server through a second APP; after the second APP monitors the log reading instruction sent by the server, the current device executes the log reading instruction to obtain a device log corresponding to the log reading instruction; the current device sends the device log to the server through the current connection; the server sends the device log to the Web end; the Web end displays the device log.

[0016] In some embodiments, the electronic device includes a processor and a memory storing program instructions, and the processor is configured to execute the method for reading device logs in remote debugging provided in the above embodiments when executing the program instructions.

[0017] In some embodiments, the storage medium stores program instructions, and the program instructions, when running, execute the method for reading device logs in remote debugging provided by the aforementioned embodiments.

[0018] The method, apparatus, and electronic device for reading device logs during remote debugging provided in the embodiments of the present application can achieve the following technical effects:

[0019] When debugging a smart device in a smart home (i.e., the current device), professional technicians can obtain an edit log reading instruction through the Web end. The log reading instruction is forwarded to the current device via the server. The current device executes the log reading instruction to locally read the device log corresponding to the log reading instruction. The device log is forwarded to the Web end via the server. In this way, professional technicians can obtain the device log of the current device through the Web end. The device log can assist professional technicians in performing fault analysis on the current device, facilitate professional technicians in locating the fault of the current device, and improve debugging efficiency.

[0020] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] One or more embodiments are exemplarily described by corresponding drawings, and these exemplary descriptions and drawings do not limit the embodiments. Elements with the same reference numerals in the drawings are regarded as similar elements, and wherein:

[0022] Figure 1 It is a schematic diagram of an implementation scenario of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0023] Figure 2 It is a flowchart of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0024] Figure 3 It is a flowchart of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0025] Figure 4 It is a flowchart of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0026] Figure 5 It is a flowchart of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0027] Figure 6 It is a flowchart of a method for reading device logs in remote debugging provided by an embodiment of the present application;

[0028] Figure 7 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to be able to understand the features and technical contents of the embodiments of the present application in more detail, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, in the absence of these details, one or more embodiments can still be implemented. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0030] The terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present application described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0031] Unless otherwise stated, the term "plurality" means more than two.

[0032] In the embodiment of the present application, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0033] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0034] Figure 1 It is a schematic diagram of an implementation scenario of a method for reading device logs in remote debugging provided in an embodiment of the present application.

[0035] like Figure 1 As shown, the implementation scenario includes three ends: a server 11, a Web end 12 and a current device 13; wherein the server 11 is communicatively connected with the Web end 12, and the server 11 is communicatively connected with the current device 13.

[0036] The server 11 may be an independent server or a server cluster, for example, a server cluster of websocket implemented by using Zookeeper or Nginx.

[0037] The above-mentioned Web terminal 12 refers to the Web terminal used by professional technicians during the debugging process;

[0038] The above-mentioned current device 13 refers to a smart device to be debugged, such as a smart refrigerator, a smart washing machine, a smart air conditioner, a smart switch panel, and a smart light. The smart devices listed here are only used to illustrate the current device 13, and do not constitute a specific limitation on the type of the current device 13. In actual application scenarios, technicians in this field can determine the current device 13 according to actual conditions.

[0039] The Web terminal 12 and the current device 13 are usually located in different geographical spaces, so professional technicians can obtain the device log of the current device 13 through the Web terminal, and accurately locate the fault of the current device 13 by analyzing the device log, thereby improving debugging efficiency.

[0040] The following takes the application of the method for reading device logs in remote debugging to a server as an example to exemplarily illustrate the method for reading device logs in remote debugging.

[0041] Combination Figure 2 As shown in the figure, the methods for reading device logs in remote debugging include:

[0042] S201. When debugging the current device, monitor the current connection between the server and the first APP of the current device, and obtain the current session control of the current connection.

[0043] The current device includes a first APP and a second APP. The first APP is used to support the device function of the current device. The functions of the first APP in different devices are also different. For example, when the current device is a smart switch panel, the device function of the smart switch panel is to realize power on and off control, then the first APP can have a switch function; when the current device is a smart lamp, the device function of the smart lamp is brightness adjustment and color change, then the first APP has the function of adjusting brightness and changing light color.

[0044] The second APP is used to support the debugging function of the current device and monitor the connection between the current device and the server through the first APP. The second APPs in different devices can have the same function. In some application scenarios, when debugging the current device, the current device loads the second APP (for example, the user opens the second APP). After the debugging is completed, the current device clears the relevant data of the second APP in the running memory, reducing the memory demand of the current device.

[0045] The current connection between the server and the first APP of the current device may be a Websocket. In the embodiment of the present application, the default server has started the Websocket service, for example, the websocket service can be started by Netty.

[0046] In actual applications, the server can communicate with multiple devices, that is, the server has established connections with multiple devices. In this case, the confirmation of the current connection may include: monitoring multiple connections between the server and the device, and obtaining the device identification corresponding to each connection; determining the connection corresponding to the device identification of the current device as the current connection, for example, searching the device identification of the current device from multiple device identifications, and after retrieving the device identification of the current device, determining the connection corresponding to the device identification of the current device as the current connection.

[0047] The device identifier here is used to distinguish between devices, and can be a digital identifier, an English identifier, or a combination of digital and English identifiers. Alternatively, the device identifier can also be the device Internet Protocol (IP) address, or the Media Access Control Address (MAC).

[0048] In some specific applications, when debugging the current device, the server determines whether there is a connection: if so, it monitors the current connection between the server and the first APP of the current device, and obtains the current session control of the current connection; otherwise, it prompts the Web end to feedback the corresponding error prompt. For example, the error prompt can be a confirmation prompt whether the faulty smart device is turned on.

[0049] By adopting the above technical solution, the current connection can be determined among multiple connections.

[0050] S202: Receive a log reading instruction sent by the Web client.

[0051] The log reading instruction can be executed by the current device, and the execution result is the device log corresponding to the log reading instruction. The log reading instruction can be used to read logs of a specific level, for example, the log reading instruction can be used to read fatal logs, error logs, warning logs, information logs, or debug logs.

[0052] In practical applications, the log reading instruction may be an Android Debug Bridge (ADB) instruction. For example, when the log reading instruction is adblogcat-v time-scom.XXX.XXX:E, the log information of the time and the level of error may be printed.

[0053] The log reading instruction may be sent by the Web end through an HTTP instruction.

[0054] S203: Send the log reading instruction to the current device through the current session control.

[0055] The log reading instruction can enable the second APP of the current device that monitors the current session control to obtain and execute the log reading instruction to obtain the device log corresponding to the log reading instruction.

[0056] The current device has a first APP and a second APP. After debugging the current device, the second APP monitors the connection between the first APP and the server. When the APP monitors other instructions and data of non-log reading instruction types (such as non-adb instructions), the second APP ignores these other instructions and data of non-log reading instruction types; when the server sends the log reading instruction to the current device through the current session control, the second APP can monitor the log reading instruction, the second APP obtains the log reading instruction and enables the current device to execute the log reading instruction to obtain the device log corresponding to the log reading instruction.

[0057] S204: receiving device logs through the current session control, and sending the device logs to the Web end.

[0058] The server can send the device log to the Web end through HTTP instructions. Of course, after the server receives the device log, it can also store the device log.

[0059] When debugging a smart device in a smart home (i.e., the current device), professional technicians can obtain an edit log reading instruction through the Web end. The log reading instruction is forwarded to the current device via the server. The current device executes the log reading instruction to locally read the device log corresponding to the log reading instruction. The device log is forwarded to the Web end via the server. In this way, professional technicians can obtain the device log of the current device through the Web end. The device log can assist professional technicians in performing fault analysis on the current device, facilitate professional technicians in locating the fault of the current device, and improve debugging efficiency.

[0060] Combination Figure 3 As shown in the figure, the methods for reading device logs in remote debugging include:

[0061] S301. When debugging the current device, monitor the current connection between the server and the first APP of the current device, and obtain the current session control of the current connection.

[0062] S302: Store the current session control in Redis.

[0063] S303: Receive a log reading instruction sent by the Web client.

[0064] S304: Get the current session control in Redis.

[0065] S305: Send the log reading instruction to the current device through the current session control.

[0066] The log reading instruction can enable the second APP of the current device that monitors the current session control to obtain and execute the log reading instruction to obtain the device log corresponding to the log reading instruction.

[0067] S306: receiving device logs through the current session control, and sending the device logs to the Web end.

[0068] In the process of reading device logs, it is usually necessary to read multiple times. When reading the device logs for the first time, the current session control is stored in Redis. Each subsequent time the device logs are read, the current session control can be obtained from Redis without repeatedly obtaining the current session control of the current connection, thereby improving the reading efficiency of the device logs. In addition, the current session control is stored in Redis. After the adjustment is completed, Redis releases the current session control to reduce memory usage.

[0069] The following takes the application of the method for reading device logs in remote debugging to the Web end as an example to exemplarily illustrate the method for reading device logs in remote debugging.

[0070] Combination Figure 4 As shown in the figure, the methods for reading device logs in remote debugging include:

[0071] S401. When debugging the current device, obtain a log reading instruction.

[0072] The log reading instruction may be a log reading instruction obtained by the Web end in response to the operation of a professional technician. For example, the Web end provides a text input box. After the professional technician enters relevant text, the Web end reads the text in the text input box to obtain the log reading instruction.

[0073] S402: Send the log reading instruction to the server.

[0074] The log reading instruction can enable the server to send the log reading instruction to the current device through the current session control, so that the second APP of the current device that monitors the current connection obtains and executes the log reading instruction to obtain the device log corresponding to the log reading instruction, and send the device log to the server; the current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device.

[0075] Optionally, sending the log reading instruction to the server includes: sending the log reading instruction to the server via an HTTP instruction.

[0076] S403: Receive and display the device log sent by the server.

[0077] Display the device instructions to assist professional technicians in locating faults of the current device.

[0078] When debugging a smart device in a smart home (i.e., the current device), professional technicians can obtain an edit log reading instruction through the Web end. The log reading instruction is forwarded to the current device via the server. The current device executes the log reading instruction to locally read the device log corresponding to the log reading instruction. The device log is forwarded to the Web end via the server. In this way, professional technicians can obtain the device log of the current device through the Web end. The device log can assist professional technicians in performing fault analysis on the current device, facilitate professional technicians in locating the fault of the current device, and improve debugging efficiency.

[0079] The following takes the method of reading a device log in remote debugging as an example and applies it to the current device to illustrate the method of reading a device log in remote debugging.

[0080] Combination Figure 5 As shown in the figure, the methods for reading device logs in remote debugging include:

[0081] S501. When debugging the current device, monitor the current connection between the first APP and the server through the second APP.

[0082] In some application scenarios, when a smart device in a user's home malfunctions, the user can seek help from professional technicians. When debugging the current device, the user can assist in opening the second APP on the current device, so that the current device can load the second APP and realize the function of monitoring the current connection between the first APP and the server through the second APP.

[0083] S502: After the second APP monitors the log reading instruction sent by the server, it executes the log reading instruction to obtain the device log corresponding to the log reading instruction.

[0084] Among them, the log reading instruction is obtained by the Web end and sent to the server. The server sends the log reading instruction to the current device through the current session control. The current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device.

[0085] After the current device executes the log reading instruction, the execution result is to output a log of a specific level corresponding to the log reading instruction, thereby realizing the reading of the log of a specific level by using the log reading instruction.

[0086] S503: Send the device log to the server through the current connection, so that the server sends the device log to the Web end, and the Web displays the device log.

[0087] When debugging a smart device in a smart home (i.e., the current device), professional technicians can obtain an edit log reading instruction through the Web end. The log reading instruction is forwarded to the current device via the server. The current device executes the log reading instruction to locally read the device log corresponding to the log reading instruction. The device log is forwarded to the Web end via the server. In this way, professional technicians can obtain the device log of the current device through the Web end. The device log can assist professional technicians in performing fault analysis on the current device, facilitate professional technicians in locating the fault of the current device, and improve debugging efficiency.

[0088] The following is an example of how to read device logs during remote debugging from the perspective of the interaction between the server, the Web end, and the current device.

[0089] Combination Figure 6 As shown in the figure, the methods for reading device logs in remote debugging include:

[0090] S601. When debugging the current device, the server monitors the current connection between the server and the first APP of the current device, and obtains the current session control of the current connection.

[0091] S602: The Web end obtains a log reading instruction.

[0092] S603: The Web client sends the log reading instruction to the server.

[0093] S604: The server sends the log reading instruction to the current device through the current session control.

[0094] S605: The current device monitors the current connection between the first APP and the server through the second APP.

[0095] S606: After the second APP monitors the log reading instruction sent by the server, the current device executes the log reading instruction to obtain the device log corresponding to the log reading instruction.

[0096] S607: The current device sends the device log to the server through the current connection.

[0097] S608: The server sends the device log to the Web client.

[0098] S609. The web terminal displays the device log.

[0099] In the above embodiment, the smart device in the smart home is used as the current device to exemplify the method of reading the device log in remote debugging. Of course, the current device in the embodiment of the present application can also be other devices with similar network functions as the smart device in the smart home, such as industrial devices in the industrial Internet of Things.

[0100] In some embodiments, the electronic device includes a processor and a memory storing program instructions, and the processor is configured to execute the method for reading device logs in remote debugging provided in the above embodiments when executing the program instructions.

[0101] Figure 7 is a schematic diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic equipment includes:

[0102] The processor 71 and the memory 72 may also include a communication interface 73 and a bus 74. The processor 71, the communication interface 73, and the memory 72 may communicate with each other through the bus 74. The communication interface 73 may be used for information transmission. The processor 71 may call the logic instructions in the memory 72 to execute the method for reading device logs in remote debugging provided in the aforementioned embodiment.

[0103] In addition, the logic instructions in the above-mentioned memory 72 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0104] The memory 72 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 71 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 72, that is, implementing the methods in the above method embodiments.

[0105] The memory 72 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 72 may include a high-speed random access memory and may also include a non-volatile memory.

[0106] An embodiment of the present application provides a storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the method for reading device logs in remote debugging provided in the aforementioned embodiment.

[0107] An embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method for reading device logs in remote debugging provided by the aforementioned embodiment.

[0108] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0109] The technical solution of the embodiment of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in the embodiment of the present application. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0110] The above description and the accompanying drawings fully illustrate the embodiments of the present application so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms as well. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0111] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0112] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units can be only a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0113] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and a part of a module, program segment or code includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, which can depend on the functions involved. Each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs the function or action of the specification, or can be realized by a combination of special-purpose hardware and computer instructions.

Claims

1. A method for reading device logs in remote debugging, characterized in that: Applied to a server, the method comprises: When debugging the current device, monitoring the current connection between the server and the first APP of the current device, and obtaining the current session control of the current connection; wherein the first APP is used to support the device function of the current device; Receive log reading instructions sent by the Web client; The log reading instruction is sent to the current device through the current session control, so that the second APP of the current device that monitors the current session control obtains and executes the log reading instruction to obtain the device log corresponding to the log reading instruction; wherein the second APP is used to support the debugging function of the current device; after the debugging is completed, the current device clears the relevant data of the second APP in the running memory; The device log is received through the current session control, and the device log is sent to the Web end.

2. The method according to claim 1, characterized in that After obtaining the current session control of the current connection, the method further includes: storing the current session control in Redis; Before sending the log reading instruction to the current device through the current session control, the method further includes: Get the current session control in the Redis.

3. The method according to claim 1, characterized in that: The confirmation of the current connection includes: Monitoring multiple connections between the server and the device, and obtaining a device identifier corresponding to each connection; A connection corresponding to the device identification of the current device is determined as the current connection.

4. A method for reading device logs in remote debugging, characterized in that: Applied to the Web side, the method includes: When debugging the current device, obtain the log reading instruction; Send the log reading instruction to the server, so that the server sends the log reading instruction to the current device through the current session control, so that the second APP of the current device that monitors the current connection obtains and executes the log reading instruction to obtain the device log corresponding to the log reading instruction, and sends the device log to the server; the current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device; wherein the first APP is used to support the device function of the current device, and the second APP is used to support the debugging function of the current device; after the debugging is completed, the current device clears the relevant data of the second APP in the running memory; Receive and display the device log sent by the server.

5. The method according to claim 4, characterized in that Sending the log reading instruction to the server includes: The log reading instruction is sent to the server via HTTP instruction.

6. A method for reading device logs in remote debugging, characterized in that: Applied to the current device, the method includes: When debugging the current device, the current connection between the first APP and the server is monitored by the second APP; wherein the first APP is used to support the device function of the current device, and the second APP is used to support the debugging function of the current device; after the debugging is completed, the current device clears the relevant data of the second APP in the running memory; After the second APP monitors the log reading instruction sent by the server, the log reading instruction is executed to obtain the device log corresponding to the log reading instruction; wherein the log reading instruction is obtained by the Web end and sent to the server, and the server sends the log reading instruction to the current device through the current session control, and the current session control is the current session control of the current connection obtained by the server monitoring the current connection between the server and the first APP of the current device; The device log is sent to the server through the current connection, so that the server sends the device log to the Web end, and the Web displays the device log.

7. The method according to claim 6, characterized in that When debugging the current device, load the second APP.

8. A method for reading device logs in remote debugging, characterized in that: include: When debugging the current device, the server monitors the current connection between the server and the first APP of the current device, and obtains the current session control of the current connection; wherein the first APP is used to support the device function of the current device; The Web end obtains the log reading instruction; The Web end sends the log reading instruction to the server; The server sends the log reading instruction to the current device through the current session control; The current device monitors the current connection between the first APP and the server through the second APP; wherein the second APP is used to support the debugging function of the current device; after the debugging is completed, the current device clears the relevant data of the second APP in the running memory; After the second APP monitors the log reading instruction sent by the server, the current device executes the log reading instruction to obtain the device log corresponding to the log reading instruction; The current device sends the device log to the server through the current connection; The server sends the device log to the Web client; The web terminal displays the device log.

9. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for reading device logs in remote debugging according to any one of claims 1 to 8 when executing the program instructions.

10. A storage medium storing program instructions, characterized in that: The program instructions execute the method for reading device logs in remote debugging according to any one of claims 1 to 8 when running.

Citation Information

Patent Citations

  • Terminal remote access control method

    CN110166547A