Abnormality positioning method, device, computer equipment and computer readable storage medium

By obtaining and reconstructing recall statements, the problem of limited use scenarios of existing troubleshooting tools is solved, efficient abnormal positioning is achieved, and efficiency and availability are improved.

CN115061998BActive Publication Date: 2025-03-14RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210814808.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-12
Publication Date
2025-03-14
Estimated Expiration
2042-07-12

AI Technical Summary

Technical Problem

The existing troubleshooting tools have limited usage scenarios, low coverage and poor availability, which leads to a lot of time spent on abnormal positioning and low positioning efficiency.

Method used

By obtaining the original recall statement and the specified content, multiple statements to be recalled are reconstructed, and data recall operations are performed separately based on the original data table, the exception statement is determined and the exception positioning result is output.

Benefits of technology

It improves the efficiency and availability of abnormal positioning, is compatible with newly accessed service scenarios, has a high coverage rate, and shortens the time spent on abnormal positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061998B_ABST
    Figure CN115061998B_ABST
Patent Text Reader

Abstract

The present application discloses an abnormality location method, device, computer equipment and computer-readable storage medium, which relates to the field of Internet technology, locates abnormalities for underlying databases, is unaware of services, is compatible with newly connected service scenarios, has strong availability and improves efficiency. The method includes: obtaining an original recall statement, determining the specified content expected to be recalled when the original recall statement is used to perform a data recall operation; when the original data table includes the specified content, using multiple recall conditions and specified content of the original recall statement to rebuild multiple statements to be recalled; based on the original data table, performing data recall operations on multiple statements to be recalled respectively; determining the statement to be recalled that has an abnormality when executing the data recall operation as an abnormal statement among the multiple statements to be recalled, and outputting the abnormality location result based on the recall conditions used when rebuilding the abnormal statement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to an abnormality location method, device, computer equipment and computer-readable storage medium. Background Art

[0002] With the continuous development of Internet technology, online platforms with various functions emerge in an endless stream, providing users with massive amounts of information to meet their needs in daily life and work. In order to facilitate users to quickly find the information they need in the massive amount of information, the online platform will provide a search function on the front end. Users can quickly obtain relevant information by entering the content they want to query. However, in the actual application process, users often encounter search failures when using the search function. In order to solve this abnormal problem in a timely manner, the staff of the online platform needs to promptly investigate the problem, locate the abnormality, and quickly repair it.

[0003] In the related art, staff will use troubleshooting tools to locate anomalies. However, the applicant found that the abnormal location ideas of the troubleshooting tools are strongly related to the services. Online platforms that provide different services need to use different troubleshooting tools for troubleshooting. The use scenarios of the troubleshooting tools are limited, the coverage is low, and the usability is poor, which leads to a lot of time-consuming and low positioning efficiency for abnormal location. Summary of the invention

[0004] In view of this, the present application provides an anomaly location method, apparatus, computer device and computer-readable storage medium, the main purpose of which is to solve the problem that the current troubleshooting tools have limited usage scenarios, low coverage, and poor usability, which result in a lot of time spent on anomaly location and low location efficiency.

[0005] According to the first aspect of the present application, a method for locating an abnormality is provided, the method comprising:

[0006] Obtaining an original recall statement, and determining the specified content expected to be recalled when the data recall operation is performed using the original recall statement;

[0007] When the original data table includes the specified content, multiple recall conditions of the original recall statement and the specified content are used to rebuild multiple to-be-recalled statements, and the original data table is a data table used when the data recall operation is performed using the original recall statement;

[0008] Based on the original data table, respectively perform data recall operations on the multiple statements to be recalled;

[0009] A statement to be recalled in which an exception occurs when executing a data recall operation is determined among the multiple statements to be recalled as an abnormal statement, and an abnormality locating result is output based on a recall condition used when reconstructing the abnormal statement.

[0010] Optionally, the obtaining of the original recall statement and determining the specified content expected to be recalled when the data recall operation is performed using the original recall statement includes:

[0011] Receive an input statement to be located for abnormality location, and content to be recalled that is expected to be recalled when a data recall operation is performed based on the statement to be located;

[0012] Executing a data recall operation of the sentence to be located based on the data recall engine, and obtaining the data to be identified that is recalled after the data recall operation is completed;

[0013] Reading the data to be identified, and querying whether the data to be identified includes the content to be recalled;

[0014] When the to-be-recalled content is not included in the to-be-recognized data, the to-be-located sentence is used as the original recall sentence, and the to-be-recalled content is used as the designated content.

[0015] Optionally, when the original data table includes the specified content, before reconstructing multiple to-be-recalled statements by using multiple recall conditions and the specified content of the original recall statement, the method further includes:

[0016] Parsing the original recall statement, and determining a data mapping table used when performing a data recall operation using the original recall statement as the original data table;

[0017] Reading the original data table, and querying whether the original data table includes the specified content;

[0018] When the original data table does not include the designated content, the supplier of the original data table is queried, the content status bound to the designated content is extracted from the status information provided by the supplier, and the content status is output as an abnormality locating result.

[0019] Optionally, the reconstructing a plurality of to-be-recalled sentences by using the plurality of recall conditions and the specified content of the original recall sentence includes:

[0020] Analyze the original recall statement to obtain the multiple recall conditions in the original recall statement for limiting the recalled content;

[0021] Deleting the multiple recall conditions in the original recall statement to obtain an initial statement retaining the specified content;

[0022] Each of the multiple recall conditions is added to the initial statement to construct a new recall statement, thereby obtaining the multiple to-be-recalled statements, wherein each of the multiple to-be-recalled statements includes at least one recall condition and the specified content.

[0023] Optionally, the adding each of the multiple recall conditions to the initial statement to construct a new recall statement to obtain the multiple to-be-recalled statements includes:

[0024] Selecting a recall condition from the multiple recall conditions, adding the recall condition to the initial statement to construct a new recall statement, and obtaining a statement to be recalled; and reselecting another recall condition other than the recall condition from the multiple recall conditions and adding it to the initial statement to construct a new recall statement, until all the recall conditions from the multiple recall conditions are traversed to obtain the multiple statements to be recalled; or,

[0025] Determine a preset number of conditions within a group, group the multiple recall conditions according to the number of conditions within the group to obtain multiple recall condition groups, select a recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the recall condition group to the initial statement to construct a new recall statement to obtain a statement to be recalled, and re-select another recall condition group other than the recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the other recall condition group to the initial statement to construct a new recall statement, until all the recall condition groups in the multiple recall condition groups are traversed to obtain the multiple statements to be recalled.

[0026] Optionally, performing data recall operations on the multiple statements to be recalled based on the original data table respectively includes:

[0027] Based on the data recall engine, respectively executing the data recall operation of each of the multiple statements to be recalled on the original data table, and respectively counting whether each statement to be recalled returns recalled data after executing the data recall operation; or,

[0028] Read the content conditions set in the original data table, add the specified content to the content conditions, cache the original data table after the specified content is added, and based on the data recall engine, respectively execute the data recall operation for each of the multiple statements to be recalled on the original data table after the content conditions are changed, and respectively count whether each statement to be recalled returns recalled data after executing the data recall operation.

[0029] Optionally, determining, from among the multiple statements to be recalled, a statement to be recalled that has an exception when executing a data recall operation as an abnormal statement, and outputting an abnormality locating result based on a recall condition used when reconstructing the abnormal statement, includes:

