CN111367703B - Fault checking method and device - Google Patents

Fault checking method and device Download PDF

Info

Publication number
CN111367703B
CN111367703B CN202010192707.2A CN202010192707A CN111367703B CN 111367703 B CN111367703 B CN 111367703B CN 202010192707 A CN202010192707 A CN 202010192707A CN 111367703 B CN111367703 B CN 111367703B
Authority
CN
China
Prior art keywords
query
target
configuration file
parameters
flow
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.)
Active
Application number
CN202010192707.2A
Other languages
Chinese (zh)
Other versions
CN111367703A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a fault detection method and device. The method is applied to a server, and comprises the following steps: receiving a query parameter, wherein the query parameter at least comprises 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 inquiry flows and flow parameters of each inquiry flow, and the flow parameters comprise script configuration parameters; and executing the target configuration file to obtain a query result. The embodiment of the invention realizes the automatic execution of the fault checking by the server, reduces the fault checking time, reduces the checking cost, and solves the problems of complex operation and long time consumption of the fault checking tool in the prior art.

Description

Fault checking method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a fault detection method and device.
Background
At present, a server is often required to provide fault checking service for a client during operation; in the process of troubleshooting, various data sources need to be queried to find target data. In the case of multiple fault types, a fixed troubleshooting process is usually adopted, but for a server, since specific faults for each troubleshooting are different, configuration files for one troubleshooting need to be repeatedly configured each time. In the configuration process, various data sources are required to be logged in, the configuration checking conditions and the like, and the operation is complicated.
To solve the above problems, some servers provide related troubleshooting tools; however, in the existing fault checking tool, manual participation is needed in the checking flow, the operation logic is complex, and for staff, the complex logic of a background system is needed to be learned first, so that 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 fault checking method and device, so that a server can automatically perform fault checking, the fault checking time is reduced, and the checking cost is reduced.
The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a fault detection method, applied to a server, the method including:
receiving a query parameter, wherein the query parameter at least comprises 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 inquiry flows and flow parameters of each inquiry flow, and the flow parameters comprise script configuration parameters;
And executing the target configuration file to obtain a query result.
Optionally, the script configuration parameters include: the target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
wherein the target field is included in the query condition.
Optionally, in an embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether the original detected field is subjected to first preset processing or not;
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 after the original detected field is subjected to first preset processing 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 flow, executing the target configuration file, and searching a detection field pointed by the second identification number in the target data table, wherein the content of the detection field is a query result;
Or (b)
If the target configuration file comprises at least M query flows, sequentially executing each query flow in the target configuration file to obtain a query result; the input parameters of the nth query flow are at least one detected field of the 1 st to the N-1 st query flows; the query result is a detected field of the Mth query flow; 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 flow parameters further include a result display parameter;
if the target configuration file comprises at least M query flows, 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 flow;
and if the intermediate display parameters indicate to display the detected fields and/or the query parameters of the N-1 th query flow, the detected fields and/or the query parameters of the N-1 th query flow carry links pointing to the N-1 th query flow.
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 fault detection device applied to a server, the device including:
The parameter receiving module is used for 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;
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 inquiry flows and flow parameters of each inquiry flow, and the flow 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 target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
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 the original detected field is subjected to first preset processing or not;
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 after the original detected field is subjected to first preset processing according to the first processing rule.
Optionally, the execution module includes:
the first execution sub-module is used for executing the target configuration file and searching a detection field pointed by the second identification number in the target data table if the target configuration file comprises a query flow, wherein the content of the detection field is a query result;
or (b)
The second execution sub-module is used for executing each query flow in the target configuration file in sequence to obtain a query result if the target configuration file comprises at least M query flows; the input parameters of the nth query flow are at least one detected field of the 1 st to the N-1 st query flows; the query result is a detected field of the Mth query flow; 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 flow parameters further include a result display parameter;
if the target configuration file comprises at least M query flows, 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 flow;
And if the intermediate display parameters indicate to display the detected fields and/or the query parameters of the N-1 th query flow, the detected fields and/or the query parameters of the N-1 th query flow carry links pointing to the N-1 th query flow.
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 instructions stored therein, which when run on a computer, cause the computer to perform any of the above described troubleshooting methods.
In yet another aspect of the invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above described troubleshooting methods.
According to the fault checking method and device provided by the embodiment of the invention, the server receives the query parameters, wherein the query parameters at least comprise the fault type and the first identification number of the target object to be checked; filling the first identification number into a preset configuration file based on the preset configuration file corresponding 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 performs fault checking, the fault checking time is reduced, and the checking 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 flowchart illustrating steps of a fault detection method according to 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 invention;
FIG. 3 is a second flowchart illustrating a fault detection method according to an embodiment of the present invention;
FIG. 4 is a diagram of a UI interface of a second example provided in an embodiment of the invention;
FIG. 5 is an interactive schematic 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 device 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 accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 order of execution, and the order of execution of the processes should be determined by the functions and the internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a fault detection method, which is applied to a server, and includes:
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 inquiry flows and flow parameters of each inquiry flow, and script configuration parameters in the flow parameters;
And step 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 related parameters of the fault, and the query parameter includes a fault type and a first identification number of the target object, where the first identification number may be a mobile phone number or an order number. Alternatively, as a first example, referring to fig. 2, the server may provide a User Interface (UI) for the User on the User side, and provide an input location of the query parameter in the UI Interface, for example, at a location A1 in fig. 2, for selecting a type of the first identification number, for example, providing at least two types of options in a drop-down menu of A1 for the User to select; the position B1 is a first identification number input by a user; if the user selects a type at A1, the server recognizes the first identification number entered by the user at B1 as the identification number under the selected type. The position C1 is a fault type input position, and a user can directly input the fault type at the position C1 or select the fault type in a drop-down menu of the position C1; after the user enters the first identification number and enters (or selects) the fault type, a search may be clicked, the UI interface sends the first identification number and the fault type to the server, and the server receives the query parameters and then performs step 102.
It can be appreciated that in the embodiment of the present invention, the user refers to the person initiating the troubleshooting.
In step 102, the server determines a preset configuration file corresponding to the fault type; the server side is preset with preset configuration files of various fault types, and the configuration files are used for the server to execute fault troubleshooting aiming at the fault types; the target field in the preset configuration file is a blank field, the server is required to fill the first identification number into the target field to obtain the target configuration file, and the target configuration file is executed when the server executes fault investigation. The target field is used for determining the queried data table by the server; and after the first identification number is used as an index and is filled into the target field, the server addresses according to the target field and queries a data table recording the log of the target object.
The target configuration file comprises query flows to be executed, and flow parameters of each query flow; alternatively, the number of flows included in the target configuration file corresponding to the different fault types may be different, and the number of flows may be one or more, but each flow has a respective flow parameter. The flow parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query flow.
In step 103, the server executes the target configuration file, and executes each query flow in the target configuration file to obtain a query result; if the query flows include at least two, the server executes each query flow in turn, and the query result may display only the result of the last query flow, or may display other intermediate results.
Alternatively, the query result type 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 a user according to the type of the query result.
In the above embodiment of the present invention, the server 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 examined; filling the first identification number into a preset configuration file based on the preset configuration file corresponding 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 performs fault checking, the fault checking time is reduced, and the checking cost is reduced. The embodiment of the invention solves the problems of complicated operation and long time consumption of the fault checking tool in the prior art.
It will be appreciated that the flow parameters also include other parameters such as: a flow header (nameCn), a parameter list (input), a query step (procedure) of the flow, a display parameter configuration (display), etc.; specifically, the process title and the parameter list may be the same title and the same parameter list for each target configuration file, or each query process may have a respective process title and/or parameter list.
Flow titles such as "order number check order details"; the parameter list may include: an engine (engine) used in the current step, step aliases (presentation title for query results) and the script configuration parameters.
Optionally, in an 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 an embodiment of the present invention, the script configuration parameter includes: the target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
wherein the target field is included in the query condition.
The target data table is a data table recording the running log, namely a data source of flow query, and the data source can be mysql, es, hdfs, a log, a curl return value, a 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, i.e., a target query field, which records a fault name of the target object, a code of the fault name, and/or a log recording the fault name; the second identification number is used for identifying the detection field; as an example, see the following profile, identifying annotated content as annotated content for each field:
script (comment: query script)
from: t_movie_sender (note: t_movie_sender is the target data table of the query);
where:
"sender_id= '{ { input.sender_id }' or mobile= '{ { input.mobile }'" (note: where is followed by a query condition, where either input.sender_id or input.mobile is the first identification number);
select:>-
* (note: select is the second identification number, "> -" is the detected field).
After the server obtains the target configuration file, analyzing script configuration parameters in the target configuration file, and executing fault checking according to the script configuration parameters.
Optionally, in an embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether the original detected field is subjected to first preset processing or not;
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 after the original detected field is subjected to first preset processing 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, wherein the first processing parameter is used for converting the original detected field into a format corresponding to the detected field, such as a code of which the original detected field is of a fault type, and the code is transcoded into a text of the fault type through the first preset processing.
Referring to fig. 3, a further embodiment of the present invention provides a fault detection method, which is applied to a server, and includes:
step 301, receiving a query parameter, wherein the query parameter at least comprises 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 inquiry flows and flow parameters of each inquiry flow, and the flow parameters comprise script configuration parameters;
step 303, if the target configuration file includes a query procedure, executing the target configuration file, and searching a detection field pointed by the second identification number in the target data table, where the content of the detection field is a query result;
or (b)
Step 304, if the target configuration file includes at least M query processes, executing each query process in the target configuration file in turn to obtain a query result; the input parameters of the nth query flow are at least one detected field of the 1 st to the N-1 st query flows; the query result is a detected field of the Mth query flow; 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 related to the fault, and includes a fault type and a first identification number of the target object, where 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 various fault types, and the configuration files are used for the server to execute fault troubleshooting aiming at the fault types; the target field in the preset configuration file is a blank field, the server is required to fill the first identification number into the target field to obtain the target configuration file, and the target configuration file is executed when the server executes fault investigation. The target field is used for determining the queried data table by the server; and after the first identification number is used as an index and is filled into the target field, the server addresses according to the target field and queries a data table recording the log of the target object.
The target configuration file comprises query flows to be executed, and flow parameters of each query flow; alternatively, the number of flows included in the target configuration file corresponding to the different fault types may be different, and the number of flows may be one or more, but each flow has a respective flow parameter. The flow parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query flow.
If the target configuration file only includes one query flow, the server executes step 303, and the server executes the target configuration file to find 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.
If the target configuration file comprises at least M query flows, namely at least two query flows, the server executes step 304 to sequentially execute each query flow in the target configuration file, and stream processing is performed on the results of each query flow to obtain query results; the input parameter of the nth query flow is at least one detected field of the 1 st to the N-1 st query flows, i.e. the input parameter of the current query flow can be the detected field of any previous query flow; and the final query result is the detected field of the last query flow.
Further, in the embodiment of the present invention, the flow parameters further include a result display parameter;
if the target configuration file comprises at least M query flows, 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 flow;
And if the intermediate display parameters indicate to display the detected fields and/or the query parameters of the N-1 th query flow, the detected fields and/or the query parameters of the N-1 th query flow carry links pointing to the N-1 th query flow.
That is, the flow parameters include result display parameters including whether to display to the user, specific configuration of the display result, etc.; specific configurations of the presentation results are as follows: a query result ordering mode, the number of the query results to be displayed, and the like. If the target configuration file comprises a plurality of inquiry flows, the result display parameters also comprise intermediate display parameters, and the intermediate display parameters indicate whether the detected field of the (N-1) th inquiry flow (namely, the non-last inquiry flow) is displayed or not; if the display is performed, the detection field of the (N-1) th query flow carries a link pointing to the (N) th query flow, for example, the user may click the detection field to jump to the next query flow; 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 the first identification number B1 and/or the location of the detected field D1, the process may jump to the process 2, and the server executes the query process 2.
As a third example, fig. 5 shows a specific example of querying for an online ticket order for a ticket out fault in a lock socket ring node, and the interaction process between the user and the server is as shown in fig. 5, and the server side may perform fault checking through a fault checking tool, which mainly includes the following steps:
1. when the server is started, starting an HTTP service, and reading a memory list (memory is a flow configuration file); the memory list comprises a plurality of memory configuration files, namely preset configuration files; each preset configuration file is a memory file.
2. The user enters the query parameters.
The user may select the type of the first identification number at A1 in the UI interface 1 as shown in fig. 2, the type of the first identification number may be a ticket booking number or a mobile phone number (mobile phone number of the ticket booking user), and fill in the first identification number of the target object at a B1 position, and click search initiates 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 precompiled the query parameters and convert the query parameters into the readable preset data format; if the query parameters input by the user are more, including unnecessary parameters, the server can also filter the parameters.
4. 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 performs one-time fault checking according to the target configuration file.
The contents in the first query flow of the target configuration file at this time are as shown in the following examples, and the annotated contents are identified as annotated contents of each field: :
service (annotation: service)
NameCn (comment) inquiry flow title, order number inquiry order details
input (note: define parameter list required by query flow: parameter name, parameter description, parameter type, whether it is necessary parameter, etc.)
Name border_id (comment: order number)
nameCn:
type int (comment: parameter type, integer)
must:1
-name:action_type
nameCn (note: behavior type fillable: 1.; 2. BucyTicket; 3. LockSeat));
type:string
procedure (annotation: query flow)
Engine mysql (notes: flow parameters defining the first query flow, query engine)
alias (annotate, the current flow detects aliases of the result set, such as "order")
dbname-movie_instance_info (annotation: data storage target location)
script (comment: query script)
from: t_movie_sender (note: t_movie_sender is the target data table of the query);
where:
"sender_id= '{ { input.sender_id }' or mobile= '{ { input.mobile }'" (note: where is followed by a query condition, where either input.sender_id or input.mobile is the first identification number);
select:>-
* (note: select is the second identification number, "> -" is the detected field).
6. The server judges whether the following flow exists: if so, allowing to jump to the next flow.
At this time, the target configuration file further includes the following contents:
nextPhase:
"border_id" (note: define which process can be skipped to in the last query process, in this example, click on "border_id" in the checked field of page presentation can be skipped to "movie_full_ticket" process, and use border_id as input parameter for the next query process)
7. Jump to the next query flow.
The contents in the second query flow of the target configuration file at this time are as follows:
engine es (note: define the second query step, query engine is the elastic search, other flow parameters are the same as the first query flow, and will not be described again
dbname:newticket
alias: log record
script:
where:>-
"query":{
"bool":{
"filter":[{
"range":{
"@ time stamp": { "gte": "{ order { lock_time|mathcalc ($ { v } -5000) }000", (note: streaming the input parameters), taking the value of lock_time queried in the first query flow after a first preset process (mathCalc function minus 5000) as the input parameter of the second query flow
"lte" { { order, lock_time|mathcalc ($ { v } +2000) }000"," format ":" epoch_millis "}),
select [ + ] [ + "hits" ] [ [ "hits" ] [, "_source" ] [ "url", "request", "response", "error_msg" ] ] }' (note: show results configuration shown to user, take out several fields behind the select).
8. And the server obtains the query result according to the detected field of the last query flow and displays the query result on the front-end UI interface.
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 presentation layer is used for transmitting interactive information of the UI interface and the server and comprises a generation submission parameter page and a rendering universal result page, wherein the generation 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 universal result page is used for converting a query result checked by the server into a UI interface display result.
The server side comprises a flow execution engine and a data source;
the flow execution engine comprises:
a store manager for managing a preset configuration file;
and the execution engine is used for executing the target configuration file and performing fault detection.
In addition, the execution engine side also comprises a parameter precompilation module, a multi-data source executor and an execution result processing module.
The data sources include mysql, es, hdfs, api, cmd or others.
The server side also comprises a memory flow configuration (memory is a flow configuration file), a global operation configuration and other modules.
In the above example, the server automatically performs the fault detection according to the pre-configured configuration file, and for the user side, only the query parameter is required to be input into the front end UI interface, so as to reduce the multi-step query operation into one-click operation; and each fault type presets a fault configuration file, so that the server processing problem is more targeted. The data source module of the server integrates various data sources, is suitable for most of service scenes at present, can be used for a plurality of services after being unpacked, supports various configuration modes, and is easy to use and expand; and a plurality of execution flows are supported, and different service scenes are adapted.
In the above embodiment of the present invention, the server 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 examined; filling the first identification number into a preset configuration file based on the preset configuration file corresponding 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 performs fault checking, the fault checking time is reduced, and the checking cost is reduced. The embodiment of the invention solves the problems of complicated operation and long time consumption of the fault checking tool in the prior art.
Referring to fig. 7, the embodiment of the invention further provides a fault detection device, which is applied to a server, and the device comprises:
a parameter receiving module 701, configured to receive a query parameter, where the query parameter includes at least a fault type and a first identification number of a target object to be examined;
a configuration module 702, configured to determine a preset configuration file corresponding to the fault type, and fill the first identification number into a target field in the preset configuration file to obtain a target configuration file; the target configuration file comprises inquiry flows and flow parameters of each inquiry flow, and the flow 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 related to a fault, and includes a fault type and a first identification number of a target object, where the first identification number may be a mobile phone number or an order number. Alternatively, as a first example, referring to fig. 2, the server may provide a User Interface (UI) for the User on the User side, and provide an input location of the query parameter in the UI Interface, for example, at a location A1 in fig. 2, for selecting a type of the first identification number, for example, providing at least two types of options in a drop-down menu of A1 for the User to select; the position B1 is a first identification number input by a user; if the user selects a type at A1, the server recognizes the first identification number entered by the user at B1 as the identification number under the selected type. The position C1 is a fault type input position, and a user can directly input the fault type at the position C1 or select the fault type in a drop-down menu of the position C1; after the user enters the first identification number and enters (or selects) the fault type, a search may be clicked, the UI interface sends the first identification number and the fault type to the server, and the server receives the query parameters and then performs step 102.
It can be appreciated that in the embodiment of the present invention, the user refers to the person initiating the 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 various fault types, and the configuration files are used for the server to execute fault troubleshooting aiming at the fault types; the target field in the preset configuration file is a blank field, the server is required to fill the first identification number into the target field to obtain the target configuration file, and the target configuration file is executed when the server executes fault investigation. The target field is used for determining the queried data table by the server; and after the first identification number is used as an index and is filled into the target field, the server addresses according to the target field and queries a data table recording the log of the target object.
The target configuration file comprises query flows to be executed, and flow parameters of each query flow; alternatively, the number of flows included in the target configuration file corresponding to the different fault types may be different, and the number of flows may be one or more, but each flow has a respective flow parameter. The flow parameters at least comprise script configuration parameters, and the script configuration parameters are used for configuring script files of the query flow.
The execution module executes the target configuration file, and executes each query flow in the target configuration file to obtain a query result; if the query flows include at least two, the server executes each query flow in turn, and the query result may display only the result of the last query flow, or may display other intermediate results.
Alternatively, the query result type 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 a user according to the type of the query result.
Optionally, in an embodiment of the present invention, the script configuration parameter includes: the target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
wherein the target field is included in the query condition.
Optionally, in an embodiment of the present invention, the script configuration parameters further include: the first processing parameter is used for indicating whether the original detected field is subjected to first preset processing or not;
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 after the original detected field is subjected to first preset processing according to the first processing rule.
Optionally, in an embodiment of the present invention, the execution module includes:
the first execution sub-module is used for executing the target configuration file and searching a detection field pointed by the second identification number in the target data table if the target configuration file comprises a query flow, wherein the content of the detection field is a query result;
or (b)
The second execution sub-module is used for executing each query flow in the target configuration file in sequence to obtain a query result if the target configuration file comprises at least M query flows; the input parameters of the nth query flow are at least one detected field of the 1 st to the N-1 st query flows; the query result is a detected field of the Mth query flow; 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 flow parameter further includes a result display parameter;
if the target configuration file comprises at least M query flows, 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 flow;
And if the intermediate display parameters indicate to display the detected fields and/or the query parameters of the N-1 th query flow, the detected fields and/or the query parameters of the N-1 th query flow carry links pointing to the N-1 th query flow.
Optionally, in an embodiment of the present invention, the query result includes a fault parameter in a 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 includes at least a fault type and a first identification number of a target object to be examined; the configuration module 702 fills the first identification number into the preset configuration file based on the preset configuration file corresponding to each fault type 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 performs fault checking, the fault checking time is reduced, and the checking cost is reduced. The embodiment of the invention solves the problems of complicated operation and long time consumption of the fault checking tool in the prior art.
The embodiment of the invention also provides an electronic device, as shown in fig. 8, which comprises a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 complete communication with each other through the communication bus 84,
A memory 83 for storing a computer program;
the processor 81 is configured to execute the program stored in the memory 83, and implement the following steps:
receiving a query parameter, wherein the query parameter at least comprises 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 inquiry flows and flow parameters of each inquiry flow, and script configuration parameters in the flow parameters;
and executing the target configuration file to obtain a query result.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the troubleshooting method of any of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform the troubleshooting method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (9)

1. The fault checking method is applied to a server and is characterized by comprising the following steps:
receiving a query parameter, wherein the query parameter at least comprises 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 a query flow and flow parameters of each query flow, script configuration parameters are included in the flow parameters, target fields in the preset configuration file are blank fields, the first identification number is used as an index to fill in the target fields, and the target fields are used for a server to determine a log data table of the queried target object;
executing the target configuration file to obtain a query result, wherein the script configuration parameters comprise: the first processing parameter is used for indicating whether the original detected field is subjected to first preset processing or not; 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 after performing a first preset process on the original detected field according to the first processing rule, the original detected field is a query result directly obtained when the server executes the target configuration file, and the first preset process is used for converting the original detected field into a format corresponding to the detected field.
2. The troubleshooting method of claim 1 wherein said script configuration parameters include: the target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
wherein the target field is included in the query condition.
3. The troubleshooting method of claim 2 wherein said executing said target profile to obtain a query result includes:
if the target configuration file comprises a query flow, executing the target configuration file, and searching a detection field pointed by the second identification number in the target data table, wherein the content of the detection field is a query result;
or (b)
If the target configuration file comprises at least M query flows, sequentially executing each query flow in the target configuration file to obtain a query result; the input parameters of the nth query flow are at least one detected field of the 1 st to the N-1 st query flows; the query result is a detected field of the Mth query flow; 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.
4. The troubleshooting method of claim 3 wherein said flow parameters further include a result display parameter;
If the target configuration file comprises at least M query flows, 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 flow;
and if the intermediate display parameters indicate to display the detected fields and/or the query parameters of the N-1 th query flow, the detected fields and/or the query parameters of the N-1 th query flow carry links pointing to the N-1 th query flow.
5. The troubleshooting method of claim 1 wherein said query result includes a fault parameter in a log of said target object.
6. A troubleshooting apparatus, applied to a server, comprising:
the parameter receiving module is used for 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;
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 a query flow and flow parameters of each query flow, the flow parameters comprise script configuration parameters, target fields in the preset configuration file are blank fields, the first identification number is used as an index to fill the target fields, and the target fields are used for a server to determine a log data table of the queried target object;
The execution module is used for executing the target configuration file to obtain a query result, and the script configuration parameters comprise: the first processing parameter is used for indicating whether the original detected field is subjected to first preset processing or not; 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 after performing a first preset process on the original detected field according to the first processing rule, the original detected field is a query result directly obtained when the server executes the target configuration file, and the first preset process is used for converting the original detected field into a format corresponding to the detected field.
7. The troubleshooting device of claim 6 wherein said script configuration parameters include: the target data table is inquired, the condition is inquired, and the second identification number of the field is detected;
wherein the target field is included in the query condition.
8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other 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 to 5 when executing a program stored on a memory.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the troubleshooting method as claimed in any one of claims 1 to 5.
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 CN111367703A (en) 2020-07-03
CN111367703B true 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)

Families Citing this family (1)

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

Citations (3)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10083398B2 (en) * 2014-12-13 2018-09-25 International Business Machines Corporation Framework for annotated-text search using indexed parallel fields

Patent Citations (3)

* 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
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

Also Published As

Publication number Publication date
CN111367703A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
US9734261B2 (en) Context aware query selection
US7490167B2 (en) System and method for platform and language-independent development and delivery of page-based content
US9317259B2 (en) Apparatus, system, and method for automatically generating a reusable software component for interfacing with a web service
CN110851308A (en) Test method, test device, electronic equipment and storage medium
CN110321154B (en) Micro-service interface information display method and device and electronic equipment
CN110716783A (en) Front-end page generation and deployment method and device, storage medium and equipment
US11755531B1 (en) System and method for storage of data utilizing a persistent queue
US20120131035A1 (en) Generating search query suggestions
CN101952823B (en) Method for media discovery
CN109284321B (en) Data loading method, device, computing equipment and computer readable storage medium
JP2018518726A (en) Information retrieval navigation method and apparatus
WO2016000507A1 (en) Traffic-saving mode search service method, server, client and system
US20170277622A1 (en) Web Page Automated Testing Method and Apparatus
RU2424565C2 (en) Focused search using network addresses
WO2016176099A1 (en) Information search navigation method and apparatus
CN104298675A (en) Method and device for cache management
CN111367703B (en) Fault checking method and device
CN109446445B (en) Resource acquisition method and device
US20080313190A1 (en) Method and system for searchable web services
CN114629929A (en) Log recording method, device and system
CN112671574B (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
US20140222865A1 (en) Method, System and Program for Interactive Information Services
US8230002B2 (en) Method and system for automatic setup in web-based applications
CN112947844B (en) Data storage method, device, electronic equipment and medium
CN103718179A (en) Information processing apparatus, information processing method, information processing program, and storage medium having information processing program stored therein

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