CN112861529A - Method and device for managing error codes - Google Patents

Method and device for managing error codes Download PDF

Info

Publication number
CN112861529A
CN112861529A CN201911184901.XA CN201911184901A CN112861529A CN 112861529 A CN112861529 A CN 112861529A CN 201911184901 A CN201911184901 A CN 201911184901A CN 112861529 A CN112861529 A CN 112861529A
Authority
CN
China
Prior art keywords
error code
description information
code description
error
database
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.)
Pending
Application number
CN201911184901.XA
Other languages
Chinese (zh)
Inventor
刘沛文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911184901.XA priority Critical patent/CN112861529A/en
Publication of CN112861529A publication Critical patent/CN112861529A/en
Pending legal-status Critical Current

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/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The invention discloses a method and a device for managing error codes, and relates to the technical field of computers. One embodiment of the method comprises: acquiring first error code description information; identifying whether second error code description information similar to the first error code description information exists in the query database based on the semantics; if not, generating an error code identifier; and creating a first error code based on the error code identification and the first error code description information, and storing the first error code to a database. The method and the device can be used for managing the error codes in a standardized manner, improve the standardization of the error codes, avoid the situation that different error codes represent the same error information, and reduce the maintenance and calling costs of the error codes.

Description

Method and device for managing error codes
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for error code management.
Background
In an existing Web application system, an error code is usually maintained in a code in a form of constant or enumeration by a developer, and is directly taken from the constant or enumeration when abnormal information needs to be thrown outwards.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
(1) the normalization of the error code is poor, such as the error code description information specification of the error code, the generation rule specification of the error code identifier of the error code, and the like;
(2) it is difficult to ensure that the error code identifier of the newly added error code is not repeated with the error code identifier of the existing error code before a large number of error codes.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for error code management, which can manage error codes in a standardized manner, improve the normalization of error codes, avoid the occurrence of the situation that different error codes represent the same error information, and reduce the maintenance and calling costs of error codes.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of error code management, including:
acquiring first error code description information;
identifying whether second error code description information similar to the first error code description information exists in the query database based on the semantics; if not, generating an error code identifier;
and creating a first error code based on the error code identification and the first error code description information, and storing the first error code to a database.
Optionally, identifying whether second error code description information similar to the first error code description information exists in the query database based on the semantics includes:
determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information;
determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector;
and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
Optionally, determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information includes:
performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words;
converting each word into a word vector through a word2vec model;
and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words.
Optionally, the method of the embodiment of the present invention further includes: receiving a compliance verification request sent by a service system, wherein the compliance verification request comprises an error code identifier of a third error code; inquiring whether a third error code exists in the database or not according to the error code identification of the third error code; if the error code exists, acquiring the error code description information of the third error code from the database according to the error code identifier of the third error code, packaging a verification result according to the error code identifier of the third error code and the error code description information, and returning the verification result to the service system; and if not, sending out alarm information.
Optionally, the compliance verification request further includes: the language type of the third error code;
acquiring error code description information of the third error code from the database according to the error code identifier of the third error code, wherein the error code description information comprises: and acquiring error code description information which corresponds to the error code identification of the third error code and has the language type of the third error code from the database.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for error code management, including:
the interface layer module is used for acquiring first error code description information;
the service layer module is used for identifying and inquiring whether second error code description information similar to the first error code description information exists in the database or not based on the semantics; if not, generating an error code identifier;
and the data layer module is used for creating a first error code based on the error code identifier and the first error code description information and storing the first error code to a database.
Optionally, the service layer module identifies whether second error code description information similar to the first error code description information exists in the query database based on semantics, including:
determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information;
determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector;
and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
Optionally, the determining, by the service layer module, a first sentence vector of the first error code description information and a second sentence vector of the second error code description information includes:
performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words;
converting each word into a word vector through a word2vec model;
and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words.
Optionally, the service layer module is further configured to: receiving a compliance verification request sent by a service system, wherein the compliance verification request comprises an error code identifier of a third error code; inquiring whether a third error code exists in the database or not according to the error code identification of the third error code; if the error code exists, acquiring the error code description information of the third error code from the database according to the error code identifier of the third error code, packaging a verification result according to the error code identifier of the third error code and the error code description information, and returning the verification result to the service system; and if not, sending out alarm information.
Optionally, the compliance verification request further includes: the language type of the third error code;
the service layer module obtains the error code description information of the third error code from the database according to the error code identifier of the third error code, and the method comprises the following steps: and acquiring error code description information which corresponds to the error code identification of the third error code and has the language type of the third error code from the database.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for error code management, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method provided by the first aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the error codes are created based on the semantic similarity of the first error code description information and the second error code description information, so that the error codes can be managed in a standardized mode, the standardization of the error codes is improved, the situation that different error codes represent the same error information is avoided, and the maintenance and calling cost of the error codes is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram illustrating a main flow of a method for error code management according to an embodiment of the present invention;
FIG. 2 is a block diagram of a method of error code management according to an alternative embodiment of the present invention;
FIG. 3 is a diagram illustrating the main modules of an error code management apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The error code includes an error code identification and error code description information. The error code description information is a simple description of the error code. Error code identification is used to uniquely identify an error code, usually a string of numbers or letters or a combination of numbers and letters. Each error code identification corresponds to a unique type of error code description information. For example, common error codes in HTTP requests are as follows:
error code identification: 404; error code description information: the requested web page does not exist;
error code identification: 503; error code description information: the service is not available.
In the prior art, error codes are usually maintained in the codes in a constant or enumeration manner by research and development personnel, and are directly taken from the constant or enumeration when abnormal information needs to be thrown outwards, so that the problems that the normalization of the error codes is poor, and the error code identifiers of newly added error codes and the error code identifiers of existing error codes are not repeated in the presence of a large number of error codes are difficult to ensure are solved.
In view of this, the invention establishes a set of error code creation processes to perform unified error code establishment, distribution and management, thereby improving the normalization of error codes and preventing the problems that it is difficult to ensure that the error code identifiers of the newly added error codes are not repeated with the error code identifiers of the existing error codes in the presence of a large number of error codes.
According to an aspect of an embodiment of the present invention, a method for error code management is provided.
Fig. 1 is a schematic diagram of a main flow of an error code management method according to an embodiment of the present invention, and as shown in fig. 1, the error code management method includes:
step S101, obtaining first error code description information;
step S102, whether second error code description information similar to the first error code description information exists in a query database or not is identified and inquired based on semantics;
step S103, if the error code does not exist, generating an error code identifier;
and step S104, creating a first error code based on the error code identification and the first error code description information, and storing the first error code to a database.
When a user wants to create a new error code, the description information of the error code to be created can be input through the information operation page, and the description information is the first error code description information. The second error code description information refers to description information of an error code that has been created and stored in the database.
If the first error code description information is similar to the second error code description information, it indicates that the error information described by the first error code description information and the second error code description information may be the same. At this point, an alarm message may be issued, and the user decides whether to continue the error code description information of the second error code (i.e. not create the first error code) or to persist the new error code (i.e. create the first error code). Illustratively, the second error code description information already existing in the database is: currently, the user already has a record to be checked. The first error code description information to be newly added is: and submitting the audit information for multiple times. If the user thinks that the two error codes are identical in meaning and can be multiplexed, the first error code is not created; otherwise, a first error code may be created.
The error codes are created based on the semantic similarity of the first error code description information and the second error code description information, so that the error codes can be managed in a standardized manner, the standardization of the error codes is improved, and the situation that different error codes represent the same error information is effectively avoided.
Optionally, identifying whether second error code description information similar to the first error code description information exists in the query database based on the semantics includes: determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information; determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector; and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
A sentence vector converts a sentence into a vector of fixed dimensions, illustratively, a sentence into a sentence vector with all words in the dictionary as one dimension. And the similarity is determined according to cosine values between the sentence vectors, and the method is simple and has good accuracy.
Optionally, determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information includes: performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words; converting each of said words into a word vector by means of a word2vec (model for generating word vectors) model; and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words. As an example, a weighted average of the word vectors of all the single words is used as the sentence vector of the first error-code description information or the second error-code description information.
The corpus of training word2vec models is typically taken from news, wikipedia, literary works, professional literature, and the like. On the basis, error description information of the existing business system can be collected to be used as expected information to be trained again, and the accuracy of the model for identifying the error description information is further improved.
The process of determining a sentence vector of error code description information is exemplary as follows:
utilizing a Chinese word segmentation tool to segment the newly added error description information (for example, newly added error description information 'the current user has a record to be audited', and obtaining [ 'current', 'user', 'existing', 'waiting', 'auditing', 'record' ]afterword segmentation);
each word of the error description information is transmitted into a word2vec model, and a corresponding word vector is calculated:
word vector: VEC1=[v11,v12…v1n]And (3) weighting: k1
Word vector: VEC2=[v21,v22…v2n]And (3) weighting: k2
Word vector: VECm=[vm1,vm2…vmn]And (3) weighting: km
Carrying out weighted average on the word vectors according to parts of speech (nouns and verbs are endowed with higher weight, other words are endowed with lower weight), and obtaining the sentence vectors of the current error information;
sentence vector:
Figure BDA0002292158760000081
in the above formulas, VEC1、VEC2、……、VECmRepresenting each word obtained by segmenting the error description information, wherein m represents the number of the words; v. of11,v12…v1nRepresenting the word VEC1Values in dimension 1,2 … n, respectively; v. of21,v22…v2nRepresenting the word VEC2Values in dimension 1,2 … n, respectively; v. ofm1,vm2…vmnRepresenting the word VECnValues in dimensions 1,2 … n, respectively.
It should be noted that, in the present invention, the accumulated value of the word vectors of all the words may be used as the sentence vector of the first error code description information or the second error code description information, or the arithmetic mean value of the word vectors of all the words may be used as the sentence vector of the first error code description information or the second error code description information.
Optionally, the method of the embodiment of the present invention further includes: receiving a compliance verification request sent by a service system, wherein the compliance verification request comprises an error code identifier of a third error code; inquiring whether a third error code exists in the database according to the error code identification of the third error code, namely, performing compliance verification; if the third error code exists (namely the verification is passed), acquiring the error code description information of the third error code from the database according to the error code identification of the third error code, packaging a verification result according to the error code identification and the error code description information of the third error code, and returning the verification result to the service system; if the information does not exist (namely the verification is not passed), alarm information is sent out.
By checking the error codes which need to be thrown out by each service system, the error codes which are thrown out can be ensured to be established through the standardized flow of the invention and to be in line with the standard.
In the actual application process, the service system can intercept abnormal information (including error code identification of an error code) thrown out by an external interface through an Aspect Oriented Programming (AOP), call an interface of an error code management device for realizing the method in the Aspect for compliance verification, send a verification result to the service system if the error code management device passes verification, throw out the verification result by the service system, and perform unified processing (such as throwing out after uniform exception is packaged, alarming of abnormal non-compliance and the like) by the service system if the error code management device fails verification.
The verification result can include the error code identification and the error code description information of the third error code, and some information, such as error code creation time, creator, audit time, auditor and the like, can be added in a customized manner according to specific service requirements. The check result has extensibility.
Optionally, the compliance verification request further includes: the language type of the third error code. Acquiring error code description information of the third error code from the database according to the error code identifier of the third error code, wherein the error code description information comprises: and acquiring error code description information which corresponds to the error code identification of the third error code and has the language type of the third error code from the database. In this example, the error code description information encapsulated into the verification result may be determined according to the incoming parameters sent by the service system to the error code management apparatus, and may be the error code description information of all language types corresponding to the error code identifier of the third error code, or may be only the error code description information of the language type corresponding to the error code identifier of the third error code and having the third error code.
The maintenance of the multi-language type of the error code description information is beneficial to extending the application scene of the error code management method and device. For example, when the service system develops international service, it may need to return error code description information of multiple language types, and depending on the error code management flow and the flexible data storage structure of the present invention, the present invention has a greater advantage than the conventional enumeration maintenance method.
FIG. 2 is a block diagram of a method for error code management according to an alternative embodiment of the present invention. In this example, the error code management method mainly realizes the functions of error code creation, semantic recognition, approximate error code prompting, error code checking, and error code query and verification. As shown in fig. 2, the error code management apparatus adopts a three-layer light-weight architecture of interface, service and data. The interface layer is responsible for interfacing page functions and providing reading services for the outside. The service layer is responsible for intermediate logic implementation, such as semantic recognition, compliance verification, verification result encapsulation and the like. The data layer is responsible for reading, writing and storing data facing to the bottom layer, the new addition and modification of error codes can be realized by directly operating a MySQL (relational database) database, the MySQL can be synchronized to the database through binlog (binary log file of MySQL) after completing data operation, for example, Redis (REmote DIctionary Server, a key-value storage system) and ES (electrophoretic search, which is a search Server based on Lucene), and all query operations read data from Redis or ES uniformly. It should be noted that the database is shown in the figure to facilitate description of the method according to the embodiment of the present invention, and in an actual application process, the method according to the embodiment of the present invention may not include a database, and only needs to be able to implement read-write operation on the database.
The error codes are created based on the semantic similarity of the first error code description information and the second error code description information, so that the error codes can be managed in a standardized mode, the standardization of the error codes is improved, the situation that different error codes represent the same error information is avoided, and the maintenance and calling cost of the error codes is reduced.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for implementing the above method.
FIG. 3 is a diagram illustrating major blocks of an apparatus for error code management according to an embodiment of the present invention. As shown in fig. 3, the error code management apparatus 300 includes:
the interface layer module 301 acquires first error code description information;
the service layer module 302 is used for identifying whether second error code description information similar to the error code description information exists in the query database or not based on the semantics; if not, generating an error code identifier;
and the data layer module 303 creates a first error code based on the error code identifier and the first error code description information, and stores the first error code in the database.
Optionally, the service layer module identifies whether second error code description information similar to the first error code description information exists in the query database based on semantics, including:
determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information;
determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector;
and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
Optionally, the determining, by the service layer module, a first sentence vector of the first error code description information and a second sentence vector of the second error code description information includes:
performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words;
converting each word into a word vector through a word2vec model;
and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words.
Optionally, the service layer module is further configured to: receiving a compliance verification request sent by a service system, wherein the compliance verification request comprises an error code identifier of a third error code; inquiring whether a third error code exists in the database or not according to the error code identification of the third error code; if the error code exists, acquiring the error code description information of the third error code from the database according to the error code identifier of the third error code, packaging a verification result according to the error code identifier of the third error code and the error code description information, and returning the verification result to the service system; and if not, sending out alarm information.
Optionally, the compliance verification request further includes: the language type of the third error code;
the service layer module obtains the error code description information of the third error code from the database according to the error code identifier of the third error code, and the method comprises the following steps: and acquiring error code description information which corresponds to the error code identification of the third error code and has the language type of the third error code from the database.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for error code management, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method provided by the first aspect of embodiments of the present invention.
Fig. 4 shows an exemplary system architecture 400 to which the method of error code management or the apparatus of error code management of embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the compliance verification request, and feed back a processing result (for example, verification result information — just an example) to the terminal device.
It should be noted that the method for error code management provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the apparatus for error code management is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present invention are executed when the computer program is executed by the Central Processing Unit (CPU) Y01.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprising: the interface layer module is used for acquiring first error code description information; the service layer module is used for identifying and inquiring whether second error code description information similar to the first error code description information exists in the database or not based on the semantics; if not, generating an error code identifier; and the data layer module is used for creating a first error code based on the error code identifier and the first error code description information and storing the first error code to a database. The names of these modules do not in some cases form a limitation on the module itself, and for example, a service layer module may also be described as a "module that obtains first error code description information".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: providing an information operation page, and acquiring first error code description information recorded into the information operation page; identifying whether second error code description information similar to the error code description information exists in a query database based on semantics; if not, generating an error code identifier; and creating a first error code based on the error code identification and the first error code description information, and storing the first error code to a database.
According to the technical scheme of the embodiment of the invention, the error codes can be managed in a standardized manner, the standardization of the error codes is improved, the situation that different error codes represent the same error information is avoided, and the maintenance and calling cost of the error codes is reduced.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of error code management, comprising:
acquiring first error code description information;
identifying whether second error code description information similar to the first error code description information exists in the query database based on the semantics; if not, generating an error code identifier;
and creating a first error code based on the error code identification and the first error code description information, and storing the first error code to a database.
2. The method of claim 1, wherein identifying whether second error code description information similar to the first error code description information is present in the query database based on semantics comprises:
determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information;
determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector;
and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
3. The method of claim 1, wherein determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information comprises:
performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words;
converting each word into a word vector through a word2vec model;
and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words.
4. The method of claim 1, further comprising: receiving a compliance verification request sent by a service system, wherein the compliance verification request comprises an error code identifier of a third error code; inquiring whether a third error code exists in the database or not according to the error code identification of the third error code; if the error code exists, acquiring the error code description information of the third error code from the database according to the error code identifier of the third error code, packaging a verification result according to the error code identifier of the third error code and the error code description information, and returning the verification result to the service system; and if not, sending out alarm information.
5. The method of claim 4, wherein the compliance verification request further comprises: the language type of the third error code;
acquiring error code description information of the third error code from the database according to the error code identifier of the third error code, wherein the error code description information comprises: and acquiring error code description information which corresponds to the error code identification of the third error code and has the language type of the third error code from the database.
6. An apparatus for error code management, comprising:
the interface layer module is used for acquiring first error code description information;
the service layer module is used for identifying and inquiring whether second error code description information similar to the first error code description information exists in the database or not based on the semantics; if not, generating an error code identifier;
and the data layer module is used for creating a first error code based on the error code identifier and the first error code description information and storing the first error code to a database.
7. The apparatus of claim 6, wherein the service layer module identifies whether second error code description information similar to the first error code description information exists in the query database based on semantics, comprising:
determining a first sentence vector of the first error code description information and a second sentence vector of the second error code description information;
determining the similarity between the first error code description information and the second error code description information according to the cosine values of the first sentence vector and the second sentence vector;
and when the similarity is greater than a preset similarity threshold, judging that the first error code description information is similar to the second error code description information.
8. The apparatus of claim 6, wherein the service layer module to determine a first sentence vector of first error code description information and a second sentence vector of second error code description information comprises:
performing word segmentation on the first error code description information or the second error code description information to obtain a plurality of words;
converting each word into a word vector through a word2vec model;
and determining sentence vectors of the first error code description information or the second error code description information according to the word vectors of all the words.
9. An electronic device for error code management, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201911184901.XA 2019-11-27 2019-11-27 Method and device for managing error codes Pending CN112861529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911184901.XA CN112861529A (en) 2019-11-27 2019-11-27 Method and device for managing error codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911184901.XA CN112861529A (en) 2019-11-27 2019-11-27 Method and device for managing error codes