[0030] Respectively read the recall result after executing the data recall operation for each of the multiple statements to be recalled, and extract the abnormal statement in which the abnormality occurs from the multiple statements to be recalled, wherein the recall result of the abnormal statement indicates that the recall fails, or the recall result of the abnormal statement includes the content that does not contain the specified content;

[0031] Parsing the abnormal statement to determine the recall condition included in the abnormal statement;

[0032] Acquire the condition content of the recall condition, and generate a first abnormal text including the condition content;

[0033] The first abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

[0034] Optionally, after parsing the abnormal statement and determining the recall condition included in the abnormal statement, the method further includes:

[0035] If the abnormal statement includes at least two recall conditions, a recall condition is selected from the at least two recall conditions, and the recall condition is added to the initial statement to construct a new recall statement, thereby obtaining a statement to be recalled;

[0036] Reselecting another recall condition other than the recall condition from the at least two recall conditions and adding it to the initial sentence to construct a new recall sentence, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two sentences to be recalled;

[0037] Based on the original data table, respectively performing a data recall operation on each of the at least two to-be-recalled statements;

[0038] Determine, among the at least two statements to be recalled, a statement to be recalled that does not return recalled data after executing the data recall operation, determine that an exception occurs in the statement to be recalled when executing the data recall operation, and use the statement to be recalled as a secondary abnormal statement;

[0039] Parsing the secondary abnormal statement, obtaining the conditional content of the recall condition included in the secondary abnormal statement, and generating a second abnormal text including the conditional content;

[0040] The second abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

[0041] Optionally, after performing data recall operations on the multiple statements to be recalled based on the original data table, the method further includes:

[0042] If the recall result after executing the data recall operation for each of the multiple statements to be recalled indicates that the recall is successful and the content included in the recall result contains the specified content, it is determined that no exception occurs when executing the data recall operation for the multiple statements to be recalled;

[0043] Obtaining a preset abnormal situation, and generating a third abnormal text including the preset abnormal situation;

[0044] The third abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

[0045] According to a second aspect of the present application, a device for locating an abnormality is provided, the device comprising:

[0046] An acquisition module, used to acquire an original recall statement and determine the specified content expected to be recalled when the data recall operation is performed using the original recall statement;

[0047] a reconstruction module, used for, when the original data table includes the specified content, reconstructing a plurality of to-be-recalled statements by using a plurality of recall conditions of the original recall statement and the specified content, wherein the original data table is a data table used when the data recall operation is performed by using the original recall statement;

[0048] An execution module, configured to execute data recall operations on the plurality of statements to be recalled respectively based on the original data table;

[0049] The output module is used to determine the statement to be recalled that has an exception when executing the data recall operation among the multiple statements to be recalled as an abnormal statement, and output the abnormality location result based on the recall condition used when reconstructing the abnormal statement.

[0050] Optionally, the acquisition module is used to receive an input statement to be located for abnormality location and content to be recalled that is expected to be recalled when a data recall operation is performed based on the statement to be located; perform a data recall operation on the statement to be located based on a data recall engine, and obtain the data to be identified that is recalled after the data recall operation is completed; read the data to be identified, and query whether the content to be recalled is included in the data to be identified; when the content to be recalled is not included in the data to be identified, use the statement to be located as the original recall statement, and use the content to be recalled as the specified content.

[0051] Optionally, the device further comprises:

[0052] A parsing module, used for parsing the original recall statement, and determining a data mapping table used when performing a data recall operation using the original recall statement as the original data table;

[0053] A query module, used for reading the original data table and querying whether the original data table includes the specified content;

[0054] The output module is also used to query the supplier of the original data table when the designated content is not included in the original data table, extract the content status bound to the designated content from the status information provided by the supplier, and output the content status as an exception locating result.

[0055] Optionally, the reconstruction module is used to analyze the original recall statement to obtain the multiple recall conditions in the original recall statement for limiting the recalled content; delete the multiple recall conditions in the original recall statement to obtain an initial statement that retains the specified content; and add each of the multiple recall conditions to the initial statement to construct a new recall statement to obtain the multiple sentences to be recalled, wherein each of the multiple sentences to be recalled includes at least one recall condition and the specified content.

[0056] Optionally, the reconstruction module is used to select a recall condition from the multiple recall conditions, add the recall condition to the initial sentence to construct a new recall sentence, and obtain a sentence to be recalled, and re-select a recall condition other than the recall condition from the multiple recall conditions and add it to the initial sentence to construct a new recall sentence, until all the recall conditions in the multiple recall conditions are traversed to obtain the multiple sentences to be recalled; or, determine a preset number of conditions within a group, group the multiple recall conditions according to the number of conditions within the group, and obtain multiple recall sentences. A recall condition group is selected from the multiple recall condition groups, and the recall conditions of the number of conditions in the group included in the recall condition group are added to the initial statement to construct a new recall statement to obtain a statement to be recalled; and another recall condition group other than the recall condition group is selected from the multiple recall condition groups, and the recall conditions of the number of conditions in the group included in the other recall condition group are added to the initial statement to construct a new recall statement, until all the recall condition groups in the multiple recall condition groups are traversed to obtain the multiple statements to be recalled.

[0057] Optionally, the execution module is used to execute the data recall operation of each of the multiple statements to be recalled on the original data table based on the data recall engine, and to count whether each of the statements to be recalled returns recalled data after the data recall operation is executed; or, read the content conditions set in the original data table, add the specified content to the content conditions, cache the original data table after the specified content is added, and execute the data recall operation of each of the multiple statements to be recalled on the original data table after the content conditions are changed based on the data recall engine, and to count whether each of the statements to be recalled returns recalled data after the data recall operation is executed.

[0058] Optionally, the output module is used to read the recall results of each of the multiple statements to be recalled after executing the data recall operation, and extract the abnormal statement where the exception occurs from the multiple statements to be recalled, wherein the recall result of the abnormal statement indicates a recall failure, or the content included in the recall result of the abnormal statement does not contain the specified content; parse the abnormal statement to determine the recall condition included in the abnormal statement; obtain the conditional content of the recall condition, and generate a first abnormal text including the conditional content; use the first abnormal text as the abnormal location result, and output the abnormal location result.

[0059] Optionally, the output module is also used to, if the abnormal statement includes at least two recall conditions, select a recall condition from the at least two recall conditions, add the recall condition to the initial statement to construct a new recall statement, and obtain a statement to be recalled; re-select a recall condition other than the recall condition from the at least two recall conditions and add it to the initial statement to construct a new recall statement, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two statements to be recalled; based on the original data table, perform a data recall operation on each of the at least two statements to be recalled respectively; determine the statement to be recalled that does not return recalled data after executing the data recall operation among the at least two statements to be recalled, determine that an exception occurs in the statement to be recalled when executing the data recall operation, and use the statement to be recalled as a secondary abnormal statement; parse the secondary abnormal statement, obtain the conditional content of the recall condition included in the secondary abnormal statement, and generate a second abnormal text including the conditional content; use the second abnormal text as the abnormal location result, and output the abnormal location result.

[0060] Optionally, the output module is also used to determine that no exception occurs when the multiple statements to be recalled execute the data recall operation if the recall result after executing the data recall operation for each of the multiple statements to be recalled indicates a successful recall and the specified content is included in the content of the recall result; obtain a preset abnormal situation, generate a third abnormal text including the preset abnormal situation; use the third abnormal text as the abnormal location result, and output the abnormal location result.

