Abnormal code management method and device, electronic equipment and storage medium

By establishing a structured association between the exception coding library and interface calls, the problem of unclear paths in exception coding management is solved, enabling clear transmission and efficient processing of exception information, and improving the efficiency and accuracy of exception handling in the system.

CN121364883APending Publication Date: 2026-01-20PEOPLE'S INSURANCE COMPANY OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511430727.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

In existing technologies, exception coding management methods fail to effectively bind the relationship between application systems and interface calls, resulting in unclear exception information transmission paths, affecting processing efficiency and accuracy, and easily causing version inconsistencies and erroneous modifications, increasing the complexity of system debugging and maintenance.

Method used

An exception coding library is established, and exception codes are structurally associated with application systems and interface calls. Exception codes are forcibly associated through interface registration, generating a configuration file containing system identifiers and interface information. Global exception information storage variables are injected into the configuration file using encrypted interface dynamic requests. The exception codes are traced and passed on by combining the call chain context information.

Benefits of technology

It enables the binding and dynamic management of exception codes with systems and interfaces, clarifies exception propagation paths, improves the efficiency and accuracy of exception handling, and reduces the complexity of system debugging and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121364883A_ABST
    Figure CN121364883A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal code management method and device, electronic equipment and a storage medium, and relates to the technical field of research and development management. As an abnormal code library in which abnormal codes are structurally associated with an application system and an interface calling relationship is established, the abnormal codes possibly thrown out are forcibly associated during interface registration; the abnormal code configuration file is dynamically requested by means of the encryption interface, the global abnormal information storage variable is injected, and the system identifier is dynamically injected according to the call chain context to realize the abnormal code tracing transmission when the abnormality occurs, so that the binding and dynamic management of the abnormal code, the system and the interface are realized. The technical problems that in the prior art, exception handling efficiency and accuracy are affected, and system debugging operation and maintenance complexity is increased can be solved. The technical effects of making the calling party clear the interface exception set and clear the exception transmission path, avoiding the problems of exception information version inconsistency and error modification, improving the exception handling efficiency and accuracy and reducing the system debugging and operation and maintenance complexity are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of research and development management, and particularly relates to an exception code management method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the software development process, exceptions such as runtime exceptions and check exceptions will inevitably occur. For a system group composed of multiple application systems with calling relationship, a set of exception codes are also needed to represent exceptions.

[0003] At present, the most common way of the commonly used exception code management method and tool is to predefine a set of exception codes and publish them to developers, requiring them to throw exception information and corresponding codes according to the specification, and to maintain them in the application self-defined persistent entity.

[0004] In this exception code management method, static resource files are directly used to maintain exception information, and exception codes are not bound to application systems and interface calling relationships, which may cause the calling system to be unable to determine the exception set that the interface may throw, or the exception information transmission path in the multi-level calling chain to be unclear, thereby affecting the efficiency and accuracy of exception handling. In addition, manual maintenance methods are prone to cause version inconsistency, incorrect modification and other problems, leading to incorrect exception information display or chaotic processing logic, further increasing the complexity of system debugging and operation and maintenance. SUMMARY

[0005] The present disclosure provides an exception code management method, device, electronic equipment and storage medium. Its main purpose is to solve the problem that the exception information transmission path in the multi-level calling chain is not clear, thereby affecting the efficiency and accuracy of exception handling.

[0006] According to a first aspect of the present disclosure, an exception code management method is provided, which comprises:

[0007] Establishing an exception code library, and structurally associating exception codes with application systems and interface calling relationships;

[0008] Based on the interface calling relationship, the exception codes that may be thrown are associated with the interface registration, and an exception code configuration file containing system identification and interface information is generated;

[0009] Based on the encrypted interface, the exception code configuration file is dynamically requested, and the configuration file is decrypted by the exception processing component package and then injected into the global exception information storage variable;

[0010] In response to an exception, the application system identification is dynamically injected according to the calling chain context information, and the backtracking transmission of the exception code in the multi-level calling relationship is performed.

[0011] Optionally, the establishing of the exception code library and the structured association of the exception code with the application system and the interface call relationship comprise:

[0012] The first preset bit of the exception code is a predefined code; wherein the predefined code represents an exception source and an exception type.

[0013] The second preset bit of the exception code is an application system set and an interface set.

