CN115914400A - Service processing method, device, electronic equipment and medium - Google Patents

Service processing method, device, electronic equipment and medium Download PDF

Info

Publication number
CN115914400A
CN115914400A CN202211388592.XA CN202211388592A CN115914400A CN 115914400 A CN115914400 A CN 115914400A CN 202211388592 A CN202211388592 A CN 202211388592A CN 115914400 A CN115914400 A CN 115914400A
Authority
CN
China
Prior art keywords
service
micro
target
branch
micro service
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
CN202211388592.XA
Other languages
Chinese (zh)
Inventor
侯文龙
刘孟昕
林科锵
张玉娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202211388592.XA priority Critical patent/CN115914400A/en
Publication of CN115914400A publication Critical patent/CN115914400A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Abstract

The present disclosure provides a service processing method, apparatus, device and medium, which can be applied to the fields of electronic communication, software testing and internet financial management. The service processing method comprises the following steps: in response to receiving a service request for processing a target service, determining a micro service link for processing the target service based on link information in the service request, wherein the micro service link comprises micro service branches of each of a plurality of micro services; determining respective state information of a plurality of micro-service branches; and in response to determining that the state information of the target micro service branch is used for characterizing that the target micro service branch is in a disabled state, determining a processing mode for the target service based on the attribute information of the target micro service branch.

Description