[0061] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0062] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0063] By means of the above technical scheme, the present application provides an exception location method, device, computer equipment and computer-readable storage medium. The present application obtains the original recall statement, determines the specified content expected to be recalled when the original recall statement is used to perform the data recall operation, and when the original data table used when the original recall statement is used to perform the data recall operation includes the specified content, the multiple recall conditions and specified content of the original recall statement are used to reconstruct multiple statements to be recalled, and based on the original data table, the data recall operation is performed on the multiple statements to be recalled respectively, and the statements to be recalled that have an exception when the data recall operation is performed are determined as abnormal statements in the multiple statements to be recalled, and the abnormal location result is output based on the recall conditions used when reconstructing the abnormal statement. The present application analyzes the statement structure and conditions, uses the original recall statement and the specified content to assemble statements with different conditions, locates the abnormality for the underlying database, does not invade the service, and has no perception of the specific service. It is not only compatible with the newly connected service scenarios, has high coverage and strong availability, but also uses the feature that statement analysis and execution can be performed concurrently, shortens the time consumed by abnormal location, and improves the efficiency of abnormal location.

[0064] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0066] Figure 1 A schematic diagram of a method for locating an abnormality provided in an embodiment of the present application is shown;

[0067] Figure 2 A schematic diagram of another abnormality location method provided in an embodiment of the present application is shown;

[0068] Figure 3 A schematic structural diagram of an abnormality locating device provided in an embodiment of the present application is shown;

[0069] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0070] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0071] The present application embodiment provides a method for locating an abnormality, such as Figure 1 As shown, the method includes:

[0072] 101. Obtain an original recall statement, and determine the specified content that is expected to be recalled when the original recall statement is used to perform a data recall operation.

[0073] The search function provided by the front end is actually a data recall process based on the underlying database. When a user uses the search function on the front end, the platform will feed back the search content entered by the user to the server. The server uses the search content to generate a statement for searching in the database, such as a SQL (Structured Query Language) statement, and uses the statement to perform data recall operations, thereby obtaining information related to the content searched by the user and feeding it back to the user.

[0074] At present, when many online platforms provide search functions, some search failures or relevant content is not searched. Therefore, the staff of the online platform needs to frequently check the problems in data recall, locate the anomalies, and then perform system maintenance in a timely manner. However, the applicant recognizes that many tools for locating anomalies use invasive programming, and the troubleshooting ideas are strongly related to the services provided by the online platform. For example, if the online platform provides a takeaway function, it is necessary to locate the anomaly based on a tool with a product data query function, and the use of the tool is limited.

[0075] Therefore, in an embodiment of the present application, a new online tool for locating anomalies is proposed. The staff provides the underlying recall statements used for data recall and the specified content expected to be obtained through data recall to the online tool. The online tool performs a series of analyses such as disassembly and reconstruction on the recall statements provided by the staff to quickly locate the anomaly and achieve efficient anomaly troubleshooting. Moreover, since the online tool locates anomalies for the underlying database, the method in the embodiment of the present application is independent of the services and engines of the online platform, does not invade the services, has a low degree of coupling with the services, has no perception of specific services, is compatible with newly connected service scenarios, has high coverage, and has strong availability.

[0076] The technical solution in the embodiment of the present application can be applied to the online tool, and the online tool can be connected to the online platform so as to realize the location of abnormalities by performing data recall operations multiple times in the database of the online platform. Among them, the online tool can provide a front end for staff, maintenance personnel, testers, etc. When troubleshooting is required, relevant personnel can log in to the online tool, enter the original recall statement for performing the data recall operation in the online tool, and provide the specified content that is expected to be recalled through the original recall statement, so that the subsequent online tool can locate abnormalities for these contents.

[0077] It should be noted that in the actual application process, the original recall statement can be a statement that an exception occurs when executing the data recall operation determined by relevant personnel in the process of sorting out complaints, abnormal feedback, etc., or it can also be a statement that no data is recalled when the online platform provides a search function for online users. The embodiment of this application does not specifically limit the source of the original recall statement. Among them, the original recall statement can be an SQL statement, and the specified content can be information such as product ID (Identity, identification number), store ID, product name, etc. that you hope to recall from the engine through the original recall statement. This application does not specifically limit this.

[0078] 102. When the original data table includes specified content, multiple recall conditions and specified content of the original recall statement are used to reconstruct multiple statements to be recalled.

[0079] Among them, after obtaining the original recall statement and the specified content, the online tool will first perform a simple exception location, that is, by parsing the original recall statement, obtaining the original data table used when the original recall statement is used to perform the data recall operation, and checking whether the original data table contains the specified content.

[0080] Furthermore, when the original data table includes the specified content, it means that the original data table has already contained the specified content. If the data recall operation is performed normally, the specified content should be recalled in the original data table, not because there is a problem with the original data table. Therefore, it is necessary to further analyze the original recall statement and the specified content. Considering that the original recall statement usually includes multiple recall conditions for limiting the recall content, it is necessary to check each recall condition one by one to locate the recall condition with abnormalities. Therefore, the online tool will use the multiple recall conditions and specified content of the original recall statement to rebuild multiple statements to be recalled, so that the data recall operation can be performed on each statement to be recalled one by one in the future to determine which recall condition has an abnormality.

[0081] It should be noted that, in the actual application process, the original data table can be a specific table used when the original recall statement performs the data recall operation, such as a Cargo table, a Commdity table, etc. The table in which the specified content should be reflected is the original data table. This application does not specifically limit the type of the original data table. In addition, the reconstructed multiple statements to be recalled can also be SQL statements like the original recall statement.

[0082] 103. Based on the original data table, perform data recall operations on multiple statements to be recalled respectively.

[0083] Among them, after completing the reconstruction of the statement, since the content included in the original data table has been roughly analyzed at the beginning in step 102, it is currently necessary to analyze the statement in a targeted manner. Therefore, the online platform will perform data recall operations on multiple statements to be recalled based on the original data table, so as to determine which recall condition is used to reconstruct the statement with the abnormality.

[0084] In the process of actual application, the data recall operation of each statement to be recalled can be directly performed on the original data table. In this way, after the data recall operation is completed, by querying whether the recall result of the corresponding statement to be recalled includes the specified content, it can be determined whether the corresponding statement to be recalled has an exception. However, the applicant recognizes that in some scenarios, after the statement to be recalled executes the data recall operation, the recall result will include a large amount of data, and it is necessary to query whether the specified content is included in the large amount of data, which involves a large amount of workload and is inefficient. Therefore, in another optional implementation scheme, the restriction of the specified content can be added to the where condition (an instruction in the database for specifying the recall standard) of the original data table, and the data recall operation of multiple statements to be recalled is performed in the original data table with the restriction of the specified content, so as to realize the directional recall, so that the recall result of the statement to be recalled without the exception only includes the specified content, and the recall result of the statement to be recalled with the exception indicates the recall failure, so that there is no need to find the specified content in the recall result, saving workload, shortening the time-consuming abnormality positioning, and improving the positioning efficiency.

[0085] 104. Determine, among the multiple statements to be recalled, a statement to be recalled in which an exception occurs when executing a data recall operation as an abnormal statement, and output an abnormality locating result based on a recall condition used when reconstructing the abnormal statement.

[0086] After the data recall operation of multiple statements to be recalled is started, whether anomalies occur will be detected respectively. If the recall result fed back after the data recall operation is executed for a statement to be recalled does not include the specified content, it is determined that an abnormality occurs in the statement to be recalled, and the statement to be recalled is treated as an abnormal statement. Furthermore, the reason why the abnormal statement cannot recall data normally is that the recall condition used to reconstruct the abnormal statement cannot obtain the specified content. Therefore, the online tool will generate an abnormal location result for the recall condition and output the abnormal location result.