[0014] Optionally, the generating of the exception code configuration file comprising the system identifier and the interface information based on the interface call relationship and the forced association of the possible thrown exception code during the interface registration comprise:

[0015] In response to the interface registration, the calling party and the called party system identifier of the interface are submitted, and the exception code list thrown by the interface is specified;

[0016] According to the interface registration information and the associated data in the exception code library, an encrypted exception code configuration file is generated, and the exception code configuration file is bound to the application system corresponding to the interface registration information.

[0017] Optionally, the dynamic request of the exception code configuration file based on the encrypted interface and the decryption of the configuration file by the exception processing component and the injection of the configuration file into the global exception information storage variable comprise:

[0018] In response to the application system starting to request the exception code configuration file based on the preset encrypted interface, and using a symmetric encryption algorithm for decryption;

[0019] The decrypted exception code information is input into a global variable, so that the application system can call in real time in the exception processing logic.

[0020] Optionally, the method further comprises:

[0021] In response to the exception code change, a change notification email is sent to the user subscribing to the exception code, and a change log is recorded.

[0022] According to a second aspect of the present disclosure, an exception code management device is provided, comprising:

[0023] The association unit is configured to establish an exception code library and structurally associate the exception code with an application system and an interface call relationship.

[0024] The generation unit is configured to generate an exception code configuration file comprising a system identifier and interface information based on an interface call relationship and forced association of a possible thrown exception code during interface registration.

[0025] The decryption unit is configured to dynamically request an exception coding configuration file based on an encryption interface, and inject the configuration file into a global exception information storage variable after decryption by an exception processing component;

[0026] The execution unit is configured to, in response to an exception, dynamically inject an application system identifier according to call chain context information, and perform backtracking and transmission of exception coding in a multi-level call relationship.

[0027] Optionally, the association unit is further configured to:

[0028] The first preset bit of the exception coding is a pre-defined coding; wherein the pre-defined coding represents an exception source and an exception type;

[0029] The second preset bit of the exception coding is an application system set and an interface set.

[0030] Optionally, the generation unit is further configured to:

[0031] In response to interface registration, the calling party and the called party system identifier of the interface are submitted, and an exception coding list thrown by the interface is specified;

[0032] According to the interface registration information and the associated data in the exception coding library, an encrypted exception coding configuration file is generated, and the exception coding configuration file is bound to the application system corresponding to the interface registration information.

[0033] Optionally, the decryption unit is further configured to:

[0034] In response to an application system starting to request an exception coding configuration file based on a preset encryption interface, the exception coding configuration file is decrypted using a symmetric encryption algorithm;

[0035] The decrypted exception coding information is input into a global variable, so that the application system can call in real time in the exception processing logic.

[0036] Optionally, the apparatus further comprises:

[0037] The sending unit is configured to, in response to exception coding change, send a change notification email to a user subscribing to the exception coding, and record a change log.

[0038] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0039] at least one processor; and

[0040] a memory connected in communication with the at least one processor; wherein

[0041] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of the first aspect.

[0042] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method of the first aspect.

[0043] According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.

[0044] The abnormal code management method, device, electronic equipment and storage medium provided by the present disclosure establish an abnormal code library structuredly associated with application systems and interface call relationship, forcibly associate possible thrown abnormal codes when the interface is registered, dynamically request an abnormal code configuration file by means of an encrypted interface and inject a global abnormal information storage variable, and realize abnormal code tracing and transmission according to the system identifier dynamically injected according to the call chain context when an abnormality occurs, so as to realize the binding and dynamic management of abnormal codes and systems and interfaces, rather than the manual maintenance mode of maintaining abnormal information by using static resource files and not binding the associated relationship. Therefore, the technical problems that the calling party cannot clearly determine the interface abnormal set, the abnormal transmission path in the multi-level call chain is not clear, and the version inconsistency and incorrect modification caused by manual maintenance affect the efficiency and accuracy of abnormal processing and increase the complexity of system debugging and operation and maintenance can be solved, so as to achieve the technical effects of making the calling party clearly determine the interface abnormal set, clearly determining the abnormal transmission path, avoiding the problems of version inconsistency and incorrect modification, improving the efficiency and accuracy of abnormal processing, and reducing the complexity of system debugging and operation and maintenance.