Service processing method, device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of electronic communications, software testing, and internet financial management, and more particularly, to a method and apparatus for processing a service, an electronic device, a storage medium, and a program product.
Background
The long-link service transaction mode representation needs to be processed by interaction and cooperation of a plurality of servers or application nodes in a complete service processing process to complete a complete service to a client. With the development of information technology, the architecture of a service system is more and more complex, and especially today, the micro-service architecture is more and more widely applied, and a long-link service transaction mode is more and more common.
In the course of implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: under the condition that one micro-service branch is forbidden, the whole micro-service link is forbidden by utilizing the existing isolation technology, so that the problem that the service cannot be normally processed or a new service system cannot be normally tested is caused.
Disclosure of Invention
In view of this, the present disclosure provides a service processing method, apparatus, electronic device, storage medium, and program product.
One aspect of the present disclosure provides a service processing method, including:
in response to receiving a service request for processing a target service, determining a micro-service link for processing the target service based on link information in the service request, wherein the micro-service link comprises micro-service branches of each of a plurality of micro-services;
determining respective state information of a plurality of said micro service branches; and
and in response to the fact that the state information of the target micro service branch is used for representing that the target micro service branch is in the forbidden state, determining a processing mode aiming at the target business based on the attribute information of the target micro service branch.
According to an embodiment of the present disclosure, the processing mode of the target service includes a mode of rolling back service data of the target service;
the determining a processing mode for the target service based on the attribute information of the target micro service branch includes:
determining whether a candidate micro service branch matched with the target micro service branch exists in at least one second micro service container based on the identification information in the attribute information, wherein the target micro service branch is a micro service branch in a first micro service container, and the first micro service container is a micro service container different from the second micro service container; and
and under the condition that the candidate micro service branch does not exist, determining the processing mode as a mode of rolling back the service data of the target service.
According to an embodiment of the present disclosure, the processing mode of the target service includes a mode of calling a target candidate micro service branch to process the target service;
the determining a processing mode for the target service based on the attribute information of the target micro service branch includes:
determining whether a candidate micro service branch matched with the target micro service branch exists in at least one second micro service container based on the identification information in the attribute information, wherein the target micro service branch is a micro service branch in a first micro service container, and the first micro service container is a micro service container different from the second micro service container;
determining the access frequency of the target micro service branch under the condition that the candidate micro service branch exists;
determining the target candidate micro service branch from the candidate micro service branches under the condition that the access frequency of the target micro service branch is determined to be less than or equal to a preset access frequency threshold; and
and calling the target candidate micro-service branch to process the target service.
According to an embodiment of the present disclosure, the candidate micro service branch includes a plurality of branches;
the determining the target candidate micro service branch from the candidate micro service branches includes:
determining available processing capacity of each of the plurality of candidate micro-service branches;
sorting according to the sequence of the available processing capacity from high to low to obtain a sorting result of the available processing capacity; and
and taking the candidate micro service branch ranked at the head as the target candidate micro service branch.
According to an embodiment of the present disclosure, the link information includes first identification information of each of the plurality of micro services and second identification information of a micro service branch of each of the plurality of micro services;
the determining the state information of each of the plurality of micro service branches includes:
and determining the state information of the micro service branch matched with the identification information from a micro service branch state information table based on the identification information of the micro service branch, wherein the micro service branch state information table comprises the mapping relation between the identification information and the state information.
According to an embodiment of the present disclosure, the method further includes:
periodically sending availability detection information to the target micro-service branch;
under the condition that the feedback information from the target micro service branch for the preset times is determined not to be received, determining the current state information of the target micro service branch to be in a forbidden state; and
and updating the state information of the target micro service branch in the micro service branch state information table by using the current state information when the current state information of the target micro service branch is determined to be different from the state information in the micro service branch state information table.
According to an embodiment of the present disclosure, the extracting link information of the micro service link from the service request in response to receiving the service request for processing the target service includes:
responding to a received service request for processing the target service, and acquiring a service message in the service request, wherein the field format of the service message is fixed; and
and extracting the link information of the micro service link from the service message according to a preset field.
Another aspect of the present disclosure provides a service processing apparatus, including:
the link determining module is used for responding to a received service request for processing a target service, and determining a micro service link for processing the target service based on link information in the service request, wherein the micro service link comprises micro service branches of a plurality of micro services;
a state determining module for determining respective state information of a plurality of the micro service branches; and
and the mode determining module is used for responding to the state information of the target micro service branch for representing that the target micro service branch is in a forbidden state, and determining the processing mode aiming at the target service based on the attribute information of the target micro service branch.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to implement the method as described above.
Another aspect of the disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, as the method, in response to receiving the service request for processing the target service, the micro service link for processing the target service is determined based on the link information in the service request, wherein the micro service link comprises the micro service branches of each of the plurality of micro services; determining respective state information of a plurality of micro-service branches; and in response to the fact that the state information of the target micro service branch is used for representing that the target micro service branch is in the forbidden state, the technical means for determining the processing mode of the target business is based on the attribute information of the target micro service branch, the processing mode of the target business can be determined from a plurality of processing modes under the condition that the target micro service branch is abnormal, and flexibility and pertinence are achieved. In addition, only the target micro service branch is processed, and other micro service branches except the target micro service branch of the micro service are not processed and are normally used, so that the service processing capacity is improved, the service processing efficiency is improved, and the use experience of a user is further improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an exemplary system architecture to which the traffic processing method and apparatus of the present disclosure may be applied;
FIG. 2 schematically shows a flow diagram of a traffic handling method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a processing mode of determining a target traffic according to an embodiment of the present disclosure;
fig. 4 schematically shows a block diagram of a traffic processing device according to an embodiment of the present disclosure; and
fig. 5 schematically shows a block diagram of an electronic device adapted to implement a traffic processing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
In those instances where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). Where a convention analogous to "at least one of A, B, or C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, or C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
The present disclosure provides a service processing method, apparatus, device and medium, which can be applied to the fields of electronic communication, software testing and internet financial management.
Taking an application scenario in the software testing field as an example, in the financial industry, due to the particularity of services, the requirements on the accuracy and consistency of data in a service system are very high, so that the centralized processing characteristics of the data in the service processing process are obvious, and different service systems are developed according to the service field and the classification of the data inevitably in the centralized processing process. With the coming of the internet financial era, the progress of online and fusion processing of data is accelerated, more and more service and application nodes are involved in guest transactions, and stability and data integrity are very critical characteristics. However, with the development of information technology, the architecture of the service system is more and more complex, and especially today, the micro-service architecture is more and more widely applied, and the long-link transaction mode is more and more common. In a complete transaction process, a complete service for a customer can be completed only by interactive cooperative processing of a plurality of application nodes.
In the financial industry, the requirement on the accuracy of data is very high, so the verification of functions such as checking and checking of financial data, reconciliation comparison of data among different business systems, posting and repairing of abnormal data and the like is very important for business system versions, and each version needs to be subjected to key verification in a test environment before being online.
The versions deployed in the test environment are all versions in the developing process, the version quality is not verified, and patches need to be updated continuously and discovered bugs need to be repaired in the process. However, due to the characteristics of the long financial service link, the call chain between the service systems and the services is very long and complex, and when some application node in the middle of the long link is maintained, other upstream and downstream application nodes still provide services normally because of no version update or environment maintenance operation. When a user initiates a transaction, it often happens that one or more upstream application nodes are already processed and completed, and when a transaction call chain reaches an application node in environment maintenance, because the environment of the corresponding application node is in maintenance and cannot process a request, the whole test process is interrupted, but the data of the upstream application node is already processed and completed in the corresponding service system, and dirty data is generated. When account checking or data checking is involved in a subsequent link, due to influence interference generated by dirty data, the account checking of test data cannot be completed in a business system through comparison of checking functions of the business system, a tester can only copy partial data manually, and checks the data through other methods, so that the working efficiency is low, and a blind area of function verification exists.
According to the embodiment of the disclosure, the service processing method comprises the following steps: in response to receiving a service request for processing a target service, determining a micro-service link for processing the target service based on link information in the service request, wherein the micro-service link comprises micro-service branches of each of a plurality of micro-services; determining respective state information of a plurality of micro-service branches; and in response to determining that the state information of the target micro service branch is used for characterizing that the target micro service branch is in a disabled state, determining a processing mode for the target service based on the attribute information of the target micro service branch.
By using the service processing method provided by the embodiment of the disclosure, in the service version testing process, test conflicts generated by account verification by different testers during operation can be avoided, the processing mode for the target service is determined by using the attribute information of the forbidden target micro-service branch, and further the targeted shielding and processing of the transaction branch are realized, so that the testing requirements of account checking and report verification of a service system with high testing sensitivity on dirty data are guaranteed, and the working quality of the testing process is improved, and meanwhile, the testing efficiency is improved.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which a traffic processing method or apparatus may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include servers 101, 102, and 103, a network 104, and a terminal device 105. The network 104 serves as a medium for providing communication links between the servers 101, 102, 103 and the terminal device 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
A user can use the terminal device 105 to interact with the servers 101, 102, and 103 through the network 104 to receive or transmit information or the like. The terminal device 105 may have installed thereon various applications for communicating with the servers 101, 102, 103, such as shopping applications, search applications, instant messaging tools, mailbox clients, etc. (by way of example only).
Terminal device 105 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to tablet computers, laptop portable computers, desktop computers, and the like.
Servers 101, 102, and 103 may be servers that process various services, and servers 101, 102, and 103 may each include a plurality of microservice containers, each microservice container having a plurality of microservices disposed therein, each microservice may include a plurality of microservice branches.
Any one of the servers 101, 102, and 103 may also be configured to monitor whether multiple micro service branches in the servers 101, 102, and 103 are in a disabled state, and in a case that a target micro service branch in the disabled state exists in the servers 101, 102, and 103, determine a processing mode for the target service based on the attribute information of the target micro service branch, so as to process the target service according to the processing mode.
It should be noted that the service processing method provided by the embodiment of the present disclosure can be generally executed by the servers 101, 102, and 103. Accordingly, the service processing device provided by the embodiment of the present disclosure may be generally disposed in the servers 101, 102, and 103. The service processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the servers 101, 102, and 103 and capable of communicating with the terminal device 105 and/or the server 105. Correspondingly, the service processing apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the servers 101, 102, and 103 and is capable of communicating with the terminal device 105 and/or the servers 101, 102, and 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a traffic processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S203.
In operation S201, in response to receiving a service request for processing a target service, a micro service link for processing the target service is determined based on link information in the service request. The microservice link includes microservice branches for each of a plurality of microservices.
In operation S202, status information of each of a plurality of micro service branches is determined.
In operation S203, in response to determining that the state information of the target micro service branch is used to characterize that the target micro service branch is in the disabled state, a processing mode for the target traffic is determined based on the attribute information of the target micro service branch.
According to an embodiment of the present disclosure, the service request for processing the target service may be a service request of a service from a user in a financial service scenario. For example, a service request for purchasing a financial product, user registration, or authentication, etc.
According to the embodiment of the disclosure, the service processing method provided by the disclosure adopts the micro service link to process the target service. The micro-service link includes a micro-service branch for each of a plurality of micro-services, each micro-service being deployed independently, the plurality of micro-services being loosely coupled to each other. The micro-services have sequential access sequence and calling relationship with each other. The micro-service branch of each micro-service can complete the service unit corresponding to the micro-service.
Taking a target service as a user authentication service as an example, the target service sequentially comprises an information acquisition service unit, a security check service unit and an identity authentication service unit. The micro service link for processing the target service may sequentially include a micro service branch for processing the information collection service unit, a micro service branch for processing the security check service unit, and a micro service branch for processing the identity authentication service unit.
Taking the micro service branch for processing the identity authentication service unit as an example, the micro service branch for processing the identity authentication service unit may include a short message authentication micro service branch, a verification code authentication micro service branch, a micro message authentication micro service branch, and a hardware authentication micro service branch. The micro-service branch in the micro-service link for processing the identity authentication service unit may be a micro-trust authentication micro-service branch.
According to an embodiment of the present disclosure, determining the respective state information of the plurality of micro service branches may include: and determining the state information of each of the micro service branch for processing the information acquisition service unit, the micro service branch for processing the safety check service unit and the micro service branch for processing the identity authentication service unit.
According to an embodiment of the present disclosure, the state information may include a processing state of the service unit corresponding to the micro service branch, e.g., a current traffic throughput. But is not limited thereto. The state information may also characterize whether the microservice branch is in a test state, inaccessible state, or the like.
According to the embodiment of the disclosure, in the case that the current traffic processing capacity is overloaded or in the test state, the state information of the target micro service branch is used for representing that the target micro service branch is in the disabled state. In this case, the processing mode for the target service may be determined based on the attribute information of the target micro service branch.
According to an embodiment of the present disclosure, determining a processing mode for a target service based on attribute information of a target micro service branch may include: and determining a processing mode for the target service from a plurality of processing modes based on the attribute information of the target micro-service branch. The processing mode may include at least one of: the mode of rolling back the service data of the target service and the mode of calling the target candidate micro-service branch to process the target service.
According to an embodiment of the present disclosure, the mode of rolling back the service data of the target service may include: the target microservice branch is disabled, but the other microservice branches of the microservice are used normally. For example, a micro service branch for processing the identity authentication service unit, such as a micro message authentication micro service branch, is disabled, and a micro service branch for processing the identity authentication service unit, such as a short message authentication micro service branch, a verification code authentication micro service branch, is normally used.
According to an embodiment of the present disclosure, invoking a mode of processing a target service by a target candidate micro-service branch may include: and taking other micro service branches of the micro service as target candidate micro service branches, or taking micro service branches matched with the target micro service branches in other micro service containers as target candidate micro service branches, and calling the target candidate micro service branches to process target services.
By using the service processing method provided by the embodiment of the disclosure, the processing mode of the target service can be determined from a plurality of processing modes under the condition that the target micro-service branch of the micro-service is abnormal, and flexibility and pertinence are achieved. In addition, only the target micro service branch is processed, and other micro service branches except the target micro service branch of the micro service are not processed and are normally used, so that the service processing capacity is improved, the service processing efficiency is improved, and the use experience of a user is further improved.
In a related example, access control to the exception service may be implemented using a firewall access control policy that the firewall controls IP addresses and ports, and a soft load balancing access control policy that utilizes soft load balancing URLs.
The firewall access control policy for controlling the IP address and port using the firewall may include: and (4) controlling the IP address and the port of the service exception from hardware by using the firewall. The minimum control unit of the policy is one IP plus one port. The access control strategy has certain limitations, and when a certain micro service branch is abnormal or the micro service branch needs to be shielded in a targeted manner in the test process, the strategy cannot realize the normal use of other micro service branches. Under the condition that the IP address and the port resource of the server container are limited in the test environment, the IP address and the port number resource and the micro-service number deployed in a single container are limited during the control through the firewall, so that a plurality of micro-service branches in a large number of micro-services are abnormally off-line simultaneously.
Utilizing a soft load balancing access control policy may include: and (3) controlling the micro service URL with abnormal service from software by using a soft load balancing technology. The minimum control unit of the strategy is the URL accessed by the micro-service. When some micro service branch is abnormal, or the micro service branch needs to be shielded in a targeted manner in the test process, and other micro service branches are normally used, the soft load balancing control strategy cannot support the use, and the function of normal business logic in the micro service is abnormally off-line.
Compared with a firewall access control strategy or a soft load balancing technology, the service processing method provided by the embodiment of the disclosure can realize refined access control of branch dimensions of the micro-service, and avoid the problem that normal service logic in a target micro-service is also isolated simultaneously due to management control on the whole micro-service container or a complete micro-service link when partial service logic in part of the micro-service is abnormal.
The method shown in fig. 2 is further described below with reference to specific embodiments.
According to an embodiment of the present disclosure, for operation S201 shown in fig. 2, in response to receiving a service request for processing a target service, extracting link information of a micro service link from the service request may include the following operations.
For example, in response to receiving a service request for processing a target service, a service packet in the service request is obtained. And extracting the link information of the micro service link from the service message according to the preset field. And determining the micro service link for processing the target service based on the link information.
According to an embodiment of the present disclosure, the service request includes a traffic packet. The format of the service message is not limited, but once the format is formed, the field format of the service message is fixed. The transaction agent processing module can be used for performing format arrangement on the information in the service request or adding corresponding micro-service identification information and micro-service branch identification information according to a fixed format.
For example, the traffic packet may include micro-service identification information such as first identification information of a micro-service, URL link information, and micro-service branch identification information such as second identification information of a micro-service branch.
According to the embodiment of the present disclosure, the link information of the micro service link may be extracted from the service message according to a predetermined field. The link information may include micro service identification information and micro service branch identification information of each of the plurality of micro service branches, a call relationship between the plurality of micro service branches and the like. And then the micro service link for processing the target service can be determined based on the link information.
According to the embodiment of the disclosure, the micro service link of the target service is determined by using the above mode, and the granularity analysis of the abnormal application node in the micro service link is improved while the form is simple and the analysis is convenient.
According to the embodiment of the disclosure, registration and definition management of a single micro service, a single transaction composed of micro services and a single business transaction scene formed by concatenation of multiple transactions can be realized by utilizing a micro service definition module. So as to support control strategies with three different granularities, namely a single transaction scene dimension, a single transaction flow dimension, a single micro-service branch dimension and the like.
According to embodiments of the present disclosure, the microservice definition module may include a transaction scenario definition component, a transaction service registration component, and a single microservice registration component. The target service can be defined in advance by using various components so as to realize that different micro service links are obtained by analyzing from different dimensions based on the service request.
For example, a long-flow transaction scenario can be defined by using a transaction scenario definition component, and a complete customer service flow is embodied by concatenating a plurality of transaction flow information from a service perspective. As shown in the transaction scenario definition table in table 1, the defined fields may include field information such as a transaction scenario name, a transaction scenario code, a transaction chain, and a transaction scenario description, and in an acceptance test stage, each function in a micro service link of a transaction scenario may be conveniently verified.
Table 1 transaction scenario definition table
Figure BDA0003930157900000131
For example, the transaction service registration component can be used to register and define a chain of calling relationships of multiple microservices in one business transaction service. When a developer develops a new business transaction, the micro-business transaction link for the new transaction must be defined. As shown in table 2, the defined fields include transaction code, transaction name, calling transaction name of the micro service, calling code of the micro service, calling sequence of the micro service, calling branch code of the micro service, and calling description.
TABLE 2 micro-service transaction Link Table
Figure BDA0003930157900000132
Also for example, each individual microservice may be defined for registration with a single microservice registration component. Each time a developer develops a new microservice, registration may occur in the component. As shown in table 3, the field information defined mainly includes the micro service name, the micro service URL, the micro service code, the micro service branch code, and the micro service description.
TABLE 3 micro service Branch Table
Figure BDA0003930157900000141
According to an embodiment of the present disclosure, determining the state information of each of the plurality of micro service branches with respect to operation S202 shown in fig. 2 may include the following operations.
For example, based on the identification information of the micro service branch, the state information of the micro service branch matching the identification information is determined from the micro service branch state information table.
According to an embodiment of the present disclosure, the link information includes first identification information of each of the plurality of micro services and second identification information of a micro service branch of each of the micro services. The micro service branch state information table comprises the mapping relation between the identification information and the state information.
According to the embodiment of the disclosure, dynamic proxy forwarding of all service requests can be realized by using an access control scheduling module through soft load balancing technologies such as Haproxy or Nginx. And the module is used for searching from the micro service branch state information table. In response to receiving a service request for processing a target service, the URL is first routed and matched according to a pre-established format, and meanwhile, first identification information of a micro service, such as a micro service code and second identification information of a micro service branch, such as a branch code, in a service message is parsed, and the parsed micro service code and branch code are matched with a micro service branch state information table, which is shown in table 4 below. And determining whether the access prohibition definition of the branch code corresponding to the micro service exists in the current access time from the micro service branch state information table, for example, if the access state is forbidden, determining that the micro service branch is a target micro service branch. The state information of the target micro service branch is used for representing that the target micro service branch is in a forbidden state. If the access state is normal, the micro service branch is a normal branch, and the micro service branch is directly used for carrying out service processing.
Table 4 micro service branch status information table
Figure BDA0003930157900000151
According to an embodiment of the present disclosure, the micro-service branch status information table may be updated as follows.
For example, availability probe information is periodically sent to the target microservice branch. And under the condition that the feedback information from the target micro service branch for the preset times is determined not to be received, determining the current state information of the target micro service branch to be in a forbidden state. And under the condition that the current state information of the target micro service branch is determined to be different from the state information in the micro service branch state information table, updating the state information aiming at the target micro service branch in the micro service branch state information table by using the current state information.
According to the embodiment of the disclosure, the abnormal service monitoring module may be utilized to monitor the feedback information returned by the availability detection information of the target service according to the abnormal service determination rule, so as to determine whether the current state information of the target micro-service branch is in the disabled state.
For example, the abnormal service monitoring module may periodically send availability probe information to the target micro service branch at 20 second intervals, monitor that a certain micro service branch fails to be called or does not receive feedback information from the target micro service branch for more than 5 consecutive times, set the state information of the micro service branch as abnormal, call the access control policy management module to generate policy information corresponding to the abnormal micro service branch, and call the access control disabling policy generation module to generate corresponding control policy configuration. Meanwhile, the mail is sent to inform technicians that some micro-service branch is abnormal, the micro-service branch is recovered after being processed as soon as possible, and specific error reporting information is attached.
According to an embodiment of the present disclosure, in a case that it is determined that current state information of a target micro service branch is different from state information in a micro service branch state information table, updating state information for the target micro service branch in the micro service branch state information table by using the current state information may include: and in the case that the current state information of the target micro service branch, such as the state information for representing the forbidden state, is determined to be different from the state information in the micro service branch state information table, such as the state information for representing the normal state, updating, such as replacing the state information aiming at the target micro service branch in the micro service branch state information table by the current state information.
According to the embodiment of the disclosure, the availability detection information is periodically sent to the target micro-service branch, so that the real-time monitoring of the target micro-service branch can be realized. Under the condition that the current state information of the target micro service branch is different from the state information in the micro service branch state information table, the state information aiming at the target micro service branch in the micro service branch state information table is updated by using the current state information, so that the accuracy and the effectiveness of determining the state information of each micro service branch in the micro service link can be realized, and the service processing capacity is improved.
Fig. 3 schematically shows a flow chart of a processing mode of determining a target service according to an embodiment of the present disclosure.
As shown in fig. 3, determining the processing mode of the target service may include operations S301 to S306.
In operation S301, it is determined whether there is a candidate micro service branch matching the target micro service branch from the at least one second micro service container based on the identification information in the attribute information. In a case where it is determined that there is no candidate micro service branch, operation S302 is performed. In case it is determined that there is a candidate micro service branch, operation S303 is performed.
According to an embodiment of the present disclosure, the target micro service branch is a micro service branch in a first micro service container, the first micro service container being a different micro service container than a second micro service container.
In operation S302, it is determined that the processing mode is a mode of rolling back the service data of the target service.
In operation S303, the frequency of access of the target micro service branch is determined.
In operation S304, it is determined whether the access frequency of the target micro service branch is greater than a predetermined access frequency threshold. In a case where it is determined that the access frequency of the target micro service branch is less than or equal to the predetermined access frequency threshold, S305 is performed. In the case where it is determined that the access frequency of the target micro service branch is greater than the predetermined access frequency threshold, S302 is performed.
In operation S305, a target candidate micro service branch is determined from the candidate micro service branches.
In operation S306, the target candidate micro service branch is called to process the target service.
According to an embodiment of the present disclosure, the processing mode of the target service may include a mode of rolling back service data of the target service. But is not limited thereto. The processing mode of the target service may further include a mode of calling the target candidate micro-service branch to process the target service. The processing mode may be determined based on attribute information of the target micro service branch.
According to an embodiment of the present disclosure, the attribute information of the target micro service branch may include second identification information of the target micro service branch and first identification information of a micro service matching the target micro service branch. But is not limited thereto. The attribute information of the target micro-service branch may further include information such as access frequency, service processing amount, and the like. As long as it is information that can be used to determine the processing mode of the target service.
According to the embodiment of the disclosure, in the case that it is determined that the candidate micro service branch matching the target micro service branch does not exist in the at least one second micro service container, the target service may be processed in a mode of rolling back the service data of the target service.
According to an embodiment of the present disclosure, the mode of rolling back the service data of the target service may include: sending a service return message to the client sending the service request, where the service return includes an access barring information message in a unified format that can adopt standard processing, for example, the access barring information message includes a prompt to the user: prompt message "current access to downstream services is abnormal, normal transaction cannot be performed temporarily, and later attempt is made". Meanwhile, the transaction data of the current target service can be rolled back.
According to an embodiment of the present disclosure, determining whether there is a candidate micro service branch matching a target micro service branch from at least one second micro service container based on identification information in attribute information includes: and determining whether a candidate micro service branch matched with the identification information exists in at least one second micro service container from the micro service configuration information table based on the identification information of the micro service branch.
According to an embodiment of the present disclosure, the micro service configuration information table includes a mapping relationship between the micro service branch identification information of the first micro service container and the identification information of the micro service branch of the second micro service container.
According to the embodiment of the disclosure, in the case that it is determined that the candidate micro service branch exists, it may be determined whether to adopt a mode of calling the target candidate micro service branch to process the target traffic as the processing mode or adopt a mode of rolling back the traffic data of the target traffic as the processing mode according to the access frequency of the micro service branch.
According to the embodiment of the present disclosure, the "URL branch access frequency count table based" as shown in table 5 may be generated by the access frequency on the URL branch within the history period. Through the table 5, different micro-service branch load conditions on the same micro-service container can be checked according to the dimension of the micro-service container. When the micro service branch has a fault, the micro service branch is judged to be in a high-frequency state or a low-frequency state by checking the historical access frequency of the corresponding micro service branch and the calling of other micro service branches in the same container.
Taking a service count within ten minutes as an example, a low frequency state is defined if the frequency of access of a micro service branch is less than 20% of the sum of the frequency of access of all micro service branches within a micro service container, or the absolute value is less than a predetermined frequency of access threshold, e.g., 100. A high frequency state is defined if the frequency of access of a micro service branch is greater than 80% of the sum of the frequency of access of all micro service branches in the micro service container, or the absolute value is greater than a predetermined frequency of access threshold, e.g. 20000.
Table 5 access frequency count table
Service URL linking Microservice code Branch code Service counting
umsp.com.cn/testapi A10801 01 2000/10min
umsp.com.cn/testapi A10801 02 3000/10min
ebankp.com.cn/testapil A20001 01 2000/10min
ecos.com.cn/testapi1 A20002 03 8500/10min
According to the embodiment of the disclosure, when a target micro service branch in a low-frequency state fails, the state information of the target micro service branch is updated to be disabled, a forwarding strategy is generated, the service of the target micro service branch is forwarded to a target candidate micro service branch of a second micro service container, the failure problem is digested by using the target candidate micro service branches on other micro service containers, and the service availability of the target micro service branch is maintained. When the target micro service branch in the high-frequency state fails, in order to prevent other transaction businesses from being influenced, the micro service branch to which the target micro service branch belongs is updated to be in a forbidden state, a forbidden strategy is generated, and the target micro service branch is forbidden. For example, large-area influence operations such as planned application upgrade can be performed, human intervention can be performed, and a disabling strategy is generated according to the whole transaction flow string.
By using the service processing method provided by the embodiment of the disclosure, fine-grained analysis and targeted processing can be performed, so that an effective and rapid service processing mode is generated, the capability of processing a target service is improved, and the user experience is improved.
According to an exemplary embodiment of the present disclosure, the candidate micro service branch includes a plurality. Determining a target candidate micro-service branch from the candidate micro-service branches may include the following operations.
For example, available throughput for each of a plurality of candidate micro-service branches is determined. And sorting according to the sequence of the available processing capacity from high to low to obtain a sorting result of the available processing capacity. And taking the candidate micro-service branch ranked at the head as a target candidate micro-service branch.
According to embodiments of the present disclosure, available throughput may refer to the currently loadable capability. The available throughput may be determined by using the prior art, but is not limited thereto, and the difference obtained by subtracting the current access frequency from the maximum access frequency of the candidate micro service branch may be used as the available throughput. The current access frequency may be determined by the frequency of access on the URL branch over the history period.
By using the determination method of the target candidate micro-service branch provided by the embodiment of the disclosure, the target service can be ensured to be processed without feeling and smoothly by the front-end client, and the candidate micro-service branch with the largest available processing capacity is used as the target candidate micro-service branch, so that the processing efficiency is improved.
It should be noted that, unless explicitly stated that there is an execution sequence between different operations or there is an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may not be sequential, or multiple operations may be executed simultaneously in the flowchart in this disclosure.
Fig. 4 schematically shows a block diagram of a traffic processing device according to an embodiment of the present disclosure.
As shown in fig. 4, the service processing apparatus 400 includes: a link determination module 410, a state determination module 420, and a mode determination module 430.
A link determining module 410, configured to determine, in response to receiving a service request for processing a target service, a micro service link for processing the target service based on link information in the service request, where the micro service link includes micro service branches of each of a plurality of micro services;
a state determining module 420, configured to determine state information of each of the plurality of micro service branches; and
and the mode determining module 430 is configured to determine a processing mode for the target traffic based on the attribute information of the target micro service branch in response to determining that the state information of the target micro service branch is used to characterize that the target micro service branch is in the disabled state.
According to an embodiment of the present disclosure, the processing mode of the target service includes a mode of rolling back service data of the target service.
According to an embodiment of the present disclosure, the mode determination module includes: a first candidate determination sub-module and a rollback sub-module.
And the first candidate determining submodule is used for determining whether a candidate micro service branch matched with a target micro service branch exists in at least one second micro service container or not based on the identification information in the attribute information, wherein the target micro service branch is a micro service branch in a first micro service container, and the first micro service container is a micro service container different from the second micro service container.
And the rollback sub-module is used for determining that the processing mode is the mode of rolling back the service data of the target service under the condition that the candidate micro service branch does not exist.
According to an embodiment of the present disclosure, the processing mode of the target service includes a mode of calling the target candidate micro service branch to process the target service.
According to an embodiment of the present disclosure, the mode determination module includes: a second candidate determining sub-module, a frequency determining sub-module, a branch determining sub-module, and a calling sub-module.
And the second candidate determining submodule is used for determining whether a candidate micro service branch matched with a target micro service branch exists in at least one second micro service container or not based on the identification information in the attribute information, wherein the target micro service branch is a micro service branch in the first micro service container, and the first micro service container is a micro service container different from the second micro service container.
And the frequency determining submodule is used for determining the access frequency of the target micro service branch under the condition that the candidate micro service branch is determined to exist.
And the branch determining submodule is used for determining a target candidate micro service branch from the candidate micro service branches under the condition that the access frequency of the target micro service branch is determined to be less than or equal to a preset access frequency threshold.
And the calling submodule is used for calling the target candidate micro-service branch to process the target service.
According to an embodiment of the present disclosure, the candidate micro service branch includes a plurality.
According to an embodiment of the present disclosure, the branch determination submodule includes: an available amount determining unit, a sorting unit and a branch determining unit.
And the available amount determining unit is used for determining the available processing amount of each of the plurality of candidate micro service branches.
And the sequencing unit is used for sequencing according to the sequence of the available processing capacity from high to low to obtain a sequencing result of the available processing capacity.
And the branch determining unit is used for taking the candidate micro-service branch ranked at the head as a target candidate micro-service branch.
According to an embodiment of the present disclosure, the link information includes first identification information of each of the plurality of micro services and second identification information of a micro service branch of each of the micro services.
According to an embodiment of the present disclosure, the state determination module includes: a state determination unit.
And the state determining unit is used for determining the state information of the micro service branch matched with the identification information from the micro service branch state information table based on the identification information of the micro service branch, wherein the micro service branch state information table comprises the mapping relation between the identification information and the state information.
According to the embodiment of the present disclosure, the service processing apparatus further includes: the device comprises a detection module, a forbidding determination module and an updating module.
And the detection module is used for periodically sending the availability detection information to the target micro-service branch.
And the forbidding determining module is used for determining the current state information of the target micro service branch to be in the forbidding state under the condition of determining that the feedback information from the target micro service branch for the preset times is not received.
And the updating module is used for updating the state information aiming at the target micro service branch in the micro service branch state information table by using the current state information under the condition that the current state information of the target micro service branch is determined to be different from the state information in the micro service branch state information table.
According to an embodiment of the disclosure, the link determining module includes: the system comprises an acquisition submodule, an extraction submodule and a link determination submodule.
And the obtaining submodule is used for responding to the received service request for processing the target service and obtaining the service message in the service request, wherein the field format of the service message is fixed.
And the extraction submodule is used for extracting the link information of the micro-service link from the service message according to the preset field.
And the link determining submodule is used for determining the micro service link for processing the target service based on the link information.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be implemented at least partly as a computer program module, which when executed, may perform a corresponding function.
For example, any number of the link determination module 410, the state determination module 420, and the mode determination module 430 may be combined in one module/unit/sub-unit to be implemented, or any one of the modules/units/sub-units may be split into multiple modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the link determination module 410, the state determination module 420, and the mode determination module 430 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, at least one of the link determination module 410, the state determination module 420 and the mode determination module 430 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
It should be noted that, the service processing apparatus portion in the embodiment of the present disclosure corresponds to the service processing method portion in the embodiment of the present disclosure, and the description of the service processing apparatus portion specifically refers to the service processing method portion, which is not described herein again.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. Processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are stored. The processor 501, the ROM502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to embodiments of the present disclosure by executing programs in the ROM502 and/or RAM 503. Note that the programs may also be stored in one or more memories other than the ROM502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, electronic device 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the electronic device of the embodiments of the present disclosure when executed by the processor 501. According to embodiments of the present disclosure, the electronic devices, apparatuses, devices, modules, units, and the like described above may be realized by computer program modules.
The present disclosure also provides a computer-readable storage medium, which may be embodied in the device/apparatus/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, 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.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM502 and/or RAM 503 and/or one or more memories other than ROM502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being configured to cause the electronic device to implement the business processing method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 501, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The above described systems, devices, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 509, and/or installed from the removable medium 511. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A service processing method comprises the following steps:
in response to receiving a service request for processing a target service, determining a micro service link for processing the target service based on link information in the service request, wherein the micro service link comprises micro service branches of each of a plurality of micro services;
determining respective state information of a plurality of the micro-service branches; and
in response to determining that state information of a target micro service branch is used to characterize the target micro service branch as being in a disabled state, determining a processing mode for the target traffic based on attribute information of the target micro service branch.
2. The method of claim 1, wherein the processing mode of the target service comprises a mode of rolling back traffic data of the target service;
the determining a processing mode for the target service based on the attribute information of the target micro service branch comprises:
determining whether a candidate micro service branch matched with the target micro service branch exists in at least one second micro service container based on the identification information in the attribute information, wherein the target micro service branch is a micro service branch in a first micro service container, and the first micro service container is a micro service container different from the second micro service container; and
determining the processing mode to be a mode of rolling back the service data of the target service under the condition that the candidate micro service branch does not exist.
3. The method of claim 1, wherein the processing mode of the target traffic comprises a mode of invoking a target candidate micro-service branch to process the target traffic;
the determining a processing mode for the target service based on the attribute information of the target micro service branch comprises:
determining whether a candidate micro-service branch matched with the target micro-service branch exists in at least one second micro-service container based on the identification information in the attribute information, wherein the target micro-service branch is a micro-service branch in a first micro-service container, and the first micro-service container is a micro-service container different from the second micro-service container;
determining an access frequency of the target micro service branch if it is determined that the candidate micro service branch exists;
determining the target candidate micro service branch from the candidate micro service branches if the access frequency of the target micro service branch is determined to be less than or equal to a predetermined access frequency threshold; and
and calling the target candidate micro-service branch to process the target service.
4. The method of claim 3, wherein the candidate micro-service branch comprises a plurality;
the determining the target candidate micro service branch from the candidate micro service branches comprises:
determining available throughput for each of a plurality of the candidate micro-service branches;
sorting according to the sequence of the available processing capacity from high to low to obtain a sorting result of the available processing capacity; and
and taking the candidate micro service branch ranked at the head as the target candidate micro service branch.
5. The method of claim 1, wherein the link information comprises first identification information of each of the plurality of microservices and second identification information of a microservice leg of each of the microservices;
the determining the state information of each of the plurality of micro service branches includes:
and determining the state information of the micro service branch matched with the identification information from a micro service branch state information table based on the identification information of the micro service branch, wherein the micro service branch state information table comprises the mapping relation between the identification information and the state information.
6. The method of claim 5, further comprising:
periodically sending availability probe information to the target micro-service branch;
determining that the current state information of the target micro service branch is in a forbidden state under the condition that the feedback information from the target micro service branch for the preset times is determined not to be received; and
and under the condition that the current state information of the target micro service branch is determined to be different from the state information in the micro service branch state information table, updating the state information aiming at the target micro service branch in the micro service branch state information table by using the current state information.
7. The method of claim 1, wherein the determining, in response to receiving a service request to process a target traffic, a micro-service link to process the target traffic based on link information in the service request comprises:
responding to a received service request for processing the target service, and acquiring a service message in the service request, wherein the field format of the service message is fixed;
extracting link information of the micro service link from the service message according to a preset field; and
and determining a micro service link for processing the target service based on the link information.
8. A traffic processing apparatus, comprising:
the link determining module is used for responding to the received service request for processing the target business and determining a micro service link for processing the target business based on link information in the service request, wherein the micro service link comprises micro service branches of each of a plurality of micro services;
a state determining module, configured to determine state information of each of the micro service branches; and
and the mode determining module is used for responding to the state information of the target micro service branch for representing that the target micro service branch is in the forbidden state, and determining the processing mode aiming at the target business based on the attribute information of the target micro service branch.
9. An electronic device, comprising:
one or more processors;
a memory to store one or more instructions that,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202211388592.XA 2022-11-07 2022-11-07 Service processing method, device, electronic equipment and medium Pending CN115914400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211388592.XA CN115914400A (en) 2022-11-07 2022-11-07 Service processing method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211388592.XA CN115914400A (en) 2022-11-07 2022-11-07 Service processing method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115914400A true CN115914400A (en) 2023-04-04

