CN114489638A - Multi-language unified error code method - Google Patents
Multi-language unified error code method Download PDFInfo
- Publication number
- CN114489638A CN114489638A CN202111558759.8A CN202111558759A CN114489638A CN 114489638 A CN114489638 A CN 114489638A CN 202111558759 A CN202111558759 A CN 202111558759A CN 114489638 A CN114489638 A CN 114489638A
- Authority
- CN
- China
- Prior art keywords
- error code
- information
- error
- code
- lingual
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000006243 chemical reaction Methods 0.000 claims abstract description 5
- 238000012545 processing Methods 0.000 claims abstract description 5
- 238000012423 maintenance Methods 0.000 claims abstract description 4
- 230000008569 process Effects 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 claims description 4
- 230000004044 response Effects 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008571 general function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
Abstract
The invention discloses a multilingual unified error code method, which comprises the steps of predefining error code generation specifications; generating a fault log, and extracting error code information in the fault log according to the code instruction; reading the code and the fault log file, acquiring a software code and a software version code, generating a corresponding error code data file according to an error code generation specification, and storing the error code data file in a database; generating a multilingual error code according to the language conversion instruction, and returning error code information; and displaying the error code information to a user interface for subsequent processing and operation and maintenance. According to the invention, the error code information is extracted from the fault log, the error code information is converted into multi-language error codes, the error code file information is pushed in real time, the field code of the service module is obtained, the user can be helped to quickly position and check the error information, the multi-language error code information is unified, and the efficiency and the accuracy of the service system in fault treatment are improved.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a multi-language unified error code method.
Background
The error code is a kind of root error information output or returned in case of failed interface call, and is used to assist the developer in finding and locating the problem. With the development of internet services, the composition architecture of the internet services is increasingly complex, and the difficulty of finding and locating problems is also increasing. The error code design mechanism in each system mostly adopts a digital code form, and the meaning of errors represented by different digital error codes is set by the developer of each module.
The following problems mainly exist in the transmission mode of the error code:
1. errors are easy to occur through the error code expression form of the digital code, a requester cannot accurately know which node generates the errors, and the error source cannot be quickly analyzed and positioned.
2. When the digital error code facing the local call interface is transmitted, the general function module or the application service module does not consider the consistency problem in the whole system, different function modules or application service modules have error code mechanisms with different rules, most companies have no standard on the error code definition used in software or systems, the error code definition has huge difference between different software or systems, and even the error code definition is changed between different versions of the same system or software. The difficulty of later positioning problem is increased by the random definition of the error code, so that the user experience is influenced, the problem of error code transmission is not considered in local calling, and the problem of system error positioning difficulty is caused.
There is therefore a need for a convenient multilingual unified error code method.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a multi-language unified error code method aiming at the defects related in the background art, which can realize the fast positioning of the specific application module generated by the error and the accurate extraction of the error code information by the multi-language error code generation and the unified error code implementation.
The technical problems of the invention are realized by adopting the following technical scheme:
a multi-language unified error code method comprises the following steps:
predefining error code generation specifications;
generating a fault log, and extracting error code information in the fault log according to a code instruction;
reading the code and the fault log file, acquiring a software code and a software version code, generating a corresponding error code data file according to an error code generation specification, and storing the error code data file in a database;
generating a multilingual error code according to the language conversion instruction, and returning error code information;
and displaying the error code information to a user interface for subsequent processing and operation and maintenance.
Preferably, the method further includes, when the error code needs to be updated, traversing the database to screen out unprocessed error code identifiers, sending error code data information to the server, receiving a response message, analyzing the error code identifiers of the error code data information, and generating and storing a corresponding error code data file.
Preferably, the multi-language error code is generated, wherein when the multi-language error code is generated, the error code information in the fault log is converted into english, and then the english is converted into other predefined multi-languages.
Preferably, when the multi-language error code is generated, the language identifier is transmitted into the interface, and the language identifier can also be transmitted through the interface parameter.
Preferably, the error code information extracted from the fault log includes, but is not limited to, the following:
software information, software version information, method name, function information.
Preferably, the generated multilingual error code includes: and combining the error code method name, the error code prefix, the error information sequencing in the log and the error code field number according to the field number corresponding to the system service module, the error code method name, the error code prefix and the error information sequencing in the log to form a new error code.
Preferably, the error code length is set to be within 100.
Preferably, the extracting of the error code information in the fault log includes: extracting when the fault log is printed for the first time or the last time; extracting in a top layer process or a bottom layer process; and extracting when the system intercepts the error log.
Preferably, the error code information in the fault log is extracted, and when the error code is extracted to the placeholder, the fault log with the placeholder is completely intercepted.
According to the invention, the error code information is extracted from the fault log, the error code information is converted into multi-language error codes, the error code file information is pushed in real time, the field code of the service module is obtained, the user can be helped to quickly position and check the error information, the multi-language error code information is unified, and the efficiency and the accuracy of the service system in fault treatment are improved.
Drawings
FIG. 1 is a flow chart of a multi-lingual UPC method according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further described in detail with reference to the accompanying drawings. It is understood that the embodiments described are only a few embodiments, not all embodiments, and that all other embodiments obtained by those skilled in the art without the use of inventive faculty are within the scope of the invention.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components and/or sections, these elements, components and/or sections should not be limited by these terms.
In a distributed system, service modules are often arranged in different servers, when a certain service request is to be completed, many service modules may need to be called, and these service modules, which may be local service modules or remote service modules, are called to a certain service module, and may also need to call other local service modules or remote service modules again, so that after an error code transmission between different service modules generates an error, a root service module needs to obtain positioning and obtain accurate error code information.
The embodiment provides a multi-language unified error code method, as shown in fig. 1, which includes the following steps:
s101: predefining error code generation specifications;
s102: when the service module generates errors and generates error codes, generating a fault log, and extracting error code information in the fault log according to a code instruction;
specifically, a fault log is generated, log data of a service system are analyzed, fault description information is obtained, and error code information in the fault log is extracted;
the error code information refers to an error code generated according to a fault event, and also comprises the type of the fault event, a service module and the severity level of the fault event;
s103: reading the code and the fault log file, acquiring a software code and a software version code, generating a corresponding error code data file according to an error code generation specification, and storing the error code data file in a database;
s104: generating a multilingual error code according to the language conversion instruction, and returning error code information;
specifically, receiving a multilingual language conversion instruction, generating an error code data file into formulated language information, returning and storing;
s105: and displaying the error code information to a user interface for subsequent processing and operation and maintenance.
In this embodiment, the method further includes, when the error code needs to be updated, traversing the database to screen out an unprocessed error code identifier, sending error code data information to the server, receiving a response message, analyzing the error code identifier of the error code data information, and generating and storing a corresponding error code data file.
In this embodiment, the multi-language error code is generated, where when the multi-language error code is generated, the error code information in the fault log is converted into english, and then the english is converted into other predefined multi-languages.
Specifically, the multi-language type is predefined, and the defined types are selected according to the user instruction, and can be converted into multi-language error code information respectively, or converted into certain language error code information according to the user instruction.
In this embodiment, when the multi-language error code is generated, the language identifier is included in the language input by the interface, and the language identifier may also be input by the interface parameter.
In this embodiment, the error code information extracted from the fault log includes, but is not limited to, the following:
software information, software version information, method name, function information.
In this embodiment, the generated multilingual error code includes: and combining the error code method name, the error code prefix, the error information sequencing in the log and the error code field number according to the field number corresponding to the system service module, the error code method name, the error code prefix and the error information sequencing in the log to form a new error code.
In this embodiment, the length of the error code is set to be within 100.
In this embodiment, the extracting of the error code information in the fault log includes: extracting when the fault log is printed for the first time or the last time; extracting in a top layer process or a bottom layer process; and extracting when the system intercepts the error log.
In this embodiment, the error code information in the fault log is extracted, and when the error code is extracted to the placeholder, the fault log with the placeholder is completely intercepted.
Specifically, when the placeholder is identified during extraction of the error code information, only the error code information in front of the placeholder is extracted, and the fault log information behind the placeholder is completely intercepted.
And writing the error code information into the corresponding error code data file, returning a prompt of successful instruction writing when the execution is successful, and returning a prompt of failed writing if any one of the execution fails.
According to the invention, the error code information is extracted from the fault log, the error code information is converted into multi-language error codes, the error code file information is pushed in real time, the field code of the service module is obtained, the user can be helped to quickly position and check the error information, the multi-language error code information is unified, and the efficiency and the accuracy of the service system in fault treatment are improved.
Those skilled in the art will appreciate that the functionality described in the present invention may be implemented in a combination of hardware and software in one or more of the examples described above. When software is applied, the corresponding functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the specification and its practical application, to thereby enable others skilled in the art to best understand the specification and its practical application. The specification is limited only by the claims and their full scope and equivalents.
Claims (9)
1. A multi-language unified error code method is characterized by comprising the following steps:
predefining error code generation specifications;
generating a fault log, and extracting error code information in the fault log according to the code instruction;
reading the code and the fault log file, acquiring a software code and a software version code, generating a corresponding error code data file according to an error code generation specification, and storing the error code data file in a database;
generating a multilingual error code according to the language conversion instruction, and returning error code information;
and displaying the error code information to a user interface for subsequent processing and operation and maintenance.
2. The multi-lingual Unicode error method of claim 1, further comprising, when an error code needs to be updated, traversing the database to screen out unprocessed error code identifications, sending error code data messages to the server, receiving response messages, parsing the error code identifications of the error code data messages, generating and storing corresponding error code data files.
3. The method of claim 1, wherein the multi-lingual UPC is generated, wherein when the multi-lingual UPC is generated, the error code information in the fault log is converted into English, and then converted into other predefined multi-lingual by English.
4. The multi-lingual UPC method of claim 3, wherein the interface entry language is identified by language identification when generating the multi-lingual UPC, and further by the interface parameters.
5. The multilingual unified error code method of claim 1, wherein the error code information extracted from the fault log includes, but is not limited to, the following:
software information, software version information, method name, function information.
6. The multi-lingual unicode method of claim 1, wherein the generated multi-lingual error code comprises: and combining the error code method name, the error code prefix, the error information sequencing in the log and the error code field number according to the field number corresponding to the system service module, the error code method name, the error code prefix and the error information sequencing in the log to form a new error code.
7. The multi-lingual unicode method of claim 1, wherein the error code length is set to be within 100.
8. The multi-lingual unified error code method according to claim 1, wherein said extracting of said error code information from said error code information in said fault log comprises: extracting when the fault log is printed for the first time or the last time; extracting in a top layer process or a bottom layer process; and extracting when the system intercepts the error log.
9. The multi-lingual uniform error code method of claim 1, wherein error code information in the fault log is extracted, and when the error code is extracted to the placeholder, the fault log with the placeholder is completely intercepted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111558759.8A CN114489638A (en) | 2021-12-20 | 2021-12-20 | Multi-language unified error code method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111558759.8A CN114489638A (en) | 2021-12-20 | 2021-12-20 | Multi-language unified error code method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114489638A true CN114489638A (en) | 2022-05-13 |
Family
ID=81493402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111558759.8A Withdrawn CN114489638A (en) | 2021-12-20 | 2021-12-20 | Multi-language unified error code method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114489638A (en) |
-
2021
- 2021-12-20 CN CN202111558759.8A patent/CN114489638A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8626778B2 (en) | System and method for conversion of JMS message data into database transactions for application to multiple heterogeneous databases | |
CN112287009A (en) | Interface calling and interface data warehousing method, device, equipment and storage medium | |
CN111460241B (en) | Data query method and device, electronic equipment and storage medium | |
CN110858172A (en) | Automatic test code generation method and device | |
CN112231407B (en) | DDL synchronization method, device, equipment and medium of PostgreSQL database | |
CN114281342A (en) | Automatic code generation method | |
CN115599359A (en) | Code generation method, device, equipment and medium | |
CN110109981B (en) | Information display method and device for work queue, computer equipment and storage medium | |
CN109947711B (en) | Automatic multi-language file management method in IOS project development process | |
CN113111669B (en) | Increment-based front-end multi-language internationalized translation method and device | |
CN111240772A (en) | Data processing method and device based on block chain and storage medium | |
CN114254661A (en) | Method and system for translating application international language, electronic device and storage medium | |
JP7346332B2 (en) | Database migration method, database migration system, and database migration program | |
CN116775488A (en) | Abnormal data determination method, device, equipment, medium and product | |
CN114489638A (en) | Multi-language unified error code method | |
KR101820495B1 (en) | Multilingual translation and output method of websites, communities and bulletin board user interfaces on the Internet and characters | |
CN111373377A (en) | Error handling | |
CN111488286B (en) | Method and device for independently developing Android modules | |
CN112988583A (en) | Method and device for testing syntax compatibility of database | |
CN113722236B (en) | Game debugging method, device, equipment and storage medium | |
CN110955430A (en) | Application program native capability calling method and device and electronic equipment | |
US11803549B2 (en) | Method and system for facilitating on-the-fly OVSDB protocol translation between multiple OVSDB schema versions | |
CN115242625B (en) | Service deployment method, device, computer equipment and readable storage medium | |
US20240053981A1 (en) | Methods for automated configuration management in platform-as-a-service environments and devices thereof | |
CN116755684B (en) | OAS Schema generation method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20220513 |
|
WW01 | Invention patent application withdrawn after publication |