CN114816812A - Abnormal service processing method and device and electronic equipment - Google Patents

Abnormal service processing method and device and electronic equipment Download PDF

Info

Publication number
CN114816812A
CN114816812A CN202210206245.4A CN202210206245A CN114816812A CN 114816812 A CN114816812 A CN 114816812A CN 202210206245 A CN202210206245 A CN 202210206245A CN 114816812 A CN114816812 A CN 114816812A
Authority
CN
China
Prior art keywords
abnormal
service
exception
services
clustering
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
CN202210206245.4A
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.)
Tianyi Safety Technology Co Ltd
Original Assignee
Tianyi Safety 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 Tianyi Safety Technology Co Ltd filed Critical Tianyi Safety Technology Co Ltd
Priority to CN202210206245.4A priority Critical patent/CN114816812A/en
Publication of CN114816812A publication Critical patent/CN114816812A/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the field of data processing, and discloses an abnormal service processing method, an abnormal service processing device and electronic equipment, wherein the abnormal service processing method comprises the following steps: clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service, then respectively generating an abnormal ID for each second abnormal service, wherein the abnormal ID is at least used for marking the abnormal category and the abnormal times corresponding to the second abnormal service, and finally processing each second abnormal service according to each abnormal ID. By the method, the abnormal type and the abnormal frequency corresponding to the abnormal service can be quickly detected, and the abnormal service processing efficiency is improved.

Description