[0045] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0046] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:

[0047] Figure 1 A flowchart of an abnormal code management method provided by an embodiment of the present disclosure;

[0048] Figure 2 A flowchart of an abnormal code life cycle provided by an embodiment of the present disclosure;

[0049] Figure 3 A flowchart of an application for use and abandonment of an exception code provided by an embodiment of the present application;

[0050] Figure 4 A flowchart of an exception code change provided by an embodiment of the present application;

[0051] Figure 5 A structural diagram of a management device of an exception code provided by an embodiment of the present application;

[0052] Figure 6 A structural diagram of another management device of an exception code provided by an embodiment of the present application;

[0053] Figure 7 A schematic block diagram of an example electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, which should be considered in a descriptive sense only. Thus, it will be apparent to those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.

[0055] The management method, device, electronic device and storage medium of the exception code of the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0056] Figure 1 A flowchart of a management method of an exception code provided by an embodiment of the present disclosure.

[0057] As shown in Figure 1 , the method comprises the following steps:

[0058] Step 101, establishing an exception code library, structurally associating the exception code with the application system and the interface calling relationship;

[0059] As the core carrier of unified management of exception codes and associated information, the exception code library needs to integrate multi-dimensional key information to support structured association. Not only the exception codes themselves, but also the exception description information, which is used to explain the specific performance and scenario of the exception, the exception source, which explicitly indicates the system or module that initiates the exception, the exception type, which classifies the exception according to its nature, and the suggested operation, which provides the processing suggestion or solution for the exception, need to be stored in the library. More importantly, the application system set using the exception code needs to be recorded in the library to clearly define the application scope of each exception code and avoid confusion in the use of exception codes between different systems. At the same time, the interface set involved needs to be recorded to determine which interface calling process may trigger the exception code, laying a foundation for subsequent positioning and processing of interface exceptions.

[0060] In the process of structured association implementation, the exception code needs to be taken as the core association node to establish explicit mapping with the application system and the interface calling relationship. For the association with the application system, the application system information corresponding to each exception code needs to be marked in the library to ensure that which application systems use a certain exception code and which exception codes are involved in a certain application system can be directly queried. For the association with the interface calling relationship, the exception code needs to be bound with the interface that may trigger the exception, i.e., when a certain interface may encounter a specific exception in the calling process, the association relationship between the interface and the corresponding exception code is explicitly recorded in the library, so that when an exception occurs in subsequent interface calling, the corresponding exception code and related processing information can be quickly matched according to the interface information. This structured association method effectively breaks the problem of information isolation in traditional exception code management and provides a basic support for clear flow and efficient processing of exception information between multiple systems.

[0061] Step 102, based on the interface calling relationship, forcibly associate the exception codes that may be thrown when the interface is registered, and generate an exception code configuration file containing system identification and interface information;

[0062] In the exception code management system of multi-system architecture, when step 102 is executed, the interface calling relationship needs to be taken as the core basis to implement the forced association of exception codes in the interface registration link, and an exception code configuration file containing system identification and interface information needs to be generated. The interface calling relationship refers to the association logic formed when multiple systems interact data and cooperate functions through interfaces, which covers the calling party, the called party, data transmission rules and other key elements of the interface. These elements directly determine the exception scenarios that the interface may encounter in the running process and are important references for associating exception codes. Interface registration is an operation that puts the basic information of interfaces used for interaction in each application system (such as interface function description, calling parameter specification, transmission protocol, etc.) into unified management category. Only the registered interfaces can have the prerequisite for subsequent association of exception codes.

[0063] In specific implementation, the calling relationship characteristics of the interface to be registered need to be combed first, combined with the business logic and data processing flow of the interface, the abnormal type that the interface may throw in different scenarios such as normal calling, parameter exception, network interruption, data format error is analyzed, then the corresponding abnormal code is matched from the established abnormal code library, and these abnormal codes are forced to be bound to the currently registered interface through the management mechanism, so that each registered interface can be clearly associated with the abnormal code it may trigger, avoiding the situation that the interface and the abnormal code are not associated or mismatched.

