CN114285844A - Method and device for intelligently fusing server interface, electronic equipment and storage medium - Google Patents

Method and device for intelligently fusing server interface, electronic equipment and storage medium Download PDF

Info

Publication number
CN114285844A
CN114285844A CN202111483882.8A CN202111483882A CN114285844A CN 114285844 A CN114285844 A CN 114285844A CN 202111483882 A CN202111483882 A CN 202111483882A CN 114285844 A CN114285844 A CN 114285844A
Authority
CN
China
Prior art keywords
interface
fusing
server
failure rate
core
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
CN202111483882.8A
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.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Oribo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Oribo Technology Co Ltd filed Critical Shenzhen Oribo Technology Co Ltd
Priority to CN202111483882.8A priority Critical patent/CN114285844A/en
Publication of CN114285844A publication Critical patent/CN114285844A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a method and a device for intelligently fusing a server interface, electronic equipment and a storage medium. The method comprises the following steps: acquiring a fusing judgment parameter, wherein the fusing judgment parameter comprises: determining a target interface to be fused in at least one server interface if the fusing judgment parameter meets the fusing condition; and carrying out fusing operation on the target interface. This application judges the parameter through two fusing of setting up server abnormal proportion and interface call failure rate to and corresponding fusing condition, can realize opening fusing mechanism under the specific scene, carries out fusing operation to the target interface who determines, forbids to visit this target interface in a period, can alleviate the access pressure of server to a certain extent, and guarantee that other interfaces except the target interface can normally work.

Description

