CN116383014A - Monitoring computer, software debugging method, software debugging system, medium and product - Google Patents

Monitoring computer, software debugging method, software debugging system, medium and product Download PDF

Info

Publication number
CN116383014A
CN116383014A CN202310650895.2A CN202310650895A CN116383014A CN 116383014 A CN116383014 A CN 116383014A CN 202310650895 A CN202310650895 A CN 202310650895A CN 116383014 A CN116383014 A CN 116383014A
Authority
CN
China
Prior art keywords
instruction
debugging
information
state
state information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310650895.2A
Other languages
Chinese (zh)
Other versions
CN116383014B (en
Inventor
李睿华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jidu Technology Co Ltd
Original Assignee
Beijing Jidu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jidu Technology Co Ltd filed Critical Beijing Jidu Technology Co Ltd
Priority to CN202310650895.2A priority Critical patent/CN116383014B/en
Publication of CN116383014A publication Critical patent/CN116383014A/en
Application granted granted Critical
Publication of CN116383014B publication Critical patent/CN116383014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a monitoring computer, a software debugging method, a software debugging system, a medium and a product, and belongs to the technical field of computers. The method comprises the following steps: encoding the first state information of the target machine and the second state information of the cloud host to obtain a state feature vector; calling an instruction prediction model, and processing the state feature vector to obtain a predicted debugging instruction; the method comprises the steps that a predicted debugging instruction is sent to a user host, and the predicted debugging instruction is used for triggering the user host to return a forward feedback instruction when forward selection operation of a user for the predicted debugging instruction is detected; and responding to the received forward feedback instruction, sending a predictive debugging instruction to the target machine, wherein the predictive debugging instruction is used for controlling the target machine to run the software to be debugged. According to the method and the device, when software debugging is carried out, a developer does not need to manually input complicated debugging instructions, the debugging instructions can be automatically given based on the first state information of the target machine and the second state information of the cloud host, and the debugging efficiency is improved.

Description

Monitoring computer, software debugging method, software debugging system, medium and product
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a monitoring computer, a software debugging method, a software debugging system, a medium, and a product.
Background
SOA (Service-Oriented Architecture, service oriented architecture) software belongs to embedded software. Embedded systems are a widely used class of real-time control systems, typically running on embedded processors or microcontrollers with stringent resource limitations. Most embedded systems do not have code writing and compiling conditions, and embedded software needs to be developed on a cloud host and run on a target machine. Since the development environment and the running environment are inconsistent, various problems, such as hardware faults, software vulnerabilities, performance problems and the like, are encountered in the development process of the SOA software, and therefore, the SOA software needs to be debugged.
When the SOA software is debugged, a developer logs in the target machine in an SSH (Secure Shell Protocol ) mode, a debugging instruction is manually input on the user host, and the user host sends the user-input debugging instruction to the target machine so as to control the target machine to run the test software, so that whether the SOA software has a problem is verified.
However, the above-mentioned debugging method requires a developer to manually input a large amount of debugging instructions, and the debugging efficiency is low.
Disclosure of Invention
The embodiment of the application provides a monitoring computer, a software debugging method, a software debugging system, a medium and a product, which can improve the debugging efficiency. The technical scheme is as follows:
in a first aspect, a monitoring computer is provided, the monitoring computer is applied to an embedded software development scene, the monitoring computer comprises a state acquisition module, a coding and decoding module, an instruction agent module and a calculation processing module, the state acquisition module and the instruction agent module are both connected with the coding and decoding module, and the coding and decoding module is connected with the calculation processing module;
the state acquisition module is used for acquiring first state information of the target machine at the current moment and second state information of the cloud host, and transmitting the first state information and the second state information to the encoding and decoding module;
the encoding and decoding module is used for encoding the first state information and the second state information to obtain a state characteristic vector, and sending the state characteristic vector to the calculation processing module;
The calculation processing module is used for calling an instruction prediction model, processing the state feature vector to obtain a prediction debugging instruction, and sending the prediction debugging instruction to the instruction proxy module;
the instruction agent module is used for sending the predicted debugging instruction to a user host, and sending the predicted debugging instruction to the target machine after receiving a forward feedback instruction returned by the user host for the predicted debugging instruction, wherein the predicted debugging instruction is used for controlling the target machine to run software to be debugged.
In another possible implementation manner, the state acquisition module is further configured to screen, based on a first information type, information generated in the operation process of the target machine at the current moment to obtain the first state information, and screen, based on a second information type, information generated in the operation process of the cloud host at the current moment to obtain the second state information.
In another possible implementation manner, the encoding and decoding module is specifically configured to perform hash computation on each type of information in the first state information to obtain a hash value corresponding to each type of information, and splice hash values corresponding to each type of information to obtain a first feature vector; carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector; and splicing the first characteristic vector and the second characteristic vector to obtain the state characteristic vector.
In another possible implementation manner, the state acquisition module is further configured to acquire sample first state information of the target machine and sample second state information of the cloud host at a historical moment, and send the sample first state information and the sample second state information to the codec module;
the instruction proxy module is also used for acquiring a sample debugging instruction input by a user on the user host at the historical moment and sending the sample debugging instruction to the encoding and decoding module;
the encoding and decoding module is further used for encoding the first state information of the sample and the second state information of the sample to obtain a sample state feature vector, encoding the sample debugging instruction to obtain a sample instruction vector, and sending the sample state feature vector and the sample instruction vector to the calculation processing module;
the computing processing module is also configured to train the instruction prediction model based on the sample state feature vector and the sample instruction vector.
In another possible implementation, the monitoring computer further includes: the information storage module is connected with the encoding and decoding module and the calculation processing module;
The information storage module is used for acquiring the state feature vector coded by the coding and decoding module and the instruction feature vector corresponding to each debugging instruction, and storing the state feature vector and the corresponding relation between each debugging instruction and the instruction feature vector;
the calculation processing module is specifically configured to invoke the instruction prediction model, process the state feature vector to obtain a predicted instruction feature vector, and obtain, based on the predicted instruction feature vector, the predicted debug instruction corresponding to the predicted instruction feature vector from the information storage module.
In another possible implementation manner, the instruction proxy module is further configured to obtain a debug instruction, and send the debug instruction to the codec module, where the debug instruction is input by a user after the user host detects a negative selection operation of the user on the predicted debug instruction;
the encoding and decoding module is also used for encoding the debugging instruction to obtain an instruction characteristic vector, and sending the instruction characteristic vector to the calculation processing module;
the information storage module is used for sending the state characteristic vector to the calculation processing module;
The calculation processing module is used for adjusting the model parameters of the instruction prediction model based on the instruction feature vector and the state feature vector to obtain an adjusted instruction prediction model, updating the instruction prediction model into the adjusted instruction prediction model, and the adjusted instruction prediction model is used for predicting a debugging instruction at the next moment.
In a second aspect, there is provided a software debugging method, the method being applied to the monitoring computer of the first aspect, the method comprising:
encoding the first state information of the target machine and the second state information of the cloud host to obtain a state feature vector;
calling an instruction prediction model, and processing the state feature vector to obtain a predicted debugging instruction;
the predicted debugging instruction is sent to a user host, and the predicted debugging instruction is used for triggering the user host to return a forward feedback instruction when detecting forward selection operation of a user on the predicted debugging instruction;
and responding to the received forward feedback instruction, sending the predicted debugging instruction to the target machine, wherein the predicted debugging instruction is used for controlling the target machine to run software to be debugged.
In another possible implementation manner, the encoding the first state information of the target machine and the second state information of the cloud host to obtain the state feature vector includes:
carrying out hash calculation on each type of information in the first state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a first feature vector;
carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector;
and splicing the first characteristic vector and the second characteristic vector to obtain the state characteristic vector.
In another possible implementation manner, before the calling the instruction prediction model and processing the state feature vector, the method further includes:
acquiring sample first state information of the target machine at historical moment, sample second state information of the cloud host and a sample debugging instruction input by a user on the user host;
encoding the first state information of the sample and the second state information of the sample to obtain a sample state feature vector, and encoding the sample debugging instruction to obtain a sample instruction vector;
The instruction prediction model is trained based on the sample state feature vector and sample instruction vector.
In another possible implementation, the method further includes:
acquiring a debugging instruction, wherein the debugging instruction is input by a user after the user host detects negative selection operation of the user on the predicted debugging instruction;
and sending the debugging instruction to the target machine, wherein the debugging instruction is used for controlling the target machine to run the software to be debugged.
In another possible implementation manner, after the obtaining the debug instruction, the method further includes:
encoding the debugging instruction to obtain an instruction feature vector;
based on the instruction feature vector and the state feature vector, adjusting model parameters of the instruction prediction model to obtain an adjusted instruction prediction model;
updating the instruction prediction model to the adjusted instruction prediction model;
and predicting a debugging instruction at the next moment based on the adjusted instruction prediction model.
In a third aspect, a software debugging system is provided, where the system includes a monitoring computer, a target machine, a cloud host and a user host, where the target machine, the cloud host and the user host are respectively connected with the monitoring computer;
The monitoring computer is as described in the first aspect;
the target machine is used for collecting first state information of the target machine, sending the first state information to the monitoring computer and receiving the prediction debugging instruction sent by the monitoring computer;
the cloud host is used for collecting second state information of the cloud host and sending the second state information to the monitoring computer;
the user host is used for receiving the predicted debugging instruction sent by the monitoring computer, and returning a forward feedback instruction to the monitoring computer when detecting forward selection operation of a user on the predicted debugging instruction.
In a fourth aspect, an electronic device is provided, the electronic device comprising a memory and a processor, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the software debugging method according to the first aspect.
In a fifth aspect, there is provided a computer readable storage medium having stored therein at least one computer program capable of implementing the software debugging method according to the first aspect when executed by a processor.
In a sixth aspect, a computer program product is provided, the computer program product comprising a computer program capable of implementing the software debugging method according to the first aspect when being executed by a processor.
The beneficial effects that technical scheme that this application embodiment provided brought are:
under the embedded software development scene, acquiring first state information of a target machine running embedded software at the current moment and second state information of a cloud host for compiling the embedded software, encoding the first state information and the second state information into state feature vectors which can be identified by an instruction prediction model, further processing the state feature vectors by calling the instruction prediction model, automatically giving a prediction debugging instruction, and receiving a forward feedback instruction sent by a developer through a user host, namely, the developer considers that the prediction debugging instruction is correct, and directly sending the prediction debugging instruction to the target machine. Because the developer does not need to manually input complicated debugging instructions, the debugging efficiency is improved. Furthermore, errors in the process of inputting the debugging instruction by a developer are avoided, so that errors are reported wrongly, and the debugging accuracy of the embedded software is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a monitoring computer according to an embodiment of the present application;
FIG. 2 is a schematic diagram of another monitoring computer according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a software debug system according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another software debug system according to an embodiment of the present application;
FIG. 5 is a flowchart of a software debugging method provided in an embodiment of the present application;
FIG. 6 is a flowchart of a software debugging method provided in an embodiment of the present application;
fig. 7 shows a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It will be understood that, as used in the embodiments of the present application, the terms "each," "plurality," and "any" and the like, a plurality includes two or more, each refers to each of the corresponding plurality, and any refers to any of the corresponding plurality. For example, the plurality of words includes 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.
Information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals referred to herein are user-authorized or fully authorized by parties, and the collection, use, and processing of relevant data requires compliance with relevant laws and regulations and standards of the relevant country and region. For example, the positive selection operation of the user, the negative selection operation of the user and the debug instruction input by the user are all acquired under the condition of full authorization.
In general-purpose computer software development, the development environment is substantially the same as the execution environment. In contrast, most embedded systems do not have code writing and compiling conditions, and software development cannot be performed on the embedded systems, and cross compiling is required, so that the development environment and the running environment are inconsistent. Where cross-compilation refers to the generation of code on one platform that can run on another platform. The development environment refers to a cloud host for compiling, linking and addressing processes; the operating environment refers to a target machine that runs embedded software.
Debugging is an important step in the embedded development process, and because of factors such as resource limitation, an embedded system is difficult to directly run a debugger, and a cross debugging mode is generally adopted, namely, library files or executable files of a target machine are compiled on a cloud host, and the library files or executable files are run on the target machine.
In summary, the debugging process comprises the steps of:
first, compiling corresponding library files and executable files in a cross-compiling environment of the cloud host, for example, after executing a make xxx command on the cloud host, obtaining library files or executable files such as libsoaa.so, libsoab.so, libsoac.so, test_server, test_client and the like.
And a second step of transmitting all or part of the library file or the executable file to the corresponding target machine and storing the library file or the executable file to the designated position of the target machine. For example, when the libsoab.so file requires debugging, a developer inputs a debugging instruction: "cd/data/src/soa/out/target/sa 515/", "scp libsoab.so @192.168.1.31/mnt/sdcard/lib/", sends the libsoab.so file to the corresponding target machine (e.g., the/mnt/sdcard/directory of the target machine M1) to replace the original libsoab.so file.
Thirdly, remotely logging in the target machine in an SSH mode, sending a debugging instruction to the corresponding target machine in the SSH mode, and running software to be debugged by each target machine. For example, when the SSH window 1 is connected to the target machine M1 and the SSH window 2 is connected to the target machine M2, a debug instruction is input into the SSH window 1: "cd/mnt/sdcard/", "export ld_library_path=/lib", "/bin/test_server", a debug instruction is input in SSH window 2: "cd/mnt/sdcard/", "export ld_LIBRARY_PATH=/lib", "/bin/test_client", and thus the debug instruction input in SSH window 1 is sent to target machine M1, and the debug instruction input in SSH window 2 is sent to target machine M2.
Based on the above-mentioned debugging method, there is a typical application scenario, and if developer a wants to add a new function in the source code corresponding to liba.so, then compiling and debugging operations need to be performed. The method comprises the following specific steps:
inputting a login user name name@10.80.50.8 in the SSH window, and logging in a cloud host (compiling host);
inputting a cd/data/xxxA/src/boots/instruction, and entering a certain source code warehouse;
inputting an instruction source build/envsetup.sh, and setting a compiling time environment variable;
Selecting a cross compiler platform, and selecting a server side lunch 2 or a client side lunch3;
inputting a compiling instruction make bootescore;
6. if the service end is selected as the cross compiler platform, the ssh@192.168.1.2 is input to open the target machine, and if the client end is selected as the cross compiler platform, the ssh@ 192.168.1.3 is input to open the target machine;
7. if the server is selected as the cross compiler, then input:
the scp/data/xxxA/src/bootes/out/target/bgm/usr/lib/libA.so. jumps back to the cloud host at 192.168.1.2;
if the client is selected as the cross compiler platform, then input:
scp/data/xxxA/src/bootes/out/target/bgm/usr/lib/libA. So @192.168.1.3 jump back to the cloud host;
8. the cloud host inputs the following instructions to start the server:
cd /update/xxx/usr/、Export LD_LIBRARY_PATH=/update/xxx/usr/lib、
Export BOOTES_HOME_DIR=/update/xxx/usr/etc./bin/test_server;
inputting the following instructions on the cloud host to start the client:
cd/mnt/sdcard/xxx/usr/、Export LD_LIBRARY_PATH=/mnt/sdcard/xxx/usr/lib、
Export BOOTES_HOME_DIR=/mnt/sdcard/xxx/usr/etc./bin/test_client。
as can be seen from the above examples, in the process of embedded software development, a large number of debug instructions need to be input by a developer. The related art does not carry out intelligent prompt on the debug instruction, or has weak prompt capability (for example, the linxu terminal can press the up and down keys to inquire the historical instructions), a large number of debug instructions need to be manually input by a developer, the requirements on the developer are high, a certain input time is needed, the debug efficiency is low, and the developer has the risk of input errors during input, so that the accuracy of the debug result is low.
However, it can be seen from an analysis of these debug instructions that although they are complicated, have various parameters, etc., they are highly similar and can be classified. Based on the characteristics of the debugging instructions, the embodiment of the application provides a monitoring computer, which trains an instruction prediction model based on the state information of a target machine and a cloud host under a historical debugging scene and the input debugging instructions, and automatically outputs a predicted debugging instruction conforming to the current debugging scene by calling the instruction prediction model in the software debugging process. Based on the monitoring computer, a developer does not need to memorize and input complicated debugging instructions, and can operate according to the output prompt of the predicted debugging instructions, so that the debugging difficulty and the complexity of debugging operation are reduced, and the debugging efficiency and the accuracy of a debugging result are improved.
The embodiment of the application provides a monitoring computer, which is applied to an embedded software development scene, referring to fig. 1, and comprises: the system comprises a state acquisition module 101, a coding and decoding module 102, an instruction agent module 103 and a calculation processing module 104, wherein the state acquisition module 101 and the instruction agent module 103 are connected with the coding and decoding module 102, and the coding and decoding module 102 is connected with the calculation processing module 104.
The state acquisition module 101 is configured to acquire, according to a certain frequency, first state information of a target machine at a current moment and second state information of a cloud host, and send the first state information and the second state information to the codec module 102. The first state information of the target machine is information generated in the running process of the target machine, and includes process information, current system time, CPU (Central Processing Unit ) utilization rate, historical debugging instructions of a first preset number recently, and the like, wherein the process information includes a process name, a PID (Process Identifier, a process identifier) of a process, and the like, and the first preset number can be 10, 20, and the like according to requirements. The second state information of the cloud host is information generated in the running process of the cloud host and comprises file information generated under a specific directory, current interactive compiling environment information, login user names of the cloud host, a latest second preset number of historical debugging instructions and the like. The specific directory may be selected according to debug requirements. The second preset number of bars is set according to the requirement, and can be 10 bars, 20 bars and the like. For the monitoring computer, the acquiring action of the state acquisition module 101 may acquire state information through the operation of the monitoring target machine and the cloud host machine, or may receive state information sent by the target machine and the cloud host machine.
The codec module 102 is configured to encode the first state information and the second state information to obtain a state feature vector, and send the state feature vector to the calculation processing module 104. Generally, the first state information and the second state information cannot be directly identified by the computing processing module, and need to be encoded to be converted into a state feature vector that can be identified by the computing processing module 104.
The calculation processing module 104 is used as a core of the monitoring computer and is used for calling an instruction prediction model, processing the state feature vector to obtain a predicted debugging instruction, and sending the predicted debugging instruction to the instruction proxy module 103. The instruction prediction model is used for predicting a debugging instruction conforming to the current debugging scene based on the state feature vector in the current debugging scene. The network structure of the instruction prediction model may be an acceptance-v 1 network, etc., which is not specifically limited in the embodiments of the present application.
The instruction agent module 103 is used as a transfer station for interaction of the user host, the target machine and the cloud host, and is used for forwarding instructions among the user host, the target machine and the cloud host. Specifically, the method is used for sending the predicted debugging instruction to the user host, and sending the predicted debugging instruction to the target machine when receiving a forward feedback instruction returned by the user host for the predicted debugging instruction, wherein the predicted debugging instruction is used for controlling the target machine to run the software to be debugged.
In this embodiment of the present application, because more information is generated during the operation of the target machine and the cloud host, part of the information is related to debug instruction prediction, for example, a "make core" instruction on the cloud host, where the instruction includes at least 2 pieces of information: the module that "compiles make" and "make" is a core module. Some of this information is not relevant to debug instruction predictions, e.g. most of the print output by the cloud host at compile stage. If the information generated in the operation process of the target machine and the cloud host is collected, the memory of the monitoring computer is occupied, and the calculated amount of coding of the coding and decoding module is increased. Therefore, it is necessary to screen the information generated in the operation process of the target machine and the cloud host, so as to reduce the memory occupied by the state information of the target machine and the cloud host, and reduce the calculation amount of the encoding and decoding modules.
In order to achieve the purpose of information screening, the state acquisition module provided by the embodiment of the application further has an information screening function, and information generated in the operation process of the target machine and the cloud host can be screened based on the information screening function, so that first state information of the target machine and second state information of the cloud host are obtained. Because the functions of the target machine and the cloud host are different, the information generated in the running process is different, and the types of the information related to the debugging instruction prediction in the information are also different, the state acquisition module needs to be respectively screened aiming at the target machine and the cloud host. Specifically, assuming that the information type related to the debug instruction prediction in the information generated in the operation process of the target machine is a first information type, and the information type related to the debug instruction prediction in the information generated in the operation process of the cloud host machine is a second information type, the state acquisition module 101 will screen the information generated in the operation process of the target machine at the current moment based on the first information type to obtain first state information, and screen the information generated in the operation process of the cloud host machine at the current moment based on the second information type to obtain second state information. The first information type comprises process information, current system time, CPU utilization rate, a last first preset number of historical debugging instructions and the like. The second information type comprises file information generated under a specific directory, current interactive compiling environment information, cloud host login user names, a latest second preset number of historical debugging instructions and the like.
In order to enable the codec module 102 to perform better encoding, an encoding policy is provided in this embodiment of the present application, where the encoding policy includes an encoding format and an encoding mode, the encoding format indicates a representation mode and a number of bits of an encoding result obtained by encoding the first state information of the target device and the second state information of the cloud host, the representation mode may be a 16-ary number or the like, and the number of bits indicates a number of bits of the encoding result. Considering that the number of target machines for software debugging is fixed, for example 6, when the number of target machines participating in encoding is the fixed number, the bit number of the obtained encoding result meets the bit number requirement; when the number of target machines participating in encoding is smaller than the fixed number, the number of bits of the obtained encoding result is necessarily smaller than the required number of bits, in which case zero padding operation can be performed. The encoding mode indicates a mode when the first state information of the target machine and the second state information of the cloud host are encoded, and the encoding mode comprises integral hash, hash calculation on the minimum information unit and the like. The whole hash is to perform hash calculation on all information in the first transition state information and the second state information. Performing hash computation on the smallest information unit refers to performing hash computation on each type of information in the first state information and the second state information respectively. Considering that if all the information in the first state information and the second state information is subjected to hash calculation, more details contained in the first state information and the second state information, for example, the number of processes, the starting time of the processes and other information, may be lost, and these details have a certain correlation with the prediction of the debug instruction, in order to reduce the information loss in the encoding process as much as possible, in the encoding and decoding module in the embodiment of the present application, in the encoding process, a manner of performing hash calculation on the smallest information unit is adopted, that is, hash calculation is performed on each type of information, and then hash values corresponding to each type of information are spliced together, so as to form a large hash value chain. The length of the hash value chain is fixed, and if each type of information is missing, the hash value of the corresponding position of the type of information is set to 0. By performing zero padding operation, the consistency of the lengths of the state feature vectors is ensured.
Specifically, the encoding and decoding process of the first state information and the second state information by the encoding and decoding module 102 includes: the encoding and decoding module performs hash calculation on each type of information in the first state information to obtain hash values corresponding to each type of information, and splices the hash values corresponding to each type of information to obtain a first feature vector; carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector; and splicing the first characteristic vector and the second characteristic vector to obtain a state characteristic vector.
For the first state information, the above encoding process may use the following formula:
encod=md5 (process name of process 1) +md5 (PID of process 1) +.+md5 (process name of process N) +md5 (PID of process N) +md5 (IP address) +md5 (current system time) +hash (recent first historical debug instruction) + … +hash (recent M-th historical debug instruction), where M and N are integers greater than 1 and M is the same as the first preset number.
For the process information, in the embodiment of the application, when hash calculation is performed on the process information, the hash calculation result of the process name can be expressed by 16-byte 16-ary numbers, and the PID of the process can be directly converted into 2-byte 16-ary numbers. Typically, 16 bytes of 16 digits are 32 bits and 2 bytes of 16 digits are 4 bits, so that each process information will be represented by a 36 bit 16 digit.
For example, if the first state information of the target machine includes 20 processes, namely, process 1, process 2, process 3, …, and process 20, the process information of the target machine is a 720-bit (36×20=720) 16-ary number in the above representation manner. The calculation results for each process can be seen in table 1 below.
TABLE 1
Figure SMS_1
Taking 20 pieces of historical debugging instructions as an example, when hash calculation is performed on each type of information in the first state information, and hash values of each type of information are spliced together, the form of the obtained first feature vector can be seen in table 2.
TABLE 2
Figure SMS_2
Taking 20 pieces of historical debug instructions as an example, when hash calculation is performed on each type of information in the second state information, and hash values of each type of information are spliced together, the form of the obtained second feature vector can be seen in table 3.
TABLE 3 Table 3
Figure SMS_3
Of course, the codec module 102 may encode not only the first state information of the target machine and the second state information of the cloud host, but also a debug instruction input by a user on the user host. Considering that the number and content of debug instructions are limited in a debug scenario, the embodiment of the present application may set a number for each debug instruction according to the storage order of each debug instruction, for example, the number of the first debug instruction is 1, the number of the second debug instruction is 2, and so on. Then, a preset encoding mode is adopted to encode the number of each debugging instruction to obtain an instruction feature vector, wherein the preset encoding mode can be one-hot and the like. Table 4 shows the encoding results of the debug instruction.
TABLE 4 Table 4
Figure SMS_4
Referring to fig. 2, in another embodiment of the present application, the monitoring computer further includes an information storage module 105, where the information storage module 105 is connected to the codec module 102 and the calculation processing module 104. The information storage module 105 is configured to obtain the status feature vector encoded by the encoding and decoding module 102 and the instruction feature vector corresponding to each debug instruction, store the status feature vector encoded by the computing processing module, and store the correspondence between each debug instruction and the instruction feature vector.
In the embodiment of the application, the instruction prediction model is a key for realizing automatic prediction of the debug instruction, and the monitoring computer needs to train out the instruction prediction model before realizing the automatic prediction function of the debug instruction. Specifically, the training process of the instruction prediction model includes:
the state acquisition module 101 acquires sample first state information of the historical moment target machine and sample second state information of the cloud host, and sends the sample first state information and the sample second state information to the encoding and decoding module 102, meanwhile, the instruction proxy module 103 acquires a sample debugging instruction input by a user on the user host at the historical moment, and sends the sample debugging instruction to the encoding and decoding module 102, the encoding and decoding module 102 encodes the sample first state information and the sample second state information to obtain sample state feature vectors, encodes the sample debugging instruction to obtain sample instruction vectors, and then takes the sample state feature vectors as states and takes the sample instruction vectors as labels to form a state label pair, and then sends the state label pair to the calculation processing module 104. The computation processing module 104 receives the sample state feature vector and the sample instruction vector, and trains the instruction prediction model based on the sample state feature vector and the sample instruction vector.
Based on the trained instruction prediction model, when predicting the debugging instruction at the current moment, the instruction prediction model can be called to process the state feature vector so as to obtain a predicted instruction feature vector. Because the predicted instruction feature vector is not an instruction that can be identified by the target machine, a predicted debug instruction corresponding to the predicted instruction feature vector needs to be obtained from a corresponding relation between the instruction feature vector and the debug instruction stored in the information storage module based on the predicted instruction feature vector.
In the embodiment of the application, after a predicted debug instruction is sent to a user host, the user host displays the predicted debug instruction, a developer judges whether the predicted debug instruction is accurate based on a current debug scene, if the predicted debug instruction is accurate, forward selection operation, such as touch enter key, can be performed on the predicted debug instruction to generate a forward feedback instruction, the forward feedback instruction is sent to an instruction proxy module, and the instruction proxy module sends the predicted debug instruction to a target machine to control the target machine to run the software to be debugged, so that whether the software to be debugged has a problem is checked. If the predicted debugging instruction is wrong, a developer can execute negative selection operation on the predicted debugging instruction, such as touch ECS keys, and then input a correct debugging instruction, a user host acquires the debugging instruction and then sends the debugging instruction to an instruction proxy module, the instruction proxy module sends the debugging instruction to a coding and decoding module, the coding and decoding module encodes the debugging instruction after receiving the debugging instruction to obtain an instruction feature vector, and then sends the instruction feature vector to a calculation processing module, and meanwhile, an information storage module sends the stored state feature vector at the current moment to the calculation processing module, and the calculation processing module adjusts model parameters of an instruction prediction model based on the instruction feature vector and the state feature vector to obtain an adjusted instruction prediction model, and then updates the loaded instruction prediction model into the adjusted instruction prediction model. In the subsequent instruction debugging process, the calculation processing module predicts a debugging instruction at the next moment based on the adjusted instruction prediction model.
According to the monitoring computer provided by the embodiment of the application, the first state information of the target machine running the embedded software at the current moment and the second state information of the cloud host used for compiling the embedded software can be obtained, the first state information and the second state information are encoded into the state feature vector which can be identified by the instruction prediction model, and then the state feature vector is processed by calling the instruction prediction model, so that the prediction debugging instruction is obtained. Based on the monitoring computer, under the embedded software development scene, a prediction debugging instruction can be automatically given, and after a forward feedback instruction sent by a developer through a user host is received, namely the developer considers that the prediction debugging instruction is correct, the prediction debugging instruction is directly sent to a target machine. Because the developer does not need to manually input complicated debugging instructions, the debugging efficiency is improved. Furthermore, errors in the process of inputting the debugging instruction by a developer are avoided, so that errors are reported wrongly, and the debugging accuracy of the embedded software is improved.
Referring to fig. 3, the software debugging system provided in the embodiment of the present application includes a monitoring computer 301, a target machine 302, a cloud host 303, and a user host 304, where the target machine 302, the cloud host 303, and the user host 304 are respectively connected with the monitoring computer 301.
The monitoring computer is shown in fig. 1 or 2;
the target machine 302 is configured to collect first state information of the target machine, send the first state information to the monitoring computer 301, and receive a prediction debug instruction sent by the monitoring computer;
the cloud host 303 is configured to collect second state information of the cloud host, and send the second state information to the monitoring computer 301;
the user host 304 is configured to receive a predicted debug instruction sent by the monitoring computer 301, and return a forward feedback instruction to the monitoring computer when detecting a forward selection operation of the user for the predicted debug instruction.
In another embodiment of the present application, after the monitoring computer sends the predicted debug instruction to the user host, if the user determines that the preset debug instruction is wrong, the user performs a negative selection operation for the preset debug instruction, after the user host detects the negative selection operation of the user, the input operation of the user is monitored to obtain the debug instruction input by the user, and the debug instruction is sent to the monitoring computer, and the monitoring computer sends the debug instruction to the corresponding target machine, so that the target machine runs the software to be debugged.
Fig. 4 is a schematic diagram showing a specific structure of the software debug system shown in fig. 3, and referring to fig. 4, the software debug system includes a target machine, a cloud host, a monitoring computer, and a user host group. The number of the target machines is at least one target machine, namely a target machine M1, target machines M2 and …, a target machine Mn and the like, wherein the target machine M1, the target machines M2 and …, the target machine Mn comprise an instruction agent module, a state acquisition module and the like. The cloud host comprises an instruction agent module, a state acquisition module and the like. The monitoring computer comprises a state acquisition module, a coding and decoding module, a calculation processing module, an instruction agent module, an information storage module and the like. The user main group comprises at least one user host, namely a user host 1, a user host 2, …, a user host n and the like, wherein the user host 1, the user host 2, … and the user host n comprise instruction agent modules. The modules included in the target machine, the cloud host and the user host are similar to the corresponding modules in the monitoring computer in function, and the functions of each module in the target machine, the cloud host, the monitoring computer and the user host will be described in detail below in combination with the compiling and debugging process of software.
In the compiling process, a user can input a compiling instruction on any user host, and the user host acquires the compiling instruction input by the user and sends the compiling instruction to the instruction proxy module of the monitoring computer. The instruction proxy module of the monitoring computer receives the compiling instruction and sends the compiling instruction to the instruction proxy module of the cloud host. And when a compiling instruction is received, the cloud host executes compiling operation and sends the executable file obtained by compiling to an instruction proxy module of the monitoring computer. And the instruction agent module of the monitoring computer receives the executable file sent by the cloud host and sends the executable file to the corresponding target machine.
In the debugging process, the state acquisition modules of the target machine M1, the target machines M2 and … and the target machine Mn acquire first state information generated in the respective running process and respectively send the acquired first state information to the state information acquisition module of the monitoring computer. The state acquisition module of the cloud host acquires second state information generated in the running process and sends the second state information to the state information acquisition module of the monitoring computer. The state information acquisition module of the monitoring computer receives the first state information and the second state information and sends the received first state information and second state information to the encoding and decoding module. The encoding and decoding module encodes the first state information and the second state information to obtain a state feature vector, and sends the state feature vector to the calculation processing module. The calculation processing module calls an instruction prediction model, processes the state feature vector to obtain a predicted debugging instruction, and sends the predicted debugging instruction to an instruction proxy module on the user host through the instruction proxy module, and the predicted debugging instruction is displayed by the user host. If the forward selection operation of the user is detected, the user host generates a forward feedback instruction, the forward feedback instruction is sent to an instruction proxy module of the monitoring computer through the instruction proxy module, and the instruction proxy module of the monitoring computer sends a predicted debugging instruction to a corresponding target machine so that the target machine runs software to be debugged. If negative selection operation of the user is detected, the user host acquires a debugging instruction input by the user through detecting the input operation of the user, the debugging instruction is sent to an instruction proxy module of the monitoring computer through the instruction proxy module, and the instruction proxy module of the monitoring computer sends the debugging instruction to a corresponding target machine so that the target machine runs software to be debugged.
An embodiment of the present application provides a software debugging method, taking a monitoring computer executing the embodiment of the present application as an example, referring to fig. 5, a method flow provided by the embodiment of the present application includes:
501. and encoding the first state information of the target machine and the second state information of the cloud host to obtain a state feature vector.
Specifically, the monitoring computer encodes the first state information of the target machine and the second state information of the cloud host to obtain a state feature vector, which includes: carrying out hash calculation on each type of information in the first state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a first feature vector; carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector; and splicing the first characteristic vector and the second characteristic vector to obtain a state characteristic vector.
502. And calling an instruction prediction model, and processing the state feature vector to obtain a predicted debugging instruction.
The training process of the instruction prediction model comprises the following steps: the monitoring computer obtains sample first state information of the target machine at the historical moment, sample second state information of the cloud host and sample debugging instructions input by a user on the user host, encodes the sample first state information and the sample second state information to obtain sample state feature vectors, encodes the sample debugging instructions to obtain sample instruction vectors, and trains an instruction prediction model based on the sample state feature vectors and the sample instruction vectors.
503. And sending the predicted debugging instruction to the user host.
Based on the generated predictive debugging instruction, the monitoring computer sends the predictive debugging instruction to the user host, when the predictive debugging instruction is received, the user host displays the predictive debugging instruction, the user detects whether the predictive debugging instruction is correct, if the user determines that the predictive debugging instruction is correct, forward selection operation on the predictive debugging instruction is executed, when the forward selection operation of the user is detected, the user host generates a forward feedback instruction, and sends the forward feedback instruction to the monitoring computer; and if the user determines that the predicted debugging instruction is incorrect, executing negative selection operation on the predicted debugging instruction, monitoring input operation of the user by the user host computer when the negative selection operation of the user is detected, acquiring the debugging instruction input by the user, and sending the debugging instruction to the monitoring computer.
504. And responding to the received forward feedback instruction, and sending a predicted debugging instruction to the target machine.
If the monitoring computer receives a forward feedback instruction sent by the user host, the monitoring computer responds to the forward feedback instruction and sends the predicted debugging instruction to the target machine so as to control the target machine to run software to be debugged.
In another embodiment of the present application, if the monitoring computer obtains a debug instruction sent by the user host, the debug instruction is sent to the target machine, so as to control the target machine to run the software to be debugged.
Further, after obtaining the debug instruction, the monitoring computer encodes the debug instruction to obtain an instruction feature vector, further adjusts model parameters of the instruction prediction model based on the instruction feature vector and the state feature vector to obtain an adjusted instruction prediction model, and then updates the loaded instruction prediction model into the adjusted instruction prediction model, and further predicts the debug instruction at the next moment based on the adjusted instruction prediction model.
In the embodiment of the application, two working modes are simultaneously operated on a monitoring computer, one working mode is a learning mode, and when the monitoring computer is in the learning mode, the monitoring computer encodes sample state feature vectors obtained by encoding sample first state information of a target machine and sample second state information of a cloud host, and encodes sample debugging instructions input by a user, and the sample state feature vectors are input into an artificial neural network for learning to train the artificial neural network capable of predicting the debugging instructions, namely an instruction prediction model; when the other mode is the prediction mode, the monitoring computer takes the state feature vector obtained by encoding the state information as input, calls the instruction prediction model to process the state feature vector to obtain a prediction debugging instruction, and further provides the prediction debugging instruction for a developer, so that the software debugging process can be completed without inputting the debugging instruction by the developer.
Fig. 6 is a flowchart of a software debugging method provided in the embodiment of the present application, referring to fig. 6, when a sampling period is entered, a monitoring computer collects first state information of a target machine and second state information of a cloud host, encodes the collected first state information and second state information to obtain a state feature vector, if the state feature vector appears for the first time, the state feature vector needs to be stored, and then a calculation processing module invokes an instruction prediction model to process the state feature vector to obtain a predicted debugging instruction. And then, the monitoring computer judges whether the user host waits for command input at the current moment, and if the current host waits for command input, the prediction debugging instruction is output and displayed by the user host. The user host detects the operation of the user, if the user inputs the ECS key, the predicted debugging instruction error is described, the debugging instruction input by the user is obtained, and the debugging instruction is further sent to the target machine; if the enter key input by the user is detected, the predicted debugging instruction is correct, and the predicted debugging instruction is sent to the target machine. Further, after the debug instruction input by the user is sent to the target machine, the monitoring computer also uses the debug instruction as a tag and the stored state feature vector as a state, adjusts model parameters of the instruction prediction model to obtain an adjusted instruction prediction model, and then updates the loaded instruction prediction model into the adjusted instruction prediction model.
According to the method provided by the embodiment of the application, under an embedded software development scene, the first state information of the target machine running the embedded software at the current moment and the second state information of the cloud host used for compiling the embedded software are obtained, the first state information and the second state information are encoded into the state feature vector which can be identified by the instruction prediction model, the state feature vector is further processed by calling the instruction prediction model, a prediction debugging instruction is automatically given, and after a forward feedback instruction sent by a developer through the user host is received, namely the developer considers that the prediction debugging instruction is correct, the prediction debugging instruction is directly sent to the target machine. Because the developer does not need to manually input complicated debugging instructions, the debugging efficiency is improved. Furthermore, errors in the process of inputting the debugging instruction by a developer are avoided, so that errors are reported wrongly, and the debugging accuracy of the embedded software is improved.
Fig. 7 illustrates a block diagram of an electronic device 700, which may be a monitoring computer, according to an exemplary embodiment of the present application. In general, the electronic device 700 includes: a processor 701 and a memory 702.
The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 701 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The Memory 702 may include one or more computer-readable storage media, which may be non-transitory computer-readable storage media, such as CD-ROM (Compact Disc Read-Only Memory), ROM, RAM (Random Access Memory ), magnetic tape, floppy disk, optical data storage device, and the like. The computer readable storage medium has stored therein at least one computer program that when executed enables a software debugging method.
Of course, the electronic device described above may necessarily also include other components, such as input/output interfaces, communication components, and the like. The input/output interface provides an interface between the processor and a peripheral interface module, which may be an output device, an input device, etc. The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices, and the like.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the electronic device 700 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
Of course, in addition to the monitoring computer, any one of the target machine, the cloud host, and the user host in the software testing system shown in fig. 3 may have the structure of the electronic device 700, except that when the electronic device 700 is used as any one of the target machine, the cloud host, and the user host, the operations performed are different.
The embodiment of the application provides a computer readable storage medium, wherein at least one computer program is stored in the computer readable storage medium, and the software debugging method can be realized when the at least one computer program is executed by a processor.
The methods in this application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described herein are performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network device, a user device, a core network device, OAM (Operation Administration and Maintenance, operations administration maintenance), or other programmable apparatus. The computer program or instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program or instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The usable medium may be a magnetic medium, e.g., floppy disk, hard disk, tape; but also optical media such as digital video discs; but also semiconductor media such as solid state disks. The computer readable storage medium may be volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage medium.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (15)

1. The monitoring computer is characterized by being applied to an embedded software development scene, and comprises a state acquisition module, a coding and decoding module, an instruction agent module and a calculation processing module, wherein the state acquisition module and the instruction agent module are both connected with the coding and decoding module, and the coding and decoding module is connected with the calculation processing module;
The state acquisition module is used for acquiring first state information of the target machine at the current moment and second state information of the cloud host, and transmitting the first state information and the second state information to the encoding and decoding module;
the encoding and decoding module is used for encoding the first state information and the second state information to obtain a state characteristic vector, and sending the state characteristic vector to the calculation processing module;
the calculation processing module is used for calling an instruction prediction model, processing the state feature vector to obtain a prediction debugging instruction, and sending the prediction debugging instruction to the instruction proxy module;
the instruction agent module is used for sending the predicted debugging instruction to a user host, and sending the predicted debugging instruction to the target machine after receiving a forward feedback instruction returned by the user host for the predicted debugging instruction, wherein the predicted debugging instruction is used for controlling the target machine to run software to be debugged.
2. The monitoring computer according to claim 1, wherein the state acquisition module is further configured to screen information generated during the operation of the target machine at a current moment based on a first information type to obtain the first state information, and screen information generated during the operation of the cloud host at the current moment based on a second information type to obtain the second state information.
3. The monitoring computer according to claim 1, wherein the encoding and decoding module is specifically configured to perform hash computation on each type of information in the first state information to obtain a hash value corresponding to each type of information, and splice hash values corresponding to each type of information to obtain a first feature vector; carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector; and splicing the first characteristic vector and the second characteristic vector to obtain the state characteristic vector.
4. The monitoring computer according to claim 1, wherein the state acquisition module is further configured to acquire sample first state information of the target machine and sample second state information of the cloud host at a historical moment, and send the sample first state information and the sample second state information to the codec module;
the instruction proxy module is also used for acquiring a sample debugging instruction input by a user on the user host at the historical moment and sending the sample debugging instruction to the encoding and decoding module;
The encoding and decoding module is further used for encoding the first state information of the sample and the second state information of the sample to obtain a sample state feature vector, encoding the sample debugging instruction to obtain a sample instruction vector, and sending the sample state feature vector and the sample instruction vector to the calculation processing module;
the computing processing module is also configured to train the instruction prediction model based on the sample state feature vector and the sample instruction vector.
5. The monitoring computer according to claim 1, wherein the monitoring computer further comprises: the information storage module is connected with the encoding and decoding module and the calculation processing module;
the information storage module is used for acquiring the state feature vector coded by the coding and decoding module and the instruction feature vector corresponding to each debugging instruction, and storing the state feature vector and the corresponding relation between each debugging instruction and the instruction feature vector;
the calculation processing module is specifically configured to invoke the instruction prediction model, process the state feature vector to obtain a predicted instruction feature vector, and obtain, based on the predicted instruction feature vector, the predicted debug instruction corresponding to the predicted instruction feature vector from the information storage module.
6. The monitoring computer according to claim 5, wherein the instruction agent module is further configured to obtain a debug instruction, and send the debug instruction to the codec module, where the debug instruction is input by a user after the user host detects a negative selection operation of the user for the predicted debug instruction;
the encoding and decoding module is also used for encoding the debugging instruction to obtain an instruction characteristic vector, and sending the instruction characteristic vector to the calculation processing module;
the information storage module is used for sending the state characteristic vector to the calculation processing module;
the calculation processing module is used for adjusting the model parameters of the instruction prediction model based on the instruction feature vector and the state feature vector to obtain an adjusted instruction prediction model, updating the instruction prediction model into the adjusted instruction prediction model, and the adjusted instruction prediction model is used for predicting a debugging instruction at the next moment.
7. A software debugging method, characterized in that the method is applied to the monitoring computer of any one of claims 1 to 6, the method comprising:
Encoding the first state information of the target machine and the second state information of the cloud host to obtain a state feature vector;
calling an instruction prediction model, and processing the state feature vector to obtain a predicted debugging instruction;
the predicted debugging instruction is sent to a user host, and the predicted debugging instruction is used for triggering the user host to return a forward feedback instruction when detecting forward selection operation of a user on the predicted debugging instruction;
and responding to the received forward feedback instruction, sending the predicted debugging instruction to the target machine, wherein the predicted debugging instruction is used for controlling the target machine to run software to be debugged.
8. The method of claim 7, wherein encoding the first state information of the target machine and the second state information of the cloud host to obtain the state feature vector comprises:
carrying out hash calculation on each type of information in the first state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a first feature vector;
carrying out hash calculation on each type of information in the second state information to obtain a hash value corresponding to each type of information, and splicing the hash values corresponding to each type of information to obtain a second feature vector;
And splicing the first characteristic vector and the second characteristic vector to obtain the state characteristic vector.
9. The method of claim 7, wherein the calling the instruction prediction model to process the state feature vector, before obtaining the predicted debug instruction, further comprises:
acquiring sample first state information of the target machine at historical moment, sample second state information of the cloud host and a sample debugging instruction input by a user on the user host;
encoding the first state information of the sample and the second state information of the sample to obtain a sample state feature vector, and encoding the sample debugging instruction to obtain a sample instruction vector;
the instruction prediction model is trained based on the sample state feature vector and sample instruction vector.
10. The method of claim 7, wherein the method further comprises:
acquiring a debugging instruction, wherein the debugging instruction is input by a user after the user host detects negative selection operation of the user on the predicted debugging instruction;
and sending the debugging instruction to the target machine, wherein the debugging instruction is used for controlling the target machine to run the software to be debugged.
11. The method of claim 10, wherein after the obtaining the debug instruction, further comprising:
encoding the debugging instruction to obtain an instruction feature vector;
based on the instruction feature vector and the state feature vector, adjusting model parameters of the instruction prediction model to obtain an adjusted instruction prediction model;
updating the instruction prediction model to the adjusted instruction prediction model;
and predicting a debugging instruction at the next moment based on the adjusted instruction prediction model.
12. The software debugging system is characterized by comprising a monitoring computer, a target machine, a cloud host and a user host, wherein the target machine, the cloud host and the user host are respectively connected with the monitoring computer;
the monitoring computer according to any one of claims 1 to 6;
the target machine is used for collecting first state information of the target machine, sending the first state information to the monitoring computer and receiving the prediction debugging instruction sent by the monitoring computer;
the cloud host is used for collecting second state information of the cloud host and sending the second state information to the monitoring computer;
The user host is used for receiving the predicted debugging instruction sent by the monitoring computer, and returning a forward feedback instruction to the monitoring computer when detecting forward selection operation of a user on the predicted debugging instruction.
13. An electronic device comprising a memory and a processor, wherein the memory stores at least one computer program that is loaded and executed by the processor to implement the software debugging method of any of claims 7-11.
14. A computer readable storage medium, characterized in that at least one computer program is stored in the computer readable storage medium, which at least one computer program, when being executed by a processor, is capable of implementing the software debugging method according to any one of claims 7 to 11.
15. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, is capable of implementing a software debugging method as claimed in any one of claims 7 to 11.
CN202310650895.2A 2023-06-02 2023-06-02 Monitoring computer, software debugging method, software debugging system, medium and product Active CN116383014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310650895.2A CN116383014B (en) 2023-06-02 2023-06-02 Monitoring computer, software debugging method, software debugging system, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310650895.2A CN116383014B (en) 2023-06-02 2023-06-02 Monitoring computer, software debugging method, software debugging system, medium and product

Publications (2)

Publication Number Publication Date
CN116383014A true CN116383014A (en) 2023-07-04
CN116383014B CN116383014B (en) 2023-08-01

Family

ID=86967875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310650895.2A Active CN116383014B (en) 2023-06-02 2023-06-02 Monitoring computer, software debugging method, software debugging system, medium and product

Country Status (1)

Country Link
CN (1) CN116383014B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627254A (en) * 2003-12-10 2005-06-15 华为技术有限公司 Method for debuging embedded system and equipment
CN110032426A (en) * 2019-04-10 2019-07-19 浙江讯盟科技有限公司 A kind of method that can be debugged in real time online, system and storage medium
WO2021051529A1 (en) * 2019-09-19 2021-03-25 平安科技(深圳)有限公司 Method, apparatus and device for estimating cloud host resources, and storage medium
KR20210090575A (en) * 2020-11-27 2021-07-20 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. A method, an apparatus, an electronic device, a storage medium and a program for testing code
US20210374040A1 (en) * 2020-06-01 2021-12-02 Cerner Innovation, Inc. Auto Test Generator
CN114817028A (en) * 2022-04-22 2022-07-29 智汇(中山)信息技术有限公司 Multi-target cross debugging system based on software development platform
CN114936062A (en) * 2021-12-09 2022-08-23 腾讯科技(深圳)有限公司 Method, device, equipment, system and storage medium for automatically debugging equipment
WO2023016147A1 (en) * 2021-08-09 2023-02-16 腾讯科技(深圳)有限公司 Multi-target prediction method and apparatus, device, storage medium, and program product
CN115794313A (en) * 2022-12-26 2023-03-14 科东(广州)软件科技有限公司 Virtual machine debugging method, system, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627254A (en) * 2003-12-10 2005-06-15 华为技术有限公司 Method for debuging embedded system and equipment
CN110032426A (en) * 2019-04-10 2019-07-19 浙江讯盟科技有限公司 A kind of method that can be debugged in real time online, system and storage medium
WO2021051529A1 (en) * 2019-09-19 2021-03-25 平安科技(深圳)有限公司 Method, apparatus and device for estimating cloud host resources, and storage medium
US20210374040A1 (en) * 2020-06-01 2021-12-02 Cerner Innovation, Inc. Auto Test Generator
KR20210090575A (en) * 2020-11-27 2021-07-20 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. A method, an apparatus, an electronic device, a storage medium and a program for testing code
WO2023016147A1 (en) * 2021-08-09 2023-02-16 腾讯科技(深圳)有限公司 Multi-target prediction method and apparatus, device, storage medium, and program product
CN114936062A (en) * 2021-12-09 2022-08-23 腾讯科技(深圳)有限公司 Method, device, equipment, system and storage medium for automatically debugging equipment
CN114817028A (en) * 2022-04-22 2022-07-29 智汇(中山)信息技术有限公司 Multi-target cross debugging system based on software development platform
CN115794313A (en) * 2022-12-26 2023-03-14 科东(广州)软件科技有限公司 Virtual machine debugging method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116383014B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
EP3806432A1 (en) Method for changing service on device and service changing system
CN110928772A (en) Test method and device
CN109871290B (en) Call stack tracking method and device applied to Java and storage medium
US11593562B2 (en) Advanced machine learning interfaces
CN111108481B (en) Fault analysis method and related equipment
CN110210212A (en) A kind of data processing method, device and relevant device
CN111737073B (en) Automatic testing method, device, equipment and medium
TWI557594B (en) Method, system and server for self-healing of electronic apparatus
CN112685248A (en) Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium
CN109492181A (en) Method for page jump, device, computer equipment and storage medium
CN111651352B (en) Warehouse code merging method and device
CN111930472A (en) Code debugging method and device, electronic equipment and storage medium
CN115391219A (en) Test case generation method and device, electronic equipment and storage medium
CN113064816B (en) Testing device and testing method for programmable logic device software
CN116383014B (en) Monitoring computer, software debugging method, software debugging system, medium and product
WO2024051757A1 (en) Information processing method and apparatus, electronic device and computer readable medium
CN115146782A (en) Quantum line compiling method, device, compiling framework and quantum operating system
CN111258607A (en) Version upgrading method, device, equipment and storage medium based on shunting
CN110548285B (en) Game communication control method and device, medium and electronic equipment
KR100587532B1 (en) Apparatus and method for fabricating software application for streaming service and system and method for offering software streaming services with network fault tolerance
CN110554966B (en) Driving debugging method, behavior analysis method and driving debugging system
CN114297062A (en) Service testing method and device, electronic equipment and storage medium
CN112799703A (en) Resource file processing method and device, client and storage medium
Hallström et al. Data Cleaning Extension on IoT Gateway: An Extended ThingsBoard Gateway
CN111026651A (en) Test method, test device, storage medium and electronic equipment

Legal Events

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