[0064] When the interface and the abnormal code are forced to be associated, the system will automatically generate an abnormal code configuration file. The system identifier in the configuration file is an identifier information used to uniquely distinguish different application systems in a multi-system environment, which can ensure that the system to which the exception belongs can be quickly located when the exception occurs subsequently; the interface information contains the function description, calling rule, parameter requirement and other contents of the registered interface, which together with the abnormal code constitute a clear abnormal traceability basis. The generated configuration file not only provides a standardized reference for subsequent application system calling interface exception identification, but also avoids the non-standard problems such as incorrect modification and missing association that may occur when manually maintaining the correspondence between the interface and the abnormal code, and ensures the accuracy and efficiency of the abnormal information flow between multiple systems.

[0065] Step 103, based on the encrypted interface, dynamically request the abnormal code configuration file, and inject the configuration file into the global abnormal information storage variable after the configuration file is decrypted by the abnormal processing component package;

[0066] The application system does not obtain the configuration file by static download or local storage, but initiates a dynamic request by calling the encrypted interface during running. This dynamic request method can ensure that the application system obtains the latest configuration file in the abnormal code management platform every time, avoiding the problem that the abnormal code does not match the actual abnormal scenario due to the lag of the configuration file version. Since the abnormal code configuration file is in an encrypted state after being generated in the management platform, the application system needs to introduce the abnormal processing component package to complete the decryption operation. The component package has a special decryption logic, which can recognize and parse the encryption format of the configuration file, and convert the encrypted configuration file into plaintext data that can be recognized by the application system.

[0067] After decryption is completed, the abnormal processing component package will inject the abnormal code and associated information (such as abnormal description, suggested operation, etc.) in the configuration file into the global abnormal information storage variable. The global variable can be called by the abnormal processing logic at any time during the running cycle of the application system. When the application system triggers an exception, the abnormal processing logic can quickly obtain the corresponding abnormal code and related information from the global variable, ensuring the timeliness and accuracy of the exception processing, and providing support for efficient transmission and processing of abnormal information between multiple systems.

[0068] Step 104, in response to the occurrence of an exception, dynamically injecting an application system identifier according to the call chain context information, and performing a trace transfer of the exception coding in a multi-level call relationship.

[0069] In the exception management process of the multi-system architecture, the core of the trace transfer processing after the occurrence of an exception is to rely on the call chain context information to achieve the dynamic injection of the application system identifier, and then to ensure the traceability of the exception coding in the multi-level call relationship. The call chain context information refers to the information set that records the call path, the call sequence, the nodes of each system involved in the call, and the interaction data and other key contents in the multi-system multi-level interface call process. It can fully present the entire call link when the exception occurs, providing a basis for subsequent tracing; the application system identifier is an identifier information used to uniquely distinguish different application systems in a multi-system environment. Through the identifier, the system where the exception initially occurs and the systems involved in subsequent transmission can be accurately located.

[0070] When an exception occurs in the running process of an application system, the system will first capture the exception event and automatically obtain the call chain context information to which the current exception belongs. Based on the obtained call chain context information, the system extracts the relevant information of the exception occurrence link and the subsequent possible levels of the calling system, and then dynamically injects the corresponding application system identifier into the exception data, so that the exception data not only contains the exception coding itself, but also has an explicit system attribution mark, avoiding the problem of confusion of the source of the exception in the subsequent transmission process.

[0071] After completing the injection of the application system identifier, the trace transfer of the exception coding in the multi-level call relationship is entered. Due to the existence of complex multi-level call scenarios under the multi-system architecture, for example, system A calls system B, and system B calls system C. If system C has an exception, the exception coding needs to be transmitted back to system B and then to system A. In this process, each level of the calling system can clearly know which system the exception initially occurs in and which systems the exception has passed through by the application system identifier attached to the exception data, so as to quickly sort out the flow path of the exception in the call chain. With this trace transfer mechanism, technical personnel can accurately locate the root cause of the exception according to the exception coding and the corresponding application system identifier, greatly shorten the exception troubleshooting time, and improve the efficiency and accuracy of exception handling under the multi-system architecture.

[0072] In some embodiments, the establishing an exception coding library, and structurally associating the exception coding with an application system and an interface call relationship comprises:

[0073] The first preset bit of the exception coding is a pre-defined coding; wherein the pre-defined coding represents an exception source and an exception type;

[0074] The second preset bit of the abnormal code is an application system set and an interface set.