Abnormal service processing method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for processing an abnormal service, and an electronic device.
Background
The microservice is a variant of a Service-Oriented Architecture (SOA) Architecture style, and is a Service that constructs an application program as a group of loosely coupled services, and because the microservice has an independent operation function, the logic of the underlying code of the microservice is more complex, so that many abnormal phenomena can occur in the operation process of the microservice, such as server software and hardware faults, network faults, and damaged domain name resolution of the microservice, and therefore, how to timely and efficiently process the microservice when the microservice fails is more important.
Currently, exception handling of microservices is generally based on sending out exception notifications during operation, and a professional maintenance person handles the exception notifications. In the micro service architecture, a large number of different services exist, and each service has a complex interaction relationship, so that a process of detecting and analyzing the abnormal type, the abnormal frequency and the like corresponding to each abnormal service by a maintainer consumes a large time cost and a large labor cost, thereby causing low processing efficiency of the abnormal service.
Disclosure of Invention
The application discloses an abnormal service processing method, which is used for generating corresponding abnormal IDs for each abnormal service in a micro service system, wherein the abnormal IDs can be at least used for marking abnormal types and abnormal times corresponding to the abnormal services, and further the method is beneficial to improving the efficiency of processing each abnormal service.
In a first aspect, the present application provides an exception service handling method, where the method includes:
clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
respectively generating an exception ID for each second exception service, wherein the exception ID is at least used for marking the exception category and the exception times corresponding to the second exception service;
and processing each second abnormal service according to each abnormal ID.
By the method, the abnormal ID is generated for each abnormal service, the abnormal type and the abnormal frequency corresponding to the abnormal service can be quickly detected, and the abnormal service processing efficiency is improved.
In one possible design, before the clustering the first abnormal services in the microservice system according to a preset rule, the clustering includes:
acquiring operation parameters of each service in the micro-service system;
detecting the operation state of each service in the micro-service system according to each operation parameter;
and according to each running state, identifying abnormal services existing in each service, and taking the abnormal services as first abnormal services.
By the method, abnormal services in the micro system are identified in time.
In a possible design, the clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service includes:
clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set;
and merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents.
By the method, each abnormal service is clustered, and the abnormal service processing efficiency is improved.
In a possible design, the clustering, according to a service type corresponding to each first abnormal service, each first abnormal service to obtain at least one abnormal service set includes:
acquiring service fields corresponding to each first abnormal service in the micro service system;
respectively calculating a first matching degree value between each service field and a preset type field;
and clustering the first abnormal services corresponding to the first matching values which are greater than the first preset threshold value to obtain at least one abnormal service set.
In a possible design, the merging the abnormal service sets according to the service features respectively corresponding to the abnormal service sets to obtain the second abnormal services includes:
matching each abnormal service set with the preset service characteristics respectively to obtain each second matching value;
and merging the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value to obtain the second abnormal services.
In one possible design, the generating an exception ID for each of the second exception services separately includes:
generating an ID primary key corresponding to each second abnormal service, wherein the ID primary key is used for representing an abnormal type;
determining ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing abnormal times;
and generating an abnormal ID corresponding to each second abnormal service according to each ID main key and each ID serial number.
By the method, the abnormal ID is generated for each abnormal service, the abnormal type and the abnormal frequency corresponding to the abnormal service can be quickly detected, and the abnormal service processing efficiency is improved.
In one possible design, the processing each second exception service according to each exception ID includes:
sending each abnormal ID to a cache, and caching an abnormal processing state corresponding to each abnormal ID, wherein the abnormal processing state is that an abnormality is processed or the abnormality is not processed;
if an exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining an exception type and an exception frequency corresponding to the any exception ID;
and processing each second abnormal service according to the abnormal type and the abnormal times corresponding to any abnormal ID.
By the method, each abnormal service is managed in a centralized mode, convenience and rapidness are achieved, the abnormal type and the abnormal times can be detected rapidly, and the abnormal service processing efficiency is improved.
In a second aspect, the present application provides an exception service handling apparatus, the apparatus comprising:
the clustering module is used for clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
a generating module, configured to generate an exception ID for each second exception service, where the exception ID is at least used to label an exception category and an exception frequency corresponding to the second exception service;
and the processing module is used for processing each second abnormal service according to each abnormal ID.
In one possible design, the apparatus further includes:
the acquisition module is used for acquiring the operation parameters of each service in the micro-service system;
the detection module is used for detecting the operation state of each service in the micro-service system according to each operation parameter;
and the identification module is used for identifying abnormal services existing in the services according to the running states and taking the abnormal services as first abnormal services.
In one possible design, the clustering module is specifically configured to:
clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set;
and merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents.
In one possible design, the clustering module is further to:
acquiring service fields corresponding to each first abnormal service in the micro service system;
respectively calculating a first matching degree value between each service field and a preset type field;
and clustering the first abnormal services corresponding to the first matching values which are greater than the first preset threshold value to obtain at least one abnormal service set.
In one possible design, the clustering module is further to:
matching each abnormal service set with the preset service characteristics respectively to obtain each second matching value;
and merging the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value to obtain the second abnormal services.
In one possible design, the generating module is specifically configured to:
generating an ID primary key corresponding to each second abnormal service, wherein the ID primary key is used for representing an abnormal type;
determining ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing abnormal times;
and generating an abnormal ID corresponding to each second abnormal service according to each ID main key and each ID serial number.
In one possible design, the processing module is specifically configured to:
sending each abnormal ID to a cache, and caching an abnormal processing state corresponding to each abnormal ID, wherein the abnormal processing state is that an abnormality is processed or the abnormality is not processed;
if an exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining an exception type and exception times corresponding to any exception ID;
and processing each second abnormal service according to the abnormal type and the abnormal times corresponding to any abnormal ID.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the abnormal service processing method when executing the computer program stored in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored therein, where the computer program, when executed by a processor, implements the above-mentioned abnormal service handling method steps.
For each of the second to fourth aspects and possible technical effects of each aspect, reference is made to the above description of the possible technical effects of the first aspect or various possible schemes of the first aspect, and repeated description is omitted here.
Drawings
FIG. 1 is a flow chart of a method for exception service handling provided herein;
fig. 2 is a schematic structural diagram of an exception service handling apparatus provided in the present application;
fig. 3 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied to apparatus embodiments or system embodiments. It should be noted that "a plurality" is understood as "at least two" in the description of the present application. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. A is connected with B and can represent: a and B are directly connected and A and B are connected through C. In addition, in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not intended to indicate or imply relative importance nor order to be construed.
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
At this stage, exception handling of microservices is usually based on sending out exception notifications during operation, and is handled by professional maintenance personnel. In the micro service architecture, a large number of different services exist, and each service has a complex interaction relationship, so that a process of detecting and analyzing the abnormal type, the abnormal frequency and the like corresponding to each abnormal service by a maintainer consumes a large time cost and a large labor cost, thereby causing low processing efficiency of the abnormal service.
In order to solve the above problem, the present application provides an abnormal service processing method, which generates a corresponding abnormal ID for each abnormal service in a micro service system, where the abnormal ID is at least used for labeling the abnormal type and the abnormal frequency corresponding to the abnormal service, thereby facilitating to improve the efficiency of processing each abnormal service. The method and the device in the embodiment of the application are based on the same technical concept, and because the principles of the problems solved by the method and the device are similar, the device and the embodiment of the method can be mutually referred, and repeated parts are not repeated.
As shown in fig. 1, a flowchart of an exception service processing method provided by the present application specifically includes the following steps:
s11, clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
in the embodiment of the present application, the micro service system may be understood as an architecture system formed by micro services, where a micro service refers to a variation of a software development technology-service oriented architecture SOA architecture style, an application is constructed as a set of loosely coupled services, the architecture system formed by the micro service may construct the application as an independent component, and each application process is operated as a service, so that the application is easier to expand and faster to develop, thereby accelerating the innovative maintenance of program functions and shortening the online time of the application.
In order to ensure the normal operation of the micro service system, the operation state of each service in the micro service system needs to be monitored in real time to identify each first abnormal service existing in the micro service system. The method for identifying each first abnormal service existing in the micro-service system comprises the following steps:
the method comprises the steps of obtaining an operation log of each service in the micro-service system in real time, and identifying operation parameters in the operation log, wherein the operation log refers to an operation record set generated in the operation process of each service and comprises an operation event, operation time, an operation object, an operation file and the like, the operation parameters refer to specific field contents generated by the operation log corresponding to the service, and for a credible call service, the operation parameters can be field contents such as call duration, call signals and call objects. The operation parameters corresponding to each service can be identified by searching the field content corresponding to the operation log.
Further, according to each operation parameter, the operation state of each service in the micro-service system is detected, according to each operation state, abnormal service existing in each service is identified, and the abnormal service is used as the first abnormal service.
Specifically, if the operation parameter conforms to a preset operation rule, the operation state corresponding to the operation parameter is a normal operation state, and if the operation parameter does not conform to the preset operation rule, the operation state corresponding to the operation parameter is an abnormal operation state. The operation rule is set based on service types of different services, such as the above trusted call service, and the operation rule may be set as whether a call signal is in a continuous state and/or whether a call object is authenticated, or the like, and may also be set according to an actual service scenario.
After each first abnormal service in the micro service system is identified, further clustering each first abnormal service according to a preset rule to obtain at least one second abnormal service. The specific clustering method comprises the following steps:
and clustering the first abnormal services according to the service types respectively corresponding to the first abnormal services to obtain at least one abnormal service set.
Specifically, first, service fields corresponding to first abnormal services in the micro-service system are obtained, where the service fields are used to represent data structures of the abnormal services, and may implement data calculation of subsequent abnormal services. Then, first matching values between the service fields and the preset type fields are respectively calculated, and the first abnormal services corresponding to the first matching values larger than a first preset threshold value are clustered to obtain at least one abnormal service set. The first matching degree value may be calculated by a similarity algorithm, such as a cosine similarity algorithm, and the preset matching degree may be set to 0.8, or may be set according to an actual service scenario.
And further, merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents. Specifically, each abnormal service set is respectively matched with the preset service characteristics to obtain each second matching value, and the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value are combined to obtain each second abnormal service.
S12, generating an exception ID for each second exception service;
in the embodiment of the application, the abnormal ID may be at least used to label the abnormal category and the abnormal frequency corresponding to the second abnormal service, and may also represent the unique identity information of the second abnormal service, which is convenient for the accurate search of the subsequent abnormal service. The method for generating the abnormal ID comprises the following steps:
and generating ID primary keys corresponding to the second abnormal services respectively through a random algorithm, wherein the ID primary keys are used for representing the abnormal types. The method for specifically generating the ID primary key comprises the following steps: configuring an ID primary key compiling environment of each second abnormal service, importing a jar packet generated by a preset ID primary key into the ID primary key compiling environment, then initializing the ID primary key of each second abnormal service, respectively adding one operation to the initialized ID primary key of each second abnormal service by using a random algorithm, and then running the jar packet to generate the ID primary key of each second abnormal service. The ID primary key compiling environment comprises a Java compiling environment, and the preset ID primary key can be set according to different service types and can also be set according to an actual service scene.
And meanwhile, determining the ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing the abnormal times and can be realized through a snowflake algorithm.
And finally, generating the abnormal ID corresponding to each second abnormal service by each ID main key and each ID serial number through an ID compiler.
In one possible application scenario, the anomaly ID TSHD generated for each second anomaly service using a random algorithm, where T represents a timestamp of the current time, may be set according to different time scales, for example: t can be the year, month or day; s represents the number of times of abnormity in the current timestamp scale, and the bit width of S is higher than the upper limit of the abnormity in a single timestamp scale; for example: if the upper limit of the abnormal occurrence is less than 10000, S can occupy 4 decimal bit widths; s, starting from 1, adding 1 successively; h represents the hash value of the abnormal information and can be used for representing the abnormal type, the hash values of the same abnormal type are the same, and the bit width of H can be set by a user; d represents the frequency of the similar abnormity, and 1 is added from 1; the abnormality occurrence frequency is selected according to the fineness, for example, T may be: the numerical representation of the year, month and day may be: the number of years, months, days, and hours.
For example: t-20211203 denotes day 03, 12 months in 2021, day scale; if the number of times of occurrence of the abnormality in each day is less than 10000, S is represented by a four-digit decimal number, and the S value corresponding to 1234 th abnormality occurring in the current scale is 1234; if H is set to be 4 bits, when the hash value of the current abnormal type information is 2211, the H bit corresponding to the abnormal ID is 2211; if the same type of exception has occurred 100 times, the next time the exception ID corresponds to the D value bit: 101. thus, the anomaly ID is: 2021120312342211101.
s13, the second abnormal service is processed according to the abnormal ID.
After obtaining the exception IDs corresponding to the second exception services, further sending the exception IDs to a cache, and caching exception handling states corresponding to the exception IDs, where the exception handling states are exception-handled or exception-unprocessed. In a possible application scenario, the second exception services with the same exception ID may be merged, so that the same exception service is prevented from being repeatedly processed, and the exception service processing efficiency is improved. In this embodiment of the present application, the cache may be a Redis cache.
And then, if the exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining the exception type and the exception frequency corresponding to any exception ID, and handling each second exception service according to the exception type and the exception frequency. Specifically, if the number of anomalies corresponding to the same anomaly type exceeds a preset warning threshold, the maintenance personnel is notified to perform anomaly handling, and a specific notification manner is not limited here, and may be a light or sound alarm, or may be implemented by sending related data corresponding to an anomaly service to a preset terminal. For example, within 1 minute, the same alarm occurs more than 5 times; within 5 minutes, the same alarm occurs for more than 10 times; within 10 minutes, the same alarm occurs more than 20 times, and service maintenance personnel are notified.
In one possible application scenario, asynchronous handling of the respective second exception service may be implemented by returning the respective second exception service to the service maintenance person in an asynchronous handling manner, specifically: and transmitting each abnormal service to a message queue, and returning the abnormal service in the message queue to the service maintainer by using a preset data transmission mode according to a subscription mechanism configured in the message queue by the service maintainer in advance so that the service maintainer asynchronously processes each second abnormal service, thereby improving the processing efficiency of the abnormal service.
In the above process, the asynchronous processing mode may be a message publish-subscribe mechanism, that is, in response to a processing request of an asynchronous service subscriber, the asynchronous service subscriber acquires a corresponding abnormal service from the asynchronous service publisher, so as to implement asynchronous processing of the abnormal service. The message queue may be a RabbitMQ middleware, the subscription mechanism may be configured to notify an abnormal service immediately if the abnormal service exists in the message queue, or may be configured according to an actual service scenario, and the preset data transmission mode may be a mail mode and/or a short message mode.
Based on the abnormal service processing method, the abnormal ID is generated for each abnormal service, the abnormal type and the abnormal frequency corresponding to the abnormal service can be quickly detected, and the abnormal service processing efficiency is improved.
Based on the same inventive concept, the present application further provides an abnormal service processing apparatus, as shown in fig. 2, which is a schematic structural diagram of the abnormal service processing apparatus in the present application, and the apparatus includes:
the clustering module 21 is configured to cluster each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
a generating module 22, configured to generate an exception ID for each second exception service, where the exception ID is at least used to label an exception category and an exception frequency corresponding to the second exception service;
and the processing module 23 is configured to process each second exception service according to each exception ID.
In one possible design, the apparatus further includes:
the acquisition module is used for acquiring the operation parameters of each service in the micro service system;
the detection module is used for detecting the operation state of each service in the micro-service system according to each operation parameter;
and the identification module is used for identifying abnormal services existing in the services according to the running states and taking the abnormal services as first abnormal services.
In one possible design, the clustering module 21 is specifically configured to:
clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set;
and merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents.
In one possible design, the clustering module 21 is further configured to:
acquiring service fields corresponding to each first abnormal service in the micro service system;
respectively calculating a first matching degree value between each service field and a preset type field;
and clustering the first abnormal services corresponding to the first matching values which are greater than the first preset threshold value to obtain at least one abnormal service set.
In one possible design, the clustering module 21 is further configured to:
matching each abnormal service set with the preset service characteristics respectively to obtain each second matching value;
and merging the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value to obtain the second abnormal services.
In one possible design, the generating module 22 is specifically configured to:
generating an ID primary key corresponding to each second abnormal service, wherein the ID primary key is used for representing an abnormal type;
determining ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing abnormal times;
and generating an abnormal ID corresponding to each second abnormal service according to each ID main key and each ID serial number.
In one possible design, the processing module 23 is specifically configured to:
sending each abnormal ID to a cache, and caching an abnormal processing state corresponding to each abnormal ID, wherein the abnormal processing state is that an abnormality is processed or the abnormality is not processed;
if an exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining an exception type and exception times corresponding to any exception ID;
and processing each second abnormal service according to the abnormal type and the abnormal times corresponding to any abnormal ID.
Based on the abnormal service processing device, the abnormal ID is generated for each abnormal service, the abnormal type and the abnormal frequency corresponding to the abnormal service can be quickly detected, and the abnormal service processing efficiency is improved.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the foregoing abnormal service processing method and apparatus, and with reference to fig. 3, the electronic device includes:
at least one processor 31, and a memory 32 connected to the at least one processor 31, in this embodiment, a specific connection medium between the processor 31 and the memory 32 is not limited, and fig. 3 illustrates an example where the processor 31 and the memory 32 are connected through a bus 30. The bus 30 is shown in fig. 3 by a thick line, and the connection between other components is merely illustrative and not limited thereto. The bus 30 may be divided into an address bus, a data bus, a control bus, etc., and is shown in fig. 3 with only one thick line for ease of illustration, but does not represent only one bus or type of bus. Alternatively, the processor 31 may also be referred to as a controller, without limitation to name a few.
In the embodiment of the present application, the memory 32 stores instructions executable by the at least one processor 31, and the at least one processor 31 can execute the exception service processing method discussed above by executing the instructions stored in the memory 32. The processor 31 may implement the functions of the various modules in the apparatus shown in fig. 2.
The processor 31 is a control center of the apparatus, and may connect various parts of the entire control device by using various interfaces and lines, and perform various functions of the apparatus and process data by operating or executing instructions stored in the memory 32 and calling data stored in the memory 32, thereby performing overall monitoring of the apparatus.
In one possible design, processor 31 may include one or more processing units, and processor 31 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, and the like, and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 31. In some embodiments, the processor 31 and the memory 32 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 31 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, that implements or performs the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method for processing the exception service disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 32, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 32 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 32 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 32 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
By programming the processor 31, the code corresponding to the exception handling method described in the foregoing embodiment may be solidified into the chip, so that the chip can execute the steps of the exception handling method of the embodiment shown in fig. 1 when running. How to program the processor 31 is well known to those skilled in the art and will not be described in detail here.
Based on the same inventive concept, the embodiment of the present application further provides a storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the foregoing exception service processing method.
In some possible embodiments, the aspects of the exception service handling method provided by the present application may also be implemented in the form of a program product comprising program code for causing the control apparatus to perform the steps of the exception service handling method according to various exemplary embodiments of the present application described above in this specification when the program product is run on an apparatus.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (16)

