CN114443343A - Method, device, equipment and storage medium for service interface to feed back abnormal information - Google Patents

Method, device, equipment and storage medium for service interface to feed back abnormal information Download PDF

Info

Publication number
CN114443343A
CN114443343A CN202210125558.7A CN202210125558A CN114443343A CN 114443343 A CN114443343 A CN 114443343A CN 202210125558 A CN202210125558 A CN 202210125558A CN 114443343 A CN114443343 A CN 114443343A
Authority
CN
China
Prior art keywords
service
abnormal information
interface
instance
service instance
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
CN202210125558.7A
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.)
Xiaoma Guoju Yuxi Technology Co ltd
Original Assignee
Xiaoma Guoju Yuxi 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 Xiaoma Guoju Yuxi Technology Co ltd filed Critical Xiaoma Guoju Yuxi Technology Co ltd
Priority to CN202210125558.7A priority Critical patent/CN114443343A/en
Publication of CN114443343A publication Critical patent/CN114443343A/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/0766Error or fault reporting or storing
    • G06F11/0778Dumping, i.e. gathering error/state information after a fault for later diagnosis
    • 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/0766Error or fault reporting or storing
    • G06F11/0784Routing of error reports, e.g. with a specific transmission path or data flow
    • 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/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for service interface feedback abnormal information, wherein the method comprises the following steps: acquiring service data operated by a user; generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data; the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances; and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface. According to the technical scheme, the generated service instances can be sequentially transmitted among the service interfaces and abnormal information generated by the service interfaces is collected, and the monitoring program is used for monitoring and feeding back the abnormal information in the service instances, so that clear code logic is realized, code maintenance is facilitated, and the development quality is improved.

Description