Family

ID=86490585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211388592.XA Pending CN115914400A (en) 2022-11-07 2022-11-07 Service processing method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115914400A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009086906A (en) * 2007-09-28 2009-04-23 Nec Corp Data processing device and system, user portable terminal, sales processing terminal, computer program and data processing method
JP2011175534A (en) * 2010-02-25 2011-09-08 Mitsubishi Electric Corp Process execution device, computer program, and process execution method
US20140089390A1 (en) * 2012-09-24 2014-03-27 Empire Technology Development Llc Decentralized cloud workflows
US20190340059A1 (en) * 2018-05-02 2019-11-07 International Business Machines Corporation Isolating service issues in a microservice architecture
CN111104260A (en) * 2019-12-30 2020-05-05 北京三快在线科技有限公司 Service upgrade monitoring method, device, server and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN112671882A (en) * 2020-12-18 2021-04-16 上海安畅网络科技股份有限公司 Same-city double-activity system and method based on micro-service
WO2021077506A1 (en) * 2019-10-23 2021-04-29 平安科技(深圳)有限公司 Micro-service call chain concretization method and device, electronic device and storage medium
CN113110975A (en) * 2021-04-19 2021-07-13 中国工商银行股份有限公司 Data access method, device, equipment and medium
US20220138217A1 (en) * 2021-01-20 2022-05-05 Beijing Baidu Netcom Science Technology Co., Ltd. Data processing method, electronic equipment and storage medium
CN114760233A (en) * 2022-03-22 2022-07-15 中国工商银行股份有限公司 Service processing method and device, electronic equipment and storage medium
CN115037653A (en) * 2022-06-28 2022-09-09 北京奇艺世纪科技有限公司 Service flow monitoring method and device, electronic equipment and storage medium
CN115237960A (en) * 2022-08-10 2022-10-25 中国工商银行股份有限公司 Information pushing method and device, storage medium and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009086906A (en) * 2007-09-28 2009-04-23 Nec Corp Data processing device and system, user portable terminal, sales processing terminal, computer program and data processing method
JP2011175534A (en) * 2010-02-25 2011-09-08 Mitsubishi Electric Corp Process execution device, computer program, and process execution method
US20140089390A1 (en) * 2012-09-24 2014-03-27 Empire Technology Development Llc Decentralized cloud workflows
US20190340059A1 (en) * 2018-05-02 2019-11-07 International Business Machines Corporation Isolating service issues in a microservice architecture
WO2021077506A1 (en) * 2019-10-23 2021-04-29 平安科技(深圳)有限公司 Micro-service call chain concretization method and device, electronic device and storage medium
CN111104260A (en) * 2019-12-30 2020-05-05 北京三快在线科技有限公司 Service upgrade monitoring method, device, server and storage medium
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN112671882A (en) * 2020-12-18 2021-04-16 上海安畅网络科技股份有限公司 Same-city double-activity system and method based on micro-service
US20220138217A1 (en) * 2021-01-20 2022-05-05 Beijing Baidu Netcom Science Technology Co., Ltd. Data processing method, electronic equipment and storage medium
CN113110975A (en) * 2021-04-19 2021-07-13 中国工商银行股份有限公司 Data access method, device, equipment and medium
CN114760233A (en) * 2022-03-22 2022-07-15 中国工商银行股份有限公司 Service processing method and device, electronic equipment and storage medium
CN115037653A (en) * 2022-06-28 2022-09-09 北京奇艺世纪科技有限公司 Service flow monitoring method and device, electronic equipment and storage medium
CN115237960A (en) * 2022-08-10 2022-10-25 中国工商银行股份有限公司 Information pushing method and device, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵建涛等: "微服务故障诊断相关技术研究探讨", 网络新媒体技术, 15 January 2020 (2020-01-15) *

