CN116431344A - Configuration method and device of financial service resource degradation strategy and electronic equipment - Google Patents

Configuration method and device of financial service resource degradation strategy and electronic equipment Download PDF

Info

Publication number
CN116431344A
CN116431344A CN202310370560.5A CN202310370560A CN116431344A CN 116431344 A CN116431344 A CN 116431344A CN 202310370560 A CN202310370560 A CN 202310370560A CN 116431344 A CN116431344 A CN 116431344A
Authority
CN
China
Prior art keywords
financial service
resource
call
target financial
calling
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
CN202310370560.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310370560.5A priority Critical patent/CN116431344A/en
Publication of CN116431344A publication Critical patent/CN116431344A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a configuration method of a financial service resource degradation strategy, a device thereof and electronic equipment, and relates to the field of financial science and technology, wherein the configuration method comprises the following steps: analyzing a financial business request sent by a user side, and acquiring resource names of N target financial service resources to be called; reading rule configuration files corresponding to each resource name; calling target financial service resources based on the resource names, and calculating the slow calling proportion of each target financial service resource; and marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file. The invention solves the technical problem that the degradation strategy cannot be uniformly configured for the plurality of service resources when the load of the server is too high due to the fact that the plurality of service resources are called in the related technology.

Description

Configuration method and device of financial service resource degradation strategy and electronic equipment
Technical Field
The invention relates to the field of financial science and technology and other related technical fields, in particular to a method and a device for configuring a financial service resource degradation strategy and electronic equipment.
Background
In the micro-service architecture, an application is split into a plurality of services according to service requirements, the services can be called mutually, the services are mutually dependent, and the dependency relationship is complicated.
In the process of processing service requests, for the service with larger request quantity, the server faces the conditions of overhigh load and rapid pressure increase in the process of processing, when the pressure of the server increases in the process of processing the service, strategy degradation is required to be carried out on some application resources, the strategy degradation is used for releasing the server resources so as to ensure the normal operation of core services, in the related technology, when the application resources are degraded, each application predicts the service call quantity of the production environment according to own service scene to carry out strategy configuration, and the configuration method of the degradation strategy is self-configured by each application, and when a plurality of application resources are called to carry out service processing, unified strategy configuration cannot be carried out on a plurality of service resources, so that the configuration efficiency is lower and the real-time effectiveness cannot be realized.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a configuration method and a device for a financial service resource degradation strategy and electronic equipment, which at least solve the technical problem that the degradation strategy cannot be uniformly configured for a plurality of service resources when the server load is too high due to the fact that the service resources are called in the related technology.
According to an aspect of the embodiment of the present invention, there is provided a method for configuring a financial service resource degradation policy, including: analyzing a financial service request sent by a user side, and obtaining resource names of N target financial service resources to be called, wherein N is a positive integer greater than or equal to 1; reading a rule configuration file corresponding to each resource name, wherein configuration parameters of the rule configuration file at least comprise: calling a critical response value and a resource degradation threshold value; calling the target financial service resources based on the resource names, and calculating the slow call proportion of each target financial service resource, wherein the slow call proportion refers to the ratio of the slow call times to the total call times when the target financial service resources are called, and the slow call refers to the call mode that the response time length when the target financial service resources are called is greater than the call critical response value; and marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
Optionally, after parsing the financial service request sent by the user side, the method further includes: responding to the financial business request, and acquiring N target financial service resources to be called and service call links, wherein the service call links are constructed based on the call sequence of the target financial service resources; and creating a link log file based on the service call link, wherein the link log file is used for recording log data in the financial service resource call process.
Optionally, after creating the link log file based on the service call link, further comprising: the control service call monitoring module establishes connection with all financial service resources; invoking the rule configuration file of each financial service resource and storing the rule configuration file in the service invocation monitoring module; analyzing the link log file to obtain an analysis result; updating the rule configuration file on the visual interface of the service call monitoring module based on the analysis result, wherein the updated rule configuration file is automatically synchronized to the application where the corresponding financial service resource is located.
Optionally, the link log file includes log parameters of at least one of: whether a service call monitoring module is normally connected, the consumed time length of each target financial service resource is called, the call request parameter of each target financial service resource, and whether a resource degradation rule is triggered.
Optionally, the configuration parameters of the rule configuration file further include: the resource name, the service label, the degradation type, the degradation duration, the minimum request number for triggering the degradation strategy and the abnormal call critical response value.
Optionally, the step of calling the target financial service resources based on the resource names and calculating a slow call proportion of each target financial service resource includes: sending a resource calling request to the target financial service resource, and recording a request sending time point for sending the resource calling request; receiving a request response result returned by the target financial service resource, and recording a receiving time point for receiving the request response result; calculating the intermediate duration between the receiving time point and the request sending time point, and taking the intermediate duration as the response duration of the target financial service resource; comparing the response time length of the target financial service resource with the call critical response value, and marking the call of the target resource for calling the target financial service resource as slow call under the condition that the response time length of the target financial service resource is greater than the call critical response value; counting the total calling times and slow calling times of calling the target financial service resource; and calculating the ratio between the slow call times and the total call times to obtain the slow call proportion.
Optionally, after configuring a degradation policy for the financial service resource to be degraded based on the configuration parameters of the rule configuration file, the method further includes: sending a resource calling request to the target financial service resource; under the condition that a request response result returned by the target financial service resource is not received, marking the target resource call of the target financial service resource as abnormal call; counting the total calling times and the abnormal calling times of the target financial service resource, and calculating the ratio between the abnormal calling times and the total calling times to obtain an abnormal calling proportion; and under the condition that the abnormal call proportion is larger than an abnormal call critical response value, configuring a new degradation strategy for the target financial service resource based on the configuration parameters of the rule configuration file.
According to another aspect of the embodiment of the present invention, there is also provided a configuration apparatus for a financial service resource degradation policy, including: the analysis unit is used for analyzing the financial service request sent by the user side and obtaining the resource names of N target financial service resources to be called, wherein N is a positive integer greater than or equal to 1; the reading unit is used for reading the rule configuration file corresponding to each resource name, wherein the configuration parameters of the rule configuration file at least comprise: calling a critical response value and a resource degradation threshold value; the calling unit is used for calling the target financial service resources based on the resource names and calculating the slow call proportion of each target financial service resource, wherein the slow call proportion refers to the ratio of the slow call times to the total call times when the target financial service resources are called, and the slow call refers to a calling mode that the response time length when the target financial service resources are called is longer than the call critical response value; and the configuration unit is used for marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
Optionally, the configuration device of the financial service resource degradation policy further includes: the first response module is used for responding to the financial service request and acquiring N target financial service resources to be called and service call links, wherein the service call links are links constructed based on the call sequence of the target financial service resources; the first creating module is used for creating a link log file based on the service calling link, wherein the link log file is used for recording log data in the financial service resource calling process.
Optionally, the configuration device of the financial service resource degradation policy further includes: the first control module is used for controlling the service calling monitoring module to establish connection with all financial service resources; the first calling module is used for calling the rule configuration file of each financial service resource and storing the rule configuration file in the service calling monitoring module; the first analysis module is used for analyzing the link log file to obtain an analysis result; and the first updating module is used for updating the rule configuration file on the visual interface of the service call monitoring module based on the analysis result, wherein the updated rule configuration file can be automatically synchronized into the application where the corresponding financial service resource is located.
Optionally, the link log file includes log parameters of at least one of: whether a service call monitoring module is normally connected, the consumed time length of each target financial service resource is called, the call request parameter of each target financial service resource, and whether a resource degradation rule is triggered.
Optionally, the configuration parameters of the rule configuration file further include: the resource name, the service label, the degradation type, the degradation duration, the minimum request number for triggering the degradation strategy and the abnormal call critical response value.
Optionally, the calling unit includes: the first sending module is used for sending a resource calling request to the target financial service resource and recording a request sending time point for sending the resource calling request; the first receiving module is used for receiving a request response result returned by the target financial service resource and recording a receiving time point for receiving the request response result; the first calculation module is used for calculating the intermediate duration between the receiving time point and the request sending time point, and taking the intermediate duration as the response duration of the target financial service resource; the first comparison module is used for comparing the response time length of the target financial service resource with the call critical response value, and marking the call of the target resource which calls the target financial service resource as slow call under the condition that the response time length of the target financial service resource is greater than the call critical response value; the first statistics module is used for counting the total calling times and slow calling times of calling the target financial service resource; and the second calculation module is used for calculating the ratio between the slow call times and the total call times to obtain the slow call proportion.
Optionally, the configuration device of the financial service resource degradation policy further includes: the second sending module is used for sending a resource calling request to the target financial service resource; the first marking module is used for marking the target resource call which calls the target financial service resource as abnormal call under the condition that the request response result returned by the target financial service resource is not received; the second statistics module is used for counting the total calling times and the abnormal calling times of the target financial service resource, calculating the ratio between the abnormal calling times and the total calling times, and obtaining the abnormal calling proportion; and the first configuration module is used for configuring a new degradation strategy for the target financial service resource based on the configuration parameters of the rule configuration file under the condition that the abnormal call proportion is larger than the abnormal call critical response value.
According to another aspect of the embodiment of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where when the computer program runs, the device where the computer readable storage medium is located is controlled to execute the method for configuring any one of the above-mentioned financial service resource degradation policies.
According to another aspect of the embodiments of the present invention, there is further provided an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a configuration method of any one of the above financial service resource degradation policies.
In the present disclosure, the following steps are performed: firstly analyzing a financial service request sent by a user side, acquiring resource names of N target financial service resources to be called, and then reading rule configuration files corresponding to the resource names, wherein configuration parameters of the rule configuration files at least comprise: and calling a critical response value and a resource degradation threshold value, then calling target financial service resources based on resource names, and calculating a slow call proportion of each target financial service resource, wherein the slow call proportion refers to a ratio of the number of slow calls to the total number of calls when the target financial service resources are called, the slow call refers to a call mode that the response time is longer than the call critical response value when the target financial service resources are called, and finally marking the target financial service resources as financial service resources to be degraded under the condition that the slow call proportion of the target financial service resources is longer than the resource degradation threshold value, and configuring a degradation strategy for the financial service resources to be degraded based on configuration parameters of a rule configuration file.
In the method, when degrading strategy configuration is carried out on certain services and pages, the slow call proportion corresponding to each financial service resource to be called is calculated, the slow call proportion is compared with parameters in a rule configuration file, and the degrading strategy is called for the service resources which are larger than a resource degrading threshold, so that logic judgment and strategy configuration are uniformly carried out on a plurality of service resources to be called, and the technical problem that the degrading strategy cannot be uniformly configured for the plurality of service resources when the load of a server is too high due to the fact that the plurality of service resources are called in the related art is solved.
In the method, a service call monitoring module is also established for a plurality of applications in the system and a plurality of service resources provided by each application, all applications of the whole system can be visually managed, meanwhile, link log files are established locally for each application, service call data are recorded and uploaded to the service call monitoring module for visualization, after the service call monitoring module is connected with all financial service resources, parameter updating can be carried out on rule configuration files of the financial service resources through the service call monitoring module, updated parameters can be automatically synchronized to the applications, and parameter updating is not required to be carried out by manually calling the rule configuration files in the applications.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an alternative method of configuring a financial services resource degradation policy in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative update profile for a financial service resource according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a configuration device of an alternative financial services resource degradation policy according to an embodiment of the invention;
fig. 4 is a block diagram of a hardware architecture of an electronic device (or mobile device) of a method for configuring a financial service resource degradation policy according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the configuration method and the device of the degrading policy of the financial service resource in the present disclosure may be used in the financial science and technology field when the degrading policy is configured for the financial service resource, and may also be used in any field other than the financial science and technology field when the degrading policy is configured for the financial service resource.
It should be noted that, related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions, and be provided with corresponding operation entries for the user to select authorization or rejection. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The embodiments of the invention can be applied to various degradation policy configuration systems/applications/devices, the data collected in the process of calling each service resource is compared with the parameters in the rule configuration file corresponding to the service resource, and when a certain service resource is in a slow calling state for a long time, the degradation policy is configured for the service resource, so that the server resource is released, and the normal operation of the core service is ensured.
The embodiment of the invention can be applied to various application monitoring systems/applications/devices, and by establishing the connection between each application and the service call monitoring module, the application and the service resource are uniformly monitored, a visual page is constructed, the operation and maintenance personnel can conveniently operate, each application is connected to the service call monitoring module, the complex service release scene is uniformly controlled, and the degradation strategy can be self-defined and configured to take effect in real time.
The present invention will be described in detail with reference to the following examples.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a method of configuring a financial services resource degradation policy, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different from that herein.
FIG. 1 is a flow chart of an alternative method of configuring a financial services resource degradation policy, as shown in FIG. 1, according to an embodiment of the invention, the method comprising the steps of:
step S101, analyzing a financial service request sent by a user side, and obtaining resource names of N target financial service resources to be called, wherein N is a positive integer greater than or equal to 1;
Step S102, reading a rule configuration file corresponding to each resource name, wherein configuration parameters of the rule configuration file at least comprise: calling a critical response value and a resource degradation threshold value;
step S103, calling target financial service resources based on resource names, and calculating a slow call proportion of each target financial service resource, wherein the slow call proportion refers to a ratio of the number of slow calls to the total number of calls when the target financial service resources are called, and the slow call refers to a call mode that the response time length when the target financial service resources are called is greater than a call critical response value;
step S104, marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
Through the steps, firstly analyzing a financial service request sent by a user side, obtaining resource names of N target financial service resources to be called, and then reading rule configuration files corresponding to the resource names, wherein configuration parameters of the rule configuration files at least comprise: and calling a critical response value and a resource degradation threshold value, then calling target financial service resources based on resource names, and calculating a slow call proportion of each target financial service resource, wherein the slow call proportion refers to a ratio of the number of slow calls to the total number of calls when the target financial service resources are called, the slow call refers to a call mode that the response time is longer than the call critical response value when the target financial service resources are called, and finally marking the target financial service resources as financial service resources to be degraded under the condition that the slow call proportion of the target financial service resources is longer than the resource degradation threshold value, and configuring a degradation strategy for the financial service resources to be degraded based on configuration parameters of a rule configuration file.
In this embodiment, when performing degradation policy configuration on some services and pages, calculating a slow call proportion corresponding to each financial service resource to be invoked, comparing the slow call proportion with parameters in a rule configuration file, and invoking a configuration degradation policy for service resources greater than a resource degradation threshold, thereby implementing unified logic judgment and policy configuration on a plurality of service resources to be invoked, and further solving the technical problem that in the related art, when a server load is too high due to invoking a plurality of service resources, the degradation policy cannot be uniformly configured for the plurality of service resources.
Embodiments of the present invention will be described in detail with reference to the following steps.
Step S101, analyze the financial business request sent by the user side.
It should be noted that, in the embodiment of the present invention, the implementation body is a server of a financial institution, in a micro-service architecture, a plurality of applications are deployed in a service system, each application is split into a plurality of service resources according to actual service requirements, when the service resources are invoked to perform service processing, due to larger service volume or larger request volume, the server responding to each service request may have a situation that the server cannot operate normally due to too high load, and in this case, a degradation operation such as current limiting, fusing, etc. needs to be performed on the service resources through a resource degradation policy.
It should be noted that, the user side described in the embodiment of the present invention includes, but is not limited to: the mobile phone, the platform, the desktop and the ipad are used for enabling a user to select financial services through a visual interface of the user side, the financial services selected by the user side generate financial service requests, communication can be conducted between the user side and a financial institution server, and the financial service requests are uploaded to the financial institution server.
Optionally, fig. 2 is a flowchart of updating a configuration file for a financial service resource according to an embodiment of the present invention, as shown in fig. 2, after parsing a financial service request sent by a user terminal, further including:
step S201, responding to a financial business request, and acquiring N target financial service resources to be called and service call links, wherein the service call links are links constructed based on the call sequence of the target financial service resources;
step S202, creating a link log file based on the service call link, wherein the link log file is used for recording log data in the financial service resource call process.
It should be noted that, a financial service carried by a financial service request often needs to call a plurality of applications and service resources to cooperate together, and a financial service resource corresponds to a service interface, for example: the three different login requests of the mobile phone number login, the card number login and the managed login call the same financial service resource, after the financial service request is received, the request is analyzed, the financial service resource to be called and the calling sequence can be determined, a complete service calling link is formed, and the link log file is established for the service calling link to record log data generated in the calling process.
Optionally, the link log file includes log parameters of at least one of: whether the service call monitoring module is normally connected, the consumed time length of each target financial service resource is called, the call request parameter of each target financial service resource, and whether the resource degradation rule is triggered.
It should be noted that, whether the service call monitoring module is normally connected is recorded in the link log file, and only after the application where the financial service resource is located is connected with the service call monitoring module, the link log file can be uploaded to the service call monitoring module so as to perform visual management through the service call monitoring module.
Optionally, after creating the link log file based on the service call link, further comprising: the control service call monitoring module establishes connection with all financial service resources; calling a rule configuration file of each financial service resource, and storing the rule configuration file in a service calling monitoring module; analyzing the link log file to obtain an analysis result; updating a rule configuration file on a visual interface of the service call monitoring module based on the analysis result, wherein the updated rule configuration file can be automatically synchronized to the application where the corresponding financial service resource is located.
Optionally, in order to enable the service call monitoring module to establish connection with all financial service resources, the embodiment of the invention integrates the service call monitoring module, and sends the service call monitoring module to each application in a byte code mode, for example, based on a java agent mechanism, when each application is started, a jvm command is used for executing the sent jar packet, so that light-weight access is realized, and the starting logic of each application is not influenced.
After the service call monitoring module is well connected with all financial service resources, the link log data can be checked and analyzed through the service call monitoring module, the running environment where the financial service resources are located is analyzed, various parameters in the rule configuration file are adjusted in real time based on the analysis result, the degradation strategy is customized, and the rule configuration file updated in the service call monitoring module can be automatically synchronized to the application where the financial service resources are located in real time on the basis that the service call monitoring module is well connected with all financial service resources.
Step S102, reading rule configuration files corresponding to each resource name.
It should be noted that, each financial service resource has a corresponding rule configuration file, and the rule configuration file is pre-established and configured based on the operation environment, and can be adjusted in real time according to the actual production environment and operation condition in the application operation process.
Optionally, the configuration parameters of the rule configuration file further include: resource name, service tag, demotion type, demotion duration, minimum number of requests to trigger demotion policy, exception call critical response value.
It should be noted that, the resource name is used as a financial service resource identifier, which is used to locate a rule configuration file corresponding to a target financial service resource, the service tag corresponds to a service call link, and each different service call link has a service tag for identifying a currently ongoing transaction (financial service), and the degradation types include, but are not limited to: based on slow call proportion degradation and abnormal call proportion degradation, the degradation duration refers to the time difference from the start of degradation to the end of degradation of the financial service resources, and a proper degradation duration is set, during which time, the financial service resources for performing degradation operation are limited or fused, the transaction currently being performed is stopped or the transaction currently being performed is delayed, so that the execution of core business is not affected, and after the degradation duration is reached, the degraded financial service resources resume normal execution; the configuration parameters also comprise two critical response values, corresponding to two degradation types, namely a slow call critical response value and an abnormal call critical response value; the minimum number of requests to trigger the demotion policy refers to the number of requests within a period of time being less than a certain threshold, and a determination as to whether to configure the demotion policy is not made.
Step S103, calling the target financial service resources based on the resource names, and calculating the slow call proportion of each target financial service resource.
Optionally, the step of calling the target financial service resources based on the resource names and calculating a slow call proportion of each target financial service resource includes: sending a resource calling request to a target financial service resource, and recording a request sending time point for sending the resource calling request; receiving a request response result returned by the target financial service resource, and recording a receiving time point for receiving the request response result; calculating the intermediate time length between the receiving time point and the request sending time point, and taking the intermediate time length as the response time length of the target financial service resource; comparing the response time length of the target financial service resource with the call critical response value, and marking the call of the target resource for calling the target financial service resource as slow call when the response time length of the target financial service resource is larger than the call critical response value; counting the total calling times and slow calling times of the target financial service resource; and calculating the ratio between the slow call times and the total call times to obtain the slow call proportion.
When the financial service resource is called, based on the sending of each call request and the receiving time point of the call result, calculating the response time of the target financial service resource, wherein the response time can reflect the running state of the financial service resource, when a plurality of transactions call the financial service resource at the same time, the response time of certain transactions can be correspondingly prolonged, when the response time is longer than a preset call critical response value, the call belongs to slow call, the slow call is marked, and the ratio of the total call times and the slow call times of a certain transaction for calling the target financial service resource for a plurality of times is counted at an application outlet, so that the slow call proportion is obtained.
Step S104, marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
It should be noted that, when the slow call proportion is greater than or equal to the resource degradation threshold, the degradation policy is configured for the financial service resource, and the resource degradation operation is executed according to the degradation duration indicated by the configuration rule.
Optionally, after configuring the degradation policy for the financial service resource to be degraded based on the configuration parameters of the rule configuration file, further includes: sending a resource calling request to a target financial service resource; under the condition that a request response result returned by the target financial service resource is not received, marking the target resource call of the target financial service resource as abnormal call; counting the total calling times and the abnormal calling times of the target financial service resource, and calculating the ratio between the abnormal calling times and the total calling times to obtain the abnormal calling proportion; and under the condition that the abnormal call proportion is larger than the abnormal call critical response value, configuring a new degradation strategy for the target financial service resource based on the configuration parameters of the rule configuration file.
It should be noted that, the degradation type in the embodiment of the present invention further includes an abnormal proportion degradation, where the abnormal proportion degradation refers to that when a certain financial service resource is called, in the case that an abnormal call occurs to the financial service resource, a degradation operation is performed on the financial service resource, and a call request is also sent to a target financial service resource, and when a call result returned by the target financial service resource is not received at a server side, it is determined that a call abnormality occurs to the target financial service resource, and it is required to be degraded and log data is sent to an operation and maintenance terminal to perform an abnormal notification.
The following describes in detail another embodiment.
Example two
The configuration device of the financial service resource degradation policy provided in the present embodiment includes a plurality of implementation units, each implementation unit corresponding to each implementation step in the above-mentioned first embodiment.
FIG. 3 is a schematic diagram of an alternative configuration device for a financial service resource degradation policy according to an embodiment of the invention, as shown in FIG. 3, the configuration device for a financial service resource degradation policy includes: a parsing unit 31, a reading unit 32, a calling unit 33, a configuration unit 34, wherein,
the parsing unit 31 is configured to parse the financial service request sent by the user side, and obtain resource names of N target financial service resources to be invoked, where N is a positive integer greater than or equal to 1;
the reading unit 32 is configured to read a rule configuration file corresponding to each resource name, where configuration parameters of the rule configuration file at least include: calling a critical response value and a resource degradation threshold value;
the calling unit 33 is configured to call the target financial service resources based on the resource names, and calculate a slow call proportion of each target financial service resource, where the slow call proportion refers to a ratio of a slow call number to a total call number when the target financial service resource is called, and the slow call refers to a call mode in which a response time length when the target financial service resource is called is greater than a call critical response value;
And a configuration unit 34, configured to mark the target financial service resource as the financial service resource to be demoted, and configure a demotion policy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file, if the slow call proportion of the target financial service resource is greater than the resource demotion threshold.
According to the configuration device of the financial service resource degradation strategy, the analysis unit 31 analyzes the financial service request sent by the user side, and obtains the resource names of N target financial service resources to be called; the rule configuration file corresponding to each resource name is read by the reading unit 32, where the configuration parameters of the rule configuration file at least include: calling a critical response value and a resource degradation threshold value; invoking the target financial service resources based on the resource names by the invoking unit 33, and calculating a slow invoking proportion of each target financial service resource; in the event that the slow call proportion of the target financial service resource is greater than the resource degradation threshold, the target financial service resource is marked as a financial service resource to be degraded by the configuration unit 34, and a degradation policy is configured for the financial service resource to be degraded based on the configuration parameters of the rule configuration file.
In this embodiment, when performing degradation policy configuration on some services and pages, calculating a slow call proportion corresponding to each financial service resource to be invoked, comparing the slow call proportion with parameters in a rule configuration file, and invoking a configuration degradation policy for service resources greater than a resource degradation threshold, thereby implementing unified logic judgment and policy configuration on a plurality of service resources to be invoked, and further solving the technical problem that in the related art, when a server load is too high due to invoking a plurality of service resources, the degradation policy cannot be uniformly configured for the plurality of service resources.
Optionally, the configuration device of the financial service resource degradation policy further includes: the first response module is used for responding to the financial business request, acquiring N target financial service resources to be called and service call links, wherein the service call links are links constructed based on the call sequence of the target financial service resources; the first creating module is used for creating a link log file based on the service calling link, wherein the link log file is used for recording log data in the financial service resource calling process.
Optionally, the configuration device of the financial service resource degradation policy further includes: the first control module is used for controlling the service calling monitoring module to establish connection with all financial service resources; the first calling module is used for calling the rule configuration file of each financial service resource and storing the rule configuration file in the service calling monitoring module; the first analysis module is used for analyzing the link log file to obtain an analysis result; and the first updating module is used for updating the rule configuration file on the visual interface of the service call monitoring module based on the analysis result, wherein the updated rule configuration file can be automatically synchronized to the application where the corresponding financial service resource is located.
Optionally, the link log file includes log parameters of at least one of: whether the service call monitoring module is normally connected, the consumed time length of each target financial service resource is called, the call request parameter of each target financial service resource, and whether the resource degradation rule is triggered.
Optionally, the configuration parameters of the rule configuration file further include: resource name, service tag, demotion type, demotion duration, minimum number of requests to trigger demotion policy, exception call critical response value.
Optionally, the calling unit 33 includes: the first sending module is used for sending a resource calling request to the target financial service resource and recording a request sending time point for sending the resource calling request; the first receiving module is used for receiving a request response result returned by the target financial service resource and recording a receiving time point for receiving the request response result; the first calculation module is used for calculating the intermediate duration between the receiving time point and the request sending time point, and taking the intermediate duration as the response duration of the target financial service resource; the first comparison module is used for comparing the response time length of the target financial service resource with the call critical response value, and marking the call of the target resource for calling the target financial service resource as slow call when the response time length of the target financial service resource is larger than the call critical response value; the first statistics module is used for counting the total calling times and slow calling times of the target financial service resource; and the second calculation module is used for calculating the ratio between the slow call times and the total call times to obtain the slow call proportion.
Optionally, the configuration device of the financial service resource degradation policy further includes: the second sending module is used for sending a resource calling request to the target financial service resource; the first marking module is used for marking the target resource call of the target financial service resource to be abnormal call under the condition that the request response result returned by the target financial service resource is not received; the second statistics module is used for counting the total calling times and the abnormal calling times of the target financial service resource, calculating the ratio between the abnormal calling times and the total calling times, and obtaining the abnormal calling proportion; the first configuration module is used for configuring a new degradation strategy for the target financial service resource based on the configuration parameters of the rule configuration file under the condition that the abnormal call proportion is larger than the abnormal call critical response value.
The configuration of the above-mentioned financial service resource degradation policy may further include a processor and a memory, where the above-mentioned parsing unit 31, reading unit 32, calling unit 33, configuration unit 34, etc. are stored as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.
The processor includes a kernel, and the kernel fetches a corresponding program unit from the memory. The kernel may set one or more downgrade policies for the financial services resources by adjusting kernel parameters.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
According to another aspect of the embodiment of the present invention, there is also provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where the computer program when executed controls a device in which the computer readable storage medium is located to execute a configuration method of any one of the above-mentioned financial service resource degradation policies.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method for configuring any one of the financial service resource degradation policies described above.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: analyzing a financial business request sent by a user side, and acquiring resource names of N target financial service resources to be called; reading rule configuration files corresponding to each resource name; calling target financial service resources based on the resource names, and calculating the slow calling proportion of each target financial service resource; and marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
Fig. 4 is a block diagram of a hardware architecture of an electronic device (or mobile device) of a method for configuring a financial service resource degradation policy according to an embodiment of the present invention. As shown in fig. 4, the electronic device may include one or more (shown in fig. 4 as 402a, 402b, … …,402 n) processors 402 (the processors 402 may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, etc. processing means), a memory 404 for storing data. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 4 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A method for configuring a financial service resource degradation policy, comprising:
analyzing a financial service request sent by a user side, and obtaining resource names of N target financial service resources to be called, wherein N is a positive integer greater than or equal to 1;
reading a rule configuration file corresponding to each resource name, wherein configuration parameters of the rule configuration file at least comprise: calling a critical response value and a resource degradation threshold value;
calling the target financial service resources based on the resource names, and calculating the slow call proportion of each target financial service resource, wherein the slow call proportion refers to the ratio of the slow call times to the total call times when the target financial service resources are called, and the slow call refers to the call mode that the response time length when the target financial service resources are called is greater than the call critical response value;
and marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
2. The configuration method according to claim 1, further comprising, after parsing the financial service request sent by the user terminal:
responding to the financial business request, and acquiring N target financial service resources to be called and service call links, wherein the service call links are constructed based on the call sequence of the target financial service resources;
and creating a link log file based on the service call link, wherein the link log file is used for recording log data in the financial service resource call process.
3. The method of claim 2, further comprising, after creating a link log file based on the service invocation link:
the control service call monitoring module establishes connection with all financial service resources;
invoking the rule configuration file of each financial service resource and storing the rule configuration file in the service invocation monitoring module;
analyzing the link log file to obtain an analysis result;
updating the rule configuration file on the visual interface of the service call monitoring module based on the analysis result, wherein the updated rule configuration file is automatically synchronized to the application where the corresponding financial service resource is located.
4. The method of claim 2, wherein the link log file includes log parameters for at least one of: whether a service call monitoring module is normally connected, the consumed time length of each target financial service resource is called, the call request parameter of each target financial service resource, and whether a resource degradation rule is triggered.
5. The configuration method according to any one of claims 1 to 4, wherein the configuration parameters of the rule configuration file further include: the resource name, the service label, the degradation type, the degradation duration, the minimum request number for triggering the degradation strategy and the abnormal call critical response value.
6. The configuration method according to claim 1, characterized in that the step of calling the target financial service resources based on the resource names and calculating a slow call ratio of each of the target financial service resources includes:
sending a resource calling request to the target financial service resource, and recording a request sending time point for sending the resource calling request;
receiving a request response result returned by the target financial service resource, and recording a receiving time point for receiving the request response result;
Calculating the intermediate duration between the receiving time point and the request sending time point, and taking the intermediate duration as the response duration of the target financial service resource;
comparing the response time length of the target financial service resource with the call critical response value, and marking the call of the target resource for calling the target financial service resource as slow call under the condition that the response time length of the target financial service resource is greater than the call critical response value;
counting the total calling times and slow calling times of calling the target financial service resource;
and calculating the ratio between the slow call times and the total call times to obtain the slow call proportion.
7. The configuration method according to claim 1, further comprising, after configuring a demotion policy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file:
sending a resource calling request to the target financial service resource;
under the condition that a request response result returned by the target financial service resource is not received, marking the target resource call of the target financial service resource as abnormal call;
Counting the total calling times and the abnormal calling times of the target financial service resource, and calculating the ratio between the abnormal calling times and the total calling times to obtain an abnormal calling proportion;
and under the condition that the abnormal call proportion is larger than an abnormal call critical response value, configuring a new degradation strategy for the target financial service resource based on the configuration parameters of the rule configuration file.
8. A device for configuring a financial services resource degradation policy, comprising:
the analysis unit is used for analyzing the financial service request sent by the user side and obtaining the resource names of N target financial service resources to be called, wherein N is a positive integer greater than or equal to 1;
the reading unit is used for reading the rule configuration file corresponding to each resource name, wherein the configuration parameters of the rule configuration file at least comprise: calling a critical response value and a resource degradation threshold value;
the calling unit is used for calling the target financial service resources based on the resource names and calculating the slow call proportion of each target financial service resource, wherein the slow call proportion refers to the ratio of the slow call times to the total call times when the target financial service resources are called, and the slow call refers to a calling mode that the response time length when the target financial service resources are called is longer than the call critical response value;
And the configuration unit is used for marking the target financial service resource as the financial service resource to be demoted under the condition that the slow call proportion of the target financial service resource is larger than the resource demotion threshold value, and configuring a demotion strategy for the financial service resource to be demoted based on the configuration parameters of the rule configuration file.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to execute the method for configuring the financial service resource degradation policy according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of configuring the financial services resource downgrade policy of any of claims 1-7.
CN202310370560.5A 2023-04-07 2023-04-07 Configuration method and device of financial service resource degradation strategy and electronic equipment Pending CN116431344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310370560.5A CN116431344A (en) 2023-04-07 2023-04-07 Configuration method and device of financial service resource degradation strategy and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310370560.5A CN116431344A (en) 2023-04-07 2023-04-07 Configuration method and device of financial service resource degradation strategy and electronic equipment