Method and device for intelligently fusing server interface, electronic equipment and storage medium
Technical Field
The present application relates to the field of server technologies, and in particular, to a method and an apparatus for intelligently fusing a server interface, an electronic device, and a storage medium.
Background
High concurrency refers to a situation where many users access the same Application Programming Interface (API) or the same Uniform Resource Locator (URL address) at the same time point.
In the current society with the vigorous development of the internet of things, the life of all things interconnection is merged into the life of thousands of households, and accordingly more and more intelligent devices and various application software are connected into cloud services, and the corresponding number of users, the number of devices and the amount of application data start to increase rapidly, so that interface calling fails under the condition of high concurrency, and the whole service is unavailable or the service is in an intermittent state. For example, when a shopping website has a promotional activity, a large number of users submit orders, and the phenomenon that the orders cannot be submitted or the orders are submitted unsuccessfully occurs, which affects the online shopping experience of the users.
Disclosure of Invention
The embodiment of the application provides a method and a device for intelligently fusing a server interface, electronic equipment and a storage medium.
In a first aspect, some embodiments of the present application provide a method for intelligent fusing of a server interface, where the method is applied to a service server, and the method includes: acquiring a fusing judgment parameter, wherein the fusing judgment parameter comprises: the server exception proportion and the previous item or the two items in the interface calling failure rate of at least one server interface are used for representing the ratio of the number of the service servers in the exception state to the total number of the service servers, and the calling failure rate of the server interface is used for representing the proportion of the failed calling times of the server interface to the total calling times; if the fusing judgment parameter meets the fusing condition, determining a target interface to be fused in at least one server interface; and carrying out fusing operation on the target interface.
In a second aspect, some embodiments of the present application further provide an apparatus for intelligently fusing a server interface, where the apparatus is applied to a service server, and the apparatus includes: the device comprises a parameter acquisition module, an interface determination module and a fusing execution module. Wherein, parameter acquisition module is used for acquireing fusing judgement parameter, and fusing judgement parameter includes: the server exception proportion and the interface call failure rate of at least one server interface are the former one or both, the server exception proportion is used for representing the ratio of the number of the service servers in the exception state to the total number of the service servers, and the call failure rate of the server interface is used for representing the proportion of the failed call times of the server interface to the total call times. The interface determining module is used for determining a target interface to be fused in at least one server interface if the fusing judgment parameter meets the fusing condition. And the fusing execution module is used for fusing the target interface.
In a third aspect, some embodiments of the present application further provide an electronic device, including: one or more processors, memory, and one or more applications. Wherein one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method for server interface intelligent fusing described above.
In a fourth aspect, some embodiments of the present application further provide a computer-readable storage medium having program code stored thereon. The method for intelligently fusing the server interface is executed when the program code is run by the processor.
In a fifth aspect, some embodiments of the present application further provide a computer program product, which when executed, implements the method for intelligent fusing of a server interface described above.
The application provides a fusing judgment parameter and a fusing condition corresponding to the fusing judgment parameter, determines a target interface needing fusing under the condition that the fusing judgment parameter meets the fusing condition, and performs fusing operation on the target interface, wherein the fusing judgment parameter comprises the previous item or all two items in server abnormal proportion and interface calling failure rate of at least one server interface; the fusing judgment parameters of the server abnormal proportion and the interface calling failure rate and the corresponding fusing conditions are set, so that a fusing mechanism can be started under a specific scene, for example, in a scene with a higher server abnormal proportion and a scene with a higher interface calling failure rate, fusing operation is carried out on a determined target interface, the target interface is forbidden to be accessed within a period of time, the access pressure of the server can be relieved to a certain extent, and other interfaces except the target interface can be ensured to normally work.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows an application environment schematic diagram of a method for intelligent fusing of a server interface provided by an embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for intelligent fusing of a server interface according to a first embodiment of the present application.
Fig. 3 is a flowchart illustrating a method for intelligent fusing of a server interface according to a second embodiment of the present application.
Fig. 4 is a flowchart illustrating a method for intelligent fusing of a server interface according to a third embodiment of the present application.
Fig. 5 is a flowchart illustrating a method for intelligent fusing of a server interface according to a fourth embodiment of the present application.
Fig. 6 is a schematic diagram illustrating a method for intelligent fusing of a server interface according to a fifth embodiment of the present application.
Fig. 7 shows a block diagram of a device for intelligently fusing a server interface according to an embodiment of the present application.
Fig. 8 shows a block diagram of an electronic device provided in an embodiment of the present application.
Fig. 9 illustrates a block diagram of modules of a computer-readable storage medium provided by an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application provides a method and a device for intelligently fusing a server interface, electronic equipment and a storage medium, wherein a fusing judgment parameter and a fusing condition corresponding to the fusing judgment parameter are provided, a target interface needing fusing is determined and fusing operation is carried out on the target interface under the condition that the fusing judgment parameter is judged to meet the fusing condition, and the fusing judgment parameter comprises the former item or the whole two items of the abnormal proportion of a server and the interface calling failure rate of at least one server interface; the fusing judgment parameters of the server abnormal proportion and the interface calling failure rate and the corresponding fusing conditions are set, so that a fusing mechanism can be started under a specific scene, for example, in a scene with a higher server abnormal proportion and a scene with a higher interface calling failure rate, fusing operation is carried out on a determined target interface, the target interface is forbidden to be accessed within a period of time, the access pressure of the server can be relieved to a certain extent, and other interfaces except the target interface can be ensured to normally work.
For the convenience of describing the scheme of the present application in detail, the following description will first describe an application environment in the embodiments of the present application with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic view of an application environment of a method for intelligently fusing a server interface according to an embodiment of the present application, where the method for intelligently fusing a server interface according to the embodiment of the present application can be applied to a server system 100 shown in the figure, where the server system 100 includes: one or more business servers 10 and a cloud server 20.
The service server 10 refers to a server that provides at least one service. According to the difference of importance of services, the services can be divided into core services and non-core services. The service server 10 includes a plurality of server interfaces corresponding to the services one to one, where the server interfaces are used to access the corresponding services in the service server, the interface corresponding to the core service is a core interface, and the interface corresponding to the non-core service is a non-core interface.
Illustratively, taking a server that the service server 10 provides login function service for a certain shopping webpage as an example, the service corresponding to the service server 10 includes user login service, new user registration service and user password modification service. The user login service is a core service of the service server 10, and the corresponding interface is a core interface. The new user registration service and the user password modification service are non-core services of the service server 10, and the interfaces corresponding to the new user registration service and the user password modification service are non-core interfaces respectively.
In the embodiment of the present application, a fusing mechanism is designed for the server interfaces in the service server 10, that is, when the fusing determination parameter of the service server 10 meets the fusing condition, a fusing operation is performed on at least one server interface. The server interface is blown out and cannot respond to the call request, that is, the service server 10 does not respond to the call request for the blown server interface, so that the access pressure of the server can be relieved to a certain extent.
The cloud server 20 and the one or more service servers 10 establish communication connection in a wired or wireless manner.
The cloud server 20 mainly provides services such as data backup, device status monitoring, and data processing for the service server 10. In the present embodiment, the cloud server 20 is configured to monitor whether an abnormality occurs in the operating states of the plurality of service servers 10, where the abnormal state includes a high concurrency state, a network abnormal state, and the like. For example, the cloud server 20 may monitor the access amount of each server interface in the service server 10 in real time, and in a case where the access amount is high, determine the operating state of the service server 10 as a high concurrency state. In other possible embodiments, the cloud server 20 is further configured to send status information of the service servers to the service servers 10, where the status information includes an operating status of one or more service servers 10, so that the service servers 10 can obtain a fusing judgment parameter, which is a server anomaly ratio.
As shown in fig. 2, fig. 2 schematically illustrates a method for intelligent fusing of a server interface according to a first embodiment of the present application. The method is applied to the service server in fig. 1, and may include the following steps S210 to S230.
Step S210: and acquiring fusing judgment parameters.
The fusing judgment parameters comprise the former item or the whole two items in the abnormal proportion of the server and the interface calling failure rate of at least one server interface.
The server anomaly ratio is used for representing the ratio of the number of the service servers in the anomaly state to the total number of the service servers. In some embodiments, the service server receives service server state information sent by the cloud server within a first preset time period, where the service server state information includes state information of all service servers in communication connection with the cloud server within the first preset time period. From the service server state information, the service server may determine the number of service servers in an abnormal state within a first preset time period, and further determine an abnormal ratio of the servers. Illustratively, the total number of the service servers in communication connection with the cloud server is 5, and the number of the service servers in an abnormal state in the current time period is 3, so that the abnormal proportion of the servers is 60%.
The first preset time period is a time period before the current time and with a time length of a first preset time length. The first preset duration may be set by the service server by default, or may be determined based on the network status, the concurrency number, and the like of the service server itself. For example, when the network condition of the service server is poor and the concurrency number is high, the first preset duration is short, so that the service server can fuse part of the server interfaces in time to adapt to the processing capability of the service server. Illustratively, for example, the first predetermined period of time is the last half hour.
The calling failure rate of the server interface is used for representing the proportion of the number of failed calling times of the server interface to the total number of calling times. In some embodiments, the service server records the total number of calls and the number of failed calls of each server interface within a second preset time period to calculate the call failure rate of each server interface. Taking the second preset time length as 5s as an example, if the total number of calls of a certain server interface in the service server within 5s is 100, and the number of failed calls is 20, the call failure rate corresponding to the server interface is 20%.
The second predetermined time period is a time period before the current time and with a time length of a second preset time length. The second preset time duration may be set by the service server by default, or may be determined based on the network status, the concurrency number, and the like of the service server itself. For example, when the network condition of the service server is poor and the number of the concurrency is high, the second preset duration is short, so that the service server can fuse part of the server interfaces in time to adapt to the processing capability of the service server. Illustratively, the second predetermined period of time is, for example, the last half hour.
In some embodiments, the service server detects whether the service server is in a high concurrency state, and if the service server is in the high concurrency state, the step of obtaining the fusing judgment parameter is performed. The high concurrency state is used for representing a state that the number of the access requests received by the service server is larger than the preset number in the third preset time period. The third preset time period is a time period before the current time and the time length is the third preset time length. The preset number is set according to experiments or experience. Illustratively, taking the third preset time duration as 10s and the preset number as 200, if the number of the access requests received by the service server is 300, it is determined that the service server is in a high concurrency state, and then the step of obtaining the fusing judgment parameter is executed. By the method, the fusing mechanism can be triggered in a high-concurrency scene, so that the processing pressure of the service server can be relieved by fusing operation on partial server interfaces in the high-concurrency scene.
In other embodiments, the service server detects whether the network is in an abnormal state, and if the current network is in the abnormal state, the step of obtaining the fusing judgment parameter is executed. The network abnormal state of the service server represents a state in which the service server cannot be accessed within a period of time, or a state in which the response speed of the service server is low. By the method, the fusing mechanism can be triggered in the network abnormal scene, so that the processing pressure of the service server can be relieved by fusing operation on partial server interfaces in the network abnormal scene.
Step S220: and if the fusing judgment parameter meets the fusing condition, determining a target interface to be fused in at least one server interface.
The fusing condition is used for representing a condition that the fusing judgment parameter should meet under the condition that the fusing operation is determined to be performed on at least one server interface. Under the condition that the fusing judgment parameter meets the fusing condition, the business server determines a target interface to be fused in at least one server interface; and under the condition that the fusing judgment parameter does not meet the fusing condition, the service server normally works.
In some embodiments, the fusing judgment parameter includes a server abnormal proportion, and under the condition that the server abnormal proportion meets a corresponding fusing condition, at least one server interface in the service server is determined as a target interface to be fused; and under the condition that the abnormal proportion of the server does not meet the corresponding fusing condition, the service server normally works. The fusing conditions corresponding to the server exception rate are set forth in the examples below.
In other embodiments, the fusing determination parameter includes an interface call failure rate of at least one server interface, and when the interface call failure rate of at least one server interface meets the corresponding fusing condition, the server interface corresponding to the interface call failure rate is determined as a target interface to be fused; and under the condition that the interface calling failure rate of the server interface does not meet the corresponding fusing condition, the service server normally works. The fusing conditions corresponding to the interface call failure rate of at least one server interface are described in the following embodiments.
Step S230: and carrying out fusing operation on the target interface.
After the target interface is fused, the service server does not respond to the call request any more, that is, the service server does not respond to the call request aiming at the fused server interface. By the method, the processing pressure of the service server can be relieved to a certain extent, and the call requests of the server interfaces except the target interface can be processed in time.
In some embodiments, the fusing operation of the target interface is achieved by setting a fusing switch of the target interface to an open state.
In some embodiments, when the service server performs the fusing operation on the target interface, it is further required to set a fusing duration of the target interface. In one possible implementation, the fusing duration is set by the service server as a default. In another implementation manner, the fusing duration is determined based on the concurrency number of the service servers, and the fusing duration is larger if the concurrency number of the service servers is larger, and the fusing duration is smaller if the concurrency number of the service servers is smaller. In another embodiment, the fusing duration is determined based on the network quality of the service server, and the fusing duration is larger when the network quality of the service server is worse, and the fusing duration is smaller when the network quality of the service server is smaller. In another implementation, the fusing duration is dynamically adjusted, the service server obtains fusing judgment parameters every preset duration, and under the condition that any one of the fusing judgment parameters does not meet the fusing condition, the fusing operation is stopped being executed on the target interface.
In the case of setting the fusing duration, after the fusing operation on the target interface is stopped, the execution may be resumed from step S210 described above, so as to implement continuous monitoring on the service server.
The embodiment of the application provides a method for intelligently fusing a server interface, which comprises the steps of providing a fusing judgment parameter and a fusing condition corresponding to the fusing judgment parameter, determining a target interface needing fusing under the condition that the fusing judgment parameter is judged to meet the fusing condition, and fusing the target interface, wherein the fusing judgment parameter comprises the previous item or all two items in server abnormal proportion and interface calling failure rate of at least one server interface; the fusing judgment parameters of the server abnormal proportion and the interface calling failure rate and the corresponding fusing conditions are set, so that a fusing mechanism can be started under a specific scene, for example, in a scene with a higher server abnormal proportion and a scene with a higher interface calling failure rate, fusing operation is carried out on a determined target interface, the target interface is forbidden to be accessed within a period of time, the access pressure of the server can be relieved to a certain extent, and other interfaces except the target interface can be ensured to normally work.
The following describes a case where the fusing determination parameter includes the server abnormal ratio. As shown in fig. 3, fig. 3 schematically illustrates a method for intelligent fusing of a server interface according to a second embodiment of the present application. The method is applied to the service server in fig. 1, and may include the following steps S310 to S330.
Step S310: and acquiring the abnormal proportion of the server.
The specific implementation process of step S310 refers to the description in step S210, and is not described in detail herein.
Step S320: and if the abnormal proportion of the server is larger than or equal to the preset abnormal proportion, determining that the fusing judgment parameter meets the fusing condition, and determining the non-core interface as the target interface.
The preset abnormal proportion is set by the service server in a default mode or is set by a technician in a self-defined mode. For example, the preset abnormality ratio may be any value of more than 30% and less than or equal to 100%. The non-core interface is a server interface corresponding to the non-core service, and the service server may mark in advance whether each service is a core service or a non-core service, and then determine the non-core interface based on the mark content.
When the abnormal proportion of the server is larger than or equal to the preset abnormal proportion, the fusing judgment parameter meets the fusing condition, and the non-core interface is determined as a target interface; and when the abnormal proportion of the server is smaller than the preset abnormal proportion, the fusing judgment parameter does not meet the fusing condition, and the target interface to be fused does not need to be determined. Taking the preset abnormal proportion as 50% as an example, if the abnormal proportion of the server is 60%, determining that the fusing judgment parameter meets the fusing condition.
In one embodiment, in the case that the server abnormal proportion meets the fusing condition, all the non-core interfaces in the service server are determined as target interfaces. With reference to the example in the embodiment of fig. 1, when the server abnormal proportion meets the fusing condition, the non-core interfaces corresponding to the two non-core tasks, i.e., the new user registration service and the user password modification service, are determined as target interfaces to be fused.
In another embodiment, in the case that the server abnormal proportion meets the fusing condition, at least one target interface is determined from all the non-core interfaces of the service server based on a predetermined rule. The predetermined rules include, but are not limited to: selecting one or more non-core interfaces with the least number of requests, selecting one or more non-core interfaces with the highest interface call failure rate, and the like.
In this embodiment, when the abnormal proportion of the server meets the fusing condition, the non-core interface in the service server is set as the target interface to be fused, on one hand, the core interface cannot be fused, so that the core service in the service server can be ensured to continue, and on the other hand, the load of the service server can be reduced, so that the core service can be executed by the service server more quickly.
Step S330: a first notification message is broadcast.
The first notification message is used for notifying the non-core interface to perform the fusing operation. Since the fusing judgment parameter, which is the abnormal server ratio, is not known by the non-core interface, the non-core interface needs to be notified to perform the fusing operation when the abnormal server ratio satisfies the fusing condition.
In other possible implementation manners, each server interface corresponds to a unique Uniform Resource Locator (URL) address, the service server can determine a URL address corresponding to the non-core interface by searching a mapping table between the server interface and the URL address, and then send a message for notifying the non-core interface of fusing based on the URL address corresponding to the non-core interface to each non-core interface.
Step S340: and performing fusing operation on the non-core interface based on the first notification message.
For reference to the description in step S230, the specific implementation process of performing the fusing operation on the non-core interface is not described in detail herein.
In this embodiment, the server abnormal proportion is used as a fusing judgment parameter, so that the access states of all service servers can be monitored on the whole, and when the server abnormal proportion meets the fusing condition, a first notification message is sent to notify all non-core interfaces of the corresponding server to fuse, so that the core interfaces can be normally accessed, and the core services corresponding to the core interfaces are ensured not to be interrupted.
The following describes a case where the fusing determination parameter includes an interface call failure rate of at least one server interface. As shown in fig. 4, fig. 4 schematically illustrates a method for intelligent fusing of a server interface according to a third embodiment of the present application. The method is applied to the service server in fig. 1, and may include the following steps S410 to S430.
Step S410: and acquiring the interface calling failure rate of at least one server interface.
The specific implementation process of step S410 refers to the description in step S210, and is not described in detail herein.
Step S420: and if the interface calling failure rate is greater than or equal to the preset calling failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining at least one server interface corresponding to the interface calling failure rate as a target interface.
The preset call failure rate is automatically set by the service server or is self-defined by technicians. For example, the first preset call failure rate may be any value greater than 20% and less than or equal to 80%.
The service server can monitor the interface call failure rate of the server interface of the service server in real time, and can also detect the interface call failure rate of the server interface at intervals of preset time.
When the interface calling failure rate is greater than or equal to the preset calling failure rate, indicating that the fusing judgment parameter meets the fusing condition, and determining at least one server interface corresponding to the interface calling failure rate as a target interface; and when the interface calling failure rate is less than the preset calling failure rate, the fusing judgment parameter does not meet the fusing condition, and the target interface to be fused does not need to be determined.
In some embodiments, the service server sets different preset call failure rates for the core interface and the non-core interface. Optionally, the preset call failure rate corresponding to the core interface is a first preset call failure rate, and the preset call failure rate corresponding to the non-core interface is a second preset call failure rate. The second predetermined call failure rate is greater than or equal to the first predetermined call failure rate. For example, the first predetermined call failure rate is 40%, and the second predetermined call failure rate is 60%. Because the service importance corresponding to the non-core interface is lower than the service importance corresponding to the core interface, compared with the first preset calling failure rate, the second preset calling failure rate can be set to be relatively larger, and the situation that the non-core interface is frequently fused under the condition that the second preset calling failure rate is set to be too small, so that a user cannot normally access the non-core interface is avoided.
When the server interface is the core interface, step S420 includes step S4201: and if the interface call failure rate of the core interface is greater than or equal to the first preset call failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining the corresponding core interface as the target interface.
The first preset call failure rate is automatically set by the service server or is self-defined by a technician. The service server may monitor in real time whether the interface call failure rate of the core interface is greater than or equal to a first preset call failure rate, or may detect, every preset time, whether the interface call failure rate of the core interface is greater than or equal to the first preset call failure rate.
With reference to the example in the embodiment of fig. 1, when the interface call failure rate of the core interface corresponding to the core service, which is the user login service, is greater than the first preset call failure rate, the core interface corresponding to the user login service is determined as the target interface.
When the server interface is a non-core interface, step S420 includes step S4203: and if the interface calling failure rate of the non-core interface is greater than or equal to a second preset calling failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining the corresponding non-core interface as the target interface.
The second preset call failure rate is set automatically by the service server or is set by a technician in a self-defined manner. The service server may monitor in real time whether the interface call failure rate of the non-core interface is greater than or equal to a second preset call failure rate, or may detect whether the interface call failure rate of the non-core interface is greater than or equal to the second preset call failure rate every preset time.
With reference to the example in the embodiment of fig. 1, when the interface call failure rate of the non-core interface corresponding to the non-core service of the new user registration service is greater than the second preset call failure rate, the non-core interface corresponding to the new user registration service is determined as the target interface.
Step S430: and carrying out fusing operation on the target interface.
The specific implementation process of step S430 may refer to the description in step S230, and is not described in detail here.
It should be noted that, in the embodiment of the present application, only the server interface is blown when the interface call failure rate of the server interface is greater than the preset call failure rate, and therefore, the server interface may also be referred to as "interface self-blowing logic".
In this embodiment, the interface call failure rate of at least one server interface is used as a fusing judgment parameter, and the server interface with abnormal access can be fused from an individual, so that other server interfaces can be ensured to be normally accessed by a user, and other services of the service server are ensured not to be interrupted.
Besides the interface self-fusing logic, the embodiment of the application also provides the interface linkage fusing logic, namely under the condition that the interface calling failure rate of the server interface is greater than the preset calling failure rate, the server interface is fused, and other server interfaces are fused. In proportion, when the interface call failure rate of the core interface is greater than the first preset call failure rate, the service server fuses other non-core interfaces in addition to the fusing operation of the core interface.
The following describes "interface linkage fusing logic". As shown in fig. 5, fig. 5 schematically illustrates a method for intelligent fusing of a server interface according to a fourth embodiment of the present application. The method is applied to the service server in fig. 1, and may include the following steps S510 to S560.
Step S510: and acquiring the interface calling failure rate of at least one server interface.
The specific implementation process of step S510 refers to the description in step S410, and is not described in detail herein.
Step S520: and if the interface call failure rate of the core interface is greater than or equal to the first preset call failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining the corresponding core interface as the target interface.
The specific implementation process of step S520 refers to the description in step S4201, and is not described in detail here.
Step S530: and all the non-core interfaces are determined as target interfaces.
In the embodiment of the present application, when it is determined that the core interface is the target interface, it indicates that the core function of the service server cannot be smoothly accessed, and in order to ensure fast recovery of the core service, all the non-core interfaces in the service server need to be blown, so that all the non-core interfaces are determined as the target interfaces.
Step S540: and carrying out fusing operation on the core interface.
The specific implementation process of step S540 refers to the description in step S430, and is not described in detail herein.
Step S550: and sending a second notification message to all the non-core interfaces through the core interfaces.
The second notification message is used for notifying the non-core interface to perform the fusing operation. Since the fusing determination parameter, which is the abnormal server ratio, is not known by the non-core interface, the non-core interface needs to be notified to perform the fusing operation when the abnormal server ratio satisfies the fusing condition.
In other possible implementation manners, each server interface corresponds to a unique URL address, the service server may determine the URL address corresponding to the non-core interface by searching a mapping table between the server interface and the URL address, and then send a message for notifying the non-core interface of fusing to each non-core interface based on the URL address corresponding to the non-core interface.
Step S560: and performing fusing operation on all the non-core interfaces based on the second notification message.
The specific implementation process of step S560 refers to the description in step S430, and is not described in detail here.
In the embodiment of the application, in order to quickly recover the core service of the service server when the target interface is determined to be the core interface, all the non-core interfaces in the service server are further determined to be non-core interfaces, and the core interfaces and all the non-core interfaces, of which the interface calling failure rates meet the fusing conditions, are prohibited from being accessed within a period of time, so that the access pressure of the server can be relieved to a certain extent, and the other interfaces except the core interfaces and all the non-core interfaces, of which the interface calling failure rates meet the fusing conditions, can be ensured to normally work.
As shown in fig. 6, fig. 6 schematically illustrates a method for intelligent fusing of a server interface according to a fifth embodiment of the present application. The method for intelligently fusing the server interface provided by the embodiment of the application is mainly divided into three server interface fusing methods, namely, alarming triggering non-core interface fusing, interface self fusing and interface linkage fusing.
In the fusing of the alarm triggering non-core interface, firstly, an alarm callback URL is configured at a cloud server side, and under the condition that the cloud server side detects that the current application server is in high concurrency, state information of the service server is sent to the service server through the alarm callback, and the application server calculates fusing rules through the state information. Specifically, the fusing rule may be that when the number of abnormal states in the service server is greater than 50% of the total number, the non-core interface in the application server is fused for 30 s. Further, in the case that the number of the abnormal states in the application server is greater than 50% of the total number, a first message is sent to the message queue, the first message is a blown interface I1, and the corresponding blowing time is T1. Wherein, the interface I1 is a non-core interface, and the T1 is 30 s. The message queue then sends the first message to the blowing interface I1 in broadcast mode, and interface blowing is performed according to the blowing time T1. The detailed implementation of the method for intelligently fusing the server interface may refer to the descriptions in step S310 to step S340 in this application.
In the self-fusing of the interfaces, the application server respectively calculates the single-interface failure rate corresponding to each interface, and if the single-interface failure rate of the core interface is greater than the ratio R1 or/and the single-interface failure rate of the non-core interface is greater than the ratio R2, the corresponding interface is self-fused. The method may refer to the descriptions of step S410 to step S430 in this application.
In the interface linkage fusing, if the single interface failure rate of the core interface is greater than the ratio R3, a second message is sent to the message queue, and the second message is used for informing the non-core interface to fuse. And the message queue sends the fusing message to the corresponding non-core interface under the condition of receiving the second message. The detailed implementation of the method for intelligently fusing the server interface may refer to the descriptions in step S510 to step S560 in this application.
In the embodiment of the application, the corresponding server interface fusing method is provided for different fusing judgment parameters, the corresponding server interface fusing method can be executed under the condition that different servers are abnormally accessed, the access pressure of the server is relieved to a certain extent, and the other interfaces except the fused interface can work normally.
Referring to fig. 7, a block diagram of an apparatus 700 for intelligent fusing of a server interface according to an embodiment of the present disclosure is shown. The apparatus 700 is applied to a service server, and the apparatus 700 includes: a parameter acquisition module 710, an interface determination module 720, and a fuse execution module 730. The parameter obtaining module 710 is configured to obtain a fusing determination parameter, where the fusing determination parameter includes: the server exception proportion and the interface call failure rate of at least one server interface are the former one or both, the server exception proportion is used for representing the ratio of the number of the service servers in the exception state to the total number of the service servers, and the call failure rate of the server interface is used for representing the proportion of the failed call times of the server interface to the total call times. The interface determining module 720 is configured to determine a target interface to be blown in the at least one server interface if the blowing determination parameter meets the blowing condition. The fuse executing module 730 is used for performing a fuse operation on the target interface.
In some embodiments, the server interface includes a core interface and a non-core interface, and the fusing determination parameter includes a server anomaly ratio. The interface determining module 720 is configured to determine that the fusing determination parameter meets the fusing condition and determine the non-core interface as the target interface if the server abnormal ratio is greater than or equal to the preset abnormal ratio.
In some embodiments, the fuse execution module 730 is configured to broadcast a first notification message for notifying the non-core interface of the fuse operation. And performing fusing operation on the non-core interface based on the first notification message.
In some embodiments, the server interfaces include a core interface and a non-core interface, and the fusing determination parameter includes an interface call failure rate of at least one of the server interfaces. The interface determining module 720 is configured to determine that the fusing determination parameter meets the fusing condition if the interface call failure rate is greater than or equal to the preset call failure rate, and determine at least one server interface corresponding to the interface call failure rate as a target interface.
In some embodiments, the predetermined call failure rate comprises a first predetermined call failure rate. The interface determining module 720 is configured to determine that the fusing determination parameter meets the fusing condition if the interface call failure rate of the core interface is greater than or equal to the first preset call failure rate, and determine the corresponding core interface as the target interface. And all non-core interfaces are determined as target interfaces.
In some embodiments, the fuse execution module 730 is configured to send a second notification message to all the non-core interfaces through the core interface, where the second notification message is used to notify all the non-core interfaces to perform the fuse operation. And performing fusing operation on all the non-core interfaces based on the second notification message.
In some embodiments, the predetermined call failure rate comprises a second predetermined call failure rate. The interface determining module 720 is configured to determine that the fusing determination parameter meets the fusing condition if the interface call failure rate of the non-core interface is greater than or equal to a second preset call failure rate, and determine the corresponding non-core interface as the target interface.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The embodiment of the application provides a device for intelligently fusing a server interface, the device provides a fusing judgment parameter and a fusing condition corresponding to the fusing judgment parameter, determines a target interface needing fusing under the condition that the fusing judgment parameter meets the fusing condition, and fuses the target interface, wherein the fusing judgment parameter comprises one or two items of previous items in server abnormal proportion and interface calling failure rate of at least one server interface; the fusing judgment parameters of the server abnormal proportion and the interface calling failure rate and the corresponding fusing conditions are set, so that a fusing mechanism can be started under a specific scene, for example, in a scene with a higher server abnormal proportion and a scene with a higher interface calling failure rate, fusing operation is carried out on a determined target interface, the target interface is forbidden to be accessed within a period of time, the access pressure of the server can be relieved to a certain extent, and other interfaces except the target interface can be ensured to normally work.
Referring to fig. 8, it is shown that an electronic device 800 is further provided in an embodiment of the present application, where the electronic device 800 includes: one or more processors 810; a memory 820; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method for server interface intelligent fusing as described above.
Processor 810 may include one or more processing cores. The processor 810 interfaces with various interfaces and circuitry throughout the various parts of the battery management system to perform various functions of the battery management system and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 820 and invoking data stored in the memory 820. Alternatively, the processor 810 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 810 may integrate one or a combination of a Central Processing Unit (CPU) 810, a Graphics Processing Unit (GPU) 810, a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 810, but may be implemented by a communication chip.
The Memory 820 may include a Random Access Memory (RAM) 820 or a Read-Only Memory (Read-Only Memory) 820. The memory 820 may be used to store instructions, programs, code sets, or instruction sets. The memory 820 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area can also store data (such as a phone book, audio and video data, chatting record data) created by the electronic device map in use and the like.
Referring to fig. 9, a computer-readable storage medium 900 is further provided according to an embodiment of the present application, in which computer program instructions 910 are stored in the computer-readable storage medium 900, and the computer program instructions 910 can be called by a processor to execute the method described in the above embodiment.
The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-volatile computer-readable storage medium. The computer readable storage medium 900 has storage space for program code for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
Although the present application has been described with reference to the preferred embodiments, it is to be understood that the present application is not limited to the disclosed embodiments, but rather, the present application is intended to cover various modifications, equivalents and alternatives falling within the spirit and scope of the present application.

