CN111367703A - Troubleshooting method and device - Google Patents

Troubleshooting method and device Download PDF

Info

Publication number
CN111367703A
CN111367703A CN202010192707.2A CN202010192707A CN111367703A CN 111367703 A CN111367703 A CN 111367703A CN 202010192707 A CN202010192707 A CN 202010192707A CN 111367703 A CN111367703 A CN 111367703A
Authority
CN
China
Prior art keywords
query
configuration file
target
parameters
troubleshooting
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
CN202010192707.2A
Other languages
Chinese (zh)
Other versions
CN111367703B (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010192707.2A priority Critical patent/CN111367703B/en
Publication of CN111367703A publication Critical patent/CN111367703A/en
Application granted granted Critical
Publication of CN111367703B publication Critical patent/CN111367703B/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Abstract

The embodiment of the invention provides a troubleshooting method and a troubleshooting device. The method is applied to a server and comprises the following steps: receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked; determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters; and executing the target configuration file to obtain a query result. The embodiment of the invention realizes that the server automatically executes the troubleshooting, reduces the troubleshooting time, reduces the troubleshooting cost and solves the problems of complex operation and long time consumption of troubleshooting tools in the prior art.

Description

Troubleshooting method and device
Technical Field
The invention relates to the technical field of computers, in particular to a troubleshooting method and a troubleshooting device.
Background
At present, a server often needs to provide troubleshooting service for a client during operation; in the troubleshooting process, various data sources need to be queried to find target data. In a scenario of multiple fault types, a fixed troubleshooting process is generally adopted, but for a server, since a specific fault targeted by each troubleshooting is different, a once-checked configuration file needs to be configured repeatedly each time. In the configuration process, various data sources need to be logged in and conditions need to be configured, and the operation is complicated.
To address the above-mentioned problems, some servers provide related troubleshooting tools; however, in the existing troubleshooting tool, manual participation is needed in the troubleshooting process, the operation logic is complex, for workers, complex logic of a background system needs to be learned at first, the time consumption is long, and the problem is difficult to solve quickly.
Disclosure of Invention
The embodiment of the invention aims to provide a troubleshooting method and a troubleshooting device, so that troubleshooting can be automatically executed by a server, troubleshooting time is shortened, and troubleshooting cost is reduced.
The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a troubleshooting method, applied to a server, the method including:
receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked;
determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters;
and executing the target configuration file to obtain a query result.
Optionally, the script configuration parameters include: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
Optionally, in this embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether to perform first preset processing on the original detection field;
if the first processing parameter indicates to perform first preset processing on the original detected field, the script configuration parameter further includes a first processing rule for performing first preset processing on the original detected field;
the detected field is a field obtained by performing first preset processing on the original detected field according to the first processing rule.
Optionally, the step of executing the target configuration file to obtain a query result includes:
if the target configuration file comprises a query process, executing the target configuration file, and searching a detected field pointed by the second identification number in the target data table, wherein the content of the detected field is a query result;
or
If the target configuration file comprises at least M query processes, sequentially executing each query process in the target configuration file to obtain a query result; wherein, the input parameter of the Nth inquiry flow is at least one detected field of the 1 st to the N-1 st inquiry flows; the query result is a detected field of the Mth query process; m is a positive integer greater than or equal to 2, and N is a positive integer greater than 1 and less than or equal to M.
Optionally, the process parameters further include result display parameters;
if the target configuration file comprises at least M query processes, the result display parameters comprise intermediate display parameters, and the intermediate display parameters are used for indicating whether to display the detection fields and/or the query parameters of the (N-1) th query process;
and if the intermediate display parameter indicates to display the detected field and/or the query parameter of the (N-1) th query process, carrying a link pointing to the (N) th query process in the detected field and/or the query parameter of the (N-1) th query process.
Optionally, the query result includes a fault parameter in the log of the target object.
In a second aspect of the present invention, there is also provided a troubleshooting apparatus applied to a server, the apparatus including:
the parameter receiving module is used for receiving query parameters, and the query parameters at least comprise fault types and first identification numbers of target objects to be checked;
the configuration module is used for determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters;
and the execution module is used for executing the target configuration file to obtain a query result.
Optionally, the script configuration parameters include: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
Optionally, the script configuration parameters further include: the first processing parameter is used for indicating whether to perform first preset processing on the original detection field;
if the first processing parameter indicates to perform first preset processing on the original detected field, the script configuration parameter further includes a first processing rule for performing first preset processing on the original detected field;
the detected field is a field obtained by performing first preset processing on the original detected field according to the first processing rule.
Optionally, the execution module includes:
a first executing sub-module, configured to execute the target configuration file and search a detected field pointed by the second identification number in the target data table if the target configuration file includes a query process, where the content of the detected field is a query result;
or
The second execution sub-module is used for sequentially executing each query process in the target configuration file to obtain a query result if the target configuration file comprises at least M query processes; wherein, the input parameter of the Nth inquiry flow is at least one detected field of the 1 st to the N-1 st inquiry flows; the query result is a detected field of the Mth query process; m is a positive integer greater than or equal to 2, and N is a positive integer greater than 1 and less than or equal to M.
Optionally, the process parameters further include result display parameters;
if the target configuration file comprises at least M query processes, the result display parameters comprise intermediate display parameters, and the intermediate display parameters are used for indicating whether to display the detection fields and/or the query parameters of the (N-1) th query process;
and if the intermediate display parameter indicates to display the detected field and/or the query parameter of the (N-1) th query process, carrying a link pointing to the (N) th query process in the detected field and/or the query parameter of the (N-1) th query process.
Optionally, the query result includes a fault parameter in the log of the target object.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform any of the above-described troubleshooting methods.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the troubleshooting method described in any one of the above.
According to the troubleshooting method and device provided by the embodiment of the invention, the server receives the query parameters, and the query parameters at least comprise the fault type and the first identification number of the target object to be troubleshot; filling the first identification number into a preset configuration file based on the preset configuration file which is configured in advance and corresponds to each fault type to obtain a target configuration file; finally, executing the target configuration file to obtain a query result; the user only needs to input the query parameters into the server, the operation is simple, the server automatically executes troubleshooting, the troubleshooting time is shortened, and the troubleshooting cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart illustrating one of the steps of a troubleshooting method provided in an embodiment of the present invention;
fig. 2 is a schematic diagram of a UI interface of a first example provided in an embodiment of the present invention;
FIG. 3 is a second flowchart illustrating the steps of a troubleshooting method according to an embodiment of the present invention;
fig. 4 is a UI interface diagram of a second example provided in the embodiment of the present invention;
fig. 5 is an interaction diagram of a third example provided in an embodiment of the present invention;
fig. 6 is an architecture diagram of a third example provided in an embodiment of the present invention;
fig. 7 is a block diagram of a troubleshooting apparatus provided in an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not limit the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a troubleshooting method, applied to a server, including:
step 101, receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked;
step 102, determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the script configuration parameters in the process parameters;
and 103, executing the target configuration file to obtain a query result.
In step 101, the server receives a query parameter, where the query parameter is a parameter related to a fault, and includes a fault type and a first identification number of a target object, and the first identification number may be a mobile phone number or an order number. Optionally, as a first example, referring to fig. 2, the server may provide a User Interface (User Interface, UI) Interface for the User on the User side, provide an input position of the query parameter in the UI Interface, for example, at a1 position in fig. 2, for selecting the type of the first identification number, for example, provide at least two type options in a drop-down menu of a1 for the User to select; a first identification number entered for the user at position B1; if the user selects the genre at A1, the server recognizes the first identification number entered by the user at B1 as the identification number under the selected genre. The position C1 is a fault type input position, and a user can directly input a fault type at the position C1 or select the fault type in a pull-down menu of the position C1; after the user inputs the first identification number and inputs (or selects) the fault type, the user can click to search, the UI interface sends the first identification number and the fault type to the server, and the server receives the query parameters and then executes step 102.
It can be understood that, in the embodiment of the present invention, the user refers to a person who initiates troubleshooting.
In step 102, a server determines a preset configuration file corresponding to a fault type; the server side is preset with preset configuration files of multiple fault types, and the configuration files are used for the server to perform troubleshooting aiming at the fault types; and presetting a target field in the configuration file as a vacant field, filling the first identification number into the target field by the server to obtain the target configuration file, and executing the target configuration file when the server executes troubleshooting. The target field is used for determining the queried data table by the server; and the first identification number is used as an index, after the first identification number is filled into the target field, the server carries out addressing according to the target field and inquires a data table for recording the log of the target object.
The target configuration file comprises query processes to be executed and process parameters of each query process; optionally, the number of flows included in the target configuration file corresponding to different fault types may be different, and the number of flows may be one or more, but each flow has its own flow parameters. The process parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query process.
In step 103, the server executes the target configuration file, and executes each query process in the target configuration file to obtain a query result; if the query process comprises at least two, the server executes each query process in sequence, and the query result can only display the result of the last query process or can display other intermediate results.
Optionally, the type of the query result may be a fault name, a code of the fault name, or a log recording the fault name. And when the server executes the target configuration file, extracting a fault field from a log data table of the target object, and displaying the query result to the user according to the type of the query result.
In the above embodiment of the present invention, the server receives query parameters, where the query parameters at least include a fault type and a first identification number of a target object to be checked; filling the first identification number into a preset configuration file based on the preset configuration file which is configured in advance and corresponds to each fault type to obtain a target configuration file; finally, executing the target configuration file to obtain a query result; the user only needs to input the query parameters into the server, the operation is simple, the server automatically executes troubleshooting, the troubleshooting time is shortened, and the troubleshooting cost is reduced. The embodiment of the invention solves the problems that in the prior art, a troubleshooting tool is complex in operation and long in time consumption.
It will be appreciated that the flow parameters also include other parameters, such as: a process title (nameCn), a parameter list (input), a process query step (procedure), display parameter configuration (display), and the like; specifically, the flow title and the parameter list may be the same title and the same parameter list used by each target configuration file, or each query flow may have its own flow title and/or parameter list.
Flow headings such as "order number lookup details"; the parameter list may include: the engine (engine) used by the current step, the step alias (alias, presentation title for query result) and the script configuration parameters.
Optionally, in this embodiment of the present invention, the query result includes a fault parameter in a log of the target object, where the log of the target object is an operation log.
Optionally, in this embodiment of the present invention, the script configuration parameters include: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
The target data table is a data table for recording the running log, the data table is a data source for process query, and the data source can be mysql, es, hdfs, log, curl return value, command return value and the like; the query condition is obtained after the server fills the first identification number into the target field; a detection field, namely a target query field, which records the fault name of the target object, the code of the fault name and/or a log recording the fault name; the second identification number is used for identifying the detected field; by way of example, referring to the following configuration file, annotated content is identified as per-field annotated content:
script (Note: query script)
from t _ movie _ border (note: t _ movie _ border is the target data table of the query);
where:
"border _ id { { input.border _ id } } 'or mobile { { input.mobile } }'" (note: where person is followed by a query condition, where input.border _ id or input.mobile is the first identification number);
select:>-
note that select is the second identification number and ">", is the detected field.
And after the server obtains the target configuration file, analyzing the script configuration parameters in the target configuration file, and performing troubleshooting according to the script configuration parameters.
Optionally, in this embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether to perform first preset processing on the original detection field;
if the first processing parameter indicates to perform first preset processing on the original detected field, the script configuration parameter further includes a first processing rule for performing first preset processing on the original detected field;
the detected field is a field obtained by performing first preset processing on the original detected field according to the first processing rule.
The first processing parameter is used for indicating whether to perform first preset processing on the original detected field, and the first preset processing is used for converting the original detected field into a format corresponding to the detected field, for example, the original detected field is a code of a fault type and is transcoded into a character of the fault type through the first preset processing.
Referring to fig. 3, another embodiment of the present invention provides a troubleshooting method applied to a server, including:
step 301, receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked;
step 302, determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters;
step 303, if the target configuration file includes a query process, executing the target configuration file, and searching a detected field pointed by the second identification number in the target data table, where the content of the detected field is a query result;
or
Step 304, if the target configuration file comprises at least M query processes, sequentially executing each query process in the target configuration file to obtain a query result; wherein, the input parameter of the Nth inquiry flow is at least one detected field of the 1 st to the N-1 st inquiry flows; the query result is a detected field of the Mth query process; m is a positive integer greater than or equal to 2, and N is a positive integer greater than 1 and less than or equal to M.
In step 301, the server receives a query parameter, where the query parameter is a parameter related to a fault, and includes a fault type and a first identification number of the target object, and the first identification number may be a mobile phone number or an order number.
In step 302, the server determines a preset configuration file corresponding to the fault type; the server side is preset with preset configuration files of multiple fault types, and the configuration files are used for the server to perform troubleshooting aiming at the fault types; and presetting a target field in the configuration file as a vacant field, filling the first identification number into the target field by the server to obtain the target configuration file, and executing the target configuration file when the server executes troubleshooting. The target field is used for determining the queried data table by the server; and the first identification number is used as an index, after the first identification number is filled into the target field, the server carries out addressing according to the target field and inquires a data table for recording the log of the target object.
The target configuration file comprises query processes to be executed and process parameters of each query process; optionally, the number of flows included in the target configuration file corresponding to different fault types may be different, and the number of flows may be one or more, but each flow has its own flow parameters. The process parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query process.
If the target configuration file only includes one query process, the server executes step 303, and the server executes the target configuration file to search for the detected field pointed by the second identification number in the target data table, so that the content of the detected field is a query result.
If the target configuration file comprises at least M query processes, that is, at least two query processes, the server executes step 304, sequentially executes each query process in the target configuration file, and performs streaming processing on the result of each query process to obtain a query result; wherein, the input parameter of the Nth query process is at least one detected field of the 1 st to the N-1 st query processes, namely the input parameter of the current query process can be the detected field of any previous query process; and the final query result is the detected field of the last query flow.
Further, in the embodiment of the present invention, the process parameters further include a result display parameter;
if the target configuration file comprises at least M query processes, the result display parameters comprise intermediate display parameters, and the intermediate display parameters are used for indicating whether to display the detection fields and/or the query parameters of the (N-1) th query process;
and if the intermediate display parameter indicates to display the detected field and/or the query parameter of the (N-1) th query process, carrying a link pointing to the (N) th query process in the detected field and/or the query parameter of the (N-1) th query process.
That is, the process parameters include result display parameters, and the result display parameters include whether to show the result to the user, specific configuration of the result, and the like; the specific configuration of the display results is as follows: a query result sorting mode, the number of pieces to be displayed of the query result, and the like. If the target configuration file comprises a plurality of query processes, the result display parameters also comprise intermediate display parameters, and the intermediate display parameters indicate whether the detected field of the (N-1) th query process (namely, the non-last query process) is displayed or not; if so, carrying a link pointing to the Nth query process in the detected field of the (N-1) th query process, for example, setting that the user can jump to the next query process by clicking the detected field; as a second example, referring to fig. 4, fig. 4 shows a schematic diagram of a UI interface 2, where the UI interface 2 is a query result of the process 1, and if the user clicks on the first identification number B1 and/or the position of the check-out field D1, the process 2 may be skipped, and the server executes the query process 2.
As a third example, fig. 5 shows a specific example of querying online ticket booking for a ticket issuing failure in a lock seat link, an interaction process between a user and a server is shown in fig. 5, and a server side can perform troubleshooting through a troubleshooting tool, and the method mainly includes the following steps:
1. when the server is started, starting HTTP service, and reading a storage list (the storage is a flow configuration file); the storage list comprises a plurality of storage configuration files, namely preset configuration files; each preset configuration file is a storage file.
2. The user enters the query parameters.
The user may select the type of the first identification number, which may be an order number or a mobile phone number (a mobile phone number of a ticketing user), at a1 in the UI interface 1 shown in fig. 2, and fill the first identification number of the target object at a B1 position, click a search to initiate troubleshooting.
3. The server receives the query parameters.
In the process, if the input parameters submitted by the user are not in the preset data format of the server, the server can also perform pre-compiling on the query parameters and convert the query parameters into the readable preset data format; if the user inputs more query parameters including unnecessary parameters, the server can filter the parameters.
4. And the server searches a preset configuration file corresponding to the fault type, and fills the first identification number into a target field in the preset configuration file to obtain a target configuration file.
5. And the server executes one troubleshooting according to the target configuration file.
At this time, the content in the first query process of the target configuration file is as shown in the following example, and the annotated content is identified as the annotated content of each field: :
service (Note: service)
nameCn (Note: query flow title: order number to look up details)
input (note: define the parameter list needed by the inquiry process, such as parameter name, parameter description, parameter type and necessary parameter)
Name, border _ id (Note: order number)
nameCn:
Int type (Note: parameter type, integer)
must:1
-name:action_type
nameCn (Note: behavior type fillable: 1.; 2. buyTicket; 3. lockSeat));
type:string
procedure (Note: query flow)
Engine mysql (comments: Process parameters defining the first query Process, query Engine)
alias (Note: alias of current flow detection result set, such as 'order')
dbname, movie _ instant _ info (Note: data storage target location)
script (Note: query script)
from t _ movie _ border (note: t _ movie _ border is the target data table of the query);
where:
"border _ id { { input.border _ id } } 'or mobile { { input.mobile } }'" (note: where person is followed by a query condition, where input.border _ id or input.mobile is the first identification number);
select:>-
note that select is the second identification number and ">", is the detected field.
6. The server judges whether the next process exists: if so, a jump to the next flow is allowed.
At this time, the target configuration file further includes the following contents:
nextPhase:
key: "border _ id" (note: define which flow can be skipped in the last query flow, in this example, click in the check-out field of the page show "border _ id" can be skipped to "movie _ full _ ticket" flow, and the border _ id is used as the input parameter for the next query flow)
7. And jumping to the next query process.
The content of the second query process of the target configuration file is shown as the following example:
es (note: define the second query step, the query engine is an elastic search, and other process parameters are the same as those of the first query process, and are not described again)
dbname:newticket
Alias Log record
script:
where:>-
"query":{
"bool":{
"filter":[{
"range":{
"@ time," gte "{ { order, lock _ time | mathCalc ($ { v } -5000) } }000" (note: performing streaming processing on input parameters, and using the lock _ time value queried in the first query flow as the input parameters of the second query flow after first preset processing (subtracting 5000 from mathCalc function) is performed on the lock _ time value queried in the first query flow)
"lte" { { order _ time | mathCalc ($ { v } +2000) }000"," format ": epoch _ millis" }000,
select { # [ $ [ "hits" ] [ "_ source" ] [ "url", "request", "response", "error _ msg" ] }' (note: presentation result configuration presented to the user, several fields following the select are taken).
8. And the server obtains a query result according to the detected field of the last query flow and displays the query result on the front-end UI.
Referring to fig. 6, fig. 6 shows a system architecture diagram applied in the above example.
The front-end UI interface is used for interacting with a user, and may include an Html module, an Email module, a Grafena module, or other modules (other).
The display layer is used for transmitting interactive messages between the UI interface and the server, and comprises a submission parameter page and a rendering general result page, wherein the submission parameter page is used for generating parameters which can be identified by the server from input parameters of the UI interface, and the rendering general result page is used for converting query results searched by the server into UI interface display results.
The server side comprises a flow execution engine and a data source;
the flow execution engine comprises:
the storery manager is used for managing preset configuration files;
and the execution engine is used for executing the target configuration file and performing troubleshooting.
In addition, the execution engine side also comprises a parameter pre-compiling module, a multi-data source executor and an execution result processing module.
Data sources include mysql, es, hdfs, api, cmd, or others.
The server side also includes modules such as a store flow configuration (a store, i.e., a flow configuration file) and a global operation configuration.
In the above example, the server automatically performs troubleshooting according to a pre-configured configuration file, and for the user side, only the query parameter needs to be input into the front-end UI interface, and the multi-step query operation is reduced to one-click operation; and each fault type is preset with a fault configuration file, so that the server can process problems more specifically. The data source module of the server integrates various data sources, adapts to most of current service scenes, can be used by opening boxes of a plurality of services, supports various configuration modes, and is easy to use and expand; and various execution processes are supported, and different service scenes are adapted.
In the above embodiment of the present invention, the server receives query parameters, where the query parameters at least include a fault type and a first identification number of a target object to be checked; filling the first identification number into a preset configuration file based on the preset configuration file which is configured in advance and corresponds to each fault type to obtain a target configuration file; finally, executing the target configuration file to obtain a query result; the user only needs to input the query parameters into the server, the operation is simple, the server automatically executes troubleshooting, the troubleshooting time is shortened, and the troubleshooting cost is reduced. The embodiment of the invention solves the problems that in the prior art, a troubleshooting tool is complex in operation and long in time consumption.
Referring to fig. 7, an embodiment of the present invention further provides a troubleshooting apparatus, which is applied to a server, and the troubleshooting apparatus includes:
a parameter receiving module 701, configured to receive query parameters, where the query parameters at least include a fault type and a first identification number of a target object to be checked;
a configuration module 702, configured to determine a preset configuration file corresponding to the fault type, and fill the first identification number in a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters;
and the execution module is used for executing the target configuration file to obtain a query result.
The parameter receiving module 701 receives a query parameter, where the query parameter is a related parameter of a fault, and includes a fault type and a first identification number of a target object, and the first identification number may be a mobile phone number or an order number. Optionally, as a first example, referring to fig. 2, the server may provide a User Interface (User Interface, UI) Interface for the User on the User side, provide an input position of the query parameter in the UI Interface, for example, at a1 position in fig. 2, for selecting the type of the first identification number, for example, provide at least two type options in a drop-down menu of a1 for the User to select; a first identification number entered for the user at position B1; if the user selects the genre at A1, the server recognizes the first identification number entered by the user at B1 as the identification number under the selected genre. The position C1 is a fault type input position, and a user can directly input a fault type at the position C1 or select the fault type in a pull-down menu of the position C1; after the user inputs the first identification number and inputs (or selects) the fault type, the user can click to search, the UI interface sends the first identification number and the fault type to the server, and the server receives the query parameters and then executes step 102.
It can be understood that, in the embodiment of the present invention, the user refers to a person who initiates troubleshooting.
The configuration module 702 determines a preset configuration file corresponding to the fault type; the server side is preset with preset configuration files of multiple fault types, and the configuration files are used for the server to perform troubleshooting aiming at the fault types; and presetting a target field in the configuration file as a vacant field, filling the first identification number into the target field by the server to obtain the target configuration file, and executing the target configuration file when the server executes troubleshooting. The target field is used for determining the queried data table by the server; and the first identification number is used as an index, after the first identification number is filled into the target field, the server carries out addressing according to the target field and inquires a data table for recording the log of the target object.
The target configuration file comprises query processes to be executed and process parameters of each query process; optionally, the number of flows included in the target configuration file corresponding to different fault types may be different, and the number of flows may be one or more, but each flow has its own flow parameters. The process parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query process.
The execution module executes the target configuration file and executes each query process in the target configuration file to obtain a query result; if the query process comprises at least two, the server executes each query process in sequence, and the query result can only display the result of the last query process or can display other intermediate results.
Optionally, the type of the query result may be a fault name, a code of the fault name, or a log recording the fault name. And when the server executes the target configuration file, extracting a fault field from a log data table of the target object, and displaying the query result to the user according to the type of the query result.
Optionally, in this embodiment of the present invention, the script configuration parameters include: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
Optionally, in this embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether to perform first preset processing on the original detection field;
if the first processing parameter indicates to perform first preset processing on the original detected field, the script configuration parameter further includes a first processing rule for performing first preset processing on the original detected field;
the detected field is a field obtained by performing first preset processing on the original detected field according to the first processing rule.
Optionally, in an embodiment of the present invention, the execution module includes:
a first executing sub-module, configured to execute the target configuration file and search a detected field pointed by the second identification number in the target data table if the target configuration file includes a query process, where the content of the detected field is a query result;
or
The second execution sub-module is used for sequentially executing each query process in the target configuration file to obtain a query result if the target configuration file comprises at least M query processes; wherein, the input parameter of the Nth inquiry flow is at least one detected field of the 1 st to the N-1 st inquiry flows; the query result is a detected field of the Mth query process; m is a positive integer greater than or equal to 2, and N is a positive integer greater than 1 and less than or equal to M.
Optionally, in the embodiment of the present invention, the process parameters further include a result display parameter;
if the target configuration file comprises at least M query processes, the result display parameters comprise intermediate display parameters, and the intermediate display parameters are used for indicating whether to display the detection fields and/or the query parameters of the (N-1) th query process;
and if the intermediate display parameter indicates to display the detected field and/or the query parameter of the (N-1) th query process, carrying a link pointing to the (N) th query process in the detected field and/or the query parameter of the (N-1) th query process.
Optionally, in this embodiment of the present invention, the query result includes a fault parameter in the log of the target object.
In the above embodiment of the present invention, the parameter receiving module 701 receives a query parameter, where the query parameter at least includes a fault type and a first identification number of a target object to be checked; the configuration module 702 fills the first identification number into a preset configuration file based on the preset configuration file corresponding to each fault type, which is configured in advance, to obtain a target configuration file; the execution module executes the target configuration file to obtain a query result; the user only needs to input the query parameters into the server, the operation is simple, the server automatically executes troubleshooting, the troubleshooting time is shortened, and the troubleshooting cost is reduced. The embodiment of the invention solves the problems that in the prior art, a troubleshooting tool is complex in operation and long in time consumption.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which includes a processor 81, a communication interface 82, a memory 83, and a communication bus 84, where the processor 81, the communication interface 82, and the memory 83 complete mutual communication through the communication bus 84,
a memory 83 for storing a computer program;
the processor 81 is configured to implement the following steps when executing the program stored in the memory 83:
receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked;
determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the script configuration parameters in the process parameters;
and executing the target configuration file to obtain a query result.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, which when run on a computer, cause the computer to perform the troubleshooting method described in any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the troubleshooting method of any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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 instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A troubleshooting method is applied to a server and is characterized by comprising the following steps:
receiving query parameters, wherein the query parameters at least comprise a fault type and a first identification number of a target object to be checked;
determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the script configuration parameters in the process parameters;
and executing the target configuration file to obtain a query result.
2. The troubleshooting method of claim 1, wherein the script configuration parameters comprise: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
3. The troubleshooting method of claim 2, wherein the script configuration parameters further include: the first processing parameter is used for indicating whether to perform first preset processing on the original detection field;
if the first processing parameter indicates to perform first preset processing on the original detected field, the script configuration parameter further includes a first processing rule for performing first preset processing on the original detected field;
the detected field is a field obtained by performing first preset processing on the original detected field according to the first processing rule.
4. The troubleshooting method of claim 2, wherein the step of executing the target configuration file to obtain the query result comprises:
if the target configuration file comprises a query process, executing the target configuration file, and searching a detected field pointed by the second identification number in the target data table, wherein the content of the detected field is a query result;
or
If the target configuration file comprises at least M query processes, sequentially executing each query process in the target configuration file to obtain a query result; wherein, the input parameter of the Nth inquiry flow is at least one detected field of the 1 st to the N-1 st inquiry flows; the query result is a detected field of the Mth query process; m is a positive integer greater than or equal to 2, and N is a positive integer greater than 1 and less than or equal to M.
5. The troubleshooting method according to claim 4, wherein the process parameters further include a result display parameter;
if the target configuration file comprises at least M query processes, the result display parameters comprise intermediate display parameters, and the intermediate display parameters are used for indicating whether to display the detection fields and/or the query parameters of the (N-1) th query process;
and if the intermediate display parameter indicates to display the detected field and/or the query parameter of the (N-1) th query process, carrying a link pointing to the (N) th query process in the detected field and/or the query parameter of the (N-1) th query process.
6. The troubleshooting method of claim 1, wherein the query result includes a failure parameter in a log of the target object.
7. A troubleshooting device is applied to a server and is characterized by comprising:
the parameter receiving module is used for receiving query parameters, and the query parameters at least comprise fault types and first identification numbers of target objects to be checked;
the configuration module is used for determining a preset configuration file corresponding to the fault type, and filling the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises query processes and process parameters of each query process, and the process parameters comprise script configuration parameters;
and the execution module is used for executing the target configuration file to obtain a query result.
8. The troubleshooting apparatus of claim 7, wherein the script configuration parameters comprise: the inquired target data table, the inquiry condition and the second identification number of the detected field;
wherein the target field is included in the query condition.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the troubleshooting method of any one of claims 1 through 6 when the processor executes the program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the troubleshooting method of any one of claims 1 through 6.
CN202010192707.2A 2020-03-18 2020-03-18 Fault checking method and device Active CN111367703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010192707.2A CN111367703B (en) 2020-03-18 2020-03-18 Fault checking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010192707.2A CN111367703B (en) 2020-03-18 2020-03-18 Fault checking method and device

Publications (2)

Publication Number Publication Date
CN111367703A true CN111367703A (en) 2020-07-03
CN111367703B CN111367703B (en) 2024-03-29

Family

ID=71206873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010192707.2A Active CN111367703B (en) 2020-03-18 2020-03-18 Fault checking method and device

Country Status (1)

Country Link
CN (1) CN111367703B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148463A (en) * 2020-10-23 2020-12-29 新华三大数据技术有限公司 Business process control method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163223A (en) * 2011-04-02 2011-08-24 锐词文化发展(北京)有限公司 Self-service query method and device thereof for background data
US20160171092A1 (en) * 2014-12-13 2016-06-16 International Business Machines Corporation Framework for Annotated-Text Search using Indexed Parallel Fields
CN108920296A (en) * 2018-07-10 2018-11-30 郑州云海信息技术有限公司 A kind of Fault Locating Method, device and computer readable storage medium
CN110474959A (en) * 2019-07-12 2019-11-19 平安普惠企业管理有限公司 Data interactive method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163223A (en) * 2011-04-02 2011-08-24 锐词文化发展(北京)有限公司 Self-service query method and device thereof for background data
US20160171092A1 (en) * 2014-12-13 2016-06-16 International Business Machines Corporation Framework for Annotated-Text Search using Indexed Parallel Fields
CN108920296A (en) * 2018-07-10 2018-11-30 郑州云海信息技术有限公司 A kind of Fault Locating Method, device and computer readable storage medium
CN110474959A (en) * 2019-07-12 2019-11-19 平安普惠企业管理有限公司 Data interactive method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148463A (en) * 2020-10-23 2020-12-29 新华三大数据技术有限公司 Business process control method and device
CN112148463B (en) * 2020-10-23 2023-07-21 新华三大数据技术有限公司 Business process control method and device

Also Published As

Publication number Publication date
CN111367703B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
US10318360B2 (en) Registry for app features referenced pointers and pointer definitions
US8756593B2 (en) Map generator for representing interrelationships between app features forged by dynamic pointers
US8589876B1 (en) Detection of central-registry events influencing dynamic pointers and app feature dependencies
US10365790B2 (en) Determining appropriate browsing applications for selected network resources
CN109284321B (en) Data loading method, device, computing equipment and computer readable storage medium
CN113760763A (en) Software testing method, device, server and system
US9946693B2 (en) Displaying of webpage comments in an order according to the number of webpage comments
CN103678706A (en) Picture recognition method, system, equipment and device based on screenshot information
CN111368226A (en) Screening method and device, electronic equipment and computer readable storage medium
CN109213782B (en) Search interface configuration and display method and device and communication equipment
CN104699836A (en) Multi-keyword search prompting method and multi-keyword search prompting device
CN112437148B (en) Service request processing method and device, service server and system
CN111367703A (en) Troubleshooting method and device
CN109446451B (en) Webpage display method, device, medium and computing equipment
CN109542743B (en) Log checking method and device, electronic equipment and computer readable storage medium
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
WO2013190607A1 (en) Screen information collecting computer, screen information collecting method, and computer-readable storage medium
CN110674386B (en) Resource recommendation method, device and storage medium
CN109324822B (en) PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device
CN111090808A (en) Page information pushing method, device, server and computer readable storage medium
CN112579952A (en) Page display method and device, storage medium and electronic equipment
JP6515736B2 (en) INFORMATION PROCESSING APPARATUS AND INFORMATION PROCESSING PROGRAM
CN115022285B (en) Method and device for configuring one-key automatic internet communication equipment
CN110659191B (en) Buried data analysis method, buried data analysis device, computer equipment and storage medium

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