[0087] The method provided in the embodiment of the present application obtains the original recall statement, determines the specified content expected to be recalled when the original recall statement is used to perform the data recall operation, and when the specified content is included in the original data table used when the original recall statement is used to perform the data recall operation, multiple recall conditions and specified content of the original recall statement are used to reconstruct multiple statements to be recalled, and based on the original data table, the data recall operation is performed on the multiple statements to be recalled respectively, and the statements to be recalled that are abnormal when the data recall operation is performed are determined as abnormal statements among the multiple statements to be recalled, and the abnormal location result is output based on the recall conditions used when reconstructing the abnormal statements. The present application analyzes the statement structure and conditions, uses the original recall statement and the specified content to assemble statements with different conditions, locates abnormalities for the underlying database, does not invade the service, and has no perception of the specific service. It is not only compatible with newly connected service scenarios, has high coverage and strong availability, but also uses the feature that statement analysis and execution can be performed concurrently, shortens the time consumed for abnormal location, and improves the efficiency of abnormal location.

[0088] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides another abnormality locating method, such as Figure 2 As shown, the method includes:

[0089] 201. Receive an input statement to be located for abnormality location and content to be recalled that is expected to be recalled when a data recall operation is performed based on the statement to be located.

[0090] In an embodiment of the present application, the online tool is a front-end for staff, maintenance personnel, testers, etc. When troubleshooting is required, the relevant personnel can log in to the online tool, enter the statement to be located in the online tool for performing the data recall operation, and provide the content to be recalled that is expected to be recalled through the statement to be located, so that the online tool receives the statement to be located and the content to be recalled entered by the relevant personnel, so as to facilitate the subsequent online tool to locate abnormalities for these contents.

[0091] The statement to be located may be an SQL statement, and the content to be recalled may be information such as product ID, store ID, product name, etc. that is expected to be recalled from the engine through the statement to be located.

[0092] 202. Perform a data recall operation on the sentence to be located based on the data recall engine, obtain the data to be identified that is recalled after the data recall operation is completed, read the data to be identified, and query whether the data to be identified includes the content to be recalled. When the data to be identified does not include the content to be recalled, perform the following steps 203 to 204; when the data to be identified includes the content to be recalled, perform the following step 210.

[0093] In an embodiment of the present application, after obtaining the statements to be located and the content to be recalled, considering that sometimes relevant personnel may mistakenly input non-abnormal statements into the online tool for anomaly location, or sometimes data recall fails due to network fluctuations, in this case, the statements to be located do not actually have any abnormalities, and there is no need to perform a complete anomaly location process on them.

[0094] Therefore, after obtaining the sentence to be located and the content to be recalled, the online tool will first verify the sentence to be located to determine whether the sentence to be located is really unable to be recalled to the content to be recalled, that is, the online tool performs a data recall operation on the sentence to be located based on the data recall engine, obtains the data to be identified that is recalled after the data recall operation is completed, reads the data to be identified, and queries whether the data to be identified includes the content to be recalled. When the content to be recalled is not included in the data to be identified, it means that the sentence to be located is indeed abnormal and needs to be further evaluated. Therefore, the following steps 203 to 204 are executed; and when the content to be recalled is included in the data to be identified, it means that the sentence to be located is actually able to successfully recall the content to be recalled, and no further evaluation is required. It is necessary to remind relevant personnel that they can perform the data recall operation normally. Therefore, the following step 210 is executed.

[0095] 203. When the data to be identified does not include the content to be recalled, the sentence to be located is used as the original recall sentence, and the content to be recalled is used as the designated content.

[0096] In an embodiment of the present application, when the content to be recalled is not included in the data to be identified, it means that the sentence to be located does have an anomaly and needs further evaluation. Therefore, the online tool uses the sentence to be located as the original recall sentence and the content to be recalled as the designated content, and subsequently starts the process of performing anomaly location based on the original recall sentence and the designated content.

[0097] 204. Parse the original recall statement, determine the data mapping table used when the original recall statement is used to perform the data recall operation as the original data table, read the original data table, and query whether the original data table includes the specified content. When the original data table does not include the specified content, execute the following step 205; when the original data table includes the specified content, execute the following steps 206 to 209.

[0098] In an embodiment of the present application, when locating the problem, the online tool will first perform an abnormality check on the original data table used when the original recall statement is used to perform the data recall operation, and determine whether the data recall failure is caused by the original data table not including the specified data. In an optional implementation scheme, the online tool will first parse the original recall statement to determine the data mapping table used when the original recall statement is used to perform the data recall operation as the original data table; then, the online tool reads the original data table and queries whether the original data table includes the specified content. When the original data table does not include the specified content, it means that the original recall statement fails to recall the specified content because the specified content is not included in the original data table. The online tool will output the abnormality location result based on the reason why the original data table does not include the specified content, that is, execute the following step 205. Among them, the original data table can be a specific table used when the original recall statement performs the data recall operation, such as a Cargo table, a Commdity table, etc. The specified content should be reflected in which table, which table is used as the original data table. This application does not specifically limit the type of the original data table.

[0099] 205. When the original data table does not include the specified content, query the supplier of the original data table, extract the content status bound to the specified content from the status information provided by the supplier, and output the content status as an exception locating result.

[0100] In an embodiment of the present application, when the specified content is not included in the original data table, it means that the original recall statement failed to recall the specified content because the specified content is not included in the original data table. Therefore, the online tool will query the supplier of the original data table, extract the content status bound to the specified content from the status information provided by the supplier, and output the content status as the abnormal location result. For example, assuming that it is found that the specified content is not included in the original data table due to the removal of the product from the shelves, the text of "product removed from the shelves" can be output as the abnormal location result; assuming that it is found that the specified content is not included in the original data table due to the closure of the store where the product is located, the text of "store closed" can be output as the abnormal location result; assuming that it is found that the specified content is not included in the original data table due to the fact that the product is not within the distribution range, the text of "out of distribution range" can be output as the abnormal location result.

[0101] Furthermore, in the process of practical application, considering that some reasons can actually be attributed to one type, such as the removal of goods from the shelves, the deletion of goods by merchants, etc., can be uniformly attributed to the type of goods that do not exist. Therefore, in order to summarize the causes of the exceptions, simplify the content of the exception location results, and quickly output the exception location results, in an optional implementation scheme, multiple exception codes can be set. After obtaining the content status, the target exception code corresponding to the content status is queried, and the target exception code is output as the exception location result. For example, assuming that the removal of goods belongs to the situation that the goods do not exist, the target exception code of this situation is 201, then 201 is output as the exception location result; or assuming that the target exception code of the situation where the store where the goods are located is closed is 202, then 202 is output as the exception location result. This application does not specifically limit the content included in the exception location result.

[0102] 206. When the original data table includes specified content, multiple recall conditions and specified content of the original recall statement are used to reconstruct multiple statements to be recalled.

[0103] In an embodiment of the present application, when the original data table includes specified content, it means that the specified content has been stored in the original data table. If the data recall operation is performed normally, the specified content should be able to be recalled in the original data table, not because there is a problem with the original data table. Therefore, it is necessary to further analyze the original recall statement and the specified content. Considering that the original recall statement usually includes multiple recall conditions for limiting the recall content, it is necessary to check each recall condition one by one to locate the recall condition with abnormalities. Therefore, the online tool will use the multiple recall conditions and specified content of the original recall statement to rebuild multiple statements to be recalled, so that the data recall operation can be performed on each statement to be recalled one by one to determine which recall condition has an abnormality. In an optional implementation scheme, the process of reconstructing the statement to be recalled is as follows:

[0104] First, the online tool analyzes the original recall statement and obtains multiple recall conditions in the original recall statement that are used to limit the recalled content. For example, if the original recall data includes store_status=1\has_stock=1\city_id=300100, it can be split into three recall conditions, namely store_status=1, has_stock=1, and city_id=300100. Subsequently, the online tool deletes multiple recall conditions in the original recall statement to obtain an initial statement that retains the specified content. Next, the online tool adds each of the multiple recall conditions to the initial statement to construct a new recall statement, obtains multiple to-be-recalled statements, and completes the splitting and assembly of the recall conditions. Among them, each of the multiple to-be-recalled statements includes at least one recall condition and specified content. In an optional implementation scheme, if the reconstructed statement to be recalled needs to include a recall condition and specified content, it is necessary to select a recall condition from multiple recall conditions, add the recall condition to the initial statement to construct a new recall statement, and obtain a statement to be recalled, and re-select a recall condition other than the recall condition from the multiple recall conditions and add it to the initial statement to construct a new recall statement, until all the recall conditions in the multiple recall conditions are traversed to obtain multiple statements to be recalled. Continuing with the three recall conditions obtained by the above split as an example, assuming that the specified content is A, it is necessary to ensure that each reconstructed statement to be recalled includes a recall condition and specified content, then three statements to be recalled can be reconstructed, and the three statements are respectively a statement including store_status=1 and A, a statement including has_stock=1 and A, and a statement including city_id=300100 and A.

[0105] In another optional implementation scheme, if the number of recall conditions included in the reconstructed sentence to be recalled needs to be equal to the preset number of conditions within the group, then it is necessary to determine the preset number of conditions within the group, group multiple recall conditions according to the number of conditions within the group, obtain multiple recall condition groups, select a recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the recall condition group to the initial sentence to construct a new recall sentence, and obtain a sentence to be recalled, and reselect another recall condition group other than the recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the other recall condition groups to the initial sentence to construct a new recall sentence, until all the recall condition groups in the multiple recall condition groups are traversed to obtain multiple sentences to be recalled. Assuming that 10 recall conditions are obtained by splitting, and the preset number of conditions within the group is 2, then the 10 recall conditions can be divided into 5 recall condition groups, and the 5 recall condition groups are respectively combined with the initial sentence to obtain 5 sentences to be recalled. In actual application, this application does not limit the specific value of the preset number of conditions within the group.

[0106] It should be noted that the reconstructed multiple to-be-recalled statements can also be SQL statements like the original recall statements. Furthermore, in the actual application process, the online tool can be built based on Calcite (an open source SQL parsing tool), so that the online tool uses Calcite to parse the original recall statements in various SQL forms into AST (Abstract Syntax Tree), and then by operating the AST, the algorithm and relationship to be expressed in the original recall statement in SQL form can be reflected in the specific code, and then the multiple recall conditions in the original recall statement can be directly obtained.

[0107] 207. Based on the original data table, perform data recall operations on multiple statements to be recalled respectively.

[0108] In the embodiment of the present application, after the reconstruction of the statement is completed, since the contents of the original data table have been roughly analyzed at the beginning in step 102, it is currently necessary to analyze the statement in a targeted manner. Therefore, the online platform will perform data recall operations on multiple statements to be recalled based on the original data table, so as to determine which recall condition is used to reconstruct the statement with an abnormality. In an optional implementation scheme, the online tool can directly perform data recall operations on each of the multiple statements to be recalled on the original data table based on the data recall engine, and count whether each statement to be recalled returns recall data after executing the data recall operation. In this way, after the data recall operation is completed, the online tool can determine whether the corresponding statement to be recalled has an abnormality by querying whether the recall result of the corresponding statement to be recalled includes the specified content.

[0109] In order to reduce the amount of recalled data and realize directional recall, the recall results of the to-be-recalled statements without exceptions only include the specified content, while the recall results of the to-be-recalled statements with exceptions indicate recall failure, so that there is no need to search for the specified content in the recall results, saving workload, shortening the time consumption of abnormality positioning, and improving positioning efficiency. In another optional implementation scheme, the execution process of the data recall operation can also be realized based on the following process:

[0110] First, the online tool reads the content conditions set in the original data table, adds the specified content to the content conditions, and caches the original data table after adding the specified content. Specifically, the restriction of the specified content can be added to the where condition of the original data table. Then, based on the data recall engine, the online tool executes the data recall operation for each of the multiple statements to be recalled on the original data table after the content conditions are changed, and counts whether each statement to be recalled returns the recalled data after executing the data recall operation.

[0111] 208. Recall results after executing the data recall operation for each of the multiple statements to be recalled are read respectively, and abnormal statements in which abnormalities occur are extracted from the multiple statements to be recalled.

[0112] In an embodiment of the present application, if after a data recall operation is executed on a certain statement to be recalled, the recall result indicates that the recall failed, there is no normal feedback of the recalled data, or the specified content does not exist in the content included in the recall result, then it is determined that an exception has occurred in the statement to be recalled, and the failure of the data recall operation may be caused by the fact that the specified content is not included in the recall conditions included in the statement to be recalled. Therefore, the online platform will read the recall results of each of the multiple statements to be recalled after the data recall operation is executed, and extract the statements to be recalled whose recall results indicate that the recall failed or the specified content does not exist in the content included in the recall result as abnormal statements from the multiple statements to be recalled, and subsequently output the abnormality location result by analyzing the recall conditions included in the abnormal statement.

[0113] Accordingly, if the recall result after executing the data recall operation for each of the multiple statements to be recalled indicates that the recall is successful and the specified content exists in the content included in the recall result, it is determined that no exception occurs when executing the data recall operation for the multiple statements to be recalled, and the data recall operation fails not because any recall condition does not include the specified content. The exception does not exist in the underlying database, and it may be an exception caused by data sorting or other external reasons. Therefore, the online tool will obtain the preset abnormal situation, generate a third abnormal copy including the preset abnormal situation, use the third abnormal copy as the abnormal location result, and output the abnormal location result, so that the relevant personnel can continue to troubleshoot the preset abnormal situation after receiving the abnormal location result. Among them, the preset abnormal situation can be pre-set by the staff, and one or more abnormal situations found in the historical abnormal location process can be included, so that the relevant personnel can refer to it and conduct targeted problem troubleshooting. The specific content of the preset abnormal situation is not limited in this application.

[0114] 209. Analyze the abnormal statement, determine the recall condition included in the abnormal statement, obtain the condition content of the recall condition, generate a first abnormal text including the condition content, use the first abnormal text as the abnormal location result, and output the abnormal location result.

[0115] In an embodiment of the present application, after determining the abnormal statement, the online tool will parse the abnormal statement, determine the recall conditions included in the abnormal statement, and then determine which recall condition did not include the specified content, causing the data recall operation to fail. Then, in order to enable relevant personnel to know the abnormal results of this time, the online tool will obtain the conditional content of the recall condition, generate a first abnormal text including the conditional content, use the first abnormal text as the abnormal positioning result, and output the abnormal positioning result. For example, assuming that the statement including city_id=300100 and A is an abnormal statement, it can be determined that the recall condition is city_id=300100, indicating that A is not associated with the city with ID 300100. Therefore, the first abnormal text such as "not associated with the city 300100" can be output as the abnormal positioning result. In addition, similarly, the content in the above step 206 can also output the abnormal positioning result of the abnormal statement in the form of an abnormal code, which will not be repeated here.