Claims (10)

1. A method for intelligent fusing of a server interface is applied to a service server, and comprises the following steps:
acquiring a fusing judgment parameter, wherein the fusing judgment parameter comprises: the method comprises the following steps that the previous item or all two items in the server exception proportion and the interface calling failure rate of at least one server interface are used, the server exception proportion is used for representing the ratio of the number of service servers in an exception state to the total number of the service servers, and the server interface calling failure rate is used for representing the proportion of the server interface calling failure times in the total calling times;
if the fusing judgment parameter meets the fusing condition, determining a target interface to be fused in at least one server interface;
and carrying out fusing operation on the target interface.
2. The method according to claim 1, wherein the server interface includes a core interface and a non-core interface, the fusing determination parameter includes the server abnormal proportion, and if the fusing determination parameter satisfies a fusing condition, determining a target interface to be fused in at least one of the server interfaces includes:
and if the abnormal proportion of the server is larger than or equal to a preset abnormal proportion, determining that the fusing judgment parameter meets the fusing condition, and determining the non-core interface as the target interface.
3. The method of claim 2, wherein the fusing the target interface comprises:
broadcasting a first notification message, wherein the first notification message is used for notifying the non-core interface to perform fusing operation;
performing the fusing operation on the non-core interface based on the first notification message.
4. The method according to claim 1, wherein the server interfaces include a core interface and a non-core interface, the fusing determination parameter includes an interface call failure rate of at least one server interface, and if the fusing determination parameter satisfies a fusing condition, determining a target interface to be fused in the at least one server interface includes:
and if the interface calling failure rate is greater than or equal to a preset calling failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining at least one server interface corresponding to the interface calling failure rate as the target interface.
5. The method of claim 4, wherein the predetermined call failure rate comprises a first predetermined call failure rate; if the interface call failure rate is greater than or equal to a preset call failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining at least one server interface corresponding to the interface call failure rate as the target interface, including:
if the interface calling failure rate of the core interface is greater than or equal to the first preset calling failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining the corresponding core interface as the target interface; and the number of the first and second groups,
determining all of the non-core interfaces as the target interfaces.
6. The method of claim 5, wherein the fusing the target interface comprises:
sending a second notification message to all the non-core interfaces through the core interfaces, wherein the second notification message is used for notifying all the non-core interfaces to perform fusing operation;
and performing fusing operation on all the non-core interfaces based on the second notification message.
7. The method of claim 4, wherein the predetermined call failure rate comprises a second predetermined call failure rate; if the interface call failure rate is greater than or equal to a preset call failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining at least one server interface corresponding to the interface call failure rate as the target interface, including:
and if the interface call failure rate of the non-core interface is greater than or equal to the second preset call failure rate, determining that the fusing judgment parameter meets the fusing condition, and determining the corresponding non-core interface as the target interface.
8. The device for intelligent fusing of the server interface is applied to a business server, and comprises the following components:
the parameter acquisition module is used for acquiring fusing judgment parameters, and the fusing judgment parameters comprise: the method comprises the following steps that the previous item or all two items in the server exception proportion and the interface calling failure rate of at least one server interface are used, the server exception proportion is used for representing the ratio of the number of service servers in an exception state to the total number of the service servers, and the server interface calling failure rate is used for representing the proportion of the server interface calling failure times in the total calling times;
the interface determining module is used for determining a target interface to be fused in at least one server interface if the fusing judgment parameter meets the fusing condition;
and the fusing execution module is used for fusing the target interface.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
10. A computer-readable storage medium having computer program instructions stored therein, the computer program instructions being invokable by a processor to perform the method of any of claims 1-7.
CN202111483882.8A 2021-12-07 2021-12-07 Method and device for intelligently fusing server interface, electronic equipment and storage medium Pending CN114285844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111483882.8A CN114285844A (en) 2021-12-07 2021-12-07 Method and device for intelligently fusing server interface, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111483882.8A CN114285844A (en) 2021-12-07 2021-12-07 Method and device for intelligently fusing server interface, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114285844A true CN114285844A (en) 2022-04-05