Publications (1)

Publication Number Publication Date
CN112861529A true CN112861529A (en) 2021-05-28

Family

ID=75985006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911184901.XA Pending CN112861529A (en) 2019-11-27 2019-11-27 Method and device for managing error codes

Country Status (1)

Country Link
CN (1) CN112861529A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113328895A (en) * 2021-06-21 2021-08-31 河北幸福消费金融股份有限公司 Error code management system, abnormality positioning method, and storage medium
CN113868007A (en) * 2021-10-09 2021-12-31 中国建设银行股份有限公司 Method for determining component fault influence range and related device
CN115454697A (en) * 2022-09-15 2022-12-09 中航信移动科技有限公司 Information processing method and device for service exception, electronic equipment and storage medium
CN117235107A (en) * 2023-11-10 2023-12-15 恒生电子股份有限公司 Data access processing method and device, electronic equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113328895A (en) * 2021-06-21 2021-08-31 河北幸福消费金融股份有限公司 Error code management system, abnormality positioning method, and storage medium
CN113328895B (en) * 2021-06-21 2023-08-29 河北幸福消费金融股份有限公司 Error code management system, abnormality positioning method, and storage medium
CN113868007A (en) * 2021-10-09 2021-12-31 中国建设银行股份有限公司 Method for determining component fault influence range and related device
CN115454697A (en) * 2022-09-15 2022-12-09 中航信移动科技有限公司 Information processing method and device for service exception, electronic equipment and storage medium
CN117235107A (en) * 2023-11-10 2023-12-15 恒生电子股份有限公司 Data access processing method and device, electronic equipment and storage medium
CN117235107B (en) * 2023-11-10 2024-01-26 恒生电子股份有限公司 Data access processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112861529A (en) Method and device for managing error codes
US11075868B2 (en) Personal communication data management in multilingual mobile device
US11263208B2 (en) Context-sensitive cross-lingual searches
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
CN109495496B (en) Voice processing method and device, electronic equipment and computer readable medium
CN110321544B (en) Method and device for generating information
CN112527649A (en) Test case generation method and device
CN110795315A (en) Method and device for monitoring service
US11954173B2 (en) Data processing method, electronic device and computer program product
US10002181B2 (en) Real-time tagger
US20220309167A1 (en) Cluster security based on virtual machine content
CN113076153A (en) Interface calling method and device
CN110852057A (en) Method and device for calculating text similarity
CN110705271B (en) System and method for providing natural language processing service
US10057202B2 (en) Personal communication data management in multilingual mobile device
CN108768742B (en) Network construction method and device, electronic equipment and storage medium
US20230153541A1 (en) Generating and updating conversational artifacts from apis
US20220198138A1 (en) Consent to content template mapping
US11250215B2 (en) Form-based transactional conversation system design
CN110888939A (en) Data management method and device
US20230342397A1 (en) Techniques for predicting a personalized url document to assist a conversation
US11176924B2 (en) Reduced miss rate in sound to text conversion using banach spaces
US20230252092A1 (en) Reflecting metadata annotated in crawled documents to original data sources
US10417133B2 (en) Reference cache maintenance optimizer
CN113362097A (en) User determination method and device

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