[0116] It should be noted that the process of outputting the first abnormal text as the abnormal location result described in the example above is the case where the abnormal sentence includes one recall condition, while in the actual application process, the abnormal sentence may include at least two recall conditions. If the abnormal sentence includes at least two recall conditions, the online tool will select a recall condition from the at least two recall conditions, add the recall condition to the initial sentence to construct a new recall sentence, obtain a sentence to be recalled, and re-select a recall condition other than the recall condition from the at least two recall conditions and add it to the initial sentence to construct a new recall sentence, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two sentences to be recalled. That is, the at least two recall conditions included in the abnormal sentence are split, and the sentences to be recalled that only include one recall condition and the specified content are rebuilt for the at least two recall conditions. Subsequently, the online tool performs a data recall operation on each of the at least two to-be-recalled statements based on the original data table, determines the to-be-recalled statements that do not return the recalled data after executing the data recall operation in the at least two to-be-recalled statements, determines that the to-be-recalled statements are abnormal when executing the data recall operation, and uses the to-be-recalled statements as secondary abnormal statements. Finally, the secondary abnormal statements are parsed, the conditional content of the recall conditions included in the secondary abnormal statements is obtained, a second abnormal text including the conditional content is generated, the second abnormal text is used as the abnormal location result, and the abnormal location result is output. In other words, if the abnormal statement includes more than one recall condition, a to-be-recalled statement that only includes the recall condition is rebuilt for each recall condition, and then the data recall operation is performed to determine which specific recall condition has an abnormality. The advantage of performing the data recall operation in this way is that the recall conditions that do not have abnormalities can be filtered in batches without filtering one by one, so that the efficiency of abnormal location is improved when the number of recall conditions is large, and a large amount of resources are avoided.

[0117] 210. When the data to be identified includes content to be recalled, output a successful recall response indicating that there is no abnormality in the content to be recalled.

[0118] In an embodiment of the present application, when the data to be identified includes content to be recalled, it means that the statement to be located can actually successfully recall the content to be recalled, and no further evaluation is required. It is necessary to remind relevant personnel that they can perform the data recall operation normally. Therefore, a successful recall response indicating that there is no abnormality in the content to be recalled is output, reminding relevant personnel to re-provide the statement to be located and the content to be recalled.

[0119] In summary, since the embodiment of the present application only checks statements such as SQL, and is at the bottom layer of the troubleshooting stage, and analyzes the tables and structures used based on the statements, the anomaly locating method of the embodiment of the present application does not care what kind of service the online platform provides, and is transparent to the service; moreover, since statements such as SQL are universal and belong to rule-based languages, they are independent of the engine used and can therefore be independent of the search engine of the online platform; further, since each service ultimately uses statements to recall data in the search engine, it is universal, and new scenarios can be seamlessly and quickly accessed to obtain support from the online tools in the embodiment of the present application.

[0120] In addition, since the embodiment of the present application is an exception location method based on analyzing statements and executing statements and analyzing and implementing, the analysis and execution of statements can be performed concurrently, so the RT (Reaction Time) of the embodiment of the present application is very low. In addition, since a human-like troubleshooting approach is adopted, the factors affecting the recall of expected data by the statement are comprehensively analyzed, and the timeout rate is low, so the success rate of exception location is high, the conclusion is more reliable, and since the factors affecting the recall are comprehensively considered, the coverage rate can reach 90% in the actual application process.

[0121] The method provided in the embodiment of the present application analyzes statement structure and conditions, uses the original recall statement and the specified content to assemble statements with different conditions, locates anomalies in the underlying database, does not invade the service, and is unaware of the specific service. It is not only compatible with newly accessed service scenarios, has high coverage and high availability, but also utilizes the feature that statement analysis and execution can be performed concurrently, thereby shortening the time consumed in anomaly location and improving the efficiency of anomaly location.

[0122] Further, as Figure 1 In a specific implementation of the method, the present application provides an abnormality locating device, such as Figure 3 As shown, the device includes: an acquisition module 301, a reconstruction module 302, an execution module 303 and an output module 304.

[0123] The acquisition module 301 is used to acquire an original recall statement and determine the specified content expected to be recalled when the data recall operation is performed using the original recall statement;

[0124] The reconstruction module 302 is used to reconstruct multiple to-be-recalled statements by using multiple recall conditions and the specified content of the original recall statement when the original data table includes the specified content, and the original data table is a data table used when the data recall operation is performed using the original recall statement;

[0125] The execution module 303 is used to execute data recall operations on the multiple statements to be recalled respectively based on the original data table;

[0126] The output module 304 is used to determine, from the multiple statements to be recalled, the statement to be recalled that has an exception when executing the data recall operation as an abnormal statement, and output an abnormality locating result based on the recall condition used when reconstructing the abnormal statement.

[0127] In a specific application scenario, the acquisition module 301 is used to receive an input statement to be located for abnormality location and content to be recalled when a data recall operation is performed based on the statement to be located; perform a data recall operation on the statement to be located based on a data recall engine, and obtain the data to be identified that is recalled after the data recall operation is completed; read the data to be identified, and query whether the data to be identified includes the content to be recalled; when the data to be identified does not include the content to be recalled, use the statement to be located as the original recall statement, and use the content to be recalled as the specified content.

[0128] In a specific application scenario, the device also includes:

[0129] A parsing module, used for parsing the original recall statement, and determining a data mapping table used when performing a data recall operation using the original recall statement as the original data table;

[0130] A query module, used for reading the original data table and querying whether the original data table includes the specified content;

[0131] The output module 304 is also used to query the supplier of the original data table when the designated content is not included in the original data table, extract the content status bound to the designated content from the status information provided by the supplier, and output the content status as an abnormality locating result.

[0132] In a specific application scenario, the reconstruction module 302 is used to analyze the original recall statement and obtain the multiple recall conditions in the original recall statement for limiting the recalled content; delete the multiple recall conditions in the original recall statement to obtain an initial statement that retains the specified content; add each of the multiple recall conditions to the initial statement to construct a new recall statement to obtain the multiple sentences to be recalled, wherein each of the multiple sentences to be recalled includes at least one recall condition and the specified content.

[0133] In a specific application scenario, the reconstruction module 302 is used to select a recall condition from the multiple recall conditions, add the recall condition to the initial sentence to construct a new recall sentence, and obtain a sentence to be recalled, and re-select a recall condition other than the recall condition from the multiple recall conditions and add it to the initial sentence to construct a new recall sentence, until all the recall conditions in the multiple recall conditions are traversed to obtain the multiple sentences to be recalled; or, determine a preset number of conditions within a group, group the multiple recall conditions according to the number of conditions within the group, and obtain to multiple recall condition groups, select a recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions in the group included in the recall condition group to the initial statement to construct a new recall statement, and obtain a statement to be recalled; and re-select another recall condition group except the recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions in the group included in the other recall condition group to the initial statement to construct a new recall statement, until all the recall condition groups in the multiple recall condition groups are traversed to obtain the multiple statements to be recalled.

[0134] In a specific application scenario, the execution module 303 is used to execute the data recall operation of each of the multiple statements to be recalled on the original data table based on the data recall engine, and to count whether each statement to be recalled returns recalled data after the data recall operation is executed; or, to read the content condition set by the original data table, add the specified content to the content condition, cache the original data table after the specified content is added, and based on the data recall engine, to execute the data recall operation of each of the multiple statements to be recalled on the original data table after the content condition is changed, and to count whether each statement to be recalled returns recalled data after the data recall operation is executed.