Method, device, equipment and storage medium for service interface to feed back abnormal information
Technical Field
The present invention relates to the field of service interface feedback abnormal information, and in particular, to a method, an apparatus, a device, and a storage medium for service interface feedback abnormal information.
Background
Currently, under the micro-service architecture, when a user operates a functional interface, the interface is not implemented in a project, has a complex project structure, and the interfaces are mutually called. Such as the following: the interface A calls the interface B, the interface B calls the interface C, and the interface C calls the interface D. In the conventional technical scheme, an interface B throws abnormal information, an interface C throws abnormal information, and an interface D throws abnormal information; meanwhile, the interface A, the interface B and the interface C are used as a father calling interface, and codes for receiving exceptions thrown by child interfaces are needed to be compiled, and then the received exceptions are thrown out; if the service logic of the B interface is modified, not only whether the A interface is compatible or not but also how many interfaces call the B interface are considered, so that the repeated, complex and bloated codes can be caused, the maintenance is not facilitated, and the development efficiency and the code reading of programmers are influenced.
In conclusion, how to realize clear code logic, facilitate code maintenance and improve development quality when the service interface feeds back abnormal information, thereby improving the development efficiency of programmers.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device, and a storage medium for service interface feedback exception information, which can implement clear code logic, facilitate code maintenance, and improve development quality when the service interface feeds back exception information, thereby improving development efficiency of programmers. The specific scheme is as follows:
in a first aspect, the present application discloses a method for feeding back abnormal information by a service interface, including:
acquiring service data operated by a user;
generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data;
the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances;
and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
Optionally, the generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data includes:
determining a service interface and a preset interface request calling sequence between the service interfaces based on the service data;
correspondingly, the sequentially transferring the service instances among the different service ports by the service instances, and collecting and storing the abnormal information generated by each service port by the service instances includes:
and storing the abnormal information generated by the service interface into a corresponding service instance, and transmitting the service instance to the next service interface according to the preset interface request calling sequence so that the service instance collects and stores the abnormal information of all the service interfaces corresponding to the service data.
Optionally, the determining, based on the service data, a service interface and a preset interface request calling sequence between the service interfaces includes:
determining a call chain for calling the microservice based on the business data;
and determining service interfaces of the micro-service based on the call chain, wherein a preset interface request call sequence exists between the service interfaces.
Optionally, the generating a corresponding service instance based on the service data includes:
generating a service instance with a unique characteristic service instance ID based on the service data;
and storing the service instance carrying the service instance ID into a memory database.
Optionally, before the storing the service instance carrying the service instance ID in the memory database, the method further includes:
and carrying out hash operation on the service data ID, the timestamp, the salt value and the random number according to a preset hash algorithm to obtain the corresponding service instance ID with the unique characteristic.
Optionally, the storing the abnormal information collected by the service instance in a memory database so that the memory database feeds back the abnormal information to a human-computer interaction interface includes:
and monitoring the service instance in the memory database through a monitoring program, and returning the abnormal information in the service instance to a human-computer interaction interface so that the human-computer interaction interface can alarm a user.
Optionally, the monitoring the service instance in the memory database by using a monitor, and returning the abnormal information in the service instance to a human-computer interaction interface, so that the human-computer interaction interface can alert a user, includes:
monitoring the service instance in the memory database through a monitoring program, detecting the storage condition of the abnormal information in the service instance in the memory database, monitoring the state of the service embodiment within a preset time period if the abnormal information does not exist in the service instance, and returning the abnormal information in the service instance to a human-computer interaction interface if the abnormal information is stored in the service embodiment within the preset time period so as to facilitate the human-computer interaction interface to alarm a user;
if the abnormal information is not stored in the service embodiment within the preset time period, the monitoring information within the preset time period is destroyed.
In a second aspect, the present application discloses a device for feeding back abnormal information by a service interface, including:
the data acquisition module is used for acquiring service data operated by a user;
a service instance generating module, configured to generate a corresponding service instance based on the service data, and determine a corresponding service interface for executing the service data according to the service data;
the abnormal information collection module is used for sequentially transmitting the service instances among different service ports, and collecting and storing the abnormal information generated by each service port through the service instances;
and the abnormal information feedback module is used for storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the service interface feedback abnormal information method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the service interface feedback anomaly information method disclosed in the foregoing.
Therefore, the application discloses a method for feeding back abnormal information by a service interface, which comprises the following steps: acquiring service data operated by a user; generating a corresponding business instance based on the business data, and determining a corresponding service interface for executing the business data according to the business data; the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances; and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface. Therefore, according to the method and the device, corresponding business data are generated according to user operation, the corresponding service interfaces are determined according to the business data, the business examples are generated at the same time, the business examples can sequentially collect abnormal information generated by the service interfaces, and the business examples and the abnormal information are stored in the memory database, so that the database can directly feed the abnormal information back to the man-machine interaction interface, the abnormal information generated by the service interfaces is prevented from being thrown out and processed by the service interfaces, the abnormal information thrown out by other service interfaces is also prevented from being received, clear code logic is realized, repeated, complex and bloated codes are reduced, the code maintenance is facilitated, the development quality is improved, and the development efficiency of programmers is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for feeding back abnormal information by a service interface according to the present disclosure;
fig. 2 is a flowchart illustrating a method for feeding back abnormal information by a specific service interface according to the present disclosure;
fig. 3 is a flowchart illustrating a method for feeding back abnormal information by a specific service interface according to the present disclosure;
FIG. 4 is a flow chart of calling project feedback exception information disclosed herein;
fig. 5 is a schematic structural diagram of a device for feeding back abnormal information by a service interface according to the present disclosure;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Currently, under a micro-service architecture, when a user operates a functional interface, the interface is not realized in a project, has a complex project structure, and is mutually called, and a father calling interface writes a code for throwing an exception, writes a code for receiving a son interface for throwing the exception, and then throws out the received exception; a nesting child type code structure is formed, so that codes are repeated and complicated, unnecessary codes are increased, projects are larger and larger, logic is bloated, and maintenance is not facilitated.
Therefore, the service interface abnormal information feedback scheme is provided, when the service interface feeds back abnormal information, clear code logic can be achieved, code maintenance is facilitated, development quality is improved, and development efficiency of programmers is improved.
Referring to fig. 1, an embodiment of the present invention discloses a method for feeding back abnormal information by a service interface, which specifically includes:
step S11: and acquiring service data operated by a user.
In this embodiment, the service data of the user performing the relevant user operation on the human-computer interaction interface is obtained, and it can be understood that the service data may specifically be a relevant order item generated when the user clicks an order placing button on a shopping APP (Application) to perform the user operation of placing an order for a commodity.
Step S12: and generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data.
In this embodiment, a corresponding service instance is generated based on an order item operated by a user, and a service interface of the order item is generated by invoking the service instance according to the order item, for example, when a user clicks an order button on a shopping APP and executes a commodity order item, because a certain complex function interface is commonly implemented by service interfaces under a plurality of items under a micro-service architecture, a plurality of items are involved when executing the commodity order item, and a commodity inventory deduction interface (commodity item), a user coupon deduction interface (coupon item), and an order generation interface (order item) are involved when invoking the commodity order interface.
Step S13: and sequentially transmitting the service instances among different service ports, and collecting and storing abnormal information generated by each service port through the service instances.
In this embodiment, in the asynchronous interaction, the service interface sends a request, and does not need to wait for the return of the abnormal information, so that the interface call can be completed by chaining the entire call flow, but an additional monitor needs to be provided to query the real state of the service data.
In a specific implementation manner, the service instances are sequentially transmitted between different service ports, and the abnormal information generated by each service port is collected and stored in the service instances, so that a subsequent monitoring program can determine the abnormal information generated by a specific one of the service ports and feed the abnormal information back to a human-computer interaction interface in time by monitoring only the service instances, where the abnormal information may include but is not limited to: due to data errors, code anomalies, business limitations and the like, the project interface calls the specific information that links incomplete call flows.
In another specific implementation manner, the service instances are sequentially transmitted among different service ports, the abnormal information generated by each service port is collected through the service instances, and the abnormal information is bound with the service instances, that is, corresponding relationships exist between the different service ports under the same order form item and the service instances, so that a back monitor program monitors the service instances, and the monitored abnormalities generated by the service ports bound with the service instances are fed back to a human-computer interaction interface.
Step S14: and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
In this embodiment, the abnormal information collected by the service instance is stored in a memory database, then abnormal information monitoring is performed on the service instance in the memory database by setting a monitor, and if the monitor monitors the abnormal information, the abnormal information is fed back to a human-computer interaction interface through the memory database.
Therefore, the application discloses a method for feeding back abnormal information by a service interface, which comprises the following steps: acquiring service data operated by a user; generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data; the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances; and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface. Therefore, according to the method and the device, corresponding business data are generated according to user operation, the corresponding service interfaces are determined according to the business data, the business examples are generated at the same time, the business examples can sequentially collect abnormal information generated by the service interfaces, and the business examples and the abnormal information are stored in the memory database, so that the database can directly feed the abnormal information back to the man-machine interaction interface, the abnormal information generated by the service interfaces is prevented from being thrown out and processed by the service interfaces, the abnormal information thrown out by other service interfaces is also prevented from being received, clear code logic is realized, repeated, complex and bloated codes are reduced, the code maintenance is facilitated, the development quality is improved, and the development efficiency of programmers is improved.
Referring to fig. 2, the embodiment of the present invention discloses a specific method for feeding back abnormal information by a service interface, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. Specifically, the method comprises the following steps:
step S21: and acquiring service data operated by a user.
Step S22: and generating a corresponding business instance based on the business data, and determining a service interface and a preset interface request calling sequence between the service interfaces based on the business data.
In the embodiment, a call chain for calling the micro service is determined based on the business data; and determining service interfaces of the micro-service based on the call chain, wherein a preset interface request call sequence exists between the service interfaces. It can be understood that when a user performs a relevant service operation on an APP, a complex call chain is triggered, for example: when a user clicks and submits an order on an APP, order service is actually triggered to call commodity service, user virtual coupon service and the like, a call port of the micro service can be further determined based on the call chain, and a preset interface request call sequence exists between the service interfaces, so that the service instance can be conveniently transmitted between the service interfaces according to the preset interface request call sequence.
Step S23: and storing the abnormal information generated by the service interface into a corresponding service instance, and transmitting the service instance to the next service interface according to the preset interface request calling sequence so that the service instance collects and stores the abnormal information of all the service interfaces corresponding to the service data.
In this embodiment, the service instance transfers among the service interfaces according to the preset interface request transfer sequence, and collects all the abnormal information generated by the service interfaces in the transfer process, and the step of collecting the interface abnormal information by the service instance can ensure that the micro-service transfer chain is completed in the whole transfer process, thereby avoiding that the service interfaces not only throw out the generated abnormal information but also receive the abnormal information fed back by other service interfaces and complete transfer processes.
Step S24: and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
For more specific processing procedures in step S21 and step S24, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that, when the service interfaces are determined, the preset interface request calling sequence between the service interfaces also needs to be further determined, so that the service instance can transmit between all the service interfaces corresponding to the service data according to the preset interface request calling sequence, and collect the abnormal information generated by the service interfaces, thereby reducing the repeated receiving and throwing of the abnormal information by the service interfaces, and improving the development quality.
Referring to fig. 3, the embodiment of the present invention discloses a specific method for feeding back exception information through a service interface, and this embodiment further describes and optimizes the technical solution in comparison with the previous embodiment. Specifically, the method comprises the following steps:
step S31: and acquiring service data operated by a user.
For more specific processing procedure in the step S31, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Step S32: generating a service instance with a unique characteristic service instance ID based on the service data; and storing the service instance carrying the service instance ID into a memory database.
In this embodiment, before the storing the service instance carrying the service instance ID in the memory database, the method further includes: and carrying out hash operation on the service data ID, the timestamp, the salt value and the random number according to a preset hash algorithm to obtain the corresponding service instance ID with the unique characteristic. It is understood that a certain part of the service data generated by the user clicking the order button operation is computed and generated according to a certain rule by using MD5(Message Digest Algorithm, fifth edition) to obtain a string with a fixed length, for example, as shown in fig. 4, a hash value is computed on the corresponding order number, the timestamp, the salt value, and the random number generated by the user clicking the order button operation to obtain a service instance ID with a unique characteristic. When different service data are generated at the same time, namely when two or more service data are generated at the current time, the addition of the salt value can avoid the occurrence of two identical service instance IDs, and when the service data are the same, the addition of the random number can avoid the occurrence of two identical service instance IDs, so that the generated service instance IDs are globally unique, and the occurrence of two identical service instance IDs is avoided. And stores the generated service instance ID in a Remote Dictionary service (Redis Server).
Step S33: determining a corresponding service interface for executing the service data according to the service data; and sequentially transmitting the service instances among different service ports, and collecting and storing abnormal information generated by each service port through the service instances.
In this embodiment, as shown in fig. 4, when a user places an order for a commodity through a shopping APP to generate an order item, the commodity item, and a coupon item need to be sequentially called, in order to ensure complete calling execution of a call chain of the microservice, the generated service instance ID is sequentially transferred among the items, when the order item calls the commodity item to reduce inventory, and if inventory is insufficient, the service instance ID + an error code (inventory insufficiency) is stored in the Redis; when the order item calls the coupon item to check whether the coupon is suitable, if the coupon time is expired, the service instance ID + error code (coupon expiration) is stored in the Redis, so that the collection and storage work of the abnormal information is realized, and the complete call execution of the call chain is not influenced.
Step S34: and monitoring the service instance in the memory database through a monitoring program, and returning the abnormal information in the service instance to a human-computer interaction interface so that the human-computer interaction interface can alarm a user.
In the embodiment, a monitoring program is used for monitoring the service instance in the memory database, the storage condition of the abnormal information in the service instance in the memory database is detected, if the abnormal information does not exist in the service instance, the state of the service instance in a preset time period is monitored, and if the abnormal information is stored in the service instance in the preset time period, the abnormal information in the service instance is returned to a human-computer interaction interface, so that the human-computer interaction interface can alarm a user; if the abnormal information is not stored in the service embodiment within the preset time period, the monitoring information within the preset time period is destroyed. The human-computer interaction interface specifically includes but is not limited to: an App end, a large screen end and a PC (Personal Computer) management platform end. It can be understood that, referring to fig. 4, the monitoring program is started through the APP, the state of the service instance ID in the Redis is accessed in real time, whether the abnormal information is stored is monitored, and if it is monitored that the coupon item generates the abnormal information, the APP pop-up prompt box shows to the user: your coupon has expired, failure to place an order! If not, the monitoring is continued until the monitoring program is destroyed after the time default (5 minutes) of the service instance ID is expired.
Therefore, in the embodiment of the present application, the monitoring program monitors the state in the service instance ID in the Redis, and monitors whether the service port corresponding to the service instance ID generates the abnormal information, without the need for the service interface to repeatedly receive the abnormal information, thereby avoiding the code from being bloated and reducing the code maintenance difficulty.
Referring to fig. 5, an embodiment of the present invention discloses a device for feeding back abnormal information by a service interface, which specifically includes:
the data acquisition module 11 is used for acquiring service data operated by a user;
a service instance generating module 12, configured to generate a corresponding service instance based on the service data, and determine a corresponding service interface for executing the service data according to the service data;
the abnormal information collecting module 13 is configured to sequentially transmit the service instances among different service ports, and collect and store abnormal information generated by each service port through the service instances;
an exception information feedback module 14, configured to store the exception information collected by the service instance in a memory database, so that the memory database feeds back the exception information to a human-computer interaction interface.
Therefore, the application discloses a method for feeding back abnormal information by a service interface, which comprises the following steps: acquiring service data operated by a user; generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data; the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances; and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface. Therefore, according to the method and the device, corresponding business data are generated according to user operation, then the corresponding service interfaces are determined according to the business data, the business examples are generated, the business examples can sequentially collect abnormal information generated by each service interface, and the business examples and the abnormal information are stored in the memory database, so that the abnormal information can be directly fed back to the man-machine interaction interface by the database, the situation that the abnormal information generated by the service interfaces is thrown out and processed by the service interfaces and the abnormal information thrown out by other service interfaces is received is avoided, clear code logic is achieved, repeated, complex and bloated codes are reduced, code maintenance is facilitated, development quality is improved, and development efficiency of programmers is improved.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 6 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the method for feeding back exception information by a service interface disclosed in any one of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, Netware, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the method for feeding back the abnormal information by the service interface executed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the service interface feedback exception information method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the storage medium for the service interface feedback of the abnormal information provided by the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for feeding back abnormal information by a service interface is characterized by comprising the following steps:
acquiring service data operated by a user;
generating a corresponding service instance based on the service data, and determining a corresponding service interface for executing the service data according to the service data;
the service instances are sequentially transmitted among different service ports, and abnormal information generated by each service port is collected and stored through the service instances;
and storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
2. The method according to claim 1, wherein the generating a corresponding service instance based on the service data and determining a corresponding service interface for executing the service data according to the service data comprises:
determining a service interface and a preset interface request calling sequence between the service interfaces based on the service data;
correspondingly, the sequentially transferring the service instances among the different service ports by the service instances, and collecting and storing the abnormal information generated by each service port by the service instances includes:
and storing the abnormal information generated by the service interface into a corresponding service instance, and transmitting the service instance to the next service interface according to the preset interface request calling sequence so that the service instance collects and stores the abnormal information of all the service interfaces corresponding to the service data.
3. The method according to claim 2, wherein the determining a service interface and a preset interface request calling sequence between the service interfaces based on the service data comprises:
determining a call chain for calling the microservice based on the business data;
and determining service interfaces of the micro-service based on the call chain, wherein a preset interface request call sequence exists between the service interfaces.
4. The method according to claim 1, wherein the generating a corresponding service instance based on the service data includes:
generating a service instance with a unique characteristic service instance ID based on the service data;
and storing the service instance carrying the service instance ID into a memory database.
5. The method for the service interface to feed back the abnormal information according to claim 4, wherein before the storing the service instance carrying the service instance ID in the memory database, the method further comprises:
and carrying out hash operation on the service data ID, the timestamp, the salt value and the random number according to a preset hash algorithm to obtain the corresponding service instance ID with the unique characteristic.
6. The method for feeding back exception information via a service interface according to any one of claims 1 to 5, wherein the storing the exception information collected via the service instance in a memory database so that the memory database feeds back the exception information to a human-machine interaction interface comprises:
and monitoring the service instance in the memory database through a monitoring program, and returning the abnormal information in the service instance to a human-computer interaction interface so that the human-computer interaction interface can alarm a user.
7. The method as claimed in claim 6, wherein the monitoring the service instance in the memory database by a monitor and returning the abnormal information in the service instance to a human-machine interaction interface so that the human-machine interaction interface alerts a user, comprises:
monitoring the service instance in the memory database through a monitoring program, detecting the storage condition of the abnormal information in the service instance in the memory database, monitoring the state of the service embodiment within a preset time period if the abnormal information does not exist in the service instance, and returning the abnormal information in the service instance to a human-computer interaction interface if the abnormal information is stored in the service embodiment within the preset time period so as to facilitate the human-computer interaction interface to alarm a user;
if the abnormal information is not stored in the service embodiment in the preset time period, destroying the monitoring information in the preset time period.
8. A device for feeding back exception information through a service interface, comprising:
the data acquisition module is used for acquiring service data operated by a user;
a service instance generating module, configured to generate a corresponding service instance based on the service data, and determine a corresponding service interface for executing the service data according to the service data;
the abnormal information collection module is used for sequentially transmitting the service instances among different service ports, and collecting and storing the abnormal information generated by each service port through the service instances;
and the abnormal information feedback module is used for storing the abnormal information collected by the service instance in a memory database so that the memory database can feed the abnormal information back to a human-computer interaction interface.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the service interface feedback anomaly information method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the service interface feedback anomaly information method of any one of claims 1 to 7.
CN202210125558.7A 2022-02-10 2022-02-10 Method, device, equipment and storage medium for service interface to feed back abnormal information Pending CN114443343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210125558.7A CN114443343A (en) 2022-02-10 2022-02-10 Method, device, equipment and storage medium for service interface to feed back abnormal information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210125558.7A CN114443343A (en) 2022-02-10 2022-02-10 Method, device, equipment and storage medium for service interface to feed back abnormal information