[0075] The first preset bit of the abnormal code is a predefined code, and the core role of the predefined code is to clearly define the abnormal source and the abnormal type. The abnormal source refers to a specific system module or functional unit where the abnormality occurs. Through the predefined code, the source of the abnormality can be quickly located, avoiding the difficulty in troubleshooting due to the ambiguity of the abnormal source in a multi-system environment. The abnormal type is a classification of the abnormality according to its nature, such as common categories including runtime exceptions (such as null pointer exceptions, division by zero exceptions) and checked exceptions (such as I / O exceptions, SQL exceptions). The predefined code distinguishes these abnormal types through specific coding rules, ensuring that abnormalities of different natures can be accurately identified. This type of predefined code needs to be uniformly planned and set, and a special management role is responsible for maintaining it to ensure its consistency and universality in all application systems, laying the foundation for the unified understanding of abnormal information between multiple systems.

[0076] The second preset bit of the abnormal code corresponds to the application system set and the interface set. The application system set refers to the aggregation of all application systems that will use the abnormal code. Through this setting, the application scope of a certain abnormal code can be clearly defined, and it is clear which systems the abnormal code is applicable to, avoiding misuse or abuse of abnormal codes between different systems. The interface set refers to the aggregation of all interfaces that may trigger the abnormal code during the call process. Interfaces are key carriers for data interaction and functional cooperation between multiple systems, and various exceptions are likely to occur during their call process. Associating the interface set with the second preset bit of the abnormal code can accurately locate the triggering scenario of the abnormal code, i.e., it can be clear that which interface call links may cause the corresponding abnormality. Through the cooperation of the first preset bit and the second preset bit, the abnormal code can form a close and orderly structured association with the application system and the interface call relationship, providing clear information support for subsequent abnormal code queries, usage, and abnormal handling, ensuring the standardization and efficiency of abnormal code management under a multi-system architecture.

[0077] In some embodiments, based on the interface call relationship, the abnormal code that may be thrown is forcibly associated during interface registration, and an abnormal code configuration file containing system identification and interface information is generated, including:

[0078] In response to interface registration, the caller and the callee system identification of the interface are submitted, and the list of abnormal codes thrown by the interface is specified;

[0079] According to the interface registration information and the associated data in the abnormal code library, an encrypted abnormal code configuration file is generated, and the abnormal code configuration file is bound to the application system corresponding to the interface registration information.

[0080] When the interface initiates a registration operation, the system will first respond to this registration request, at which time the calling party and the called party system identification of the interface need to be submitted. The system identification is information used to uniquely distinguish different application systems in a multi-system environment. By explicitly identifying the calling party (the system initiating the interface call) and the called party (the system receiving and processing the call request), the system scope of interface interaction can be clearly defined, providing a basis for locating the system nodes involved in subsequent exceptions. At the same time, the interface business logic, data processing flow, and historical operation experience need to be combined to analyze the possible abnormal scenarios of the interface in the calling process, and the corresponding exception codes are selected from the established exception code library to form and specify the exception code list exclusive to the interface, ensuring that the association between the interface and the exception code covers all potential abnormal situations and avoids omissions.

[0081] After completing the submission of the interface registration information (including the calling party, the called party system identification, and the specified exception code list), the system will retrieve the associated data in the exception code library, which includes the exception description information, suggested operations, and applicable system scope corresponding to the exception code, and integrate and match it with the interface registration information. During the integration process, the association between the interface information and the exception code is verified to ensure that the exception codes specified by the interface are within the effective management range of the exception code library and completely match the abnormal scenarios that the interface may trigger. After the verification is passed, the system will generate an exception code configuration file. To prevent the configuration file from being unauthorized tampered with or obtained during storage or transmission, the configuration file needs to be encrypted to ensure the security of the exception code and the interface association information. Finally, the encrypted exception code configuration file is bound to the application system corresponding to the interface registration information, i.e., it is clear that the configuration file is only applicable to the application system to which the registered interface belongs, ensuring that the application system can accurately obtain the exception code configuration information corresponding to the interface when calling the interface, providing standardized and secure basis for subsequent identification and processing of interface exceptions.

[0082] In some embodiments, the dynamic request of the encrypted interface for the exception code configuration file and the decryption of the configuration file by the exception handling component and injection into the global exception information storage variable include:

[0083] In response to the application system starting to request the exception code configuration file based on the preset encrypted interface and using a symmetric encryption algorithm for decryption;

[0084] Input the decrypted exception code information into the global variable to enable the application system to call it in real time in the exception handling logic.

[0085] When the application system starts, the request operation for the abnormal code configuration file is automatically triggered, at this time the system will initiate a request through the preset encryption interface, the preset encryption interface is a security channel specially designed for the transmission of abnormal code configuration file, its core function is to ensure that the configuration file will not be leaked, tampered or unauthorized access during the transmission from the management platform to the application system, providing basic guarantee for the security of configuration file transmission.

[0086] After requesting the abnormal code configuration file, since the configuration file has been encrypted when generated in the management platform, the application system needs to decrypt it with the help of symmetric encryption algorithm. Symmetric encryption algorithm has the characteristic of using the same key for encryption and decryption, which not only ensures the efficiency of the decryption process and avoids the influence of the application system startup efficiency caused by too long decryption time, but also further improves the security of the configuration file through the exclusive management of the key, preventing unauthorized subjects from decrypting and obtaining the configuration file content through illegal means, ensuring that only the application system with the corresponding key can normally decrypt and use the configuration file.

[0087] After decryption is completed, the system will input the decrypted abnormal code information into the global variable. The global variable is a public data storage unit in the application system for storing abnormal code related information, which has the characteristic of being accessible throughout the application system running period. After storing the abnormal code information in the global variable, the application system does not need to request or decrypt the configuration file again when triggering the abnormal processing logic in the subsequent running process, and can directly call the required abnormal code information from the global variable in real time, quickly match the abnormal scene and execute the corresponding processing operation, effectively improving the response speed and efficiency of the application system abnormal processing, and ensuring the smooth running of the abnormal processing logic under the multi-system architecture.

[0088] In some embodiments, the method further comprises:

[0089] In response to the abnormal code change, a change notification email is sent to the user subscribing to the abnormal code, and a change log is recorded.

[0090] The system will automatically identify and filter out the users subscribing to the abnormal code, these users are usually the application system responsible person, interface maintenance personnel or abnormal processing related technical personnel related to the abnormal code, they have previously set up a subscription to the dynamic change of the specific abnormal code through the management mechanism, so as to obtain the change information in time. Then, the system will generate a notification email containing the key change content, the email will clearly present the identification of the abnormal code, the information before the change, the information after the change, the change reason and the change effective time, etc., to ensure that the subscribing user can fully understand the change details, so as to timely adjust the abnormal processing logic of the system or interface they are responsible for, and avoid the failure of abnormal processing caused by information lag.

[0091] At the same time, the system synchronously records the change log. The change log completely retains all key information related to the abnormal coding change, including the abnormal code, the change initiation time, the change operator, the change type (such as abnormal description modification, associated interface adjustment, etc.), the specific data comparison before and after the change, and the audit personnel and audit opinion. These log information is securely stored to form a traceable change record. If an abnormal processing problem related to the abnormal code occurs later, technical personnel can quickly locate the change node and change content by querying the change log to troubleshoot the problem source, thereby providing strong support for the compliance and problem troubleshooting efficiency of abnormal code management.

[0092] The following illustrates the management method of the abnormal code provided by the present application by an example.

[0093] The abnormal code library is established to uniformly manage the abnormal code and related information. The first 7 bits of the abnormal code are shared by all application systems and are uniformly managed and maintained by the abnormal code library administrator.

[0094] (I) Abnormal code related information

[0095] The information that the abnormal code library should manage includes: abnormal code (7 bits), abnormal description information, abnormal source, abnormal type, recommended operation, application system set used, and interface set involved.

[0096] (II) Abnormal code life cycle

[0097] The abnormal code life cycle includes: registration, use, change, and invalidation.

[0098] 1. Abnormal code registration

[0099] Please refer to Figure 2 , Figure 2 for a flowchart of the abnormal code life cycle provided by the embodiment of the present application. When the abnormal code library is first established, the first 3 bits of the abnormal source and abnormal type code are predefined codes, which are uniformly imported by the abnormal code library administrator. The 4th-7th bits of the code are sorted by the project team, and then uniformly applied to import the abnormal code library, which is approved by the abnormal code library administrator after being approved by the abnormal code library administrator.