[0135] In a specific application scenario, the output module 304 is used to respectively read the recall results of each of the multiple statements to be recalled after executing the data recall operation, and extract the abnormal statement where the exception occurs from the multiple statements to be recalled, wherein the recall result of the abnormal statement indicates a recall failure, or the content included in the recall result of the abnormal statement does not contain the specified content; parse the abnormal statement to determine the recall condition included in the abnormal statement; obtain the conditional content of the recall condition, and generate a first abnormal text including the conditional content; use the first abnormal text as the abnormal location result, and output the abnormal location result.

[0136] In a specific application scenario, the output module 304 is also used to, if the abnormal statement includes at least two recall conditions, select a recall condition from the at least two recall conditions, add the recall condition to the initial statement to construct a new recall statement, and obtain a statement to be recalled; re-select another recall condition other than the recall condition from the at least two recall conditions and add it to the initial statement to construct a new recall statement, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two statements to be recalled; based on the original data table, respectively Perform a data recall operation on each of the at least two statements to be recalled; determine, among the at least two statements to be recalled, a statement to be recalled that does not return recalled data after the data recall operation is performed, determine that an exception occurs in the statement to be recalled when the data recall operation is performed, and use the statement to be recalled as a secondary exception statement; parse the secondary exception statement, obtain the conditional content of the recall condition included in the secondary exception statement, and generate a second exception text including the conditional content; use the second exception text as the exception location result, and output the exception location result.

[0137] In a specific application scenario, the output module 304 is also used to determine that no exception occurs when the multiple statements to be recalled execute the data recall operation if the recall result after executing the data recall operation for each of the multiple statements to be recalled indicates a successful recall and the specified content is included in the content included in the recall result; obtain a preset abnormal situation, generate a third abnormal text including the preset abnormal situation; use the third abnormal text as the abnormal location result, and output the abnormal location result.

[0138] The device provided in the embodiment of the present application analyzes statement structure and conditions, uses the original recall statement and the specified content to assemble statements with different conditions, locates anomalies in the underlying database, does not invade the service, and is unaware of the specific service. It is not only compatible with newly connected service scenarios, has high coverage and high availability, but also utilizes the feature that statement analysis and execution can be performed concurrently, thereby shortening the time consumed in anomaly location and improving the efficiency of anomaly location.

[0139] It should be noted that for other corresponding descriptions of the functional units involved in the abnormality locating device provided in the embodiment of the present application, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.

[0140] In an exemplary embodiment, see Figure 4 , and also provides a computer device, which includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the abnormality locating method in the above embodiment.

[0141] A computer-readable storage medium stores a computer program, which implements the steps of the abnormality locating method when executed by a processor.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0143] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.

[0144] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0145] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.

[0146] The above disclosure only discloses several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be conceived by technicians in this field should fall within the scope of protection of the present application.

Claims

1. A method for locating an abnormality, characterized in that: include: Obtaining an original recall statement, and determining the specified content expected to be recalled when the data recall operation is performed using the original recall statement; When the original data table includes the specified content, multiple recall conditions of the original recall statement and the specified content are used to reconstruct multiple statements to be recalled, wherein the original data table is a data table used when the data recall operation is performed using the original recall statement, wherein each recall condition used to restrict the recalled content in the original recall statement is added to the initial statement to obtain the multiple statements to be recalled, and the initial statement is obtained after deleting the multiple recall conditions used to restrict the recalled content in the original recall statement; Based on the original data table, respectively perform data recall operations on the multiple statements to be recalled; A statement to be recalled in which an exception occurs when executing a data recall operation is determined among the multiple statements to be recalled as an abnormal statement, and an abnormality locating result is output based on a recall condition used when reconstructing the abnormal statement.

2. The method according to claim 1, characterized in that: The obtaining of the original recall statement and determining the specified content expected to be recalled when the data recall operation is performed using the original recall statement includes: Receive an input statement to be located for abnormality location, and content to be recalled that is expected to be recalled when a data recall operation is performed based on the statement to be located; Executing a data recall operation of the sentence to be located based on the data recall engine, and obtaining the data to be identified that is recalled after the data recall operation is completed; Reading the data to be identified, and querying whether the data to be identified includes the content to be recalled; When the to-be-recalled content is not included in the to-be-recognized data, the to-be-located sentence is used as the original recall sentence, and the to-be-recalled content is used as the designated content.

3. The method according to claim 1, characterized in that When the original data table includes the specified content, before reconstructing multiple to-be-recalled statements using multiple recall conditions and the specified content of the original recall statement, the method further includes: Parsing the original recall statement, and determining a data mapping table used when performing a data recall operation using the original recall statement as the original data table; Reading the original data table, and querying whether the original data table includes the specified content; When the original data table does not include the designated content, the supplier of the original data table is queried, the content status bound to the designated content is extracted from the status information provided by the supplier, and the content status is output as an abnormality locating result.

4. The method according to claim 1, characterized in that: The step of reconstructing a plurality of to-be-recalled sentences by using the plurality of recall conditions and the specified content of the original recall sentence includes: Analyze the original recall statement to obtain the multiple recall conditions in the original recall statement for limiting the recalled content; Deleting the multiple recall conditions in the original recall statement to obtain an initial statement retaining the specified content; Each of the multiple recall conditions is added to the initial statement to construct a new recall statement, thereby obtaining the multiple to-be-recalled statements, wherein each of the multiple to-be-recalled statements includes at least one recall condition and the specified content.

5. The method according to claim 4, characterized in that The step of adding each of the multiple recall conditions to the initial statement to construct a new recall statement to obtain the multiple to-be-recalled statements includes: Selecting a recall condition from the multiple recall conditions, adding the recall condition to the initial statement to construct a new recall statement, and obtaining a statement to be recalled; and reselecting another recall condition other than the recall condition from the multiple recall conditions and adding it to the initial statement to construct a new recall statement, until all the recall conditions from the multiple recall conditions are traversed to obtain the multiple statements to be recalled; or, Determine a preset number of conditions within a group, group the multiple recall conditions according to the number of conditions within the group to obtain multiple recall condition groups, select a recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the recall condition group to the initial statement to construct a new recall statement to obtain a statement to be recalled, and re-select another recall condition group other than the recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the other recall condition group to the initial statement to construct a new recall statement, until all the recall condition groups in the multiple recall condition groups are traversed to obtain the multiple statements to be recalled.

6. The method according to claim 1, characterized in that The performing data recall operations on the plurality of statements to be recalled based on the original data table respectively includes: Based on the data recall engine, respectively executing the data recall operation of each of the multiple statements to be recalled on the original data table, and respectively counting whether each statement to be recalled returns recalled data after executing the data recall operation; or, Read the content conditions set in the original data table, add the specified content to the content conditions, cache the original data table after the specified content is added, and based on the data recall engine, respectively execute the data recall operation for each of the multiple statements to be recalled on the original data table after the content conditions are changed, and respectively count whether each statement to be recalled returns recalled data after executing the data recall operation.

7. The method according to claim 1, characterized in that The step of determining, from the plurality of statements to be recalled, a statement that is abnormal when executing a data recall operation as an abnormal statement, and outputting an abnormality location result based on a recall condition used when reconstructing the abnormal statement, includes: Respectively read the recall result after executing the data recall operation for each of the multiple statements to be recalled, and extract the abnormal statement in which the abnormality occurs from the multiple statements to be recalled, wherein the recall result of the abnormal statement indicates that the recall fails, or the recall result of the abnormal statement includes the content that does not contain the specified content; Parsing the abnormal statement to determine the recall condition included in the abnormal statement; Acquire the condition content of the recall condition, and generate a first abnormal text including the condition content; The first abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