Similar Documents

Publication Publication Date Title
US9413597B2 (en) Method and system for providing aggregated network alarms
US11656959B2 (en) Disaster recovery region recommendation system and method
CN114172966B (en) Service calling method, service processing method and device under unitized architecture
CN113094081B (en) Software release method, device, computer system and computer readable storage medium
CN113342560A (en) Fault processing method, system, electronic equipment and storage medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN116483888A (en) Program evaluation method and device, electronic equipment and computer readable storage medium
CN113296911B (en) Cluster calling method, cluster calling device, electronic equipment and readable storage medium
CN115914400A (en) Service processing method, device, electronic equipment and medium
CN115202973A (en) Application running state determining method and device, electronic equipment and medium
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN114237821A (en) Self-discovery method and device for Kubernetes container cluster, electronic device and storage medium
CN113127363A (en) Parameter adjusting method, parameter adjusting device, electronic device and readable storage medium
CN115190008B (en) Fault processing method, fault processing device, electronic equipment and storage medium
CN113485930B (en) Business process verification method, device, computer system and readable storage medium
CN114567537B (en) Information processing method, device, equipment and medium
CN116467209A (en) Performance test method, device, equipment and storage medium
CN114064484A (en) Interface testing method and device, electronic equipment and readable storage medium
CN116225714A (en) Information processing method, device, equipment and storage medium
CN114817073A (en) Automated testing method, apparatus, device, medium, and program product
CN116226236A (en) Information verification method and device, electronic equipment and computer readable storage medium
CN116737539A (en) Program testing method and device, electronic equipment and computer readable storage medium
CN115168089A (en) Fault processing method and device, electronic equipment and computer readable storage medium
CN116107791A (en) Test environment fault node repairing method and device
CN116719538A (en) Version deployment consistency verification method and device

Legal Events

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