[0100] During subsequent project construction, if an abnormality needs to be handled, the same meaning abnormal code should be used in the abnormal code library, and if it needs to be added, the abnormal code registration application can be submitted through the registration process of the abnormal code library, which is approved by the abnormal code library administrator after being approved by the abnormal code library administrator.

[0101] 2. Abnormal code application and abandonment

[0102] Please refer to Figure 3 , Figure 3The flowchart of the application and abandonment of the use of the abnormal code provided by the embodiment of the application is shown in the figure; in the subsequent project construction, if it is necessary to process an abnormality, the use of the abnormal code with the same meaning should be found in the abnormal code library. At the same time, the application and abandonment of the use of the abnormal code library are submitted, and the system is marked. If the abnormality may occur when one or more interfaces are called, the interface list should be associated.

[0103] When the abnormal code is applied, if the code may occur when one or more interfaces are called, the interface should be associated. Therefore, it is necessary to ensure that the interface registration is completed.

[0104] When the abnormal code is applied, the abnormal code list file is generated by the architecture management platform, which is introduced by the project group and used in the abnormality processing.

[0105] In order to ensure that the application system uses the standard abnormal code configuration file, the abnormal code management platform provides an interface for the application system to call. The application system can only dynamically update the abnormal code configuration file in the form of interface request at runtime, and the configuration file is encrypted by the management platform. The application system needs to introduce the abnormal processing component package to decrypt and use the file. After the abnormal processing component jar package is introduced, the project will read the file from the management platform during the startup process, and the content will be decrypted and placed in the global variable GLOBAL_EXCEPTION_INFO, which is called by the abnormal processing logic.

[0106] When the abnormal information needs to be updated, the application is restarted, and the latest abnormal code configuration is requested from the management platform to realize the update of the configuration.

[0107] 3. Abnormal code change

[0108] Subscription and change notification mechanism.

[0109] Please refer to Figure 4 , Figure 4 The flowchart of the abnormal code change provided by the embodiment of the application is shown in the figure; after the abnormal code is changed, the relevant system person in charge who is concerned about the code and the person in charge of the system are sent by email.

[0110] 4. Abnormal code invalidation

[0111] Since the abnormal code is public, the invalidation mechanism is not set up temporarily. If the abnormal code space is insufficient later, the management mechanism will be revised according to the actual application situation.

[0112] However, the abnormal code management platform and the log analysis tool regularly perform joint analysis to determine which abnormal code is commonly used, update the use statistical information, and provide reference.

[0113] (Three) Use of abnormal code information

[0114] If it is a system error, the trust platform can be jumped to report the problem. Meanwhile, the AI monitoring analysis can analyze the abnormality in a period of time according to the user behavior, in combination with the abnormal log and the abnormal coding library, and provide optimization suggestions.

[0115] Corresponding to the abnormal coding management method described above, the present application also provides an abnormal coding management device. Since the device embodiment of the present application corresponds to the method embodiment described above, the details not disclosed in the device embodiment can be referred to the method embodiment described above, which will not be described in detail in the present application.

[0116] Figure 5 The structure diagram of an abnormal coding management device provided by the embodiment of the present application is shown in Figure 5 As shown in the figure, it comprises:

[0117] The association unit 21 is configured to establish an abnormal coding library, and structurally associate the abnormal coding with the application system and the interface calling relationship;

[0118] The generation unit 22 is configured to generate an abnormal coding configuration file containing system identification and interface information based on the interface calling relationship, and forcibly associate the possible thrown abnormal coding when the interface is registered;

[0119] The decryption unit 23 is configured to dynamically request the abnormal coding configuration file based on the encrypted interface, and inject the configuration file into the global exception information storage variable after decryption by the exception handling component package;

[0120] The execution unit 24 is configured to respond to the occurrence of an exception, dynamically inject the application system identification according to the calling chain context information, and execute the trace transfer of the abnormal coding in the multi-level calling relationship.

[0121] Further, in a possible implementation manner of the embodiment of the present application, the association unit 21 is further configured to:

[0122] The first preset bit of the abnormal coding is a pre-defined coding; wherein the pre-defined coding represents the abnormal source and the abnormal type;

[0123] The second preset bit of the abnormal coding is the application system set and the interface set.

