CN112486823B - Error code verification method and device, electronic equipment and readable storage medium - Google Patents

Error code verification method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112486823B
CN112486823B CN202011368538.XA CN202011368538A CN112486823B CN 112486823 B CN112486823 B CN 112486823B CN 202011368538 A CN202011368538 A CN 202011368538A CN 112486823 B CN112486823 B CN 112486823B
Authority
CN
China
Prior art keywords
error code
code data
class
abnormal
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011368538.XA
Other languages
Chinese (zh)
Other versions
CN112486823A (en
Inventor
郑娜威
阳骁尧
邹为
夏伟
屈彦
李珊珊
李刚
程东旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202011368538.XA priority Critical patent/CN112486823B/en
Publication of CN112486823A publication Critical patent/CN112486823A/en
Application granted granted Critical
Publication of CN112486823B publication Critical patent/CN112486823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides an error code verification method, an error code verification device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring deployed code files in a production environment; determining all exception classes in the code file based on the predefined exception base class; and determining the corresponding error code data of all the abnormal classes, and checking the error code data. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.

Description

Error code verification method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for checking an error code, an electronic device, and a readable storage medium.
Background
At present, the business system of the financial industry, especially large and medium-sized banks, comprises a plurality of business product system modules, and the interaction of the business product system modules is complex.
The problem of non-standard definition of business error codes is commonly existed in each transaction system of a business product system module, and the existing processing mode generally collects error code data. And manually checking whether the error code is standard and compliant by a developer.
In the existing mode, due to the fact that the error code data is checked manually, the condition of missing report and false report of the error code data is likely to occur, and the working efficiency is low.
Disclosure of Invention
The object of the present application is to solve at least one of the technical drawbacks mentioned above. The technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for checking an error code, where the method includes:
acquiring deployed code files in a production environment;
determining all exception classes in the code file based on the predefined exception base class;
and determining the corresponding error code data of all the abnormal classes, and checking the error code data.
Optionally, determining all exception classes in the code file based on the predefined base exception classes, including:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining the custom exception class inherited from the basic exception class, wherein all the exception classes comprise an exception base class and the custom exception class.
Optionally, determining the corresponding error code data for all exception classes includes:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by using a positioning error code construction method.
Optionally, searching the corresponding error code data of all the abnormal classes by using a positioning error code construction method comprises the following steps:
positioning an error code construction method in a method table obtained by analyzing a code file;
and searching corresponding error code data of all abnormal classes based on the positions of the error code construction method.
Optionally, verifying the error code data includes:
determining whether error code data contains preset compliance error code data;
if so, error code data other than the compliance error code data is checked.
Optionally, the method further comprises:
and determining the error code data passing the verification as the compliance error code data.
Optionally, verifying the error code data includes:
the error code data is verified based on predefined verification rules.
In a second aspect, an embodiment of the present application provides an apparatus for checking an error code, where the apparatus includes:
the code file acquisition module is used for acquiring deployed code files in the production environment;
the abnormal class determining module is used for determining all abnormal classes in the code file based on the predefined abnormal base class;
and the error code checking module is used for determining the corresponding error code data of all the abnormal classes and checking the error code data.
Optionally, the anomaly class determination module is specifically configured to:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining the custom exception class inherited from the basic exception class, wherein all the exception classes comprise an exception base class and the custom exception class.
Optionally, the error code checking module is specifically configured to, when determining corresponding error code data of all exception classes:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by using a positioning error code construction method.
Optionally, the error code checking module is specifically configured to, when searching the corresponding error code data of all the exception classes by using the positioning error code construction method:
positioning an error code construction method in a method table obtained by analyzing a code file;
and searching corresponding error code data of all abnormal classes based on the positions of the error code construction method.
Optionally, the error code checking module is specifically configured to, when checking the error code data:
determining whether error code data contains preset compliance error code data;
if so, error code data other than the compliance error code data is checked.
Optionally, the apparatus further includes:
and the compliance error code data determining module is used for determining error code data which passes the verification as compliance error code data.
Optionally, the error code checking module is specifically configured to, when checking the error code data:
the error code data is verified based on predefined verification rules.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;
a memory for storing operation instructions;
and a processor for executing the error code checking method as shown in any implementation mode of the first aspect of the application by calling the operation instruction.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of verifying an error code as shown in any embodiment of the first aspect of the present application.
The beneficial effects that technical scheme that this application embodiment provided brought are:
according to the scheme provided by the embodiment of the application, the code files deployed in the production environment are obtained, all the abnormal classes in the code files are determined based on the predefined abnormal base classes, so that the corresponding error code data of all the abnormal classes are determined, and the error code data are checked. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a flow chart of a method for checking error codes according to an embodiment of the present application;
FIG. 2 is a class dependency structure of a code file in one example provided by embodiments of the present application;
FIG. 3 is a schematic structural diagram of an error code checking device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating the present application and are not to be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Because the transaction service scene is complex, a plurality of service systems are commonly supported, the research and development of a plurality of product service lines are involved, the situation that false code data change is missed and false report is easily caused by a research and development personnel checking and reporting mode, and the manual statistics and rechecking workload is large, and the efficiency is lower.
For testers, error code data are collected and summarized in a functional test or interface test stage, so that high requirements on test coverage rate of each service scene of the system are required, each service scene can be ensured to be covered and accurate, the error code data of each interface are checked while the delivery quality of products is ensured, the working efficiency of the testers is influenced, and the delivery time of the products is delayed.
The method is characterized in that a static code scanning method is adopted, source codes of different products related to transaction are placed in a target folder to be scanned, the source codes of the products possibly related to the transaction are intercepted through a regular rule pattern by a custom scanning rule set, but the scanning efficiency of the method is low, all source codes need to be scanned in a full quantity, the intercepted suspected problems still need to be checked manually, the false alarm rate is high, the compiling and matching capacity of the custom rule set is highly related to the experience capacity of code auditors, and the expansibility is poor.
The embodiment of the application provides a method, a device, electronic equipment and a readable storage medium for checking error codes, which aim to solve at least one of the technical problems in the prior art.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 shows a flow chart of a method for checking an error code according to an embodiment of the present application, and as shown in fig. 1, the method may mainly include:
step S110: acquiring deployed code files in a production environment;
step S120: determining all exception classes in the code file based on the predefined exception base class;
step S130: and determining the corresponding error code data of all the abnormal classes, and checking the error code data.
In the embodiment of the application, the code file may be a code deployment package generated by each production pipeline in the production environment, for example, for a java project, the code deployment package is a jar package or a war package. The exception base class is predefined in the code file such that all exception classes in the code file are from the exception base class.
In the embodiment of the application, all the abnormal classes in the code file can be determined, and error code data is determined according to all the abnormal classes, so that the error code data is automatically checked.
According to the method provided by the embodiment of the application, the deployed code files in the production environment are obtained, all the abnormal classes in the code files are determined based on the predefined abnormal base classes, so that the corresponding error code data of all the abnormal classes are determined, and the error code data are checked. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.
In an alternative manner of the embodiment of the present application, determining all exception classes in the code file based on the predefined basic exception classes includes:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining the custom exception class inherited from the basic exception class, wherein all the exception classes comprise an exception base class and the custom exception class.
In the embodiment of the application, the basic exception class is predefined, so that the production environment conforms to the unified basic exception class definition specification, and the exception class derived by self-definition is inherited from the basic exception class.
In the embodiment of the application, the abnormal base class belonging to the basic abnormal class in the code file can be determined, and the custom abnormal class inherited from the basic abnormal class is determined based on the class dependency relationship, so that all the abnormal classes in the code file are determined.
In an optional manner of this embodiment of the present application, determining the corresponding error code data of all exception classes includes:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by using a positioning error code construction method.
In the embodiment of the application, the method calling relation can be analyzed, so that the error code construction methods referenced by all the abnormal classes are determined, and the corresponding error code data of all the abnormal classes are found out by positioning the error code construction methods.
The error code data may include an error code number and an error code specification.
In an optional manner of this embodiment of the present application, searching for corresponding error code data of all exception classes by using a positioning error code construction method includes:
positioning an error code construction method in a method table obtained by analyzing a code file;
and searching corresponding error code data of all abnormal classes based on the positions of the error code construction method.
In the embodiment of the application, the method table can be parsed, so that the position of the error code construction method is determined in the method table.
In an optional manner of the embodiment of the present application, verifying error code data includes:
determining whether error code data contains preset compliance error code data;
if so, error code data other than the compliance error code data is checked.
In the embodiment of the application, the collected error code data can be filtered through the checked and passed check compliance error code data to obtain the error code data which are not checked, so that the error code data which are not checked can be checked.
In an optional manner of an embodiment of the present application, the method further includes:
and determining the error code data passing the verification as the compliance error code data.
In the embodiment of the application, the error code data passing the verification can be determined as the compliance error code data, and the compliance error code data is used for filtering the acquired error code data.
In an optional manner of the embodiment of the present application, verifying error code data includes:
the error code data is verified based on predefined verification rules.
In the embodiment of the application, a check rule can be set to check error code data. Through the verification of error code data, the non-compliance error code data can be summarized and provided for research personnel to carry out rectification feedback, so that the working efficiency of the whole error code verification and correction is improved to a great extent.
The scheme provided by the embodiment of the application can solve the problems of error code standard management, verification and correction of multi-transaction business, so that the number of system error codes is reduced, the workload of manual investigation and rechecking is reduced, an error code system library is built, error code management is centralized, code quality standard is improved, and user experience is improved.
According to the scheme provided by the embodiment of the application, the whole error code scanning automatic device is built, the basic abnormal class specification is defined, the pipeline deployment packet analysis class dependency relationship is called to accurately identify the error code error data, the error code specification problem is processed in a flow mode, and the manual verification workload is reduced; and the error code data is automatically checked by the rule check engine, so that the error rate of the transaction system error code service scene is reduced, and the product quality and the user experience are improved.
As an example, for java items, class dependencies and method call relationships of the code deployment package can be resolved through a reflection mechanism to obtain a class dependency structure. The class dependency structure is shown in fig. 2.
Wherein the_container table is jar packet information on which deployment packets depend, and the structure information is shown in table 1.
Information of the_container table (i.e., table 1)
Sequence number Column name Type(s) Description of the invention
1 id integer Self-increasing primary key
2 name varchar Files to which class files belong
3 type varchar File type (e.g. jar package)
The_nasspace table is package information to which the class in the deployment package belongs, and the structure information is shown in table 2.
Namespace table information (i.e., table 2)
Sequence number Column name Type(s) Description of the invention
1 id integer Self-increasing primary key
2 name varchar package name
The clazz table is detailed information of the class in the deployment package, and the structure information is shown in table 3.
clazz table information (i.e., table 3)
Sequence number Column name Type(s) Description of the invention
1 id integer Self-increasing primary key
2 container integer Main key of_container
3 name varchar Class name
4 namespace integer Main key of _nacespace
5 ref_class varchar Other class names of dependencies
6 ref_type varchar Dependency mode
7 type varchar The category belongs to
8 visibility varchar Class visibility type
The_method table is a call relation between class methods in the deployment package, and the detailed structure is shown in table 4.
Method table information (i.e., table 4)
Sequence number Column name Type(s) Description of the invention
1 id integer Self-increasing primary key
2 clazz varchar Class name
3 container integer Main key of_container
4 method varchar Method name
5 inv_clazz varchar Other classes of calls
6 inv_method varchar Methods of other classes of calls
7 length integer Instruction list length
And searching the custom exception class inheriting the basic exception class through the class dependency relationship in the column of 'ref_type' in the class dependency relationship table_class table, thereby determining all exception classes.
After the abnormal class is found, all class objects referring to error code examples are accurately found. The specific method position of the error code object example is included in the column of the 'inv_method' in the_method table, so that error code data can be found and resolved.
Based on the same principle as the method shown in fig. 1, fig. 3 shows a schematic structural diagram of an error code checking device provided in an embodiment of the present application, and as shown in fig. 3, the error code checking device 20 may include:
a code file acquisition module 210 for acquiring deployed code files in a production environment;
an exception class determination module 220 for determining all exception classes in the code file based on the predefined exception base class;
the error code checking module 230 is configured to determine corresponding error code data of all abnormal classes, and check the error code data.
According to the device provided by the embodiment of the application, the code files deployed in the production environment are obtained, all the abnormal classes in the code files are determined based on the predefined abnormal base classes, so that the corresponding error code data of all the abnormal classes are determined, and the error code data are checked. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.
Optionally, the anomaly class determination module is specifically configured to:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining the custom exception class inherited from the basic exception class, wherein all the exception classes comprise an exception base class and the custom exception class.
Optionally, the error code checking module is specifically configured to, when determining corresponding error code data of all exception classes:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by using a positioning error code construction method.
Optionally, the error code checking module is specifically configured to, when searching the corresponding error code data of all the exception classes by using the positioning error code construction method:
positioning an error code construction method in a method table obtained by analyzing a code file;
and searching corresponding error code data of all abnormal classes based on the positions of the error code construction method.
Optionally, the error code checking module is specifically configured to, when checking the error code data:
determining whether error code data contains preset compliance error code data;
if so, error code data other than the compliance error code data is checked.
Optionally, the apparatus further includes:
and the compliance error code data determining module is used for determining error code data which passes the verification as compliance error code data.
Optionally, the error code checking module is specifically configured to, when checking the error code data:
the error code data is verified based on predefined verification rules.
It will be appreciated that the above modules of the error code checking apparatus in this embodiment have functions of implementing the corresponding steps of the error code checking method in the embodiment shown in fig. 1. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the error code checking device, reference may be specifically made to the corresponding description of the error code checking method in the embodiment shown in fig. 1, which is not repeated herein.
The embodiment of the application provides electronic equipment, which comprises a processor and a memory;
a memory for storing operation instructions;
and the processor is used for executing the error code checking method provided in any embodiment of the application by calling the operation instruction.
As an example, fig. 4 shows a schematic structural diagram of an electronic device to which the embodiment of the present application is applied, and as shown in fig. 4, the electronic device 2000 includes: a processor 2001 and a memory 2003. The processor 2001 is coupled to a memory 2003, such as via a bus 2002. Optionally, the electronic device 2000 may also include a transceiver 2004. It should be noted that, in practical applications, the transceiver 2004 is not limited to one, and the structure of the electronic device 2000 is not limited to the embodiments of the present application.
The processor 2001 is applied in the embodiment of the present application, and is used to implement the method shown in the method embodiment. The transceiver 2004 may include a receiver and a transmitter, and the transceiver 2004 is employed in embodiments of the present application to perform functions that enable the electronic device of embodiments of the present application to communicate with other devices.
The processor 2001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 2001 may also be a combination of computing functions, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 2002 may include a path to transfer information between the components. Bus 2002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect Standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 2002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
The Memory 2003 may be, but is not limited to, a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
Optionally, a memory 2003 is used for storing application code for executing the aspects of the present application and is controlled for execution by the processor 2001. The processor 2001 is configured to execute application code stored in the memory 2003 to implement the error code checking method provided in any of the embodiments of the present application.
The electronic device provided in the embodiment of the present application is applicable to any embodiment of the foregoing method, and is not described herein again.
Compared with the prior art, the embodiment of the application provides the electronic equipment, by acquiring the deployed code files in the production environment and determining all the abnormal classes in the code files based on the predefined abnormal base classes, the corresponding error code data of all the abnormal classes are determined, and the error code data are checked. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.
The embodiment of the application provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the program is executed by a processor, the method for checking the error code shown in the embodiment of the method is realized.
The computer readable storage medium provided in the embodiments of the present application is applicable to any one of the embodiments of the above method, and is not described herein again.
Compared with the prior art, the embodiment of the application provides a computer readable storage medium, which is used for determining corresponding error code data of all abnormal classes by acquiring a deployed code file in a production environment and determining all the abnormal classes in the code file based on a predefined abnormal base class, and checking the error code data. Based on the scheme, the error code data in the code file can be automatically extracted, the automatic verification of the error code data is realized, the situations of missing report, false report and the like of the error code data possibly occurring during the verification of the error code data by manpower can be avoided, and the verification efficiency of the error code data can be improved.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations should and are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A method for checking an error code, comprising:
acquiring deployed code files in a production environment;
analyzing class dependence and method call relations of a code deployment package through a reflection mechanism based on a predefined abnormal base class to obtain a class dependence relation structure, determining all abnormal classes in the code file, and determining all abnormal classes in the code file based on the predefined basic abnormal class, wherein the method comprises the following steps:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining a custom exception class inherited from the basic exception class, wherein all exception classes comprise the exception base class and the custom exception class;
determining the corresponding error code data of all the abnormal classes, and checking the error code data, wherein the determining the corresponding error code data of all the abnormal classes comprises the following steps:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by locating the error code construction method.
2. The method of claim 1, wherein said locating the error code construction method to find the corresponding error code data of all the exception classes comprises:
positioning the error code construction method in a method table obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes based on the positions of the error code construction method.
3. The method according to any of claims 1-2, wherein said verifying said error code data comprises:
determining whether the error code data contains preset compliance error code data;
and if so, checking the error code data except the compliance error code data.
4. A method according to claim 3, further comprising:
and determining the error code data which passes the verification as the compliance error code data.
5. The method according to any of claims 1-2, wherein said verifying said error code data comprises:
the error code data is verified based on predefined verification rules.
6. An error code checking apparatus, comprising:
the code file acquisition module is used for acquiring deployed code files in the production environment;
the abnormal class determining module is used for analyzing class dependence and method call relations of the code deployment package through a reflection mechanism based on a predefined abnormal base class to obtain a class dependence relation structure, determining all abnormal classes in the code file, and determining all abnormal classes in the code file based on the predefined basic abnormal class, wherein the abnormal class determining module comprises the following steps:
analyzing the code file;
determining an abnormal base class belonging to the basic abnormal class in the code file;
based on the class dependency relationship obtained by analyzing the code file, determining a custom exception class inherited from the basic exception class, wherein all exception classes comprise the exception base class and the custom exception class;
the error code checking module is configured to determine corresponding error code data of all the abnormal classes, and check the error code data, where the determining the corresponding error code data of all the abnormal classes includes:
determining error code construction methods referenced by all abnormal classes based on a method calling relation obtained by analyzing the code file;
and searching the corresponding error code data of all the abnormal classes by locating the error code construction method.
7. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is configured to execute the method of any one of claims 1-5 by invoking the operation instruction.
8. A computer readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-5.
CN202011368538.XA 2020-11-30 2020-11-30 Error code verification method and device, electronic equipment and readable storage medium Active CN112486823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011368538.XA CN112486823B (en) 2020-11-30 2020-11-30 Error code verification method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011368538.XA CN112486823B (en) 2020-11-30 2020-11-30 Error code verification method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112486823A CN112486823A (en) 2021-03-12
CN112486823B true CN112486823B (en) 2023-06-09

Family

ID=74937219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011368538.XA Active CN112486823B (en) 2020-11-30 2020-11-30 Error code verification method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112486823B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765672A (en) * 2014-01-03 2015-07-08 腾讯科技(深圳)有限公司 Error code monitoring method, device and equipment
CN105550059A (en) * 2015-12-09 2016-05-04 中国建设银行股份有限公司 Error code conversion method and equipment
CN109146095A (en) * 2018-08-24 2019-01-04 深圳壹账通智能科技有限公司 The treating method and apparatus of multiservice system problem
CN109376025A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 Abnormality eliminating method, device, computer equipment and storage medium
CN110196790A (en) * 2018-02-24 2019-09-03 北京京东尚科信息技术有限公司 The method and apparatus of abnormal monitoring
CN110347560A (en) * 2019-07-19 2019-10-18 深圳前海微众银行股份有限公司 Abnormal prompt method, apparatus, system, equipment and the medium of big data product
CN110471832A (en) * 2019-06-25 2019-11-19 平安科技(深圳)有限公司 Processing method, device and the computer readable storage medium of program operation
CN110502362A (en) * 2019-08-22 2019-11-26 深圳前海环融联易信息科技服务有限公司 Error code based on micro services framework defines method, apparatus and computer equipment
CN110516045A (en) * 2019-08-30 2019-11-29 北京字节跳动网络技术有限公司 Method, apparatus, electronic equipment and the storage medium of document detection
CN110688285A (en) * 2019-09-30 2020-01-14 深圳前海环融联易信息科技服务有限公司 Method and device for processing abnormal classification of business system, computer equipment and storage medium
CN111090582A (en) * 2019-11-22 2020-05-01 东软集团股份有限公司 Error code positioning method and device, storage medium and electronic equipment
CN111158801A (en) * 2018-11-08 2020-05-15 珠海横琴盛达兆业科技投资有限公司 Method for popping up user-defined errors by using modal dialog box
CN111459826A (en) * 2020-04-03 2020-07-28 中国建设银行股份有限公司 Code defect identification method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9052980B2 (en) * 2013-02-20 2015-06-09 Bmc Software, Inc. Exception based quality assessment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765672A (en) * 2014-01-03 2015-07-08 腾讯科技(深圳)有限公司 Error code monitoring method, device and equipment
CN105550059A (en) * 2015-12-09 2016-05-04 中国建设银行股份有限公司 Error code conversion method and equipment
CN110196790A (en) * 2018-02-24 2019-09-03 北京京东尚科信息技术有限公司 The method and apparatus of abnormal monitoring
CN109146095A (en) * 2018-08-24 2019-01-04 深圳壹账通智能科技有限公司 The treating method and apparatus of multiservice system problem
CN109376025A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 Abnormality eliminating method, device, computer equipment and storage medium
CN111158801A (en) * 2018-11-08 2020-05-15 珠海横琴盛达兆业科技投资有限公司 Method for popping up user-defined errors by using modal dialog box
CN110471832A (en) * 2019-06-25 2019-11-19 平安科技(深圳)有限公司 Processing method, device and the computer readable storage medium of program operation
CN110347560A (en) * 2019-07-19 2019-10-18 深圳前海微众银行股份有限公司 Abnormal prompt method, apparatus, system, equipment and the medium of big data product
CN110502362A (en) * 2019-08-22 2019-11-26 深圳前海环融联易信息科技服务有限公司 Error code based on micro services framework defines method, apparatus and computer equipment
CN110516045A (en) * 2019-08-30 2019-11-29 北京字节跳动网络技术有限公司 Method, apparatus, electronic equipment and the storage medium of document detection
CN110688285A (en) * 2019-09-30 2020-01-14 深圳前海环融联易信息科技服务有限公司 Method and device for processing abnormal classification of business system, computer equipment and storage medium
CN111090582A (en) * 2019-11-22 2020-05-01 东软集团股份有限公司 Error code positioning method and device, storage medium and electronic equipment
CN111459826A (en) * 2020-04-03 2020-07-28 中国建设银行股份有限公司 Code defect identification method and system

Also Published As

Publication number Publication date
CN112486823A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US9753838B2 (en) System and method to classify automated code inspection services defect output for defect analysis
US10671627B2 (en) Processing a data set
CN109726091B (en) Log management method and related device
CN110471912B (en) Employee attribute information verification method and device and terminal equipment
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN114528201A (en) Abnormal code positioning method, device, equipment and medium
CN112486823B (en) Error code verification method and device, electronic equipment and readable storage medium
CN114500249B (en) Root cause positioning method and device
CN111367796B (en) Application program debugging method and device
CN112612882A (en) Review report generation method, device, equipment and storage medium
US9098613B2 (en) Logging of application messages
CN110442370B (en) Test case query method and device
CN113220594A (en) Automatic testing method, device, equipment and storage medium
CN114064387A (en) Log monitoring method, system, device and computer readable storage medium
CN111352824A (en) Test method and device and computer equipment
CN114625595B (en) Method, device and system for rechecking dynamic configuration information of service system
CN117743088A (en) Data auditing method, device, equipment and storage medium
CN111813776B (en) Recording method of vehicle test data, vehicle diagnosis device and storage medium
CN117033203A (en) Method and device for determining association influence of change codes and electronic equipment
CN118608093A (en) Inspection method and device for configured product manufacturing process and electronic equipment
CN116991724A (en) Interface testing method and device based on monitoring log, electronic equipment and storage medium
CN115168349A (en) Logistics data consistency processing method, device, equipment and storage medium
CN116737573A (en) Data testing method, device, equipment and medium for big data platform
CN117539762A (en) Test case recommendation method, device, equipment and storage medium
CN115686962A (en) Server link detection method and device and electronic equipment

Legal Events

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