1. A method for exception service handling, the method comprising:
clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
respectively generating an exception ID for each second exception service, wherein the exception ID is at least used for marking the exception category and the exception times corresponding to the second exception service;
and processing each second abnormal service according to each abnormal ID.
2. The method of claim 1, wherein prior to said clustering each first abnormal service in the microservice system according to a preset rule, comprising:
acquiring operation parameters of each service in the micro-service system;
detecting the operation state of each service in the micro-service system according to each operation parameter;
and according to each running state, identifying abnormal services existing in each service, and taking the abnormal services as first abnormal services.
3. The method of claim 1, wherein clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service comprises:
clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set;
and merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents.
4. The method of claim 3, wherein the clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set comprises:
acquiring service fields corresponding to each first abnormal service in the micro service system;
respectively calculating a first matching degree value between each service field and a preset type field;
and clustering the first abnormal services corresponding to the first matching values which are greater than the first preset threshold value to obtain at least one abnormal service set.
5. The method according to claim 3, wherein the merging the abnormal service sets according to the service features respectively corresponding to the abnormal service sets to obtain the second abnormal services comprises:
respectively matching each abnormal service set with preset service characteristics to obtain each second matching degree value;
and merging the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value to obtain the second abnormal services.
6. The method of claim 1, wherein said generating an exception ID for each of said second exception services separately comprises:
generating an ID primary key corresponding to each second abnormal service, wherein the ID primary key is used for representing an abnormal type;
determining ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing abnormal times;
and generating an abnormal ID corresponding to each second abnormal service according to each ID main key and each ID serial number.
7. The method as claimed in claim 1, wherein said processing each of said second exception services in accordance with each of said exception IDs comprises:
sending each abnormal ID to a cache, and caching an abnormal processing state corresponding to each abnormal ID, wherein the abnormal processing state is that an abnormality is processed or the abnormality is not processed;
if an exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining an exception type and exception times corresponding to any exception ID;
and processing each second abnormal service according to the abnormal type and the abnormal times corresponding to any abnormal ID.
8. An exception service handling apparatus, the apparatus comprising:
the clustering module is used for clustering each first abnormal service in the micro service system according to a preset rule to obtain at least one second abnormal service;
a generating module, configured to generate an exception ID for each second exception service, where the exception ID is at least used to label an exception category and an exception frequency corresponding to the second exception service;
and the processing module is used for processing each second abnormal service according to each abnormal ID.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the acquisition module is used for acquiring the operation parameters of each service in the micro-service system;
the detection module is used for detecting the operation state of each service in the micro-service system according to each operation parameter;
and the identification module is used for identifying abnormal services existing in the services according to the running states and taking the abnormal services as first abnormal services.
10. The apparatus of claim 8, wherein the clustering module is specifically configured to:
clustering each first abnormal service according to the service type corresponding to each first abnormal service to obtain at least one abnormal service set;
and merging the abnormal service sets according to the service characteristics respectively corresponding to the abnormal service sets to obtain the second abnormal services, wherein the service characteristics represent service contents.
11. The apparatus of claim 10, wherein the clustering module is further to:
acquiring service fields corresponding to each first abnormal service in the micro service system;
respectively calculating a first matching degree value between each service field and a preset type field;
and clustering the first abnormal services corresponding to the first matching values which are greater than the first preset threshold value to obtain at least one abnormal service set.
12. The apparatus of claim 10, wherein the clustering module is further to:
matching each abnormal service set with the preset service characteristics respectively to obtain each second matching value;
and merging the abnormal service sets respectively corresponding to the second matching values larger than a second preset threshold value to obtain the second abnormal services.
13. The apparatus of claim 8, wherein the generation module is specifically configured to:
generating an ID primary key corresponding to each second abnormal service, wherein the ID primary key is used for representing an abnormal type;
determining ID serial numbers corresponding to the second abnormal services respectively, wherein the ID serial numbers are used for representing abnormal times;
and generating an abnormal ID corresponding to each second abnormal service according to each ID main key and each ID serial number.
14. The apparatus of claim 8, wherein the processing module is specifically configured to:
sending each abnormal ID to a cache, and caching an abnormal processing state corresponding to each abnormal ID, wherein the abnormal processing state is that an abnormality is processed or the abnormality is not processed;
if an exception handling state corresponding to any exception ID exists in each exception ID is that the exception is not handled, determining an exception type and exception times corresponding to any exception ID;
and processing each second abnormal service according to the abnormal type and the abnormal times corresponding to any abnormal ID.
15. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-7 when executing the computer program stored on the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-7.
CN202210206245.4A 2022-02-28 2022-02-28 Abnormal service processing method and device and electronic equipment Pending CN114816812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210206245.4A CN114816812A (en) 2022-02-28 2022-02-28 Abnormal service processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210206245.4A CN114816812A (en) 2022-02-28 2022-02-28 Abnormal service processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114816812A true CN114816812A (en) 2022-07-29