Publications (1)

Publication Number Publication Date
CN116431344A true CN116431344A (en) 2023-07-14

Family

ID=87093843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310370560.5A Pending CN116431344A (en) 2023-04-07 2023-04-07 Configuration method and device of financial service resource degradation strategy and electronic equipment

Country Status (1)

Country Link
CN (1) CN116431344A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116957807A (en) * 2023-09-21 2023-10-27 成都天用唯勤科技股份有限公司 Transaction degradation method and system for high-concurrency multi-dimensional distributed transaction system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116957807A (en) * 2023-09-21 2023-10-27 成都天用唯勤科技股份有限公司 Transaction degradation method and system for high-concurrency multi-dimensional distributed transaction system
CN116957807B (en) * 2023-09-21 2023-12-08 成都天用唯勤科技股份有限公司 Transaction degradation method and system for high-concurrency multi-dimensional distributed transaction system

Similar Documents

Publication Publication Date Title
CN107704360B (en) Monitoring data processing method, equipment, server and storage medium
CN113176978B (en) Monitoring method, system, equipment and readable storage medium based on log file
CN110661659A (en) Alarm method, device and system and electronic equipment
KR100765254B1 (en) Data transmission management system, a mobile device and a server used therein
CN110009347B (en) Block chain transaction information auditing method and device
CN116431344A (en) Configuration method and device of financial service resource degradation strategy and electronic equipment
CN110661717A (en) Current limiting method and device and electronic equipment
CN111371772A (en) Intelligent gateway current limiting method and system based on redis and computer equipment
CN111651170B (en) Instance dynamic adjustment method and device and related equipment
CN113179301A (en) File downloading method and device, storage medium and electronic device
CN110674149B (en) Service data processing method and device, computer equipment and storage medium
CN111416857A (en) Client crash processing method, device, system, equipment and storage medium
CN105843675B (en) Thread exit method and device
CN112711515B (en) Real-time monitoring method and device and electronic equipment
CN111949421B (en) SDK calling method, device, electronic equipment and computer readable storage medium
CN111209171B (en) Closed loop handling method and device for security risk and storage medium
CN111124547A (en) Task processing method and device
CN114390015B (en) Data pushing system, method, equipment and storage medium based on object model
CN115374088A (en) Database health degree analysis method, device and equipment and readable storage medium
CN115391141A (en) Database flow analysis method, device, equipment and readable storage medium
CN114371980A (en) Call link performance monitoring method and device, computer equipment and storage medium
CN114281476A (en) Kubernetes cloud native cluster resource deletion protection method, device, equipment and storage medium
CN112632121A (en) Block chain data acquisition method and device
CN117294578B (en) Communication method, system, computer equipment and storage medium
KR20140047518A (en) Black box apparatus and method for supporting reconfiguration of smart grid system

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