8. The method according to claim 7, characterized in that After parsing the abnormal statement and determining the recall condition included in the abnormal statement, the method further includes: If the abnormal statement includes at least two recall conditions, a recall condition is selected from the at least two recall conditions, and the recall condition is added to the initial statement to construct a new recall statement, thereby obtaining a statement to be recalled; Reselecting another recall condition other than the recall condition from the at least two recall conditions and adding it to the initial sentence to construct a new recall sentence, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two sentences to be recalled; Based on the original data table, respectively performing a data recall operation on each of the at least two to-be-recalled statements; Determine, among the at least two statements to be recalled, a statement to be recalled that does not return recalled data after executing the data recall operation, determine that an exception occurs in the statement to be recalled when executing the data recall operation, and use the statement to be recalled as a secondary abnormal statement; Parsing the secondary abnormal statement, obtaining the conditional content of the recall condition included in the secondary abnormal statement, and generating a second abnormal text including the conditional content; The second abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

9. The method according to claim 1, characterized in that: After performing data recall operations on the multiple statements to be recalled based on the original data table, the method further includes: If the recall result after executing the data recall operation for each of the multiple statements to be recalled indicates that the recall is successful and the content included in the recall result contains the specified content, it is determined that no exception occurs when executing the data recall operation for the multiple statements to be recalled; Obtaining a preset abnormal situation, and generating a third abnormal text including the preset abnormal situation; The third abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

10. An abnormality locating device, characterized in that: include: An acquisition module, used to acquire an original recall statement and determine the specified content expected to be recalled when the data recall operation is performed using the original recall statement; A reconstruction module, used for, when the original data table includes the specified content, reconstructing a plurality of statements to be recalled by using a plurality of recall conditions of the original recall statement and the specified content, wherein the original data table is a data table used when the data recall operation is performed using the original recall statement, wherein each recall condition used to restrict the recalled content in the original recall statement is added to the initial statement respectively to obtain the plurality of statements to be recalled, and the initial statement is obtained after deleting a plurality of recall conditions used to restrict the recalled content in the original recall statement; An execution module, configured to execute data recall operations on the plurality of statements to be recalled respectively based on the original data table; The output module is used to determine the statement to be recalled that has an exception when executing the data recall operation among the multiple statements to be recalled as an abnormal statement, and output the abnormality location result based on the recall condition used when reconstructing the abnormal statement.

11. The device according to claim 10, characterized in that The acquisition module is used to receive an input statement to be located for abnormality location, and content to be recalled that is expected to be recalled when a data recall operation is performed based on the statement to be located; Executing a data recall operation of the sentence to be located based on the data recall engine, and obtaining the data to be identified that is recalled after the data recall operation is completed; Reading the data to be identified, and querying whether the data to be identified includes the content to be recalled; When the to-be-recalled content is not included in the to-be-recognized data, the to-be-located sentence is used as the original recall sentence, and the to-be-recalled content is used as the designated content.

12. The device according to claim 10, characterized in that The device also includes: A parsing module, used for parsing the original recall statement, and determining a data mapping table used when performing a data recall operation using the original recall statement as the original data table; A query module, used for reading the original data table and querying whether the original data table includes the specified content; The output module is also used to query the supplier of the original data table when the designated content is not included in the original data table, extract the content status bound to the designated content from the status information provided by the supplier, and output the content status as an exception locating result.

13. The device according to claim 10, characterized in that The reconstruction module is used to analyze the original recall statement and obtain the multiple recall conditions in the original recall statement for limiting the recalled content; Deleting the multiple recall conditions in the original recall statement to obtain an initial statement retaining the specified content; Each of the multiple recall conditions is added to the initial statement to construct a new recall statement, thereby obtaining the multiple to-be-recalled statements, wherein each of the multiple to-be-recalled statements includes at least one recall condition and the specified content.

14. The device according to claim 13, characterized in that The reconstruction module is used to select a recall condition from the multiple recall conditions, add the recall condition to the initial sentence to construct a new recall sentence, and obtain a sentence to be recalled, and re-select another recall condition other than the recall condition from the multiple recall conditions and add it to the initial sentence to construct a new recall sentence, until all the recall conditions in the multiple recall conditions are traversed to obtain the multiple sentences to be recalled; Or, determine a preset number of conditions within a group, group the multiple recall conditions according to the number of conditions within the group to obtain multiple recall condition groups, select a recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the recall condition group to the initial statement to construct a new recall statement to obtain a statement to be recalled, and re-select another recall condition group other than the recall condition group from the multiple recall condition groups, add the recall conditions of the number of conditions within the group included in the other recall condition group to the initial statement to construct a new recall statement, until all the recall condition groups in the multiple recall condition groups are traversed to obtain the multiple statements to be recalled.

15. The device according to claim 10, characterized in that The execution module is used to respectively execute the data recall operation of each of the multiple statements to be recalled on the original data table based on the data recall engine, and respectively count whether each statement to be recalled returns recalled data after executing the data recall operation; Or, read the content conditions set in the original data table, add the specified content to the content conditions, cache the original data table after the specified content is added, and based on the data recall engine, execute the data recall operation for each of the multiple statements to be recalled on the original data table after the content conditions are changed, and count whether each statement to be recalled returns recalled data after executing the data recall operation.

16. The device according to claim 10, characterized in that The output module is used to read the recall results of each of the multiple sentences to be recalled after executing the data recall operation, extract the abnormal statement where the exception occurs from the multiple sentences to be recalled, wherein the recall result of the abnormal statement indicates a recall failure, or the content included in the recall result of the abnormal statement does not contain the specified content; parse the abnormal statement to determine the recall condition included in the abnormal statement; obtain the condition content of the recall condition, and generate a first abnormal text including the condition content; use the first abnormal text as the abnormal location result, and output the abnormal location result.

17. The device according to claim 16, characterized in that The output module is further used for, if the abnormal statement includes at least two recall conditions, selecting a recall condition from the at least two recall conditions, adding the recall condition to the initial statement to construct a new recall statement, and obtaining a statement to be recalled; reselecting a recall condition other than the recall condition from the at least two recall conditions and adding it to the initial statement to construct a new recall statement, until all the recall conditions in the at least two recall conditions are traversed to obtain at least two statements to be recalled; and performing a data recall operation on each of the at least two statements to be recalled based on the original data table; Determine, among the at least two statements to be recalled, a statement to be recalled that does not return recalled data after executing the data recall operation, determine that an exception occurs in the statement to be recalled when executing the data recall operation, and use the statement to be recalled as a secondary abnormal statement; parse the secondary abnormal statement, obtain the conditional content of the recall condition included in the secondary abnormal statement, and generate a second abnormal text including the conditional content; The second abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

18. The device according to claim 10, characterized in that The output module is further configured to determine that no exception occurs when the data recall operation is executed for each of the multiple statements to be recalled, if a recall result after the data recall operation is executed for each statement to be recalled indicates that the recall is successful and the content included in the recall result contains the specified content; Obtaining a preset abnormal situation, and generating a third abnormal text including the preset abnormal situation; The third abnormal text is used as the abnormality locating result, and the abnormality locating result is output.

19. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Error correction processing method and device, computer equipment and readable medium

    CN108595412A

  • Query statement processing method and device

    CN114265857A