CN113746661B - A business processing method and device - Google Patents
A business processing method and device Download PDFInfo
- Publication number
- CN113746661B CN113746661B CN202110019655.3A CN202110019655A CN113746661B CN 113746661 B CN113746661 B CN 113746661B CN 202110019655 A CN202110019655 A CN 202110019655A CN 113746661 B CN113746661 B CN 113746661B
- Authority
- CN
- China
- Prior art keywords
- service
- business
- configuration information
- information
- target annotation
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 195
- 238000012545 processing Methods 0.000 claims abstract description 80
- 238000013507 mapping Methods 0.000 claims abstract description 73
- 238000004590 computer program Methods 0.000 claims description 9
- 230000015556 catabolic process Effects 0.000 abstract description 64
- 238000006731 degradation reaction Methods 0.000 abstract description 62
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000009467 reduction Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 3
- 230000009545 invasion Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0889—Techniques to speed-up the configuration process
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a business processing method and device, and relates to the technical field of computers. The method comprises the steps of intercepting a business method according to a target annotation, analyzing the business method to obtain signature information and parameter information corresponding to the business method, determining business configuration information from a mapping table according to the signature information, wherein the mapping table indicates the mapping relation between the signature information and the business configuration information, comparing the parameter information with the business configuration information, and executing corresponding business processing on the business method according to a comparison result. According to the implementation mode, service degradation is performed according to specific services, so that the application scene and the expandability are improved, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service processing method and apparatus.
Background
The interface level fault refers to that the system is not down and the network is not interrupted, but the problems of slow service response, overtime mass access, abnormal mass access and the like occur in the service processing process. The essence is that the system load is too high to process traffic quickly. With the continuous development of internet services, how to solve interface level faults to cope with user demands is a problem that needs to be solved at present.
The prior art has at least the following problems:
in the existing service processing method, methods such as overtime degradation, fault degradation, current limiting reduction and the like are mainly adopted to solve interface level faults, and as service degradation cannot be executed aiming at specific services, the application scene is narrow, the expandability is poor and the user experience is poor.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a service processing method and apparatus, which can execute service degradation according to specific service, thereby improving application scenarios and expandability, and improving user experience.
To achieve the above object, according to a first aspect of an embodiment of the present invention, there is provided a service processing method, including:
Intercepting a business method according to a target annotation, and analyzing the business method to acquire signature information and parameter information corresponding to the business method;
determining service configuration information from a mapping table according to the signature information, wherein the mapping table indicates the mapping relation between the signature information and the service configuration information;
And comparing the parameter information with the service configuration information, and executing corresponding service processing on the service method according to the comparison result.
Further, the method further comprises the step of constructing a mapping table before the step of determining service configuration information from the mapping table according to signature information, wherein the target annotation is marked in an interface implementation class corresponding to the service method to be degraded according to service requirements, and the method comprises the following steps:
Based on the scanning of the interface realization class, acquiring a service method to be degraded containing a target annotation;
generating service configuration information according to parameter information corresponding to the service method to be degraded, determining signature information corresponding to the service configuration information, and constructing a mapping table.
Further, when the target annotation is at least one level setting, generating service configuration information according to parameter information corresponding to the service method to be degraded, and further comprising:
after a plurality of service methods to be degraded are obtained according to the primary target annotation, parameter information corresponding to the service methods to be degraded is traversed respectively, and corresponding service configuration information is generated for the service methods to be degraded marked with the secondary target annotation.
Further, generating corresponding service configuration information for the service method to be degraded, which is marked with the secondary target annotation, further comprises:
Acquiring a parameter attribute value corresponding to parameter information of a service method to be degraded;
And generating service configuration information according to the parameter attribute values.
Further, the method further comprises the following steps:
traversing parameter information corresponding to a business method, and judging whether secondary target annotation is marked in the parameter information;
if yes, service degradation processing is executed on the service method.
Further, the service configuration information indicates parameter information to be degraded, the parameter information is compared with the service configuration information, and corresponding service processing is executed for the service method according to the comparison result, and the method further comprises the following steps:
And comparing the parameter information with the service configuration information one by one, and executing service degradation processing on the service method under the condition that at least one item of parameter information is successfully compared with the service configuration information.
Further, the method further comprises the following steps:
and updating the target annotation according to the service requirement, and updating the mapping table according to the updated target annotation.
According to a second aspect of an embodiment of the present invention, there is provided a service processing apparatus, including:
The interception module is used for intercepting the business method according to the target annotation, analyzing the business method and acquiring signature information and parameter information corresponding to the business method;
the service configuration information determining module is used for determining service configuration information from a mapping table according to the signature information, wherein the mapping table indicates the mapping relation between the signature information and the service configuration information;
And the service processing module is used for comparing the parameter information with the service configuration information and executing corresponding service processing on the service method according to the comparison result.
According to a third aspect of an embodiment of the present invention, there is provided an electronic apparatus including:
One or more processors;
storage means for storing one or more programs,
When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any of the traffic processing methods described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements a method of service processing as any one of the above.
The embodiment of the invention has the advantages that the technical means of mainly adopting methods such as overtime degradation, fault degradation, current limiting reduction and the like to solve interface level faults in the existing service processing method are overcome, the technical problems of narrow applicable scene, poor expandability and poor user experience are solved because the service method is subjected to analysis processing according to the target annotation interception service method to obtain signature information and parameter information corresponding to the service method, service configuration information is determined from the mapping table according to the signature information, the mapping table indicates the mapping relation between the signature information and the service configuration information, the parameter information is compared with the service configuration information, and corresponding service processing is executed on the service method according to the comparison result, so that the technical effects of executing service degradation on specific service, improving applicable scene and expandability and improving user experience are achieved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a service processing method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a main flow of a service processing method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of main modules of a service processing apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a service processing method according to a first embodiment of the present invention, and as shown in fig. 1, the service processing method according to the embodiment of the present invention mainly includes:
Step S101, intercepting the business method according to the target annotation, and analyzing the business method to obtain signature information and parameter information corresponding to the business method.
Specifically, according to the embodiment of the present invention, the target annotation is marked in the interface implementation class corresponding to the service method to be degraded according to the service requirement.
Through the arrangement, interception of a specific service method according to service requirements is achieved, signature information and parameter information obtained by the service method are analyzed, and then the signature information and the parameter information are compared with service configuration information in a mapping table, so that service degradation is carried out, and the application scene and expandability are improved.
Step S102, service configuration information is determined from a mapping table according to the signature information, wherein the mapping table indicates the mapping relation between the signature information and the service configuration information.
According to the embodiment of the invention, the mapping table can adopt a key-value structure, signature information and service configuration information are respectively used as a key and a key value (value), and through the setting, the service configuration information corresponding to the intercepted service method can be quickly inquired, and further corresponding service processing is executed through a subsequent comparison result, so that the service processing efficiency is improved, and the user experience is improved.
Specifically, according to an embodiment of the present invention, before the step of determining service configuration information from the mapping table according to the signature information, the method further includes a step of constructing the mapping table, including:
Based on the scanning of the interface realization class, acquiring a service method to be degraded containing a target annotation;
generating service configuration information according to parameter information corresponding to the service method to be degraded, determining signature information corresponding to the service configuration information, and constructing a mapping table.
According to the embodiment of the invention, the service configuration information can be generated according to the actual service requirement and the specific parameters in the parameter information, so that the flexible configuration of the service configuration information is realized, and the application scene is further expanded.
Further, when the target annotation is at least one level setting, generating service configuration information according to parameter information corresponding to the service method to be degraded, and further comprising:
after a plurality of service methods to be degraded are obtained according to the primary target annotation, parameter information corresponding to the service methods to be degraded is traversed respectively, and corresponding service configuration information is generated for the service methods to be degraded marked with the secondary target annotation.
Specifically, according to the embodiment of the invention, the primary target annotation is marked on the service method to be degraded, and the secondary target annotation is marked on the parameter attribute of the service method to be degraded. The primary target annotation is used for identifying that the business method needs to be subjected to business degradation logic processing, and the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration. Through the hierarchical setting, the service degradation of a certain type of request (namely a specific request) under the same type of service (same type of service) is realized, other requests under the same type of service are ensured to normally execute service processing, the application scene of the service processing method is expanded, and the flexibility configuration of the service processing method is further improved.
Preferably, corresponding service configuration information is generated for the service method to be degraded, which is marked with the secondary target annotation, and the method further comprises:
Acquiring a parameter attribute value corresponding to parameter information of a service method to be degraded;
And generating service configuration information according to the parameter attribute values.
By the arrangement, the service configuration information is generated according to the attribute value corresponding to the parameter information, so that a set of codes are prevented from being independently written for different service logics in the existing method, the invasion of the codes is avoided, and the complexity of service degradation is remarkably reduced.
And step S103, comparing the parameter information with the service configuration information, and executing corresponding service processing on the service method according to the comparison result.
Preferably, according to an embodiment of the present invention, the method further includes:
traversing parameter information corresponding to a business method, and judging whether secondary target annotation is marked in the parameter information;
if yes, service degradation processing is executed on the service method.
Through the setting, the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration, and service degradation processing can be performed on the service method only by judging that the secondary target annotation is marked in the parameter information of the service method, so that service processing efficiency is improved.
Further, according to the embodiment of the invention, the service configuration information indicates the parameter information to be degraded, the parameter information is compared with the service configuration information, and corresponding service processing is executed for the service method according to the comparison result, and the method further comprises the following steps:
And comparing the parameter information with the service configuration information one by one, and executing service degradation processing on the service method under the condition that at least one item of parameter information is successfully compared with the service configuration information.
Through the setting, the service configuration information indicates the parameter information to be degraded, and the service degradation processing is executed on the service method only by comparing the parameter information corresponding to the intercepted service method with the service configuration information as long as any one of the parameter fields is successfully compared.
Preferably, according to an embodiment of the present invention, the method further includes:
and updating the target annotation according to the service requirement, and updating the mapping table according to the updated target annotation.
Through the arrangement, when the service requirement is changed, the target annotation can be updated, so that the mapping table is reconstructed (or the original mapping table is updated), the expansion of the service processing method is realized, and the user experience is improved.
According to the technical scheme, the method for intercepting the service according to the target annotation is adopted, the service method is analyzed to obtain signature information and parameter information corresponding to the service method, service configuration information is determined according to the signature information from the mapping table, the mapping table indicates the mapping relation between the signature information and the service configuration information, the parameter information is compared with the service configuration information, and corresponding service processing is carried out on the service method according to the comparison result, so that the technical effects that interface level faults are solved by mainly adopting methods such as overtime degradation, fault degradation, current limiting reduction and the like in the existing service processing method, service degradation cannot be carried out on specific services, applicable scenes are narrow, expandability is poor, and user experience is poor are achieved, and further service degradation can be carried out according to specific services, applicable scenes and expandability are improved, and user experience is improved are achieved.
Fig. 2 is a schematic diagram of a main flow of a service processing method according to a second embodiment of the present invention, and as shown in fig. 2, the service processing method according to the embodiment of the present invention mainly includes:
step S201, marking and labeling solutions in interface implementation classes corresponding to the service method to be degraded according to service requirements.
Specifically, when the target annotation is set as the second level, the first-level target annotation (Degradation) is marked on the service method to be degraded, which has two functions that a. The service method identified by the annotation is analyzed by parameter information to generate degradation configuration through the parameter information, b. The service method needs to be intercepted by AOP (Aspect Oriented Programming, face-to-face programming), the service method needs to be subjected to service degradation logic processing, signature (signature) is the service method in the unique identification class, if the signature is not filled in, the class name or the service method name is taken by default, and the specific codes are as follows:
By the code, the primary target annotation (Degradation) is marked on the business method to be degraded, wherein signature is the business method in the unique identification class.
The secondary target annotation is marked on the parameter attribute of the service method to be demoted and is used for identifying which attributes need to generate demotion configuration, if not specified, the attribute name is directly used, and the specific code is as follows:
Through the codes, the secondary target annotation is marked on the parameter attribute (DegradationParam) of the service method to be demoted and used for identifying which attributes need to generate demotion configuration.
According to the embodiment of the invention, the specific business method is marked according to the business requirement, and the business configuration information is generated according to the specific parameters in the parameter information of the marked business method, so that the flexible configuration of the business configuration information is realized, and the application scene is further expanded.
Step S202, based on the scanning of the interface implementation class, a plurality of business methods to be degraded are obtained according to the primary target annotation.
Through the setting, all service methods to be degraded are conveniently obtained, and corresponding degradation configuration information is generated subsequently, so that the effect of improving service processing efficiency is achieved.
Step S203, parameter information corresponding to the plurality of service methods to be degraded is traversed respectively, and corresponding service configuration information is generated for the service methods to be degraded marked with the secondary target annotation.
Specifically, according to the embodiment of the invention, the primary target annotation is marked on the service method to be degraded, and the secondary target annotation is marked on the parameter attribute of the service method to be degraded. The primary target annotation is used for identifying that the business method needs to be subjected to business degradation logic processing, and the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration. Through the hierarchical setting, the service degradation of a certain type of request (namely a specific request) under the same type of service (same type of service) is realized, other requests under the same type of service are ensured to normally execute service processing, the application scene of the service processing method is expanded, and the flexibility configuration of the service processing method is further improved.
Preferably, corresponding service configuration information is generated for the service method to be degraded, which is marked with the secondary target annotation, and the method further comprises:
Acquiring a parameter attribute value corresponding to parameter information of a service method to be degraded;
And generating service configuration information according to the parameter attribute values.
By the arrangement, the service configuration information is generated according to the attribute value corresponding to the parameter information, so that a set of codes are prevented from being independently written for different service logics in the existing method, the invasion of the codes is avoided, and the complexity of service degradation is remarkably reduced.
Step S204, determining signature information corresponding to the service configuration information and constructing a mapping table.
According to the embodiment of the invention, after the service configuration information (i.e. degradation configuration information, degradationMeta) is generated, a Database (DB) is queried to check whether the service configuration information has a matched signature, if not, a unique signature is determined for the service configuration information, and a mapping table is constructed and stored in the DB for subsequent query.
Step S205, according to the target annotation interception business method, analyzing the business method to obtain signature information and parameter information corresponding to the business method.
Through the arrangement, interception of a specific service method according to service requirements is achieved, signature information and parameter information obtained by the service method are analyzed, and then the signature information and the parameter information are compared with service configuration information in a mapping table, so that service degradation is carried out, and the application scene and expandability are improved.
According to the embodiment of the invention, when an application is started, a business method containing @ Degradation (primary target annotation) is intercepted, the parameter attribute of the parameter field annotated by @ DegradationParam (secondary target annotation) in the business method is analyzed, and the signature (signature information) in the annotation @ Degradation and the parameter value (parameter information) in @ DegradationParam are obtained so as to determine metadata DegradationMeta (namely the business configuration information) according to the information.
Step S206, determining service configuration information from the mapping table according to the signature information.
According to the embodiment of the invention, the mapping table can adopt a key-value structure, signature information and service configuration information are respectively used as a key and a key value (value), and through the setting, the service configuration information corresponding to the intercepted service method can be quickly inquired, and further corresponding service processing is executed through a subsequent comparison result, so that the service processing efficiency is improved, and the user experience is improved.
Step S207, comparing the parameter information with the service configuration information one by one, and executing service degradation processing on the service method under the condition that at least one item of parameter information is successfully compared with the service configuration information.
Through the setting, the service configuration information indicates the parameter information to be degraded, and the service degradation processing is executed on the service method only by comparing the parameter information corresponding to the intercepted service method with the service configuration information as long as any one of the parameter fields is successfully compared.
Preferably, according to an embodiment of the present invention, the method further includes:
traversing parameter information corresponding to a business method, and judging whether secondary target annotation is marked in the parameter information;
if yes, service degradation processing is executed on the service method.
Through the setting, the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration, and service degradation processing can be performed on the service method only by judging that the secondary target annotation is marked in the parameter information of the service method, so that service processing efficiency is improved.
And step S208, updating the target annotation according to the service requirement, and updating the mapping table according to the updated target annotation.
Through the arrangement, when the service requirement is changed, the target annotation can be updated, so that the mapping table is reconstructed (or the original mapping table is updated), the expansion of the service processing method is realized, and the user experience is improved.
According to the technical scheme, the method for intercepting the service according to the target annotation is adopted, the service method is analyzed to obtain signature information and parameter information corresponding to the service method, service configuration information is determined according to the signature information from the mapping table, the mapping table indicates the mapping relation between the signature information and the service configuration information, the parameter information is compared with the service configuration information, and corresponding service processing is carried out on the service method according to the comparison result, so that the technical effects that interface level faults are solved by mainly adopting methods such as overtime degradation, fault degradation, current limiting reduction and the like in the existing service processing method, service degradation cannot be carried out on specific services, applicable scenes are narrow, expandability is poor, and user experience is poor are achieved, and further service degradation can be carried out according to specific services, applicable scenes and expandability are improved, and user experience is improved are achieved.
Fig. 3 is a schematic diagram of main modules of a service processing apparatus according to an embodiment of the present invention, and as shown in fig. 3, a service processing apparatus 300 according to an embodiment of the present invention mainly includes:
The interception module 301 is configured to intercept the service method according to the target annotation, and analyze the service method to obtain signature information and parameter information corresponding to the service method.
Specifically, according to the embodiment of the present invention, the target annotation is marked in the interface implementation class corresponding to the service method to be degraded according to the service requirement.
Through the arrangement, interception of a specific service method according to service requirements is achieved, signature information and parameter information obtained by the service method are analyzed, and then the signature information and the parameter information are compared with service configuration information in a mapping table, so that service degradation is carried out, and the application scene and expandability are improved.
The service configuration information determining module 302 is configured to determine service configuration information from a mapping table according to the signature information, where the mapping table indicates a mapping relationship between the signature information and the service configuration information.
According to the embodiment of the invention, the mapping table can adopt a key-value structure, signature information and service configuration information are respectively used as a key and a key value (value), and through the setting, the service configuration information corresponding to the intercepted service method can be quickly inquired, and further corresponding service processing is executed through a subsequent comparison result, so that the service processing efficiency is improved, and the user experience is improved.
Specifically, according to an embodiment of the present invention, the service processing apparatus 300 further includes a mapping table construction module, before the step of determining the service configuration information from the mapping table according to the signature information, the mapping table construction module is configured to:
Based on the scanning of the interface realization class, acquiring a service method to be degraded containing a target annotation;
generating service configuration information according to parameter information corresponding to the service method to be degraded, determining signature information corresponding to the service configuration information, and constructing a mapping table.
According to the embodiment of the invention, the service configuration information can be generated according to the actual service requirement and the specific parameters in the parameter information, so that the flexible configuration of the service configuration information is realized, and the application scene is further expanded.
Further, the target annotation is at least one level of settings; when the target annotation is a secondary setting, the service configuration information determining module 302 is further configured to:
after a plurality of service methods to be degraded are obtained according to the primary target annotation, parameter information corresponding to the service methods to be degraded is traversed respectively, and corresponding service configuration information is generated for the service methods to be degraded marked with the secondary target annotation.
Specifically, according to the embodiment of the invention, the primary target annotation is marked on the service method to be degraded, and the secondary target annotation is marked on the parameter attribute of the service method to be degraded. The primary target annotation is used for identifying that the business method needs to be subjected to business degradation logic processing, and the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration. Through the hierarchical setting, the service degradation of a certain type of request (namely a specific request) under the same type of service (same type of service) is realized, other requests under the same type of service are ensured to normally execute service processing, the application scene of the service processing device is expanded, and the flexibility configuration of service processing is further improved.
Preferably, the service configuration information determining module 302 is further configured to:
Acquiring a parameter attribute value corresponding to parameter information of a service method to be degraded;
And generating service configuration information according to the parameter attribute values.
By the arrangement, the service configuration information is generated according to the attribute value corresponding to the parameter information, so that a set of codes are prevented from being independently written for different service logics in the existing method, the invasion of the codes is avoided, and the complexity of service degradation is remarkably reduced.
And the service processing module 303 is configured to compare the parameter information with the service configuration information, and execute corresponding service processing on the service method according to the comparison result.
Preferably, according to an embodiment of the present invention, the service processing module 303 is further configured to:
traversing parameter information corresponding to a business method, and judging whether secondary target annotation is marked in the parameter information;
if yes, service degradation processing is executed on the service method.
Through the setting, the secondary target annotation is used for identifying that the parameter attribute needs to generate degradation configuration, and service degradation processing can be performed on the service method only by judging that the secondary target annotation is marked in the parameter information of the service method, so that service processing efficiency is improved.
Further, according to the embodiment of the present invention, the service configuration information indicates parameter information to be degraded, and the service processing module 303 is further configured to:
And comparing the parameter information with the service configuration information one by one, and executing service degradation processing on the service method under the condition that at least one item of parameter information is successfully compared with the service configuration information.
Through the setting, the service configuration information indicates the parameter information to be degraded, and the service degradation processing is executed on the service method only by comparing the parameter information corresponding to the intercepted service method with the service configuration information as long as any one of the parameter fields is successfully compared.
Preferably, according to an embodiment of the present invention, the service processing apparatus 300 further includes an update module, configured to:
and updating the target annotation according to the service requirement, and updating the mapping table according to the updated target annotation.
Through the arrangement, when the service requirement is changed, the target annotation can be updated, so that the mapping table is reconstructed (or the original mapping table is updated), the expansion of the service processing method is realized, and the user experience is improved.
According to the technical scheme, the method for intercepting the service according to the target annotation is adopted, the service method is analyzed to obtain signature information and parameter information corresponding to the service method, service configuration information is determined according to the signature information from the mapping table, the mapping table indicates the mapping relation between the signature information and the service configuration information, the parameter information is compared with the service configuration information, and corresponding service processing is carried out on the service method according to the comparison result, so that the technical effects that interface level faults are solved by mainly adopting methods such as overtime degradation, fault degradation, current limiting reduction and the like in the existing service processing method, service degradation cannot be carried out on specific services, applicable scenes are narrow, expandability is poor, and user experience is poor are achieved, and further service degradation can be carried out according to specific services, applicable scenes and expandability are improved, and user experience is improved are achieved.
Fig. 4 illustrates an exemplary system architecture 400 to which a business processing method or business processing apparatus of embodiments of the present invention may be applied.
As shown in fig. 4, a system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405 (this architecture is merely an example, and the components contained in a particular architecture may be tailored to the application specific case). The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as a data processing class application, a business processing class application, etc., may be installed on the terminal devices 401, 402, 403, as just examples.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a server (by way of example only) that utilizes terminal devices 401, 402, 403 (performs business processing/performs data processing) for a user. The server may perform processing such as analysis on the received data such as the service method, and feed back the processing result (e.g., signature information and parameter information—only an example) to the terminal device.
It should be noted that, the service processing method provided in the embodiment of the present invention is generally executed by the server 405, and accordingly, the service processing apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 5 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Connected to the I/O interface 505 are an input section 506 including a keyboard, a mouse, and the like, an output section 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like, a storage section 508 including a hard disk, and the like, and a communication section 509 including a network interface card such as a LAN card, a modem, and the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, a processor may be described as comprising an interception module, a service configuration information determination module, and a service processing module. The names of the modules do not limit the module itself in some cases, for example, the interception module may also be described as a "module for intercepting a business method according to a target annotation, and performing parsing processing on the business method to obtain signature information and parameter information corresponding to the business method".
As a further aspect, the invention also provides a computer readable medium which may be comprised in the device described in the above embodiments or may be present alone without being fitted into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the device, the device comprises a business method interception module for intercepting the business method according to the target annotation, a business method analysis module for obtaining signature information and parameter information corresponding to the business method, a business configuration information determination module for determining the business configuration information according to the signature information, wherein the mapping table indicates the mapping relation between the signature information and the business configuration information, a parameter information comparison module for comparing the parameter information with the business configuration information, and a corresponding business processing module for executing corresponding business processing on the business method according to the comparison result.
According to the technical scheme, the method for intercepting the service according to the target annotation is adopted, the service method is analyzed to obtain signature information and parameter information corresponding to the service method, service configuration information is determined according to the signature information from the mapping table, the mapping table indicates the mapping relation between the signature information and the service configuration information, the parameter information is compared with the service configuration information, and corresponding service processing is carried out on the service method according to the comparison result, so that the technical effects that interface level faults are solved by mainly adopting methods such as overtime degradation, fault degradation, current limiting reduction and the like in the existing service processing method, service degradation cannot be carried out on specific services, applicable scenes are narrow, expandability is poor, and user experience is poor are achieved, and further service degradation can be carried out according to specific services, applicable scenes and expandability are improved, and user experience is improved are achieved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110019655.3A CN113746661B (en) | 2021-01-07 | 2021-01-07 | A business processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110019655.3A CN113746661B (en) | 2021-01-07 | 2021-01-07 | A business processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113746661A CN113746661A (en) | 2021-12-03 |
CN113746661B true CN113746661B (en) | 2025-02-25 |
Family
ID=78728111
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110019655.3A Active CN113746661B (en) | 2021-01-07 | 2021-01-07 | A business processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113746661B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114913004A (en) * | 2022-06-14 | 2022-08-16 | 中国工商银行股份有限公司 | Service degradation method, system, device, computer equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454138A (en) * | 2017-06-19 | 2017-12-08 | 阿里巴巴集团控股有限公司 | The implementation method and device that business degrades |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7571447B2 (en) * | 2005-06-20 | 2009-08-04 | International Business Machines Corporation | Loose coupling of web services |
US20070290815A1 (en) * | 2006-05-31 | 2007-12-20 | Sap Ag | Utilizing a mapping engine to dynamically map data objects on read/write RFID tags based on customized tag structures |
CN102546118B (en) * | 2012-03-12 | 2015-08-12 | 国家广播电影电视总局广播电视规划院 | Business in a kind of C-DOCSIS system forwards and priority mapping method |
US9338065B2 (en) * | 2014-01-06 | 2016-05-10 | Cisco Technology, Inc. | Predictive learning machine-based approach to detect traffic outside of service level agreements |
CN104009994A (en) * | 2014-05-30 | 2014-08-27 | 北京京东尚科信息技术有限公司 | Method and device for achieving communication of server side and client side |
CN106997314B (en) * | 2016-01-22 | 2020-10-16 | 阿里巴巴(中国)有限公司 | Exception handling method, device and system for distributed system |
CN106713028B (en) * | 2016-12-20 | 2020-06-02 | 北京小米移动软件有限公司 | Service degradation method and device and distributed task scheduling system |
CN107592219A (en) * | 2017-09-04 | 2018-01-16 | 北京潘达互娱科技有限公司 | Service degradation processing method and processing device |
CN108920135B (en) * | 2018-06-27 | 2021-09-10 | 杭州贝店科技有限公司 | User-defined service generation method and device, computer equipment and storage medium |
CN111026797A (en) * | 2019-12-02 | 2020-04-17 | 卫盈联信息技术(深圳)有限公司 | Service data processing method, server and storage medium |
CN111178840A (en) * | 2019-12-27 | 2020-05-19 | 支付宝实验室(新加坡)有限公司 | Service processing method, device, system, electronic equipment and storage medium |
-
2021
- 2021-01-07 CN CN202110019655.3A patent/CN113746661B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454138A (en) * | 2017-06-19 | 2017-12-08 | 阿里巴巴集团控股有限公司 | The implementation method and device that business degrades |
Also Published As
Publication number | Publication date |
---|---|
CN113746661A (en) | 2021-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110019350B (en) | Data query method and device based on configuration information | |
CN109388626B (en) | Method and apparatus for assigning numbers to services | |
CN111427701A (en) | Workflow engine system and business processing method | |
US11934287B2 (en) | Method, electronic device and computer program product for processing data | |
CN110019158A (en) | A kind of method and apparatus of monitoring data quality | |
CN111221869A (en) | Method and device for tracking database transaction time and analyzing database lock | |
CN113779004A (en) | A method and device for data verification | |
CN113722007B (en) | Configuration method, device and system of VPN branch equipment | |
CN113746661B (en) | A business processing method and device | |
CN119149558A (en) | Distributed database sharding key updating method, device, equipment and medium | |
CN112948138B (en) | A method and device for processing messages | |
CN109087097B (en) | Method and device for updating same identifier of chain code | |
US12001458B2 (en) | Multi-cloud object store access | |
CN113726885B (en) | Flow quota adjusting method and device | |
WO2024045646A1 (en) | Method, apparatus and system for managing cluster access permission | |
CN112463616B (en) | A chaos testing method and device for Kubernetes container platform | |
CN113761433B (en) | Service processing method and device | |
CN113778780B (en) | Application stability determining method and device, electronic equipment and storage medium | |
CN113362097B (en) | User determination method and device | |
CN113138772B (en) | Construction method and device of data processing platform, electronic equipment and storage medium | |
CN112306723B (en) | Operation information acquisition method and device applied to applet | |
CN115297061B (en) | Token bucket updating method, device, electronic device and storage medium | |
CN110262756B (en) | Method and device for caching data | |
CN115098444B (en) | Directory data processing method, device, electronic device and storage medium | |
CN113722548B (en) | Method and device for processing quotation relation in service 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |