Traffic scheduling method and device, storage medium and electronic equipment
By comparing the startup log and status description parameters of the cloud platform service instance, it is determined whether the traffic scheduling conditions are met and the traffic is scheduled to other instances. This solves the problem of unstable application running due to unstable cloud platform instances and realizes traffic intelligence. Scheduling and stable operation of applications.
Patent Information
- Application Number
- CN202411484857.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, the problem of unstable operation of applications when deployed on cloud platform instances has caused the application to fail to provide normal services.
By obtaining the running status detection information of the current service instance, comparing the startup log and the reference log, and evaluating the status description parameters, it is determined whether the current service instance meets the traffic scheduling conditions, and traffic scheduling instructions are sent to schedule the traffic of the current service instance to other services. Example.
When a cloud platform instance becomes unstable, the traffic of the unstable cloud platform instance is dispatched to other cloud platform instances, thus avoiding the impact of the unstable cloud platform instance on applications.
Smart Images

Figure CN119341997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more specifically, to a traffic scheduling method and device, a storage medium, and an electronic device. Background Art
[0002] With the development of cloud computing technology, the method of deploying applications through cloud platforms has been widely used. The stability of applications after being deployed to cloud platforms depends not only on the stability of the applications themselves, but also on the stability of the cloud platforms. The services provided by cloud platforms themselves may enter an unstable state. When the cloud platform enters an unstable state, the applications deployed on the cloud platform may be affected and unable to provide normal services.
[0003] At present, the discovery and processing of unstable cloud platform instances are passive. When a cloud platform instance enters an unstable state, the relevant technology cannot determine that the cloud platform instance has entered an unstable state at this time. Instead, after the unstable state of the cloud platform instance causes the application to enter an abnormal state, the application's abnormality is passively discovered through the application's monitoring and alarm program. However, at this time, the application has been affected by the unstable state of the cloud platform instance. In other words, there is a technical problem in the relevant technology that the application runs unstably when deployed on a cloud platform instance. No effective solution has been proposed yet for the above problem. Summary of the invention
[0004] The embodiments of the present application provide a traffic scheduling method and device, a storage medium, and an electronic device to at least solve the technical problem of unstable operation of applications when deployed on a cloud platform instance in the current related technology.
[0005] According to one aspect of an embodiment of the present application, a traffic scheduling method is provided, comprising: obtaining running status detection information of a current service instance, wherein the current service instance is a service instance included in multiple service instances associated with a target application; in a case where the running status detection information includes a startup log, determining a first state identification result based on a comparison between the startup log of the current service instance and a reference log; in a case where the running status detection information includes at least one state description parameter, determining a second state identification result based on a comparison between at least one state description parameter of the current service instance and their respective corresponding reference description parameters, wherein the state description parameters are running parameters within a target detection cycle; in a case where it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, sending a traffic scheduling instruction to instruct that the current data service traffic of the current service instance be scheduled to at least one reference service instance among the multiple service instances.
[0006] According to another aspect of an embodiment of the present application, a traffic scheduling device is also provided, including: an acquisition unit, used to acquire running status detection information of a current service instance, wherein the current service instance is a service instance included in multiple service instances associated with a target application; a first determination unit, used to determine a first state identification result based on a comparison between the startup log of the current service instance and a reference log when a startup log is included in the running status detection information; a second determination unit, used to determine a second state identification result based on a comparison between at least one state description parameter of the current service instance and their corresponding reference description parameters when at least one state description parameter is included in the running status detection information, wherein the state description parameter is an running parameter within a target detection cycle; a sending unit, used to send a traffic scheduling instruction to instruct that the current data service traffic associated with the current service instance be scheduled to at least one reference service instance among multiple service instances when it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result.
[0007] Optionally, the above-mentioned first determination unit includes: a determination module, used to determine a log difference information set based on a comparison operation between the startup log and the reference log; when the log difference information set includes a first log content configured with a target tag, determining that the startup state of the current service instance is an abnormal state, wherein the target tag is used to indicate the alarm level of the log content that matches it; when the log difference information set does not include the first log content configured with the target tag, determining the first state identification result according to the scale of the log difference information set.
[0008] Optionally, the above-mentioned determination module is also used to, when the number of second log contents in the log difference information set is greater than or equal to the first abnormal startup state, determine that the startup state of the current service instance is an abnormal state; when the number of second log contents in the log difference information set is less than a first threshold, determine that the startup state of the current service instance is a normal state; when the ratio of the number between the second log content in the log difference information set and the reference log content is greater than or equal to a second threshold, determine that the startup state of the current service instance is an abnormal state; when the ratio of the number between the second log content in the log difference information set and the reference log content is less than the second threshold, determine that the startup state of the current service instance is a normal state; wherein the second log content is used to describe the operation mode and response result of the object operation.
[0009] Optionally, the above-mentioned traffic scheduling device also includes an identification unit, which is used to determine the first state identification result according to the scale of the log difference information set, and also includes: when the log difference information set includes a third log content, delete the third log content from the log difference information set, wherein the third log content is used to indicate the operation attribute information of the object operation; and / or, after determining the first state identification result according to the scale of the log difference information set, it also includes: when the first state identification result indicates that the startup state of the current service instance is a normal state, update the reference log according to the second log content in the log difference information set.
[0010] Optionally, the above-mentioned second determination unit includes: a second determination module, used to determine the state evaluation parameters corresponding to at least one state description parameter respectively according to at least one state description parameter and the corresponding reference description parameters, wherein the state evaluation parameters are used to indicate the comparison between the state description parameters and the reference description parameters, and the state description parameters are parameters obtained according to the resident process monitoring operation during the operation of the current service instance; determining the target state evaluation parameter according to the weighted summation result of at least one state evaluation parameter; when the target state evaluation parameter is less than or equal to the third threshold, determining that the running state of the current service instance is in a stable state; when the target state evaluation parameter is greater than the third threshold, determining that the running state of the current service instance is in a fluctuating state.
[0011] Optionally, the above-mentioned second determination module is also used to obtain a current state description parameter from at least one state description parameter, and obtain a first reference description parameter and a second reference description parameter that match the current state description parameter, the first reference description parameter being used to indicate the average state of the current operating indicator of the current service instance within the target operating cycle, and the second reference description parameter being used to indicate the peak state of the current operating indicator within the target operating cycle; the difference between the current state description parameter and the first reference description parameter is determined as a first fluctuation description parameter, and the sum of the fluctuation description parameter and the second reference description parameter is determined as a second fluctuation description parameter; the ratio between the first fluctuation description parameter and the second fluctuation description parameter is determined as a state evaluation parameter corresponding to the current state description parameter.
[0012] Optionally, the above-mentioned traffic scheduling device also includes a traffic scheduling module, which is used to send a first traffic scheduling instruction matching the current service instance when the target state evaluation parameter is greater than a fourth threshold, wherein the fourth threshold is greater than the third threshold and less than 1, and the first traffic scheduling instruction is used to schedule all current data service traffic associated with the current service instance to at least one reference service instance among multiple service instances; when the target state evaluation parameter is less than or equal to the fourth threshold, the product of the target state evaluation parameter and the reference traffic ratio is determined as the target scheduling coefficient; and a second traffic scheduling instruction matching the current service instance is sent according to the target scheduling coefficient, wherein the reference traffic ratio is the ratio of the current service traffic associated with the current service instance to the total service traffic of the target application, and the target scheduling coefficient is used to indicate the scheduling ratio of traffic scheduling performed on the current data service traffic, and the second traffic scheduling instruction is used to schedule the current data service traffic to at least one reference service instance among multiple service instances according to the scheduling ratio indicated by the target scheduling coefficient.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned traffic scheduling method when running.
[0014] According to another aspect of an embodiment of the present application, there is further provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the traffic scheduling method through the computer program.
[0015] In an embodiment of the present application, the operation status detection information of the current cloud platform service instance associated with the application can be obtained first. When the operation status detection information includes a startup log, the first state identification result is determined based on the comparison between the startup log and the reference log. In addition, when the operation status detection information includes at least one state description parameter, the second state identification result is determined based on the comparison between at least one state description parameter and the corresponding reference description parameter. Afterwards, when it is determined that the current cloud platform service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, an instruction to schedule the traffic for the current cloud platform service instance is sent, and the traffic of the current cloud platform service instance is scheduled to other cloud platform service instances. When the cloud platform instance is in an unstable state, the technical effect of scheduling the traffic of the unstable cloud platform instance to other cloud platform instances is achieved, avoiding the impact of the unstable state of the cloud platform instance on the application, thereby solving the technical problem of unstable operation when the application is deployed on the cloud platform instance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 It is a hardware structure block diagram of a server device according to an optional traffic scheduling method of an embodiment of the present application;
[0018] Figure 2 is a flow chart of an optional traffic scheduling method according to an embodiment of the present application;
[0019] Figure 3 is a flow chart of an optional traffic scheduling method according to an embodiment of the present application;
[0020] Figure 4 is a schematic diagram of another optional traffic scheduling method according to an embodiment of the present application;
[0021] Figure 5 is a schematic diagram of another optional traffic scheduling method according to an embodiment of the present application;
[0022] Figure 6 is a schematic diagram of another optional traffic scheduling method according to an embodiment of the present application;
[0023] Figure 7 is a schematic structural diagram of an optional flow scheduling device according to an embodiment of the present application;
[0024] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a data processing method in a memory in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the traffic scheduling method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific network example may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In the above implementation, the operation status detection information of the current cloud platform service instance associated with the application can be obtained first. When the operation status detection information includes a startup log, the first state identification result is determined based on the comparison between the startup log and the reference log. In addition, when the operation status detection information includes at least one state description parameter, the second state identification result is determined based on the comparison between at least one state description parameter and the corresponding reference description parameter. Afterwards, when it is determined that the current cloud platform service instance meets the traffic scheduling conditions according to the first state identification result and the second state identification result, an instruction to schedule the traffic for the current cloud platform service instance is sent, and the traffic of the current cloud platform service instance is scheduled to other cloud platform service instances. The technical effect of scheduling the traffic of the cloud platform instance in an unstable state to other cloud platform instances is achieved when the cloud platform instance is in an unstable state, avoiding the influence of the unstable state of the cloud platform instance on the application, thereby solving the technical problem of unstable operation when the application is deployed on the cloud platform instance.
[0030] Optionally, as an optional implementation, as Figure 2 As shown, the above traffic scheduling method includes:
[0031] S202, obtaining running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application;
[0032] S204, when the running status detection information includes a startup log, determining a first status identification result according to a comparison between the startup log of the current service instance and the reference log;
[0033] S206, when the running state detection information includes at least one state description parameter, determining a second state identification result according to a comparison between at least one state description parameter of the current service instance and the respective corresponding reference description parameters, wherein the state description parameter is an running parameter within a target detection period;
[0034] S208, when it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, a traffic scheduling instruction is sent to instruct the current data service traffic of the current service instance to be scheduled to at least one reference service instance among multiple service instances.
[0035] It is understandable that the above-mentioned multiple service instances can be service instances running in multiple different cloud platforms, and the above-mentioned service instances are used to provide services for multiple clients of the target application. For example, 10 service instances are virtualized on cloud platform A and cloud platform B respectively, and these 20 service instances jointly provide services for application A running in multiple terminals. In the above-mentioned step S202, the running status detection information of the current service instance is obtained, wherein the current service instance is a service instance included in the multiple service instances associated with the target application. The above-mentioned running status detection information may include the startup log of the service instance, the status description parameters of the service instance, etc. The status description parameters may include CPU utilization, memory utilization, network transmission rate, network transmission response time, etc., which are not specifically limited here. It should be noted that the above-mentioned acquisition operation can be performed through Figure 6 The cloud instance data analysis and determination module 602 executes, specifically through Figure 3 Init process and Agent process are obtained. For example, Figure 3 As shown in the figure, the startup log in the running status detection information is obtained through the Init process, and the status description parameters including CPU utilization, memory utilization, network transmission rate, network transmission response time, etc. in the running status detection information are obtained through the Agent process.
[0036] It should be noted that the above-mentioned Init process and Agent process are processes unique to the cloud platform service instance itself, wherein the above-mentioned Init process is used to execute the cloud platform's initialization commands for the service instance and complete the resource initialization operation for the service instance. The above-mentioned Agent process receives commands issued by the cloud platform during the service instance running phase to execute the change program, and collects data of the service instance and reports it to the cloud platform. The above-mentioned Agent process can perceive the cloud platform changes earlier than the application program, and can simultaneously receive and process the cloud platform's change commands.
[0037] It is understandable that the above operation status detection information is Figure 6 After the cloud instance data analysis and determination module 602 obtains it, it will be used to analyze whether the current service instance is in a stable state.
[0038] Then, steps S204 to S206 are performed. When the running status detection information includes a startup log, the first status identification result is determined based on the comparison between the startup log and the reference log. It is understandable that the startup log is used to record the information of the current service instance during the startup process, such as the startup timestamp, command execution time, etc. The reference log can be a startup log of other service instances for comparison with the current startup log. The startup log is compared with the reference log to obtain the startup log comparison result.
[0039] It should be noted that the above-mentioned reference log can be the startup log of the last log comparison operation, or multiple startup logs of log comparison operations performed in the past period of time, or a collection of partial contents of multiple startup logs of log comparison operations performed in the past period of time, without specific limitation here.
[0040] In addition, when the running status detection information includes at least one status description parameter, the second status identification result is determined based on the comparison of at least one status description parameter with the corresponding reference description parameter. It should be noted that there may be multiple reference description parameters corresponding to the above-mentioned status description parameter. For example, when the status description parameter is the current CPU utilization, the reference description parameter may be the CPU daily utilization average or the CPU daily utilization threshold, which is not specifically limited here. The above-mentioned second status identification result can be determined by comparing one or more status description parameters with their corresponding reference description parameters.
[0041] For example, the current CPU utilization can be compared with the daily CPU utilization average and the daily CPU utilization threshold, the current memory utilization can be compared with the daily memory utilization average and the daily memory utilization threshold, the current network transmission flat time can be compared with the daily network transmission flat time average and the daily network transmission flat time threshold, the current network transmission rate, the daily network transmission rate average and the daily network transmission rate threshold can be compared, and the second state identification result can be determined by the results of the above four comparison operations. Afterwards, step S208 is executed, and when it is determined that the current service instance meets the traffic scheduling condition based on the first state identification result and the second state identification result, 8 traffic scheduling instructions are sent. Specifically, the above traffic scheduling conditions can be set for the first state identification result and the second state identification result respectively. For example, for the first state identification result, the traffic scheduling condition can be the difference value of the comparison of the startup log text content, and for the second state identification result, the traffic scheduling condition can be a numerical interval.
[0042] Optionally, the above-mentioned situation in which it is determined that the current service instance meets the traffic scheduling conditions according to the first state identification result and the second state identification result may be a situation in which it is determined that the current service instance meets the traffic scheduling conditions according to one of the first state identification result and the second state identification result, or it may be a situation in which it is determined that the current service instance meets the traffic scheduling conditions according to both the first state identification result and the second state identification result. For example, when the first state identification result indicates that the current service instance needs to be traffic scheduled, it is determined that the current service instance meets the traffic scheduling conditions. For another example, when the second state identification result indicates that the current service instance needs to be traffic scheduled, it is determined that the current service instance meets the traffic scheduling conditions. For another example, when the first state identification result indicates that the current service instance needs to be traffic scheduled and the second state identification result also indicates that the current service instance needs to be traffic scheduled, it is determined that the current service instance meets the traffic scheduling conditions.
[0043] Optionally, the traffic scheduling instruction that matches the current service instance may be sent as follows: Figure 6 The cloud instance data analysis module 602 sends a traffic scheduling instruction to the traffic scheduling module 601, instructing the traffic scheduling module 601 to schedule the traffic of the current service instance. The cloud instance data analysis module 602 can also send a traffic scheduling instruction directly to the current service instance, instructing the current service instance to send the traffic to other service instances.
[0044] Through the embodiments provided by the present application, the operation status detection information of the current service instance is first obtained. When the operation status detection information includes a startup log, a first state identification result is determined based on a comparison between the startup log and the reference log. When the operation status detection information includes at least one state description parameter, a second state identification result is determined based on a comparison between at least one state description parameter and each corresponding reference description parameter. Furthermore, when it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, a traffic scheduling instruction matching the current service instance is sent, thereby achieving the technical effect of scheduling the traffic of an unstable cloud platform instance to other cloud platform instances when the cloud platform instance is in an unstable state, avoiding the impact of the unstable state of the cloud platform instance on the application, thereby solving the technical problem of unstable operation of the application when it is deployed on the cloud platform instance.
[0045] In an optional implementation, when the running status detection information includes a startup log, determining the first status identification result according to a comparison between the startup log and the reference log includes:
[0046] S1, determining a log difference information set according to a comparison operation between a startup log and a reference log;
[0047] S2, when the log difference information set includes the first log content configured with a target tag, determining that the startup state of the current service instance is an abnormal state, wherein the target tag is used to indicate the alarm level of the log content matching therewith;
[0048] S3: When the log difference information set does not include the first log content configured with the target tag, determine the first state recognition result according to the size of the log difference information set.
[0049] Optionally, in step S1, the log difference information set may be a text difference set, for example, the text content of the startup log is compared with the reference log, and the text content with differences is determined as the log difference information set. It should be noted that the text with differences may include text content that is increased or decreased in the startup log compared with the reference log, in addition to the text content corresponding to the differences. For example, the startup log text contains the following text content:
[0050] "Command A took 300ms to execute;
[0051] Warning: Command B took 600ms to execute".
[0052] In the reference log, the execution time of command A is recorded as "0.75ms", not "300ms". At the same time, there is no text description of command B in the reference log. In addition, there is a description of the execution of command C in the reference text, but there is no execution description of command C in the startup log text. At this time, "A command execution time: 300ms", "Warning: B command execution time: 600ms", and "C command" are determined as the contents in the log difference set.
[0053] Then, step S2 is performed. When the log difference information set includes the first log content configured with the target tag, it is determined that the startup state of the current service instance is an abnormal state. For example, the log difference information set includes the following text content:
[0054] "Command A took 300ms to execute;
[0055] Warning: Command B took 600ms to execute.
[0056] Error: D command not executed".
[0057] "Error" and "Warning" are log tags for the text contents of "Command B execution time: 600ms" and "Command D not executed", respectively, and the tag "Error" is the target tag. When the "Error" tag appears in the log difference information set, the startup state of the current service instance is determined to be an abnormal state.
[0058] Optionally, the above-mentioned target tag may also include multiple tags of different levels at the same time. For example, "warning" and "error" tags are determined as target tags. When log content with "warning" and / or "error" tags appears in the log difference information set, the startup status of the current service instance is determined as an abnormal status.
[0059] Optionally, the above label can be explicitly reflected in the text content, such as "Warning: B command execution takes: 600ms", where "Warning" is an explicit label. The above label can also be an implicit label, such as "A command execution takes: 300ms". The label of the log content can be a default label of the log, such as a "normal" label, or other types of labels marked by program code, such as an "error" label.
[0060] It should be noted that the "normal" label, "warning" label, and "error" label listed in this embodiment are only used for illustration, and the alarm level of the label can also have any other form, such as a "first alarm level" label, a "second alarm level" label, a "third alarm level" label, a "fourth alarm level" label, etc., which are not specifically limited here.
[0061] Afterwards, step S3 is executed, and in the case that the log difference information set does not include the first log content configured with the target tag, the first state identification result is determined according to the set size of the log difference information set. For example, in the case that the above-mentioned "target tag" is "error", if there is no log content with the tag "error" in the log difference information set, then the first state identification result is determined according to the set size of the log difference information set.
[0062] Specifically, the log difference threshold may be set first. For example, the log difference threshold may be set to 3. Assume that the log difference information set contains the following text content:
[0063] "Command A took 300ms to execute;
[0064] Warning: Command B took 600ms to execute.
[0065] Warning: D command not executed;
[0066] E command execution time: 100ms;
[0067] WARNING: F command not executed".
[0068] At this time, there are 5 log contents in the log difference information set, and there is no "error" tag. At this time, it is determined that the size of the log difference information set exceeds the log difference threshold, and then the first state identification result is determined to be that the current service instance is abnormally started. For another example, the log difference threshold is set to 6. At this time, the size of the log difference information set in this example is less than the log difference threshold, and then the first state identification result is determined to be that the current service instance is started normally.
[0069] Optionally, when the size of the log difference information set is equal to the log difference threshold, the first state identification result may be determined as normal startup or abnormal startup of the current service instance, which is not specifically limited here.
[0070] Through the above-mentioned implementation mode of the present application, first, a log difference information set is determined based on the comparison operation between the startup log and the reference log. When the log difference information set includes the first log content configured with the target tag, it is determined that the startup state of the current service instance is an abnormal state. When the log difference information set does not include the first log content configured with the target tag, the first state identification result is determined based on the set size of the log difference information set, thereby realizing the determination of the first state identification result of the current service instance based on the startup log.
[0071] In an optional implementation, when the log difference information set does not include the first log content configured with the target tag, determining the first state identification result according to the set size of the log difference information set includes one of the following:
[0072] Mode 1: when the number of the second log contents in the log difference information set is greater than or equal to the first threshold, it is determined that the startup state of the current service instance is an abnormal state; when the number of the second log contents in the log difference information set is less than the first threshold, it is determined that the startup state of the current service instance is a normal state;
[0073] Mode 2: When the quantity ratio between the second log content in the log difference information set and the reference log content is greater than or equal to the second threshold, it is determined that the startup state of the current service instance is an abnormal state; when the quantity ratio between the second log content in the log difference information set and the reference log content is less than the second threshold, it is determined that the startup state of the current service instance is a normal state;
[0074] Optionally, in the above-mentioned method 1, by comparing the number of second log contents in the log difference set with the first threshold, it is determined whether the startup state of the current service instance is a normal state or an abnormal state. For example, the first threshold is set to 5, and when the number of log contents in the log difference information set is greater than or equal to 5, the startup state of the current service instance is determined to be an abnormal state, and when the number of log contents in the log difference information set is less than 5, the startup state of the current service instance is determined to be an abnormal state.
[0075] Optionally, the second content quantity may be the number of all text words in the log difference set, or the number of text words of a specified type, such as determining the number of text words in the log text excluding the tag type as the second content quantity, or the number of log content items in the log difference set. For example, assuming that the log difference information set contains the following text content:
[0076] "Command A took 300ms to execute;
[0077] Warning: Command B took 600ms to execute.
[0078] Warning: D command not executed;
[0079] E command execution time: 100ms;
[0080] WARNING: F command not executed".
[0081] At this time, the number of second log contents is 5.
[0082] Optionally, in the above-mentioned method 2, the quantity ratio between the second log content and the reference log content is compared with the second threshold value to determine whether the startup state of the current service instance is normal or abnormal. For example, in the case where the quantity of the second log content refers to the number of all text words in the log difference set, assuming that the number of all text words in the log difference set is 19, and the number of text words in the reference log content is 100, at this time, the quantity ratio between the second log content and the reference log content is 19 / 100, and when the second threshold value is specified as 33%, it is determined that the quantity ratio between the second log content and the reference log content is less than the second threshold value, and the startup state of the current service instance is determined to be normal.
[0083] For another example, when the second log content quantity refers to the number of words of a specified type of text in the log difference set, it is assumed that the specified type is text other than a tag type. For example, in the following log difference information set:
[0084] "Warning: F command not executed".
[0085] It can be determined that the amount of the second log content at this time is the number of words except "Warning". In this example, the amount of the second log content is 6. Assuming that the number of text words in the reference log content excluding the label is 100, the ratio between the second log content and the reference log content is 6 / 100. When the second threshold is specified as 5%, it is determined that the ratio between the second log content and the reference log content is greater than the second threshold, and the startup state of the current service instance is determined to be abnormal.
[0086] For another example, when the second log content quantity refers to the number of log content items, it is assumed that the log difference information set contains the following text content:
[0087] "Command A took 300ms to execute;
[0088] Warning: Command B took 600ms to execute.
[0089] Warning: D command not executed;
[0090] E command execution time: 100ms;
[0091] WARNING: F command not executed".
[0092] At this time, the number of content items in the log difference information set is 5, and the number of second log content items is 6. Assuming that the number of content items in the reference log content is 100, the ratio between the second log content and the reference log content is 5 / 100. When the second threshold is specified as 5%, it is determined that the ratio between the second log content and the reference log content is equal to the second threshold, and the startup state of the current service instance is determined to be an abnormal state.
[0093] Through the above implementation of the present application, the startup status of the current service instance is determined by comparing the number of second log contents in the log difference information set, or the ratio of the number between the second log content in the log difference information set and the reference log content with a preset threshold.
[0094] In an optional implementation, before determining the first state identification result according to the size of the log difference information set, the method further includes: if the log difference information set includes third log content, deleting the third log content from the log difference information set, wherein the third log content is used to describe operation attribute information of the object operation;
[0095] It should be noted that the third content may be any specified information indicating one or several operation attributes. For example, the log difference set may be the following content:
[0096] "[18:06] Command A started executing; Command A took 300ms to execute; [18:06] Command A ended executing".
[0097] In the above-mentioned log difference set, "[18:06]A command starts executing" and "[18:06]A command ends executing" are information indicating the start and end timestamps of the execution of command A. When the third content is specified as the log content indicating the start and end timestamps of the command execution, "[18:06]A command starts executing" and "[18:06]A command ends executing" are deleted from the log difference information set.
[0098] Through the above implementation of the present application, when the log difference information set includes the third log content, the third log content is deleted from the log difference information set, thereby achieving further adjustment of the log difference set.
[0099] In an optional implementation, after determining the first state identification result based on the size of the log difference information set, it also includes: when the first state identification result indicates that the startup state of the current service instance is normal, updating the reference log according to the second log content in the log difference information set.
[0100] It should be noted that updating the reference log according to the second log content in the log difference information set may be adding the second log content in the log difference information set to the reference log. Alternatively, when the second log content exists in the log difference information set, the current startup log is used as a new reference log to overwrite the original reference log.
[0101] For example, when the update operation is to add the second log content in the log difference information set to the reference log, the log difference information set is first determined, and then the second log content in the log difference information set is added to the reference log. For example, the log difference information set contains the following text content:
[0102] "Command A took 300ms to execute."
[0103] After determining the first state identification result according to the above log difference information set, the above text content "A command execution time: 300ms" is added to the reference log.
[0104] Optionally, the content of the reference log can be the log content within a period of time, for example, the content added to the reference log within 24 hours is used as the content of the current reference log, and the log content added more than 24 hours ago is deleted from the reference log. For example, when the second log content is added to the reference log: "Command A took 300ms to execute; Warning: Command B took 600ms to execute; Warning: Command D was not executed", the reference log will contain the second log content added in the next 24 hours: "Command A took 300ms to execute; Warning: Command B took 600ms to execute; Warning: Command D was not executed", and after 24 hours, the second log content added will be deleted from the reference log.
[0105] Optionally, the content of the reference log may be the log content of several service instance startups, such as the reference log formed from the startup logs generated by the three most recent service instance startups. For example, the log difference set determined between the startup log of the current service instance and the reference log includes the content: "Warning: D command not executed".
[0106] After determining the first state identification result according to the above log difference information set, the above text content "Warning: D command not executed" is added to the reference log. When the above log content is started by two new service instances in the future, it is used as a part of the reference log to compare with the startup log of the newly started service instance. After the second newly started service instance is started, before the third new service instance is started, the above added content "Warning: D command not executed" is deleted from the reference log.
[0107] Optionally, the update operation may be to use the current startup log as a new reference log to overwrite the original reference log when the second log content exists in the log difference information set. For example, the log difference set contains the following second log content:
[0108] "Command A took 300ms to execute."
[0109] At this time, it is determined that the number of second log contents in the log difference information set is not 0. At this time, the startup log of the current service instance is determined as the new reference log, overwriting the original reference log. When the service instance is started next time, the new reference log is used to compare with the startup log of the newly started service instance.
[0110] Through the above implementation of the present application, when the first state identification result indicates that the startup state of the current service instance is normal, the reference log is updated according to the second log content in the log difference information set, so that the reference log content is updated.
[0111] In an optional implementation, when the log difference information set includes the first log content configured with the target tag, after determining that the startup state of the current service instance is an abnormal state, the method further includes:
[0112] S1, sending a first traffic scheduling instruction matching the current service instance, wherein the first traffic scheduling instruction is used to schedule all current data service traffic associated with the current service instance to at least one reference service instance among multiple service instances.
[0113] Optionally, in the above step S1, a first traffic scheduling instruction matching the current service instance is sent, and the above first traffic instruction indicates that all traffic sent to the current service instance will be scheduled to the reference service instance. It can be understood that the above reference service instance can be one or more service instances other than the current service instance.
[0114] In an optional implementation, when the running state detection information includes at least one state description parameter, determining the second state identification result according to a comparison between the at least one state description parameter and the respective corresponding reference description parameters includes:
[0115] S1, according to at least one state description parameter and the respective corresponding reference description parameters, respectively determine the state evaluation parameters corresponding to the at least one state description parameter, wherein the state evaluation parameter is used to indicate the comparison between the state description parameter and the reference description parameter, and the state description parameter is a parameter obtained according to the resident process monitoring operation during the operation of the current service instance;
[0116] S2, determining a target state evaluation parameter according to a weighted summation result of at least one state evaluation parameter;
[0117] S3, when the target state evaluation parameter is less than or equal to the third threshold, determining that the operation state of the current service instance is in a stable state;
[0118] S4: When the target state evaluation parameter is greater than a third threshold, determine that the running state of the current service instance is in a fluctuating state.
[0119] Optionally, in this embodiment, the state description parameter is a parameter describing various indicators during the operation of the service instance, such as CPU utilization, memory utilization, network transmission rate, network transmission flat response time, etc. The reference description parameter is an evaluation parameter corresponding to the above state description parameter, such as the average daily CPU utilization, the daily CPU utilization threshold, the average daily memory utilization, the daily memory utilization threshold, the average daily network transmission rate, the daily network transmission rate threshold, the average daily network transmission flat response time, the daily network transmission flat response time threshold, etc. The state evaluation parameter corresponding to each state description parameter is determined by comparing the state description parameter with the corresponding reference description parameter.
[0120] Specifically, for example, for CPU utilization, the current CPU utilization is determined as the state description parameter, and the CPU daily utilization average and the CPU daily utilization threshold are determined as the corresponding reference description parameters. Further, the state evaluation parameter corresponding to the current CPU utilization is determined based on the current CPU utilization, the CPU daily utilization average and the CPU daily utilization threshold. The determination method may be mathematical operation. For example, the state evaluation parameter corresponding to the current CPU utilization may conform to the following mathematical model:
[0121] Y=(PQ) / (P-Q+M)
[0122] Among them, Y is the state evaluation parameter corresponding to the current CPU utilization, P is the current CPU utilization, Q is the average daily CPU utilization, and M is the daily CPU utilization threshold. It should be noted that the above mathematical model is only an example, and the state evaluation parameter can also be determined by other mathematical models, which are not specifically limited here. It can be understood that the state evaluation parameters corresponding to other state description parameters can all be calculated using the above mathematical model.
[0123] Then, when the state evaluation parameters corresponding to the state description parameters are obtained, the obtained state evaluation parameters are weighted and summed to determine the target state evaluation parameters. It should be noted that the weights assigned to the state evaluation parameters can be determined based on the historical data statistics of the service instance. For example, in the historical data statistics of the service instance, when the service instance is in an abnormal state, the state evaluation parameter corresponding to the CPU utilization is significantly higher than the state evaluation parameters corresponding to other state description parameters. At this time, the state evaluation parameter corresponding to the CPU utilization is assigned a higher weight value.
[0124] For another example, in the historical data statistics of a service instance, when an abnormal state occurs in a service instance, the state evaluation parameters corresponding to each state description parameter are the same or have little difference, and at this time, the state evaluation parameters corresponding to each state description parameter are assigned the same weight value.
[0125] Optionally, the weighted sum operation may be to assign weights to the state evaluation parameters corresponding to the various state description parameters and then sum them. For example, the following mathematical model may be used to determine the target state evaluation parameter by weighted sum:
[0126]
[0127] D represents the target state evaluation parameter, J n Represents the weight value, L n Represents the state evaluation parameter. In addition, the weighted summation operation can also be to assign weights to the state evaluation parameters corresponding to each state description parameter, then sum and average. For example, the following mathematical model can be used to determine the target state evaluation parameter by weighted summation:
[0128]
[0129] Then, the determined target state evaluation parameter is compared with the third threshold value, and when the target state evaluation parameter is less than or equal to the third threshold value, it is determined that the operation state of the current service instance is in a stable state. When the target state evaluation parameter is greater than the third threshold value, it is determined that the operation state of the current service instance is in a fluctuating state.
[0130] Through the above-mentioned implementation mode of the present application, the state evaluation parameters corresponding to at least one state description parameter are respectively determined according to at least one state description parameter and the respective corresponding reference description parameters, and then the target state evaluation parameter is determined according to the weighted summation result of at least one state evaluation parameter; when the target state evaluation parameter is less than or equal to the third threshold value, it is determined that the operating state of the current service instance is in a stable state; when the target state evaluation parameter is greater than the third threshold value, it is determined that the operating state of the current service instance is in a fluctuating state.
[0131] In an optional implementation, determining the state evaluation parameters corresponding to the at least one state description parameter respectively according to the at least one state description parameter and the reference description parameters corresponding to the at least one state description parameter respectively includes:
[0132] S1, obtaining a current state description parameter from at least one state description parameter, and obtaining a first reference description parameter and a second reference description parameter matching the current state description parameter, wherein the first reference description parameter is used to indicate an average state of a current operating indicator of a current service instance within a target operating cycle, and the second reference description parameter is used to indicate a peak state of the current operating indicator within the target operating cycle;
[0133] S2, determining the difference between the current state description parameter and the first reference description parameter as the first fluctuation description parameter, and determining the sum of the fluctuation description parameter and the second reference description parameter as the second fluctuation description parameter;
[0134] S3, determining the ratio between the first fluctuation description parameter and the second fluctuation description parameter as a state evaluation parameter corresponding to the current state description parameter.
[0135] It should be noted that the above-mentioned target operation cycle can be any time interval of the data. For example, when the target operation cycle is determined to be one week, the first reference description parameter indicates the average state of the current operation indicator of the current service instance within a week, and the second reference description parameter indicates the peak state of the current operation indicator within a week. To further illustrate, the first reference description parameter can be the average CPU utilization, average memory utilization, average network transmission rate, average network transmission flat response time, etc. within a week. The second reference description parameter can be the CPU utilization threshold, memory utilization threshold, network transmission rate threshold, network transmission flat response time threshold, etc. within a week.
[0136] Then, the difference between the current state description parameter and the first reference description parameter is determined as the first fluctuation description parameter, and the determination process may conform to the following mathematical model:
[0137] Z=UR
[0138] Z is the first fluctuation description parameter, U is the current state description parameter, and R is the first reference description parameter.
[0139] The sum of the first fluctuation description parameter and the second reference description parameter is determined as the second fluctuation description parameter; the determination process may conform to the following mathematical model:
[0140] O=Z+T
[0141] O is the second fluctuation description parameter, Z is the first fluctuation description parameter, and T is the second reference description parameter.
[0142] Afterwards, the ratio between the first fluctuation description parameter and the second fluctuation description parameter is determined as a state evaluation parameter corresponding to the current state description parameter, and the determination process may conform to the following mathematical model:
[0143] V=Z / O
[0144] V is the state evaluation parameter, Z is the first fluctuation description parameter, and O is the second fluctuation description parameter.
[0145] Through the above-mentioned implementation mode of the present application, the current state description parameter is obtained from multiple state description parameters, and the current reference description parameter matching the current state description parameter is obtained at the same time, the difference between the current state description parameter and the first reference description parameter is determined as the first fluctuation description parameter, and the sum of the first fluctuation description parameter and the second reference description parameter is determined as the second fluctuation description parameter; the ratio between the first fluctuation description parameter and the second fluctuation description parameter is determined as the state evaluation parameter corresponding to the current state description parameter, thereby realizing the determination of the state evaluation parameter.
[0146] In an optional implementation, when the target state evaluation parameter is greater than the third threshold, after determining that the running state of the current service instance is in a fluctuating state, the method includes:
[0147] S1, when the target state evaluation parameter is greater than a fourth threshold, sending a first traffic scheduling instruction matching the current service instance, wherein the fourth threshold is greater than the third threshold and less than 1, and the first traffic scheduling instruction is used to schedule all current data service traffic associated with the current service instance to at least one reference service instance among the multiple service instances;
[0148] S2. When the target state evaluation parameter is less than or equal to the fourth threshold value, the product of the target state evaluation parameter and the reference traffic ratio is determined as the target scheduling coefficient; a second traffic scheduling instruction matching the current service instance is sent according to the target scheduling coefficient, wherein the reference traffic ratio is the ratio of the current service traffic associated with the current service instance to the total service traffic of the target application, the target scheduling coefficient is used to indicate the scheduling ratio for performing traffic scheduling on the current data service traffic, and the second traffic scheduling instruction is used to schedule the current data service traffic to at least one reference service instance among multiple service instances according to the scheduling ratio indicated by the target scheduling coefficient.
[0149] It can be understood that the above-mentioned fourth threshold is a value greater than the third threshold and less than 1. When the target evaluation parameter is greater than the fourth threshold, the target evaluation parameter is of course greater than the third threshold. At this time, since the target evaluation parameter is greater than the third threshold, it is determined that the operating status of the current service instance is in a fluctuating state, and the current service instance needs to be traffic scheduled. Then, in step S1, all the traffic of the current service instance is scheduled to other service instances.
[0150] It should be noted that the above reference traffic ratio can be the traffic ratio of the current service instance among multiple cloud service instances associated with a target application. For example, assuming that 80% of the current traffic of application A is in the current service instance and 20% of the traffic is in other service instances, then the reference traffic ratio is 80%.
[0151] Optionally, when the target state evaluation parameter is less than or equal to the fourth threshold, and because the target state evaluation parameter has been determined to be greater than the third threshold, the target state evaluation parameter is actually within the threshold interval formed by the third threshold and the fourth threshold. In this case, the product of the target state evaluation parameter and the reference traffic ratio is determined as the target scheduling coefficient. For example, at this time, the value of the target state evaluation parameter is 60%, the third threshold is 20%, the fourth threshold is 75%, and the reference traffic ratio is 80%. At this time, the value of the target state evaluation parameter is 60% and the value of the reference traffic ratio is 80%. The result of the multiplication, 48%, is determined as the target scheduling coefficient, which indicates that 48% of the target application traffic originally belonging to the current service instance is reallocated to other service instances.
[0152] According to the above-mentioned implementation mode of the present application, through the target state evaluation parameter, when the target state evaluation parameter is greater than the fourth threshold, the first traffic scheduling instruction matching the current service instance is sent, and when the target state evaluation parameter is less than or equal to the fourth threshold, the product of the target state evaluation parameter and the reference traffic ratio is determined as the target scheduling coefficient; according to the target scheduling coefficient, the second traffic scheduling instruction matching the current service instance is sent, so that after determining that the operating state of the current service instance is in a fluctuating state, the traffic of the service instance is scheduled, thereby reducing the impact caused by the fluctuating state of the service instance.
[0153] In an optional implementation, after determining the difference between the current state description parameter and the first reference description parameter as the first fluctuation description parameter, and determining the sum of the fluctuation description parameter and the second reference description parameter as the second fluctuation description parameter, the method further includes:
[0154] S1, when the first fluctuation description parameter is a negative number, determining the difference between the first reference description parameter and the third reference description parameter as the third fluctuation description parameter, wherein the third reference description parameter is used to indicate the valley state of the current operation indicator within the target operation cycle;
[0155] S2, determining the ratio of the current state description parameter to the third reference description parameter as a fourth reference description parameter;
[0156] S3, determining the difference between the value 1 and the fourth reference description parameter as the state evaluation parameter corresponding to the current state description parameter.
[0157] It is easy to understand that when the first fluctuation description parameter is a negative number, the calculation of the state evaluation parameter can conform to the following mathematical model:
[0158] S=RM
[0159] W=U / S
[0160] V=1-W
[0161] R is the first reference description parameter, M is the third reference description parameter, S is the third fluctuation description parameter, U is the current state description parameter, W is the fourth state description parameter, and V is the state evaluation parameter.
[0162] Through the above implementation of the present application, when the first fluctuation description parameter is a negative number, the state evaluation parameter can be calculated in another calculation method.
[0163] In an optional implementation, when it is determined that the current service instance meets the traffic scheduling condition according to the first state identification result and the second state identification result, sending a traffic scheduling instruction matching the current service instance further includes:
[0164] S1, determining at least one target service instance in a stable operation state from a plurality of service instances associated with a target application, wherein the target service instance is a service instance that does not meet a traffic scheduling condition;
[0165] S2, determining the traffic receiving ratios that match the at least one target service instance respectively according to the state description parameters corresponding to the at least one target service instance;
[0166] S3, sending a traffic scheduling instruction matching the current service instance according to the traffic receiving ratio matched by at least one target service instance, wherein the traffic scheduling instruction is used to schedule the current data service traffic associated with the current service instance to at least one target service instance according to the traffic receiving ratio.
[0167] In this embodiment, a service instance in a stable state is determined as a target service instance that can be used for traffic reception. The stable state can be judged based on whether the service instance meets the traffic scheduling conditions. A service instance that does not meet the traffic scheduling conditions is a service instance in a stable state, and a service instance that meets the traffic scheduling conditions is a service instance in a stable state.
[0168] Furthermore, the traffic receiving ratio of the target service instance is further determined according to the state description parameters of the target service instance. For example, the corresponding state evaluation parameters can be determined according to the state description parameters of the target service instance, and the traffic receiving ratio is determined according to the ratio of the state evaluation parameters. It can be understood that when the state evaluation parameter is less than the third threshold, it means that the service instance does not meet the traffic scheduling condition, the service instance is in a stable state, and the smaller the state evaluation parameter, the more stable the service instance. Assume that there are currently target service instance 1, target service instance 2 and target service instance 3, the state evaluation parameter of target service instance 1 is 15%, the state evaluation parameter of target service instance 2 is 6%, and the state evaluation parameter of target service instance 3 is 22%. The traffic receiving ratios of the three target service instances are:
[0169] (Third threshold - 15%):(Third threshold - 6%):(Third threshold - 22%)
[0170] When the third threshold is 30%, the traffic receiving ratio of the three target service instances is 15:24:8.
[0171] Afterwards, according to the determined traffic receiving ratio, a traffic scheduling instruction is sent to allocate the traffic to be scheduled in the current service instance to the target service instance according to the traffic receiving ratio.
[0172] Through the above implementation of the present application, the traffic receiving ratio between the target service instances can be determined, so that the target service instance can receive the traffic that needs to be scheduled in the current service instance in proportion to the determined traffic receiving ratio.
[0173] The following combination Figures 3 to 6 A complete traffic scheduling process is described.
[0174] Figure 3In the example, the same business process Service is deployed in cloud platform 311 and cloud platform 312. At the same time, cloud platform 311 implants startup process Init and resident process Agent in cloud instance 321 and cloud instance 322. Similarly, cloud platform 312 implants startup process and resident process in cloud instance 331 and cloud instance 332. Monitoring module 302 is responsible for collecting cloud instance monitoring data in cloud platform 311 and cloud platform 312. Specifically, monitoring module 302 collects startup logs through the startup process implanted in the cloud instance, and collects memory utilization, CPU utilization, network data packets and process logs through the resident process implanted in the cloud instance. The collected data is then passed to cloud instance analysis and determination module 303 for analysis and determination. Cloud instance analysis and determination module 303 compares the differences in log content, calculates the resource rate fluctuation range and the network data packet transmission rate.
[0175] The log content difference comparison process is as follows: Figure 4 In the startup log library 411, there are startup logs 413 obtained from cloud instance 401 and startup logs 412 obtained from cloud instance 402. At this time, there is currently a cloud instance 403 being started. Figure 3 The startup process implanted in the system obtains the startup log 414. At this time, step S401 is executed to compare the differences between the startup log 414 and the startup logs 412 and 413 in the startup log library. Specifically, first, the startup process description data in the startup log, such as the execution timestamp, etc., is skipped. Then, the log content other than the startup process description data is compared. When it is detected that the startup log 414 has no difference compared with the startup logs 413 and 412, step S402-1 is executed to determine that there is no abnormality in the startup phase, the inspection is passed, and the traffic is received.
[0176] When it is detected that the startup log 414 is different from the startup log 413 and the startup log 412, step S402-2 is executed to determine that there are differences in the startup phase. Then, to determine whether the detected differences indicate that the cloud instance 403 is abnormal in startup, step S402 is executed to analyze and determine the log difference points. If there are obvious differences between the startup log 414 and the startup log 413 and the startup log 412, for example, the command execution sequence recorded in the startup log 414 is changed compared with the startup log 413 and the startup log 412, and the log content of the startup log 414 increases or decreases relative to the startup log 413 and the startup log 412, and the number of the above differences exceeds the threshold, then it is considered that the above differences have an impact on the cloud instance 403. At this time, step S403-2 is executed, an abnormality is found, the inspection fails, and the traffic is rejected. In addition, when there are logs of "error" level among the detected differences, step S403-2 is directly executed without threshold comparison. When the number of the above differences does not exceed the threshold, it is considered that the above differences have no impact on the cloud instance 403. At this time, step S403-1 is executed to enrich the startup log library. It should be noted that the operation of enriching the log library can be to add the startup log 414 to the startup log library 411, or to use the startup log 414 to overwrite and replace the original startup log 413 and startup log 412 in the startup log library 411.
[0177] Optionally, the calculation of the resource rate fluctuation range and the network data packet transmission rate can be as follows: Figure 5 As shown, the resident process Agent implanted in the cloud platform collects the CPU resource utilization, memory utilization, network transmission rate, and transmission flat response time per unit time of the cloud instance 501, and relies on the above data to determine the fluctuation of resource utilization and the fluctuation of network transmission data packets. Specifically, two types of data are first determined, one is daily reference data, including daily average data within a period of time, and the maximum value of a period of time during normal operation is taken as the daily threshold, and the other is real-time monitoring data, taking the maximum value within the unit statistical time as the fluctuation peak value, calculating the difference between the fluctuation peak value and the daily average value, and taking the difference as the fluctuation coefficient, the calculation formula is as follows:
[0178] Volatility coefficient = peak volatility - daily average
[0179] Then, the flow scheduling coefficients corresponding to the above four parameters are determined according to the fluctuation coefficient. When the fluctuation coefficient is positive, the flow scheduling coefficient is calculated as follows:
[0180] Traffic scheduling coefficient = fluctuation coefficient / (fluctuation coefficient + daily threshold)
[0181] When the fluctuation coefficient is negative, the minimum value of a period of time during normal operation is taken as the daily minimum threshold. At this time, the traffic scheduling coefficient is calculated as follows:
[0182] Traffic scheduling coefficient = fluctuation peak value / (daily average value - daily minimum threshold value)
[0183] The above algorithm is used to determine the traffic scheduling coefficients corresponding to the CPU resource utilization, memory utilization, network transmission rate, and transmission response time per unit time, respectively. Then, the weighted sum of the four traffic scheduling coefficients is taken to obtain the traffic scheduling coefficient of cloud instance 501.
[0184] Then, step S501 is executed to check whether the cloud instance is in a stable state. Specifically, the traffic scheduling coefficient of cloud instance 501 is compared with the preset upper and lower limits of the traffic scheduling coefficient. When the traffic scheduling coefficient of cloud instance 501 is higher than the preset lower limit of the traffic scheduling coefficient, step S502 is executed to trigger traffic scheduling. If it is lower than the preset lower limit of the traffic scheduling coefficient, no operation is performed.
[0185] Optionally, a stable state judgment operation may also be performed on the cloud platform. Figure 5 Each cloud embodiment in the cloud platform where the cloud instance 501 is located calculates the traffic scheduling coefficient corresponding to each cloud instance, and performs weighted average on the traffic scheduling coefficients of each cloud instance to obtain the cloud platform traffic scheduling coefficient of the cloud platform. Afterwards, the traffic scheduling coefficient of the cloud platform is compared with the preset upper and lower limits of the traffic scheduling coefficient. When the traffic scheduling coefficient of the cloud platform is higher than the preset lower limit of the traffic scheduling coefficient, step S502 is executed to trigger traffic scheduling. If it is lower than the preset lower limit of the traffic scheduling coefficient, the traffic scheduling operation is not performed.
[0186] The following combination Figure 6 The following example illustrates the process of traffic scheduling. Assume that: Figure 6 In the example, the traffic scheduling module 601 initially deploys all the traffic of a certain service in the cloud instances 621, 622, and 623 in the cloud platform 611. The traffic scheduling module 601 receives the traffic scheduling coefficient generated by the data analysis and determination module 602. The traffic scheduling module 601 forwards the traffic normally when the cloud platform 611 is in a stable state. That is, the traffic scheduling ratio at this time is 0, and the cloud platform 611 is not scheduled for traffic. When the cloud platform 611 is in an unstable state, traffic scheduling is performed. Specifically, when the traffic scheduling coefficient of the cloud platform 611 is higher than the preset upper limit of the traffic scheduling coefficient, the traffic scheduling ratio at this time is determined to be 1. That is, all the traffic of the cloud platform 611 is scheduled to the cloud platform 612 and the cloud platform 613. If the traffic scheduling coefficient of the cloud platform 611 is between the upper and lower limits of the preset traffic scheduling coefficient, then at this time, according to the size of the traffic scheduling coefficient, part of the traffic of the cloud platform 611 is scheduled to the cloud platform 612 and the cloud platform 613, and further examples are given below.
[0187] Assume that application A is deployed in city S on cloud platforms A and B. Cloud platform A carries 80% of the traffic of application A, and cloud platform B carries the remaining 20% of the traffic. The monitoring system collects monitoring data of service instances of all cloud platforms, including data of two processes implanted by the cloud platforms into the cloud instances.
[0188] Under normal circumstances, application A is deployed on two cloud platforms and provides normal services.
[0189] At this time, if Cloud Platform A upgrades the VPC (Virtual Private Cloud) for City S, due to unknown problems during the upgrade process, all available area networks of Cloud Platform A in City S fail, and the recovery time cannot be determined.
[0190] When the A cloud platform is about to have an abnormality, the cloud implant process Cloud-Agent will obtain the increase in CPU utilization in the first time, because the connection between this agent and the cloud platform service center will time out and be interrupted. At the same time, the transmission response time of this process will double and the transmission rate will decrease.
[0191] Then the cloud implantation process Cloud-Agent obtains the CPU and memory utilization of the cloud instance, the daily network transmission response time, the network transmission rate and calculates the traffic scheduling coefficient.
[0192] Optionally, the cloud implantation process Cloud-Agent obtains the CPU and memory utilization, daily network transmission response time, network transmission rate of the cloud instance and calculates the traffic scheduling coefficient by separately obtaining the CPU and memory utilization, daily network transmission response time, and network transmission rate of each cloud instance. Then, a weighted average is performed to obtain the total CPU and memory utilization, daily network transmission response time, and network transmission rate. Then, the total CPU and memory utilization, daily network transmission response time, and network transmission rate are calculated to obtain the traffic scheduling coefficient of cloud platform A. Alternatively, the CPU and memory utilization, daily network transmission response time, and network transmission rate of each cloud instance can be obtained separately, and then the traffic scheduling coefficient of each cloud instance can be calculated. Then, the traffic scheduling coefficient of each cloud instance is weighted averaged to calculate the traffic scheduling coefficient of the entire cloud platform.
[0193] The following example takes a solution of calculating the traffic scheduling coefficient of each cloud instance by obtaining the CPU and memory utilization, daily network transmission average response time, and network transmission rate of each cloud instance, and then performing weighted summation of the traffic scheduling coefficients of each cloud instance to calculate the traffic scheduling coefficient of the entire cloud platform:
[0194] Assume that in this case, the data simulation of the A cloud instance in the A cloud platform is as follows: the daily CPU and memory utilization obtained by the Cloud-Agent process is 1% on a daily basis, the threshold is 2%, and it can exceed 10% in abnormal situations; the daily network transmission response time is 20ms on a daily basis, the threshold is 100ms, and it can exceed 1000ms in abnormal situations; the network transmission rate can be reduced from the daily 2Mbit / s and the minimum threshold of 1000Kbit / s to 10Kbit / s. First, calculate the fluctuation coefficient of each parameter. The fluctuation coefficient calculation formula is:
[0195] Volatility coefficient = peak volatility - daily average
[0196] Furthermore, the CPU fluctuation coefficient can be obtained as:
[0197] CPU fluctuation coefficient = 10-1 = 9
[0198] The memory fluctuation number is:
[0199] Memory fluctuation coefficient = 10-1 = 9
[0200] The fluctuation coefficient of network transmission flat response time is:
[0201] Network transmission flat response time fluctuation coefficient = 1000-20 = 980
[0202] The network transmission rate fluctuation coefficient is:
[0203] Network transmission rate fluctuation coefficient = 10-2*1024 = -2038
[0204] The value of the network transmission rate fluctuation coefficient is negative. In this case, the calculation of the network transmission rate traffic scheduling coefficient uses the algorithm when the corresponding fluctuation coefficient is negative:
[0205] Traffic scheduling coefficient = fluctuation peak value / (daily average value - daily minimum threshold value)
[0206] At this time, the traffic scheduling coefficient of the network transmission rate is:
[0207] Network transmission rate scheduling coefficient = 1-(10 / (2*1024-1000)) = 0.9
[0208] The volatility coefficients of the other three parameters are positive, and the algorithm used when the volatility coefficients are positive is:
[0209] Traffic scheduling coefficient = fluctuation coefficient / (fluctuation coefficient + daily threshold)
[0210] Furthermore, the CPU traffic scheduling coefficient can be obtained as:
[0211] CPU traffic scheduling coefficient = 9 / (9+2) = 0.81
[0212] The memory traffic scheduling coefficient is:
[0213] Memory traffic scheduling coefficient = 9 / (9+2) = 0.81
[0214] The network transmission time flow scheduling coefficient is:
[0215] Network transmission time flow scheduling coefficient = 980 / (980+100) = 0.9
[0216] Afterwards, the mathematical model of the target state evaluation parameter is determined by weighted summation mentioned in other embodiments: The traffic scheduling coefficient of the cloud instance is calculated as (assuming that the weighted value J of the traffic scheduling coefficient corresponding to each parameter is n All are 100%):
[0217] Cloud instance traffic scheduling coefficient = ((0.81+0.81+0.9+0.9)*100%) / 4 = 85%
[0218] It is understandable that the traffic scheduling coefficients of other cloud instances of Cloud Platform A can be calculated through the above process, and the traffic scheduling coefficients of each cloud instance can be weighted averaged using the following algorithm to calculate the traffic scheduling coefficient of Cloud Platform A:
[0219]
[0220] I represents the cloud platform traffic scheduling coefficient, T n Represents the weight value, H n Represents the traffic scheduling coefficient of each cloud instance on the cloud platform.
[0221] Assume that the traffic scheduling coefficient of cloud platform A is 86% after weighted average of each cloud instance on cloud platform A using the calculation formula of the traffic scheduling coefficient of cloud platform A. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, the traffic scheduling coefficient value of cloud platform A has exceeded the upper limit of the traffic scheduling coefficient. At this time, it is considered that cloud platform A is about to fail completely, and all traffic of the application is completely scheduled to cloud platform B.
[0222] If the traffic scheduling coefficient of cloud platform A is calculated by weighted average of each cloud instance on cloud platform A using the calculation formula of the traffic scheduling coefficient of cloud platform A, the traffic scheduling coefficient of cloud platform A is 73%. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, and the traffic scheduling coefficient value of cloud platform A is between the preset upper and lower limits of the traffic scheduling coefficient, then 73% of the traffic allocated to cloud platform A will be allocated to cloud platform B.
[0223] For another example, the traffic scheduling coefficient of cloud platform A is 12% after weighted average of each cloud instance on cloud platform A using the calculation formula of the traffic scheduling coefficient of the cloud platform. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, and the traffic scheduling coefficient value of cloud platform A is lower than the preset lower limit of the traffic scheduling coefficient, then traffic scheduling will not be performed on cloud platform A.
[0224] It should be noted that the object for calculating the traffic scheduling coefficient and determining whether traffic scheduling is required can also be a cloud instance. For example, the traffic scheduling coefficient of cloud instance A in the above cloud platform A is 85%. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, the traffic scheduling coefficient value of cloud instance A has exceeded the upper limit of the traffic scheduling coefficient. At this time, all traffic of cloud instance A will be completely scheduled to other cloud instances.
[0225] For another example, suppose that the traffic scheduling coefficient of cloud instance B in cloud platform A is 65%. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, and the traffic scheduling coefficient value of cloud instance B is between the preset upper and lower limits of the traffic scheduling coefficient, then 65% of the traffic allocated to cloud instance B will be allocated to other cloud instances.
[0226] For another example, suppose that the traffic scheduling coefficient of the C cloud instance in the A cloud platform is 7%. If the preset lower limit of the traffic scheduling coefficient is 20% and the upper limit is 80%, and the traffic scheduling coefficient value of the C cloud instance is lower than the preset lower limit of the traffic scheduling coefficient, then traffic scheduling will not be performed on the C cloud instance at this time.
[0227] Optionally, during the process of executing traffic scheduling, the party receiving the traffic may determine that the cloud instance can be started normally or is in a stable state. Figure 6 In the example, cloud instance 624 in cloud platform 612 passes Figure 4 After judging the startup log shown in the figure, it is determined that the startup is abnormal. At this time, cloud instance 624 did not start normally, and other cloud instances started normally. After running for a period of time, cloud instance 627 in cloud platform 613 passed Figure 5 The cloud instance shown is determined to be in an unstable state after the stable state judgment. At this time, if traffic scheduling is performed on the cloud platform 611, the cloud instances that specifically receive the traffic are cloud instance 625, cloud instance 626, cloud instance 628, and cloud instance 629.
[0228] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0229] According to another aspect of the embodiment of the present application, a traffic scheduling device for implementing the above traffic scheduling method is also provided. Figure 7 As shown, the device comprises:
[0230] An acquiring unit 702 is used to acquire running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application;
[0231] A first determining unit 704 is configured to determine a first state identification result according to a comparison between the startup log and the reference log when the running state detection message includes a startup log, wherein the startup log is used to describe multiple object operations performed by the current service instance during the startup process;
[0232] A second determining unit 706 is configured to determine a second state identification result according to a comparison between the at least one state description parameter and the respective corresponding reference description parameters when the running state detection information includes at least one state description parameter, wherein the state description parameter is used to indicate the running state of the current service instance within the target detection period;
[0233] The sending unit 708 is used to send a traffic scheduling instruction that matches the current service instance when it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, wherein the traffic scheduling instruction is used to schedule the current data service traffic associated with the current service instance to at least one reference service instance among multiple service instances.
[0234] According to another aspect of the embodiment of the present application, an electronic device for implementing the traffic scheduling method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a mobile phone or a computer as an example. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0235] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0236] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0237] S1, obtaining running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application;
[0238] S2, when the running status detection information includes a startup log, determining a first status identification result according to a comparison between the startup log of the current service instance and the reference log;
[0239] S3, when the running state detection information includes at least one state description parameter, determining a second state identification result according to a comparison between at least one state description parameter of the current service instance and the respective corresponding reference description parameters, wherein the state description parameter is an running parameter within a target detection period;
[0240] S4, when it is determined that the current service instance meets the traffic scheduling conditions according to the first state identification result and the second state identification result, a traffic scheduling instruction is sent to instruct the current data service traffic of the current service instance to be scheduled to at least one reference service instance among multiple service instances.
[0241] Alternatively, a person skilled in the art may understand that: Figure 7 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 7 The structure of the electronic device is not limited. Figure 7 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 7 Different configurations are shown.
[0242] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for traffic scheduling in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, to implement the above-mentioned traffic scheduling method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as page elements and page styles. As an example, such as Figure 8 As shown, the memory 802 may include but is not limited to the acquisition unit 702, the first determination unit 704, the second determination unit 706 and the sending unit 708 in the traffic scheduling device. In addition, it may also include but is not limited to other module units in the traffic scheduling device, which will not be repeated in this example.
[0243] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0244] In addition, the electronic device further includes: a display 808 for displaying the target page; and a connection bus 810 for connecting various module components in the electronic device.
[0245] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a point-to-point network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the point-to-point network.
[0246] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations;
[0247] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0248] S1, obtaining running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application;
[0249] S2, when the running status detection information includes a startup log, determining a first status identification result according to a comparison between the startup log of the current service instance and the reference log;
[0250] S3, when the running state detection information includes at least one state description parameter, determining a second state identification result according to a comparison between at least one state description parameter of the current service instance and the respective corresponding reference description parameters, wherein the state description parameter is an running parameter within a target detection period;
[0251] S4, when it is determined that the current service instance meets the traffic scheduling conditions according to the first state identification result and the second state identification result, a traffic scheduling instruction is sent to instruct the current data service traffic of the current service instance to be scheduled to at least one reference service instance among multiple service instances.
[0252] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0253] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0254] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0255] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0256] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0257] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0258] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0259] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A traffic scheduling method, characterized in that: include: Acquire running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application; In a case where the running status detection information includes a startup log, determining a first status identification result according to a comparison between the startup log of the current service instance and a reference log; In a case where the running state detection information includes at least one state description parameter, determining a second state identification result according to a comparison between at least one state description parameter of the current service instance and respective corresponding reference description parameters, wherein the state description parameter is an running parameter within a target detection period; When it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result, a traffic scheduling instruction is sent to instruct the current data service traffic of the current service instance to be scheduled to at least one reference service instance among the multiple service instances.
2. The method according to claim 1, characterized in that: In the case where the running status detection information includes a startup log, determining a first status identification result according to a comparison between the startup log and a reference log includes: Determining a log difference information set according to a comparison operation between the startup log and the reference log; In a case where the log difference information set includes a first log content configured with a target tag, determining that the startup state of the current service instance is an abnormal state, wherein the target tag is used to indicate an alarm level of the log content matching therewith; When the log difference information set does not include the first log content configured with the target tag, the first state identification result is determined according to the size of the log difference information set.
3. The method according to claim 2, characterized in that When the log difference information set does not include the first log content configured with the target tag, determining the first state identification result according to the size of the log difference information set includes one of the following: When the number of second log contents in the log difference information set is greater than or equal to a first threshold, determining that the startup state of the current service instance is an abnormal state; When the amount of the second log content in the log difference information set is less than the first threshold, determining that the startup state of the current service instance is a normal state; When the quantity ratio between the second log content and the reference log content in the log difference information set is greater than or equal to a second threshold, determining that the startup state of the current service instance is an abnormal state; When the quantity ratio between the second log content and the reference log content in the log difference information set is less than the second threshold, determining that the startup state of the current service instance is a normal state; The second log content is used to describe the operation mode and response result of the object operation.
4. The method according to claim 2, characterized in that: Before determining the first state identification result according to the size of the log difference information set, the method further includes: in a case where the log difference information set includes third log content, deleting the third log content from the log difference information set, wherein the third log content is used to describe operation attribute information of the object operation; And / or, after determining the first state identification result according to the scale of the log difference information set, it also includes: when the first state identification result indicates that the startup state of the current service instance is normal, updating the reference log according to the second log content in the log difference information set.
5. The method according to claim 1, characterized in that In a case where the running state detection information includes at least one state description parameter, determining the second state identification result according to a comparison between at least one state description parameter and respective corresponding reference description parameters includes: According to at least one of the state description parameters and the corresponding reference description parameters, respectively determine the state evaluation parameters corresponding to at least one of the state description parameters, wherein the state evaluation parameters are used to indicate the comparison between the state description parameters and the reference description parameters, and the state description parameters are parameters obtained according to the resident process monitoring operation during the operation of the current service instance; Determining a target state evaluation parameter according to a weighted summation result of at least one of the state evaluation parameters; When the target state evaluation parameter is less than or equal to a third threshold, determining that the running state of the current service instance is in a stable state; When the target state evaluation parameter is greater than a third threshold, it is determined that the running state of the current service instance is in a fluctuating state.
6. The method according to claim 5, characterized in that The determining, according to the at least one state description parameter and the respectively corresponding reference description parameter, a state evaluation parameter respectively corresponding to the at least one state description parameter comprises: Acquire a current state description parameter from at least one of the state description parameters, and acquire a first reference description parameter and a second reference description parameter matching the current state description parameter, wherein the first reference description parameter is used to indicate an average state of a current operating indicator of the current service instance within a target operating cycle, and the second reference description parameter is used to indicate a peak state of the current operating indicator within the target operating cycle; Determine the difference between the current state description parameter and the first reference description parameter as a first fluctuation description parameter, and determine the sum of the first fluctuation description parameter and the second reference description parameter as a second fluctuation description parameter; The ratio between the first fluctuation description parameter and the second fluctuation description parameter is determined as the state evaluation parameter corresponding to the current state description parameter.
7. The method according to claim 5, characterized in that When the target state evaluation parameter is greater than a third threshold, after determining that the running state of the current service instance is in a fluctuating state, the method further includes: In a case where the target state evaluation parameter is greater than a fourth threshold, sending a first traffic scheduling instruction matching the current service instance, wherein the fourth threshold is greater than the third threshold and less than 1, and the first traffic scheduling instruction is used to schedule all current data service traffic associated with the current service instance to at least one reference service instance among the multiple service instances; When the target state evaluation parameter is less than or equal to a fourth threshold value, the product of the target state evaluation parameter and the reference traffic ratio is determined as a target scheduling coefficient; and a second traffic scheduling instruction matching the current service instance is sent according to the target scheduling coefficient, wherein the reference traffic ratio is a ratio of the current data service traffic associated with the current service instance to the total service traffic of the target application, and the target scheduling coefficient is used to indicate the scheduling ratio for performing traffic scheduling on the current data service traffic, and the second traffic scheduling instruction is used to schedule the current data service traffic to at least one of the multiple service instances according to the scheduling ratio indicated by the target scheduling coefficient.
8. A flow scheduling device, characterized in that: include: An acquisition unit, configured to acquire running status detection information of a current service instance, wherein the current service instance is a service instance included in a plurality of service instances associated with a target application; A first determining unit, configured to determine a first state identification result according to a comparison between the startup log of the current service instance and a reference log when the running state detection information includes a startup log; A second determining unit is configured to determine a second state identification result according to a comparison between at least one state description parameter of the current service instance and respective corresponding reference description parameters when the operation state detection information includes at least one state description parameter, wherein the state description parameter is an operation parameter within a target detection period; A sending unit is used to send a traffic scheduling instruction to instruct the current data service traffic associated with the current service instance to be scheduled to at least one reference service instance among the multiple service instances when it is determined that the current service instance meets the traffic scheduling conditions based on the first state identification result and the second state identification result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.