[0124] Further, in a possible implementation manner of the embodiment of the present application, the generation unit 22 is further configured to:

[0125] In response to the interface registration, the calling party and the called party system identification of the interface are submitted, and the abnormal coding list thrown by the interface is specified;

[0126] According to the interface registration information and the associated data in the abnormal code library, an encrypted abnormal code configuration file is generated, and the abnormal code configuration file is bound to the application system corresponding to the interface registration information.

[0127] Further, in a possible implementation of the embodiment of the present disclosure, the decryption unit 23 is further configured to:

[0128] In response to the application system starting to request the abnormal code configuration file based on the preset encryption interface, and using a symmetric encryption algorithm for decryption;

[0129] The decrypted abnormal code information is input into a global variable, so that the application system can call in real time in the abnormal processing logic.

[0130] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 6 The apparatus further includes:

[0131] The sending unit 25 is configured to, in response to abnormal code change, send a change notification email to a user subscribing to the abnormal code, and record a change log.

[0132] It should be noted that the foregoing explanation and description of the method embodiments are also applicable to the apparatus of the embodiment of the present disclosure, and the principles are the same, which are not limited in the embodiment of the present disclosure.

[0133] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0134] Figure 7 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0135] As Figure 7As shown, the device 300 includes a computing unit 301 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded into a RAM (Random Access Memory) 303 from a storage unit 308. Various programs and data required for the operation of the device 300 can also be stored in the RAM 303. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An I / O (Input / Output) interface 305 is also connected to the bus 304.

[0136] Various components in the device 300 are connected to the I / O interface 305, including an input unit 306 such as a keyboard, a mouse, and the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, a magneto-optical disk, and the like; and a communication unit 309 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0137] The computing unit 301 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, and the like. The computing unit 301 performs various methods and processes described above, such as the management method of exception encoding. For example, in some embodiments, the management method of exception encoding can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 301 can be configured to perform the aforementioned management method of exception encoding by any other appropriate means, such as by means of firmware.

[0138] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on a Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0139] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general or special purpose computer, such that the program code, when executed by the processor or controller, causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0140] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include a linearly-programmed electrical connection, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0142] The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.

[0143] The computer system can include clients and servers. This relationship can be

[0144] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors of people (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several directions.

[0145] It should be understood that the steps shown above can be reordered, added or deleted. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.

[0146] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A management method of exception encoding characterized by, The method comprises: establishing an exception code library, structurally associating exception codes with application systems and interface call relationships; based on the interface call relationship, forcibly associating possible exception codes during interface registration, and generating an exception code configuration file containing system identification and interface information; based on the encrypted interface, dynamically requesting the exception code configuration file, and injecting the decrypted configuration file into a global exception information storage variable by an exception handling component package; in response to an exception, dynamically injecting an application system identification according to the call chain context information, and performing a trace transfer of the exception code in a multi-level call relationship.

2. The method of claim 1, wherein, The method further comprises: in response to a change in the exception code, sending a change notification email to a user subscribing to the exception code, and recording a change log. The method comprises:

3. The method of claim 1, wherein, an association unit configured to establish an exception code library, structurally associating exception codes with application systems and interface call relationships; a generation unit configured to, based on the interface call relationship, forcibly associate possible exception codes during interface registration, and generate an exception code configuration file containing system identification and interface information; a decryption unit configured to, based on the encrypted interface, dynamically request the exception code configuration file, and inject the decrypted configuration file into a global exception information storage variable by an exception handling component package; 4. The method of claim 1, wherein, an execution unit configured to, in response to an exception, dynamically inject an application system identification according to the call chain context information, and perform a trace transfer of the exception code in a multi-level call relationship. The association unit is further configured to: a first preset bit of the exception code is a predefined code; wherein the predefined code represents an exception source and an exception type; 5. The method of claim 1, wherein, a second preset bit of the exception code is a set of application systems and a set of interfaces. The method further comprises:

6. An apparatus for managing exception encoding, the apparatus comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein ​ ​ 7. The apparatus of claim 6, wherein, ​ ​ ​ 8. An electronic device, comprising: ​ ​ ​ ​ The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing the computer to perform the method of any one of claims 1-5.

10. A computer program product, characterised in that, A computer program comprising instructions which, when executed by a processor, implement the method of any one of claims 1-5.