Family

ID=80871098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111483882.8A Pending CN114285844A (en) 2021-12-07 2021-12-07 Method and device for intelligently fusing server interface, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114285844A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115671716A (en) * 2022-12-28 2023-02-03 北京海誉动想科技股份有限公司 Processing method and device for preloading instance application, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060136858A1 (en) * 2004-12-17 2006-06-22 International Business Machines Corporation Utilizing fuses to store control parameters for external system components
CN111049670A (en) * 2019-11-07 2020-04-21 苏宁云计算有限公司 Method and device for fusing isolation of micro-service
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system
CN112995051A (en) * 2021-02-05 2021-06-18 中国工商银行股份有限公司 Network traffic recovery method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060136858A1 (en) * 2004-12-17 2006-06-22 International Business Machines Corporation Utilizing fuses to store control parameters for external system components
CN111049670A (en) * 2019-11-07 2020-04-21 苏宁云计算有限公司 Method and device for fusing isolation of micro-service
CN112995051A (en) * 2021-02-05 2021-06-18 中国工商银行股份有限公司 Network traffic recovery method and device
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115671716A (en) * 2022-12-28 2023-02-03 北京海誉动想科技股份有限公司 Processing method and device for preloading instance application, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10897406B2 (en) Scheduling method for content delivery network, and device
CN108183950B (en) Method and device for establishing connection of network equipment
CN109660607A (en) A kind of service request distribution method, method of reseptance, device and server cluster
CN110324793B (en) Information reminding method and device and electronic terminal
CN110858843B (en) Service request processing method and device and computer readable storage medium
CN109787827B (en) CDN network monitoring method and device
CN108804194B (en) Notification bar message processing method and device, user terminal and readable storage medium
US20160321906A1 (en) Alert management within a network based virtual collaborative space
CN110113201B (en) Monitoring data processing method and device and monitoring system
CN114285844A (en) Method and device for intelligently fusing server interface, electronic equipment and storage medium
CN111026606A (en) Alarm method and device based on hystrix fuse monitoring and computer equipment
CN106878096B (en) VNF state detection notification method, device and system
CN110635968A (en) Monitoring method, device and equipment for stacked double-active detection channel and storage medium
CN111159269A (en) Data processing method, device and system
CN111949421B (en) SDK calling method, device, electronic equipment and computer readable storage medium
CN112965799A (en) Task state prompting method and device, electronic equipment and medium
CN111262731B (en) Alarm method, alarm device, server equipment and storage medium
CN110569097B (en) Information display method and device
CN110417601B (en) Information prompting method, device and system in client and readable storage medium
JP5623333B2 (en) Monitoring server and monitoring evaluation method
US11463773B2 (en) Providing activity notifications regarding digital content
CN114296979A (en) Method and device for detecting abnormal state of Internet of things equipment
CN110837431A (en) Service control method, service control device, computer equipment and computer-readable storage medium
CN113645153A (en) Flow control method, device, equipment and medium
CN113242302A (en) Data access request processing method and device, computer equipment and medium

Legal Events

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