Family

ID=82529049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210206245.4A Pending CN114816812A (en) 2022-02-28 2022-02-28 Abnormal service processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114816812A (en)

Similar Documents

Publication Publication Date Title
CN110888783B (en) Method and device for monitoring micro-service system and electronic equipment
CN112052111B (en) Processing method, device and equipment for server abnormity early warning and storage medium
CN113489713B (en) Network attack detection method, device, equipment and storage medium
US11449488B2 (en) System and method for processing logs
US11509677B2 (en) Automatically detecting vulnerability remediations and regressions
CN115237724A (en) Data monitoring method, device, equipment and storage medium based on artificial intelligence
CN115329381A (en) Sensitive data-based analysis and early warning method and device, computer equipment and medium
CN111897723A (en) Method and device for testing application
CN113282920B (en) Log abnormality detection method, device, computer equipment and storage medium
CN111899018A (en) Order data processing method, device, server and storage medium
CN111814045A (en) Data query method and device, electronic equipment and storage medium
CN114816812A (en) Abnormal service processing method and device and electronic equipment
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
CN115643172A (en) Abnormity detection method, abnormity detection device, terminal equipment and storage medium
CN112948341A (en) Method and apparatus for identifying abnormal network device logs
CN112035471A (en) Transaction processing method and computer equipment
CN111309623B (en) Coordinate class data classification test method and device
CN113778800B (en) Error information processing method, device, system, equipment and storage medium
CN113568773B (en) Abnormal service classification method, device, equipment and storage medium
CN116703505A (en) Order information judging method and device
CN116932025A (en) Program maintenance method and device, electronic equipment and storage medium
CN114818968A (en) Buried point data detection method and device, electronic equipment and storage medium
CN114386035A (en) Method and device for detecting threat data and electronic equipment
CN115840677A (en) Data verification method, device, equipment and storage medium
CN114358143A (en) Alarm event classification method, device, equipment and storage 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