Problem troubleshooting method and device, server and storage medium
By generating and storing natural language descriptions of the target code, the problem of time-consuming troubleshooting in existing technologies is solved, enabling fast and effective troubleshooting and resolution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SANKUAI ONLINE TECH CO LTD
- Filing Date
- 2020-06-24
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, troubleshooting methods are time-consuming and inefficient, failing to resolve user-reported issues promptly and quickly.
By generating a natural language description of the target code, based on event-related information and reference code, a description of the runtime logic is created and stored in a historical experience library. This description is then used for troubleshooting, supporting precise or fuzzy matching to quickly identify the problem.
It reduces the difficulty of troubleshooting, improves the efficiency of troubleshooting, reduces the time spent on troubleshooting, and enables timely and rapid identification and resolution of problems.
Smart Images

Figure CN111752838B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a problem-solving method, apparatus, server, and storage medium. Background Technology
[0002] With the development of internet technology, internet companies are expanding their businesses, and their applications are being used by more and more users. Users often encounter various problems while using these applications. In such cases, users can report the problems to the internet company through customer service, email, or other means. Developers then need to investigate the issues based on user feedback and find solutions.
[0003] Currently, the typical troubleshooting method is as follows: developers obtain the system logs and code corresponding to the user's feedback, analyze the system logs and code to determine the system operation logic corresponding to the feedback problem, troubleshoot the problem based on the system operation logic, and then find a solution to the problem.
[0004] However, because code analysis is time-consuming, relying solely on developers to analyze system logs and code to troubleshoot problems is time-consuming, inefficient, and unable to identify issues quickly and promptly. Summary of the Invention
[0005] This application provides a problem-solving method, apparatus, server, and storage medium, which can reduce troubleshooting time, improve troubleshooting efficiency, and enable timely and rapid problem identification. The technical solution is as follows:
[0006] On the one hand, a problem-solving method is provided, which includes:
[0007] In response to a target event processing request, based on the event-related information of the target event carried in the target event processing request, the target code corresponding to the event-related information is determined;
[0008] Based on the target code and the reference code, a natural language description of the system operation logic corresponding to the target code is generated to obtain the operation logic description of the target event. The code segment of the reference code is marked with a natural language description for explaining the function of the code segment.
[0009] The event-related information of the target event and the corresponding operation logic description of the target event are stored in the historical experience base, which is used to store multiple operation logic descriptions;
[0010] In response to a problem investigation request, based on the problem-related information of the problem to be investigated carried in the problem investigation request, a query is performed in the historical experience database to obtain the operational logic description of the problem to be investigated;
[0011] Obtain the problem identified based on the operational logic description of the problem to be investigated.
[0012] In one possible implementation, generating a natural language description of the system's operational logic corresponding to the target code, based on the target code and the reference code, includes:
[0013] Based on at least one logical dot in the target code, at least one running step corresponding to the at least one logical dot is determined, wherein the logical dot is used to identify the end point of the running step;
[0014] At the end of each running step, based on the running step, the running result of the running step, and the reference code, natural language descriptions are annotated for the running step and the running result to obtain a natural language description of at least one running step and a natural language description of the running result corresponding to the at least one running step.
[0015] A natural language description of the system's operating logic corresponding to the target code is generated based on the natural language description of the at least one operating step and the natural language description of the corresponding operating result of the at least one operating step.
[0016] In one possible implementation, the step of querying the historical experience database based on the problem-related information of the problem to be investigated carried in the problem investigation request to obtain the operational logic description of the problem to be investigated includes any of the following:
[0017] Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience base, a precise match is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0018] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0019] In one possible implementation, after obtaining the problem determined based on the operational logic description of the problem to be investigated, the method further includes:
[0020] Obtain a solution based on the described operational logic and the problem.
[0021] In one possible implementation, after obtaining the solution determined based on the operational logic description and the problem, the method further includes:
[0022] The operational logic descriptions and corresponding solutions are stored in the historical experience base, which is also used to store the solutions corresponding to the multiple operational logic descriptions.
[0023] In one possible implementation, the historical experience base is further used to store solutions corresponding to the multiple runtime logic descriptions, and the method further includes:
[0024] In response to a problem investigation request, obtain the problem-related information of the problem to be investigated carried in the problem investigation request;
[0025] Based on the problem-related information of the problem to be investigated, a solution to the problem is obtained by querying the historical experience database.
[0026] In one possible implementation, the step of querying a historical experience database based on problem-related information of the problem to be investigated to obtain a solution to the problem includes any of the following:
[0027] Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience database, a precise match is performed to obtain the solution corresponding to the reference information that is successfully matched.
[0028] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the solution corresponding to the reference information that is successfully matched.
[0029] On the other hand, a problem-solving device is provided, the device comprising:
[0030] The determination module is used to respond to a target event processing request and, based on the event-related information of the target event carried in the target event processing request, determine the target code corresponding to the event-related information.
[0031] The generation module is used to generate a natural language description of the system operation logic corresponding to the target code based on the target code and the reference code, thereby obtaining a description of the operation logic of the target event. The code segments of the reference code are marked with natural language descriptions for explaining the function of the code segments.
[0032] The storage module is used to store the event-related information of the target event and the corresponding operation logic description of the target event in the historical experience database, and the historical experience database is used to store multiple operation logic descriptions;
[0033] The query module is used to respond to a problem investigation request, and based on the problem-related information of the problem to be investigated carried in the problem investigation request, query the historical experience database to obtain the operational logic description of the problem to be investigated;
[0034] The acquisition module is used to acquire the problem determined based on the operational logic description of the problem to be investigated.
[0035] In one possible implementation, the generation module is configured to:
[0036] Based on at least one logical dot in the target code, at least one running step corresponding to the at least one logical dot is determined, wherein the logical dot is used to identify the end point of the running step;
[0037] At the end of each running step, based on the running step, the running result of the running step, and the reference code, natural language descriptions are annotated for the running step and the running result to obtain a natural language description of at least one running step and a natural language description of the running result corresponding to the at least one running step.
[0038] A natural language description of the system's operating logic corresponding to the target code is generated based on the natural language description of the at least one operating step and the natural language description of the corresponding operating result of the at least one operating step.
[0039] In one possible implementation, the query module is used for any of the following:
[0040] Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience base, a precise match is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0041] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0042] In one possible implementation, the device further includes:
[0043] The solution acquisition module is used to acquire the solution determined based on the operational logic description and the problem.
[0044] In one possible implementation, the storage module is further configured to:
[0045] The operational logic descriptions and corresponding solutions are stored in the historical experience base, which is also used to store the solutions corresponding to the multiple operational logic descriptions.
[0046] In one possible implementation, the historical experience base is further used to store solutions corresponding to the plurality of runtime logic descriptions, and the apparatus further includes:
[0047] The information acquisition module is used to respond to a problem investigation request and acquire problem-related information carried in the problem investigation request regarding the problem to be investigated.
[0048] The solution query module is used to query the historical experience database based on the problem-related information of the problem to be investigated, and obtain the solution to the problem to be investigated.
[0049] In one possible implementation, the solution query module is used for any of the following:
[0050] Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience database, a precise match is performed to obtain the solution corresponding to the reference information that is successfully matched.
[0051] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the solution corresponding to the reference information that is successfully matched.
[0052] On the one hand, a server is provided, which includes one or more processors and one or more memories, wherein at least one instruction is stored in the one or more memories, the instruction being loaded and executed by the one or more processors to perform the operation performed by the problem-solving method.
[0053] On the one hand, a computer-readable storage medium is provided, which stores at least one instruction that is loaded and executed by a processor to perform the operation performed by the problem-solving method.
[0054] On the one hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the operations performed by the aforementioned troubleshooting method.
[0055] The technical solution provided in this application embodiment can generate a running logic description based on the target code and reference code during the event handling process. Since the natural language description in the running logic description can clearly explain the function of the code segment, when responding to the problem investigation request and conducting problem investigation based on the running logic description, the problem can be identified in a timely and rapid manner, reducing the difficulty of investigation, improving the efficiency of investigation, and reducing the time spent on investigation. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a schematic diagram of the implementation environment of a problem-solving method provided in an embodiment of this application;
[0058] Figure 2 This is a flowchart of a problem-solving method provided in an embodiment of this application;
[0059] Figure 3 This is a flowchart of a problem-solving method provided in an embodiment of this application;
[0060] Figure 4 This is a flowchart of a problem-solving method provided in an embodiment of this application;
[0061] Figure 5 This is a flowchart illustrating a problem-solving method provided in an embodiment of this application;
[0062] Figure 6 This is a flowchart illustrating a problem-solving method provided in an embodiment of this application;
[0063] Figure 7 This is a flowchart illustrating a problem-solving method provided in an embodiment of this application;
[0064] Figure 8 This is a schematic diagram of the structure of a problem-solving device provided in an embodiment of this application;
[0065] Figure 9 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0067] Figure 1 This is a schematic diagram illustrating the implementation environment of a problem-solving method provided in an embodiment of this application. See also... Figure 1 The implementation environment includes: terminal 101 and server 102.
[0068] Terminal 101 can be at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. Terminal 101 may be equipped with an operating system and can run various types of applications, such as video applications and social applications. During the use of these applications within the operating system, users can process any event, that is, perform any function corresponding to the system or application, such as system startup events or application login events. Terminal 101 has communication capabilities and can access the Internet. Terminal 101 can refer to one of multiple terminals; this embodiment only uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less.
[0069] Server 102 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 102 can run a backend management platform with an operating system, which manages multiple servers corresponding to the operating system. Server 102 and terminal 101 can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment. Optionally, the number of servers 102 can be more or less, which is not limited in this embodiment. Of course, server 102 can also include other functional servers to provide more comprehensive and diversified services.
[0070] In implementing the embodiments of this application, the troubleshooting process can be executed by the server 102. After receiving the event handling request and the troubleshooting request, the server 102 uses the troubleshooting method provided in the embodiments of this application to execute the troubleshooting process. It should be noted that the following description of the solution assumes that the server receives both the event handling request and the troubleshooting request. The event handling request is typically triggered by the terminal 101. When a user wants to implement a certain function of an application while using the operating system, they can operate on the terminal 101 to send an event handling request to the server 102. The server 102 can then receive the event handling request and execute the subsequent event handling process. In one possible implementation, the troubleshooting request can be triggered by terminal 101. For example, when a user encounters a problem while using an application in the operating system, they can operate on terminal 101, such as clicking the "Problem Inquiry" option. Terminal 101 will then display a pre-defined input format for problem-related information. The user fills in the relevant information according to this format and submits it to server 102. Server 102 will then receive the troubleshooting request and trigger the troubleshooting process. In another possible implementation, the troubleshooting request can be triggered by server 102. For example, to prevent problems from occurring, developers of the backend management platform can operate on server 102 to trigger the troubleshooting request. Alternatively, when a system plugin installed on server 102 detects a dangerous or faulty event, it can send a warning to the server, thus triggering the troubleshooting request.
[0071] Figure 2 This is a flowchart of a problem-solving method provided in an embodiment of this application. See also... Figure 2 This embodiment is described with a server as the execution entity, and includes:
[0072] 201. In response to the target event processing request, the server determines the target code corresponding to the event-related information carried in the target event processing request.
[0073] 202. Based on the target code and the reference code, the server generates a natural language description of the system operation logic corresponding to the target code, and obtains a description of the operation logic of the target event. The code segment of the reference code is marked with a natural language description to explain the function of the code segment.
[0074] 203. The server stores the event-related information of the target event and the corresponding execution logic description of the target event in the historical experience database, which is used to store multiple execution logic descriptions.
[0075] 204. In response to the troubleshooting request, the server searches the historical experience database based on the relevant information of the problem to be investigated carried in the troubleshooting request to obtain the operational logic description of the problem to be investigated.
[0076] 205. The server obtains the problem identified based on the runtime logic description of the problem to be investigated.
[0077] The technical solution provided in this application embodiment can generate a running logic description based on the target code and reference code during the event handling process. Since the natural language description in the running logic description can clearly explain the function of the code segment, when responding to the problem investigation request and conducting problem investigation based on the running logic description, the problem can be identified in a timely and rapid manner, reducing the difficulty of investigation, improving the efficiency of investigation, and reducing the time spent on investigation.
[0078] Figure 3 This is a flowchart of a problem-solving method provided in an embodiment of this application. See also... Figure 3 This embodiment is described with a server as the execution entity, and includes:
[0079] 301. The server responds to the target event handling request and obtains the event-related information of the target event carried in the target event handling request.
[0080] The target event represents an event to be processed by the system. This target event can be any event that the system can process, such as a system startup event or an application login event. Event-related information may include the event's timestamp, the corresponding application, the event processing content, the event's API call, and the file path of the corresponding code. The application corresponding to the event can be represented by an application identifier, which can be the application's package name, referring to a piece of identification code within the application.
[0081] In one possible implementation, when a user wants to process a target event, they can perform an operation on the terminal to send a target event processing request to the server. The server then responds to the target event processing request and can obtain the event-related information of the target event carried by the target event processing request.
[0082] 302. Based on the information related to the event, the server determines the target code corresponding to the information related to the event.
[0083] The target code is used to represent the code that implements the target event.
[0084] Optionally, after obtaining the event-related information of the target event carried in the event handling request, the server can determine the target code corresponding to the event-related information based on the file path of the event-related code carried in the event-related information. In another possible implementation, the server can also determine the call path of the event-related code based on the event call interface carried in the event-related information, and thus determine the target code corresponding to the event-related information based on the call path.
[0085] 303. Based on the target code and the reference code, the server generates a natural language description of the system's operating logic corresponding to the target code, thereby obtaining a description of the operating logic of the target event. The code segment of the reference code is annotated with a natural language description used to explain the function of the code segment.
[0086] The reference code segments are annotated with natural language descriptions to explain their functionality. It should be noted that this annotation process can be conducted by experienced developers before implementing this solution, annotating multiple code segments with natural language descriptions to explain their functions. Natural language description refers to using human-used language, typically a language that evolves naturally with culture, such as Chinese or English. The system operation logic represents the operational logic for achieving the target event. This logic can include operational steps (or operational chains) and their corresponding results. The operational steps are those steps that achieve the target event. It should be understood that target code refers to code capable of implementing the function corresponding to the operational step, and the corresponding operational result can be the result obtained by running the target code. For example, in an open platform's entry point network management system, the operational steps may include parameter verification, signature verification, and permission verification. The corresponding operational results for each step can be pass, fail, successful match, failed match, or exception. Therefore, the system operational logic could be that parameter verification passes, signature verification passes, and permission verification fails due to a mismatch between the authorization module, leading to an abnormal interface call. It should be understood that this example provides a textual description of the system operational logic, but in reality, the system operational logic is usually in code form. The operational logic description is a natural language description used to represent the system's operational logic.
[0087] In one possible implementation, after the server determines the target code corresponding to the event-related information, it runs the target code. During the execution of the target code, a natural language description of the system's operating logic corresponding to the target code is generated based on the target code and the reference code, thereby obtaining the operating logic description of the target event.
[0088] Optionally, the process of the server generating a natural language description of the system's operational logic corresponding to the target code may include: the server determining at least one operational step corresponding to at least one logical marker based on at least one logical marker in the target code, whereby the logical marker is used to identify the end point of the operational step. At the end of each operational step, a natural language description is annotated for the operational step and the operational result based on the operational step, the operational result of the operational step, and the reference code, resulting in a natural language description of at least one operational step and a natural language description of the operational result corresponding to the at least one operational step. Based on the natural language descriptions of the at least one operational step and the natural language descriptions of the operational results corresponding to the at least one operational step, a natural language description of the system's operational logic corresponding to the target code is generated according to the execution order of the target code. It should be noted that the logical marker process can be pre-configured before implementing this solution. Experienced developers can determine multiple operational steps corresponding to the target code based on the functions of multiple code segments in the target code and perform logical markers at the end points of these multiple operational steps.
[0089] For example, in the example of the entry network management system of the above open platform, the natural language descriptions of the running steps are "parameter verification", "signature verification" and "permission verification", and the natural language descriptions of the running results are "pass", "pass", "mismatch" and "interface call exception". The running logic description can be "parameter verification passed, signature verification passed, and permission verification authorization module mismatch, resulting in interface call exception".
[0090] 304. The server stores the event-related information of the target event and the corresponding execution logic description of the target event in the historical experience database, which is used to store multiple execution logic descriptions.
[0091] The historical experience database stores event-related information for multiple events, along with corresponding descriptions of their operational logic.
[0092] Steps 301 to 304 above describe the processing procedure for the target event. It should be noted that users may encounter problems while processing the target event using the application based on the operating system. In such cases, troubleshooting can be performed on the target event to determine a solution. See steps 305 to 309 for details. It should be understood that if the target event runs normally without problems, subsequent steps are unnecessary.
[0093] 305. In response to a problem investigation request for the target event, the server retrieves the problem-related information carried in the problem investigation request.
[0094] The issue-related information may include the timestamp of the issue, the application in which the issue occurred, the error type, and a description of the issue. The application in which the issue occurred can be represented by an application identifier, which can be the application's package name, a piece of identifying code within the application. It should be understood that this issue-related information is related to the event-related information mentioned above, but the difference is that event-related information is automatically generated after the user triggers a processing command for the target event, while issue-related information is usually manually entered by the user after a problem occurs in the target event. Issue-related information can be a portion or all of the information from the event-related information.
[0095] In one possible implementation, users may encounter problems while using applications based on their operating system. In this case, the user can perform an operation on the terminal to send a troubleshooting request to the server. The server, in response to the troubleshooting request for the target event, can obtain relevant information about the problem to be investigated from the troubleshooting request.
[0096] 306. Based on the relevant information about the problem, the server queries the historical experience database to obtain the operational logic description of the problem to be investigated.
[0097] In one possible implementation, after the server determines the problem-related information of the problem to be investigated, it matches the problem-related information of the problem to be investigated with multiple reference information in the historical experience database to determine the reference information that successfully matches the problem-related information. Then, it obtains the running logic description corresponding to the successfully matched reference information, thus determining the running logic description of the problem to be investigated.
[0098] Optionally, the process by which the server determines the runtime logic description of the problem to be investigated includes any of the following: In one possible implementation, the server performs exact matching based on problem-related information of the problem to be investigated and multiple reference information from the historical experience base to obtain the runtime logic description corresponding to the reference information that is successfully matched. In another possible implementation, the server performs fuzzy matching based on problem-related information of the problem to be investigated and multiple reference information from the historical experience base to obtain the runtime logic description corresponding to the reference information that is successfully matched.
[0099] Exact matching refers to matching with a certain degree of precision based on given conditions. Fuzzy matching refers to matching with a general degree of precision based on given conditions.
[0100] Optionally, the specific process of the server performing exact matching can be as follows: The server uses the question-related information as the target search term and queries multiple reference information in the historical experience database. It checks whether there is any reference information in the historical experience database whose complete information is identical to the target search term. If so, the exact match is successful, and the corresponding operational logic description is obtained. If not, an error value is returned, indicating that the corresponding search term could not be found. Optionally, the specific process of the server performing fuzzy matching can be as follows: The server breaks down the question-related information into multiple unit search terms, performs a logical AND operation, and queries multiple reference information in the historical experience database. First, it checks whether there is any reference information whose complete information is identical to the multiple unit search terms. If so, the fuzzy match is successful, and the corresponding operational logic description is obtained. If not, it checks whether there is any reference information containing the multiple unit search terms. If so, the fuzzy match is successful, and the corresponding operational logic description is obtained. If not, it checks whether there is any reference information whose approximate matching value with the multiple unit search terms reaches a certain threshold. If so, the fuzzy match is successful, and the corresponding operational logic description is obtained. If not, an error value is returned. It should be noted that the above matching process uses question-related information as a search term as an example. In another possible implementation, the question-related information and its corresponding operational logic description can be stored as an identifier, and then the matching is performed based on the identifier of the question-related information.
[0101] 307. The server obtains the problem identified based on the runtime logic description of the problem to be investigated.
[0102] In one possible implementation, after the server obtains the runtime logic description of the problem to be investigated, the developers of the backend management platform can obtain the runtime logic description of the problem to be investigated from the server, investigate the problem based on the runtime logic description, identify the problem, and input the problem into the server, so that the server can obtain the problem corresponding to the runtime logic description.
[0103] 308. The server obtains the solution determined based on the runtime logic description and the problem.
[0104] In one possible implementation, after the developers of the backend management platform identify the problem, they can analyze the problem, determine the solution, and input the solution into the server, so that the server can obtain the solution corresponding to the problem.
[0105] Optionally, after obtaining the solution to the problem, the server can automatically adjust the target code by adding, deleting, or modifying code based on the content indicated in the solution, thereby resolving the problem. In another possible implementation, the developers of the backend management platform adjust the target code by adding, deleting, or modifying code based on the solution, and then input the adjusted target code into the server to resolve the problem.
[0106] 309. The server stores the corresponding operation logic description and solution in the historical experience library. The historical experience library is also used to store the solutions corresponding to the multiple operation logic descriptions.
[0107] The historical experience database stores event-related information for multiple events, corresponding operational logic descriptions, and corresponding solutions. Optionally, the operational logic descriptions can be stored using logical identifiers. For example, if the operational logic description is "parameter verification passed, signature verification passed, permission verification passed, traffic control failed," then the logical identifier for this operational logic description can be 10-21-31-40, where 1, 2, 3, and 4 represent different operational logics, and 10, 21, 31, and 40 represent sub-logics of different operational logics.
[0108] It should be understood that the process of identifying the problem, solution and storing the above steps 307 to 309 can be completed by experienced developers on the server, or by inexperienced developers who can quickly understand the code based on the runtime logic description obtained by natural language description annotation, and thus complete the process of identifying the problem, solution and storing the code.
[0109] The technical solution provided in this application embodiment can generate a running logic description based on the target code and reference code during the event handling process. Since the natural language description in the running logic description can clearly explain the function of the code segment, when responding to the problem investigation request and conducting problem investigation based on the running logic description, the problem can be identified in a timely and rapid manner, reducing the difficulty of investigation, improving the efficiency of investigation, and reducing the time spent on investigation.
[0110] The above steps 301 to 309 illustrate the problem-solving process by using manual analysis by the developers of the backend management platform to determine solutions. Alternatively, solutions can be obtained by querying a historical experience database. Figure 4 This is a flowchart of a problem-solving method provided in an embodiment of this application. See also... Figure 4 This embodiment is described with a server as the execution entity, and includes:
[0111] 401. The server responds to the target event handling request and obtains the event-related information of the target event carried in the target event handling request.
[0112] 402. Based on the information related to the event, the server determines the target code corresponding to the information related to the event.
[0113] 403. Based on the target code and the reference code, the server generates a natural language description of the system's operating logic corresponding to the target code, thereby obtaining a description of the operating logic of the target event. The code segment of the reference code is annotated with a natural language description used to explain the function of the code segment.
[0114] 404. The server stores the event-related information of the target event and the corresponding execution logic description of the target event in the historical experience database, which is used to store multiple execution logic descriptions.
[0115] 405. In response to a problem investigation request for the target event, the server retrieves the problem-related information carried in the problem investigation request.
[0116] 406. Based on the relevant information about the problem, the server queries the historical experience database to obtain the operational logic description of the problem to be investigated.
[0117] 407. The server obtains the problem determined based on the runtime logic description of the problem to be investigated.
[0118] Steps 401 to 407 are the same as steps 301 to 307 above, and will not be repeated here.
[0119] It should be noted that in step 406, when the server queries the historical experience database for the description of the operational logic based on the problem-related information, if the description is not found in the historical experience database, the server does not need to execute step 407 and can directly execute step 408 to obtain a solution to the problem. This method allows for the rapid acquisition of solutions to resolve issues, and developers can use historical solutions as a reference when trying to identify problems, helping them to quickly pinpoint the issue.
[0120] 408. Based on the problem-related information of the issue to be investigated, the server queries the historical experience database to obtain a solution to the problem.
[0121] The historical experience database can store information related to problems, descriptions of operational logic, and corresponding solutions.
[0122] In one possible implementation, the server matches the problem-related information of the problem to be investigated with multiple reference information in the historical experience database to determine the reference information that successfully matches the problem-related information, and obtains the solution corresponding to the successfully matched reference information, thus determining the solution to the problem to be investigated.
[0123] Optionally, the process by which the server determines a solution to the problem to be investigated includes any of the following: In one possible implementation, the server performs an exact match based on problem-related information of the problem to be investigated and multiple reference information from the historical experience database to obtain a solution corresponding to the reference information that has been successfully matched. In another possible implementation, the server performs a fuzzy match based on problem-related information of the problem to be investigated and multiple reference information from the historical experience database to obtain a solution corresponding to the reference information that has been successfully matched. It should be noted that the specific process of the server performing an exact match or a fuzzy match is the same as the specific matching process in step 306 above, and will not be repeated here.
[0124] It should be noted that step 408 uses the example of querying a historical experience database based on problem-related information to obtain a solution. In another possible implementation, the server can also query the historical experience database based on the operational logic description of the problem to be investigated, thereby obtaining the solution corresponding to that operational logic description. The corresponding process can be: the server matches the operational logic description with multiple reference operational logic descriptions in the historical experience database, determines the successfully matched reference operational logic description, and obtains the solution corresponding to the successfully matched reference operational logic description, thus determining the solution corresponding to the operational logic description. Optionally, the process of the server determining the solution based on the operational logic description includes any of the following: In one possible implementation, the server performs an exact match based on the operational logic description and multiple reference operational logic descriptions in the historical experience database to obtain the solution corresponding to the precisely matched reference operational logic description. In yet another possible implementation, the server performs a fuzzy match based on the operational logic description and multiple reference operational logic descriptions in the historical experience database to obtain the solution corresponding to the fuzzy matched reference operational logic description. It should be noted that the specific process of the server performing exact matching or fuzzy matching is the same as the specific matching process in step 306 above, and will not be repeated here. Furthermore, this process is illustrated using the example of a historical experience base storing multiple operational logic descriptions and their corresponding solutions. In another possible implementation, the historical experience base can also store the system operational logic corresponding to the operational logic description and its corresponding solution. The solution can be queried through the system operational logic, avoiding the generation of incorrect operational logic descriptions that would lead to the query of incorrect solutions.
[0125] In steps 401 to 408, after determining the operational logic description and problem of the issue to be investigated, the server then queries the historical experience database to obtain a solution. This method allows developers to analyze the problem in relation to the solution, ensuring the correct solution is identified. Alternatively, the server can directly query for a solution after obtaining the relevant problem information. This method allows for rapid solution retrieval and timely problem resolution. The corresponding process can be: the server responds to a problem investigation request for the target event, obtains the problem-related information carried in the request, and queries the historical experience database based on this information to obtain a solution for the problem.
[0126] The technical solution provided in this application, during event handling, can generate a runtime logic description based on the target code and reference code. Since the natural language description in the runtime logic description can clearly explain the function of the code segment, it can quickly and promptly identify problems when responding to troubleshooting requests and performing troubleshooting based on the runtime logic description, reducing the difficulty of troubleshooting, improving troubleshooting efficiency, and reducing troubleshooting time. Natural language description can solve the problem of inexperienced developers being unfamiliar with the code. Furthermore, by setting up a historical experience library, historical experience can be reused, ensuring that both inexperienced and experienced developers can refer to historical solutions, avoiding repetitive work on the same problems. In addition, this application embodiment can also support CAT (Central Application Tracking) error logs through a plugin. CAT error logs are used to record error information of software or hardware in the system during operation. Error information recorded in the system operation log can determine the cause of errors (or problems). In addition, the CAT error log can be used to monitor events occurring in the system. When a problem is found during system monitoring, the CAT error log can send a warning message to the server. The CAT error log can monitor events occurring in the system and trigger the troubleshooting process, enabling broader reuse of experience.
[0127] Based on the above technical solutions, this application also provides a comparison of the effectiveness of troubleshooting with inexperienced developers, troubleshooting with experienced developers, and troubleshooting using this solution. Figure 5 As shown, Figure 5This is a schematic diagram of how an inexperienced developer troubleshoots a problem, as provided in an embodiment of this application. When troubleshooting, inexperienced developers usually need to look at and analyze the code to determine the solution. It takes 30 minutes for an inexperienced developer to troubleshoot a problem, which is time-consuming. Figure 6 This is a schematic diagram illustrating how an experienced developer can troubleshoot problems, as provided in an embodiment of this application. Figure 6 As shown, experienced developers, due to their extensive experience in troubleshooting and high familiarity with the code, typically only need to recall the code or their experience to troubleshoot problems. Experienced developers take about 5 minutes to troubleshoot, which is shorter than that of inexperienced developers. Figure 7 This is a schematic diagram illustrating how to troubleshoot problems using this solution, as provided in an embodiment of this application. Figure 7 As shown, when troubleshooting using this solution, after determining that the running logic description is "parameter verification passed, signature verification passed, permission verification passed, traffic control failed", the logical identifiers of the running logic description can be obtained, which are 10, 21, 31, and 40 respectively. Then, the corresponding solutions can be determined by querying the historical experience database through the logical identifiers. Troubleshooting using this solution only takes 2 minutes, which greatly reduces the time spent on troubleshooting and improves the efficiency of troubleshooting. Using the solution provided in this application, even inexperienced developers, operations personnel, and third-party users can quickly troubleshoot problems, which has obvious advantages in reducing the difficulty of troubleshooting and improving the efficiency of troubleshooting.
[0128] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0129] Figure 8 This is a schematic diagram of a problem-solving device provided in an embodiment of this application. See also... Figure 8 The device includes:
[0130] The determination module 801 is used to respond to a target event processing request and determine the target code corresponding to the event-related information carried by the target event processing request.
[0131] The generation module 802 is used to generate a natural language description of the system operation logic corresponding to the target code based on the target code and the reference code, thereby obtaining a description of the operation logic of the target event. The code segment of the reference code is marked with a natural language description for explaining the function of the code segment.
[0132] The storage module 803 is used to store the event-related information of the target event and the corresponding operation logic description of the target event in the historical experience database, which is used to store multiple operation logic descriptions.
[0133] The query module 804 is used to respond to a problem investigation request, and based on the problem-related information of the problem to be investigated carried in the problem investigation request, to query the historical experience database to obtain the operational logic description of the problem to be investigated.
[0134] The acquisition module 805 is used to acquire the problem determined based on the runtime logic description of the problem to be investigated.
[0135] In one possible implementation, the generation module 802 is used for:
[0136] Based on at least one logical dot in the target code, determine at least one execution step corresponding to the at least one logical dot, wherein the logical dot is used to identify the end point of the execution step;
[0137] At the end of each running step, based on the running step, the running result of the running step, and the reference code, a natural language description is annotated for the running step and the running result, so as to obtain a natural language description of at least one running step and a natural language description of the running result corresponding to the at least one running step.
[0138] A natural language description of the system's operating logic corresponding to the target code is generated based on the natural language description of the at least one operating step and the natural language description of the corresponding operating result of the at least one operating step.
[0139] In one possible implementation, the query module 804 is used for any of the following:
[0140] Based on the problem-related information of the issue to be investigated and multiple reference information in the historical experience database, a precise match is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0141] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
[0142] In one possible implementation, the device further includes:
[0143] The solution acquisition module is used to acquire the solution determined based on the runtime logic description and the problem.
[0144] In one possible implementation, the storage module 803 is also used for:
[0145] The description of the operational logic and the corresponding solution are stored in the historical experience library, which is also used to store the solutions corresponding to the multiple descriptions of operational logic.
[0146] In one possible implementation, the historical experience base is also used to store solutions corresponding to the multiple runtime logic descriptions, and the device further includes:
[0147] The information acquisition module is used to respond to a problem investigation request and acquire the problem-related information carried in the problem investigation request.
[0148] The solution query module is used to search the historical experience database based on the problem-related information of the problem to be investigated, and obtain the solution to the problem.
[0149] In one possible implementation, the solution query module is used for any of the following:
[0150] Based on the problem-related information of the issue to be investigated and multiple reference information in the historical experience database, a precise match is performed to obtain the solution corresponding to the reference information that is successfully matched.
[0151] Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the solutions corresponding to the reference information that is successfully matched.
[0152] It should be noted that the problem-solving device provided in the above embodiments is only illustrated by the division of the above functional modules during problem-solving. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the server can be divided into different functional modules to complete all or part of the functions described above. In addition, the problem-solving device provided in the above embodiments and the problem-solving triggering method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0153] The technical solution provided in this application, during event handling, can generate an operational logic description based on the target code and reference code. Since the natural language description in the operational logic description can clearly explain the function of the code segment, when responding to a problem-solving request and performing troubleshooting based on the operational logic description, the problem can be identified quickly and promptly, reducing the difficulty of troubleshooting, improving troubleshooting efficiency, and reducing troubleshooting time. Furthermore, by setting up a historical experience database, historical experience can be reused, allowing both inexperienced and experienced developers to refer to historical solutions for the same problems, avoiding repetitive work on the same issues.
[0154] Figure 9This is a schematic diagram of a server structure provided in an embodiment of this application. The server 900 can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 901 and one or more memories 902. The memory 902 stores at least one instruction, which is loaded and executed by the processor 901 to implement the troubleshooting methods provided in the above-described method embodiments. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated here.
[0155] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to perform the troubleshooting method described in the embodiments below. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0156] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0157] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A problem-solving method, characterized in that, The method includes: In response to a target event processing request, based on the event-related information of the target event carried in the target event processing request, the target code corresponding to the event-related information is determined; Based on the target code and the reference code, a natural language description of the system operation logic corresponding to the target code is generated to obtain the operation logic description of the target event. The code segment of the reference code is marked with a natural language description for explaining the function of the code segment. The event-related information of the target event and the corresponding operation logic description of the target event are stored in the historical experience base, which is used to store multiple operation logic descriptions; In response to a problem investigation request, based on the problem-related information of the problem to be investigated carried in the problem investigation request, a query is performed in the historical experience database to obtain the operational logic description of the problem to be investigated; Obtain the problem identified based on the operational logic description of the problem to be investigated.
2. The method according to claim 1, characterized in that, The step of generating a natural language description of the system operation logic corresponding to the target code based on the target code and the reference code includes: Based on at least one logical dot in the target code, at least one running step corresponding to the at least one logical dot is determined, wherein the logical dot is used to identify the end point of the running step; At the end of each running step, based on the running step, the running result of the running step, and the reference code, natural language descriptions are annotated for the running step and the running result to obtain a natural language description of at least one running step and a natural language description of the running result corresponding to the at least one running step. A natural language description of the system's operating logic corresponding to the target code is generated based on the natural language description of the at least one operating step and the natural language description of the corresponding operating result of the at least one operating step.
3. The method according to claim 1, characterized in that, The step of querying the historical experience database based on the problem investigation request, carrying relevant information about the problem to be investigated, to obtain the operational logic description of the problem to be investigated, includes any one of the following: Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience base, a precise match is performed to obtain the running logic description corresponding to the reference information that is successfully matched. Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the running logic description corresponding to the reference information that is successfully matched.
4. The method according to claim 1, characterized in that, After obtaining the problem determined based on the operational logic description of the problem to be investigated, the method further includes: Obtain a solution based on the described operational logic and the problem.
5. The method according to claim 4, characterized in that, After obtaining the solution determined based on the operational logic description and the problem, the method further includes: The operational logic descriptions and corresponding solutions are stored in the historical experience base, which is also used to store the solutions corresponding to the multiple operational logic descriptions.
6. The method according to claim 1, characterized in that, The historical experience base is also used to store solutions corresponding to the multiple runtime logic descriptions, and the method further includes: In response to a problem investigation request, obtain the problem-related information of the problem to be investigated carried in the problem investigation request; Based on the problem-related information of the problem to be investigated, a solution to the problem is obtained by querying the historical experience database.
7. The method according to claim 6, characterized in that, The method of querying the historical experience database based on the problem-related information of the problem to be investigated to obtain a solution to the problem includes any of the following: Based on the problem-related information of the problem to be investigated and multiple reference information in the historical experience database, a precise match is performed to obtain the solution corresponding to the reference information that is successfully matched. Based on the problem-related information of the issue to be investigated and multiple reference information from the historical experience database, fuzzy matching is performed to obtain the solution corresponding to the reference information that is successfully matched.
8. A problem-solving device, characterized in that, The device includes: The determination module is used to respond to a target event processing request and, based on the event-related information of the target event carried in the target event processing request, determine the target code corresponding to the event-related information. The generation module is used to generate a natural language description of the system operation logic corresponding to the target code based on the target code and the reference code, thereby obtaining a description of the operation logic of the target event. The code segments of the reference code are marked with natural language descriptions for explaining the function of the code segments. The storage module is used to store the event-related information of the target event and the corresponding operation logic description of the target event in the historical experience database, and the historical experience database is used to store multiple operation logic descriptions; The query module is used to respond to a problem investigation request, and based on the problem-related information of the problem to be investigated carried in the problem investigation request, query the historical experience database to obtain the operational logic description of the problem to be investigated; The acquisition module is used to acquire the problem determined based on the operational logic description of the problem to be investigated.
9. A server, characterized in that, The server includes one or more processors and one or more memories, wherein the one or more memories store at least one instruction that is loaded and executed by the one or more processors to perform the operation performed by the problem-solving method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to perform the operation of the problem-solving method as described in any one of claims 1 to 7.