Publications (1)

Publication Number Publication Date
CN114443343A true CN114443343A (en) 2022-05-06

Family

ID=81371345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210125558.7A Pending CN114443343A (en) 2022-02-10 2022-02-10 Method, device, equipment and storage medium for service interface to feed back abnormal information

Country Status (1)

Country Link
CN (1) CN114443343A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421785A (en) * 2022-08-23 2022-12-02 中科方德软件有限公司 Application program migration processing method, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421785A (en) * 2022-08-23 2022-12-02 中科方德软件有限公司 Application program migration processing method, device and medium

Similar Documents

Publication Publication Date Title
US9893963B2 (en) Dynamic baseline determination for distributed transaction
US8078922B2 (en) Internal server error analysis
US8868984B2 (en) Relevant alert delivery in a distributed processing system with event listeners and alert listeners
US5751914A (en) Method and system for correlating a plurality of events within a data processing system
CN101414255A (en) Method and apparatus for processing log event
CN101877618B (en) Monitoring method, server and system based on proxy-free mode
US10230611B2 (en) Dynamic baseline determination for distributed business transaction
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN110535928B (en) Event pushing method for JAVA intelligent contract of block chain
EP2933726B1 (en) Apparatus, system and method for application log data processing
US20140201762A1 (en) Event handling system and method
CN114090366A (en) Method, device and system for monitoring data
WO2019046752A1 (en) Data array of objects indexing
CN114125049A (en) Telemetry message processing method, device, equipment and storage medium
CN112799741A (en) Application program differentiation method and device, electronic equipment and storage medium
US7117113B1 (en) Automated data collection and analysis
CN114443343A (en) Method, device, equipment and storage medium for service interface to feed back abnormal information
JP2010128597A (en) Information processor and method of operating the same
CN112270531A (en) Item notification method, item notification device, server, and storage medium
CN114936245B (en) Method and device for integrating and processing multi-source heterogeneous data
US7752504B2 (en) System diagnostics with dynamic contextual information of events
KR20170122874A (en) Apparatus for managing log of application based on data distribution service
CN112579325A (en) Business object processing method and device, electronic equipment and storage medium
US20150248453A1 (en) Automated Logging for Object-Oriented Environments
CN114374650B (en) Notification sending method based on routing middleware, storage medium and electronic equipment

Legal Events

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