CN114328692A - Data fluctuation processing method and device, electronic equipment and computer readable medium - Google Patents

Data fluctuation processing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN114328692A
CN114328692A CN202111647736.4A CN202111647736A CN114328692A CN 114328692 A CN114328692 A CN 114328692A CN 202111647736 A CN202111647736 A CN 202111647736A CN 114328692 A CN114328692 A CN 114328692A
Authority
CN
China
Prior art keywords
response
data
resource
data interface
fluctuation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111647736.4A
Other languages
Chinese (zh)
Inventor
李尊杰
王健
徐锐
刘通
吴保青
郑义
孙鹏
槐正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111647736.4A priority Critical patent/CN114328692A/en
Publication of CN114328692A publication Critical patent/CN114328692A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of communication, in particular to a data fluctuation processing method and device, electronic equipment and a computer readable medium, wherein the method comprises the following steps: acquiring a sampling file corresponding to the data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period; calculating a fluctuation value according to the response information; determining whether a resource inlet associated with the data interface is stable according to the fluctuation value; and if the data interface is unstable, switching the resource entry into a standby resource entry so as to provide the data for the data interface through the standby resource entry. The embodiment of the application monitors the resource entrance of the data interface, replaces the unstable resource entrance with the standby resource entrance, realizes the automatic replacement of the standby scheme, and is beneficial to improving the processing efficiency and improving the user experience.

Description

Data fluctuation processing method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data fluctuation processing method, a data fluctuation processing apparatus, an electronic device, and a computer-readable medium.
Background
With the continuous development and enrichment of the content of the client, the data support and the call of the multiple platforms and the multiple systems bring challenges and influences on the stability of the systems, and when data is called among the systems, if the data transmission is in a problem or fluctuates, the normal display and use of a series of related functions and service pages of the client are influenced, and the problem of the reduction of the service quality of the client is caused.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present application provide a data fluctuation processing method, a data fluctuation processing apparatus, an electronic device, and a computer-readable medium.
According to an aspect of an embodiment of the present application, there is provided a data fluctuation processing method, including: acquiring a sampling file corresponding to a data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period; calculating a fluctuation value according to the response information; determining whether a resource inlet associated with the data interface is stable according to the fluctuation value; and if the data interface is unstable, switching the resource entry into a standby resource entry so as to provide data for the data interface through the standby resource entry.
According to an aspect of an embodiment of the present application, there is provided a data fluctuation processing apparatus, including: the acquisition module is configured to acquire a sampling file corresponding to a data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period; a calculation module configured to calculate a fluctuation value from the response information; the determining module is configured to determine whether the resource inlet associated with the data interface is stable according to the fluctuation value; and the switching module is configured to switch the resource entry to a standby resource entry if the data interface is unstable, so as to provide data for the data interface through the standby resource entry.
In an embodiment of the present application, based on the foregoing solution, the calculating module further includes: an influence parameter determination module configured to determine an influence parameter according to the response information; wherein the influence parameter includes at least one of the response time, the response code, and a preset parameter contained in the response packet; a fluctuation value calculation module configured to calculate the fluctuation value according to the influence parameter.
In an embodiment of the present application, based on the foregoing solution, the fluctuation value calculation module further includes: a first determining submodule configured to determine an overtime response rate according to the response time and determine an error rate according to the response code if determining that the influence parameter is the response time and the response code according to the response information; a first calculation submodule configured to calculate the fluctuation value according to the timeout response rate and the error report rate.
In an embodiment of the present application, based on the foregoing solution, the first determining sub-module further includes: a timeout response rate determination unit configured to acquire response times contained in the respective pieces of response information; counting the total number of response time and the number of response time as overtime response time according to each response time; determining the timeout response rate according to the total number of the response times and the number of the timeout response times; wherein, the response information is a plurality of; an error rate determination unit configured to acquire response codes contained in the respective pieces of response information; counting the total number of the response codes and the number of the response codes which are correct according to each response code; determining the error reporting rate according to the total number of the response codes and the number of the correct response codes; wherein, the response information is a plurality of.
In an embodiment of the present application, based on the foregoing solution, the determining module further includes: a comparison unit configured to compare the fluctuation value with a preset fluctuation threshold; the judging unit is configured to determine that the resource inlet associated with the data interface is unstable if the fluctuation value is greater than the preset fluctuation threshold value; and if the fluctuation value is less than or equal to the preset fluctuation threshold value, determining that the resource inlet associated with the data interface is stable.
In an embodiment of the present application, based on the foregoing solution, the switching module further includes: a first switching unit configured to switch a resource bit associated with the data interface to a standby resource bit corresponding to an associated resource bit if a primary resource bit corresponds to a standby resource bit; the resource entry comprises a main resource bit storing data, and the standby resource entry comprises a standby resource bit storing standby data. A second switching unit, configured to switch the resource bit associated with the data interface to a standby resource bit corresponding to the associated resource bit if the plurality of active resource bits share one standby resource bit; the resource entry comprises a main resource bit storing data, and the standby resource entry comprises a standby resource bit storing standby data.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the data fluctuation processing method as described above.
According to an aspect of the embodiments of the present application, there is provided a computer-readable medium having stored thereon computer-readable instructions, which, when executed by a processor of a computer, cause the computer to execute the data fluctuation processing method as described above.
In the technical solution provided in the embodiment of the present application, a server samples data output by a data interface, determines an influence parameter of a fluctuation value according to response information contained in a sampling file, calculates the fluctuation value according to the influence parameter, and analyzes whether a resource entry providing data for the data interface is stable according to the fluctuation value, thereby implementing automatic monitoring of data fluctuation, if it is determined that the resource entry associated with the data interface is unstable according to the fluctuation value, the unstable resource entry is replaced by a standby resource entry, the standby resource entry provides data for the data interface, thereby implementing automatic replacement of a standby scheme, thereby implementing entry of the standby service scheme when part of functional stability of a terminal has a problem, thereby providing corresponding data for the data interface, thereby enabling a client to be normally displayed and used, in this embodiment, through automatic replacement of the standby scheme, the user experience is also improved to a certain extent.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of a data fluctuation handling system framework shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a data fluctuation handling method according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart of step S220 in the embodiment shown in FIG. 2 in an exemplary embodiment;
FIG. 4 is a flow chart of step S320 in the embodiment shown in FIG. 3 in an exemplary embodiment;
FIG. 5 is a flow chart of step S410 in the embodiment shown in FIG. 4 in an exemplary embodiment;
FIG. 6 is a flow chart of step S410 in the embodiment shown in FIG. 4 in another exemplary embodiment;
FIG. 7 is a flowchart of step S230 in the embodiment shown in FIG. 2 in an exemplary embodiment;
FIG. 8 is a flow chart diagram illustrating a data fluctuation handling method according to another exemplary embodiment of the present application;
FIG. 9 is a block diagram of a data fluctuation processing apparatus shown in an exemplary embodiment of the present application;
FIG. 10 is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Reference to "a plurality" in this application means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
First, in the field of communication technology, a data interface plays an important role in data transmission and information exchange. Typically, the data interface is associated with at least one resource entry for providing outgoing data to the data interface. Due to the data support and the call of the multi-platform and multi-system, data fluctuation is easy to occur in the data of the resource inlet, and if the data of the resource inlet fluctuates, the resource inlet associated with the data interface is unstable, so that the related functions and the service page of the client cannot be normally used, and the use experience of a user is reduced.
Therefore, when the data fluctuation occurs in the bottom layer data transmission to cause the instability of the resource entry of the data interface, the problem of the relevant data fluctuation can be monitored in time, so that corresponding measures can be taken in time to maintain the normal relevant functions and service pages of the client. In the related art, data output by a data interface is generally monitored and analyzed, if an abnormality is found, an alarm is given, and then corresponding processing of a resource entry is manually performed, but manual processing has untimely property.
In order to avoid the untimely manual operation and improve the exception handling efficiency, the application provides a data fluctuation handling system, which comprises a terminal and a server, wherein:
the server side obtains a sampling file corresponding to the data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period;
calculating a fluctuation value according to the response information;
determining whether a resource inlet associated with the data interface is stable according to the fluctuation value;
and if the data interface is unstable, switching the resource entry into a standby resource entry so as to provide the data for the data interface through the standby resource entry.
Namely, the terminal and the server interact; specifically, the server side obtains a sampling file collected by the data interface side, calculates a fluctuation value according to response information contained in the sampling file, judges whether a resource entry associated with the data interface is stable according to the fluctuation value, switches the resource entry into a standby resource entry if the resource entry associated with the data interface is determined to be unstable, and provides data for the data interface through the standby resource entry.
FIG. 1 is a schematic diagram of a data fluctuation handling system framework shown in an exemplary embodiment of the present application, as shown in FIG. 1, as seen from the data fluctuation handling system framework shown in FIG. 1, wherein: the server 101 has a logic calculation, and the server 101 calculates a fluctuation value according to response information contained in the sample file, and determines whether a resource entry for providing data to the data interface is stable according to the fluctuation value, so as to replace the unstable resource entry with a spare resource entry.
It should be noted that, in the data fluctuation processing system, the terminal 102 may send any data interface call request and/or data call request to the server 101, and the server 101 responds to the corresponding request of the terminal 102 to provide the corresponding data interface, resource entry and related data required by the terminal 102 for the terminal.
It should be noted that the association relationship between the data interface and the resource entry may be one-to-one, or one-to-many, or many-to-one, or many-to-many, and the specific correspondence relationship is set by the operator according to different functions, which is not limited herein.
It should be noted that the resource entry includes a primary resource bit storing data, and the data stored in the primary resource bit may include data such as pictures and characters, and may also include data related to an operation manner such as a jump and an operation link.
In an embodiment of the present application, the server 101 is a server, for example, may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), and a big data and artificial intelligence platform, which is not limited herein. The server 101 may communicate with the terminal 102 through a wireless network such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), 5G (fifth generation mobile information technology), and the like, which is not limited herein.
In an embodiment of the present application, the terminal 102 may be a smart phone, a tablet Computer, a PC (Personal Computer), or any other electronic device capable of operating a client, which is not limited herein.
Based on the application scenario in fig. 1, after the technical solution of the embodiment of the present application is adopted, the server 101 calculates a fluctuation value according to response information contained in a sampling file, and determines whether a resource entry providing data for the data interface is stable according to the fluctuation value, thereby implementing automatic monitoring of data fluctuation, if it is determined that the resource entry associated with the data interface is unstable according to the fluctuation value, the unstable resource entry is replaced by a standby resource entry, the standby resource entry provides data for the data interface, thereby implementing automatic replacement of a standby scheme, thereby implementing entry into the standby service scheme when part of functional stability of the terminal 102 has a problem, and facilitating improvement of user experience.
Various implementation details of the technical solution of the embodiments of the present application are set forth in detail below:
fig. 2 is a flowchart illustrating a data fluctuation processing method according to an exemplary embodiment of the present application. As shown in fig. 2, the method may be performed by the server 101 in the data fluctuation processing system framework shown in fig. 1. It should be understood that the method may be applied to other exemplary implementation environments and is specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
As shown in fig. 2, the data fluctuation processing method at least includes steps S210 to S240, which are described in detail as follows:
step S210, a sampling file corresponding to the data interface is obtained, where the sampling file includes response information of the data interface for data call in a preset time period.
The sampling file corresponding to the data interface in the embodiment of the present application is a file obtained by sampling data output by the data interface.
The preset time period in the embodiment of the present application is a sampling time for sampling data output by the data interface.
In step S220, a fluctuation value is calculated based on the response information.
It should be noted that the response information in the embodiment of the present application includes, but is not limited to, a response time, a response code, and a response packet carrying a preset parameter.
The response time in the embodiment of the application refers to time for the server to provide the data interface and/or data corresponding to the data interface call request and/or the data call request for the client in response to the data interface call request and/or the data call request of the client.
The response code in this embodiment refers to a status code returned to the client by the server in response to the data interface call request and/or the data call request of the client, and the response code may be used to indicate whether the request has been completed, for example, the status code 200 indicates that the request is successfully received and the entire processing procedure has been completed, and the status code 500 indicates that an error occurs at the server.
The response message in the embodiment of the application refers to a message returned to the client when the server responds to the data interface call request and/or the data call request of the client, and the response message carries state information and all result data generated by operation.
The preset parameter in the embodiment of the application is a parameter for communication transmission between the server and the terminal, and the parameter may be set manually, for example, when the terminal requests to query the user score from the server, the server returns a response message carrying a user score query result to the terminal in response to the query request of the terminal, and at this time, the preset parameter in the response message is the user score query result.
In an embodiment of the present application, referring to fig. 3, the process of calculating the fluctuation value according to the response information in step S220 may include steps S310 to S320, which are described in detail as follows:
step S310, determining an influence parameter according to the response information; the influence parameter includes at least one of response time, response code and preset parameter contained in the response message.
It should be understood that the influencing parameter is an influencing factor of the fluctuation value. For data fluctuation of the data interface, response time, response codes and preset parameters contained in the response message are all in certain correlation with stability of the bottom-layer resource entry, so that factors of the data fluctuation can be determined according to information content contained in the response message, and the influencing parameters include at least one of the response time, the response codes and the preset parameters contained in the response message.
In step S320, a fluctuation value is calculated according to the influence parameter.
In this embodiment of the application, the influence parameter of the fluctuation value may be one or more of response time, a response code, and a preset parameter contained in a response message, and is determined according to an actual situation.
In an embodiment of the present application, referring to fig. 4, the process of calculating the fluctuation value according to the influence parameter in step S320 may include steps S410 to S420, which are described in detail as follows:
step S410, if the influence parameters are determined to be response time and response codes according to the response information, determining the response rate of overtime according to the response time, and determining the error rate according to the response codes.
The timeout response rate in the embodiment of the present application refers to a ratio of a number of response times exceeding a preset response time in a sampling time period to a total number of all response times.
The error reporting rate in the embodiment of the present application is a ratio of the number of error response codes in the sampling time period to the total number of all response codes.
In an embodiment of the present application, referring to fig. 5, the process of determining the timeout response rate according to the response time in step S410 may include steps S510 to S530, which are described in detail as follows:
in step S510, the response time included in each response message is acquired.
It can be understood that the number of the response information in the embodiment of the present application is multiple, a sampling file for performing sample acquisition on the data interface within a preset time period is obtained, the sampling file obtained within the preset time period includes multiple pieces of response information, and each piece of response information includes response time.
Step S520, counting the total number of response times according to each response time, and taking the response time as the number of the response time overtime.
The timeout response time in the embodiment of the present application refers to a timeout response time if the response time of the terminal for receiving information from the server exceeds a preset response time. The response time reflects whether the server can make a timely feedback on the request of the terminal, and if the continuous response time is overtime, the server may have problems such as data interface abnormality or unstable resource entry. The preset response time is the expected response time of the terminal for receiving the information from the server, and is preset according to manual experience or experiments.
In step S530, a timeout response rate is determined according to the total number of response times and the number of timeout response times.
In this embodiment of the present application, the calculation manner of the timeout response rate may include: and calculating the ratio of the number of the overtime response time to the total number of the response time to obtain the overtime response rate.
For example, data output by the data interface is sampled within a preset time period to obtain a sampling file corresponding to the data interface, the sampling file includes multiple pieces of response information, corresponding response time is obtained from each piece of response information, the response time obtained from each piece of response information is compared with the preset response time, the response time exceeding the preset response time is timeout response time, the number of the timeout response time and the total number of the response time are counted, and if the number of the timeout response time obtained by counting is N and the total number of the response time is N, the calculation expression of the timeout response rate is as follows:
Figure BDA0003443182760000081
where δ represents the timeout response rate.
In an embodiment of the present application, referring to fig. 6, the process of determining the error reporting rate according to the response code in step S410 may include steps S610 to S630, which are described in detail as follows:
in step S610, response codes included in the respective pieces of response information are acquired.
It can be understood that the number of the response information in this embodiment of the application is multiple, a sampling file for sample collection of the data interface is obtained within a preset time period, the sampling file obtained within the preset time period includes multiple pieces of response information, and each piece of response information includes a response code.
Step S620, counting the total number of the response codes and the number of the response codes that are correct according to each response code.
It should be noted that the response code may include a response code representing a temporary response, a request success, a request error, and a server error. For example, the response code is an HTTP status return code, and common HTTP status return codes include 200, 404, and 503, where 200 indicates that the server successfully returns the web page, 404 indicates that the requested web page does not exist, and 503 indicates that the service is unavailable.
The correct response code in the embodiment of the application is a response code that the request is successful, for example, the response code is an HTTP status return code, and if 200 indicates that the server successfully returns to the web page, 200 is the correct response code; 404 indicates that the requested web page does not exist and 503 indicates that the service is not available, and thus neither 404 nor 503 is a correct response code.
Step S630, determining an error reporting rate according to the total number of response codes and the number of correct response codes.
In this embodiment of the present application, the error reporting rate may be calculated by: and calculating the ratio of the number of the correct response codes to the total number of the response codes to obtain the error reporting rate.
For example, data output by the data interface is sampled within a preset time period to obtain a sampling file corresponding to the data interface, the sampling file includes multiple pieces of response information, a corresponding response code is obtained from each piece of response information, 200 is defined as a correct response code, other response codes are not correct response codes, the total number of the response codes and the number of the correct response codes are counted, and if the total number of the response codes is counted as U and the number of the response codes is counted as μ, the error reporting rate can be calculated by using the following expression:
Figure BDA0003443182760000091
where β represents an error rate.
And step S420, calculating a fluctuation value according to the timeout response rate and the error reporting rate.
In one embodiment of the present application, the following method may be adopted to calculate the fluctuation value according to the timeout response rate and the error reporting rate: and averaging the overtime response rate and the error reporting rate to obtain a fluctuation value.
In one embodiment of the present application, the following method may be adopted to calculate the fluctuation value according to the timeout response rate and the error reporting rate: assigning corresponding weight coefficients to the timeout response rate and the error reporting rate, respectively, for example, assigning a first weight coefficient k to the timeout response rate1Assigning a second weight coefficient k to the error rate2And performing weighted fusion calculation to obtain a fluctuation value, wherein the calculation expression is as follows:
C=k1δ+k2β
wherein, part of parameters in the formula are the same as the parameters in the formula, and C represents a fluctuation value.
In some embodiments of the present application, the timeout response rate or the error reporting rate may be used alone to calculate the fluctuation value, or the preset parameter return code included in the response message is considered alone to calculate the fluctuation value, so that the operator may calculate the fluctuation value by using the most relevant impact parameter according to a specific application scenario, which is not limited herein.
And step S230, determining whether the resource entry associated with the data interface is stable according to the fluctuation value.
In this embodiment of the present application, the resource entry associated with the data interface is a resource entry for providing data for the data interface, and the association manner between the data interface and the resource entry may be a communication connection supporting data transmission, or another connection manner supporting data transmission.
The data interfaces and the resource entries in the embodiment of the present application have a corresponding relationship, for example, one data interface may have one or more associated resource entries, one resource entry may also be associated with multiple data interfaces, and the corresponding relationship between the data interface and the resource entry may be set according to an experimental setting or a manual experience, which is not limited herein.
In an embodiment of the present application, referring to fig. 7, the process of generating the status notification information according to the change information in step S230 may include steps S710 to S730, which are described in detail as follows:
in step S710, the fluctuation value is compared with a preset fluctuation threshold.
Step S720, if the fluctuation value is greater than the preset fluctuation threshold, it is determined that the resource entry associated with the data interface is unstable.
Step S730, if the fluctuation value is less than or equal to the preset fluctuation threshold, it is determined that the resource entry associated with the data interface is stable.
In step S240, if the data interface is unstable, the resource entry is switched to a standby resource entry, so as to provide data for the data interface through the standby resource entry.
It should be noted that the resource entry includes a primary resource bit in which data is stored, and the standby resource entry includes a standby resource bit in which standby data is stored.
In this embodiment, the corresponding relationship between the primary resource bits and the standby resource bits may be a one-to-one corresponding relationship, that is, one primary resource bit is provided with one standby resource bit, and if one primary resource bit corresponds to one standby resource bit, the resource bit associated with the data interface is switched to the standby resource bit corresponding to the associated resource bit.
In this embodiment, the corresponding relationship between the primary resource bit and the standby resource bit may be that a plurality of primary resource bits share one standby resource bit, and the resource bit associated with the data interface is switched to the standby resource bit corresponding to the associated resource bit.
It can be known from the above that, the server samples data output by the data interface, determines an influence parameter of a fluctuation value according to response information contained in a sampling file, calculates the fluctuation value according to the influence parameter, and analyzes whether a resource entry providing data for the data interface is stable according to the fluctuation value, thereby implementing automatic monitoring of data fluctuation.
Fig. 8 is a flowchart illustrating a data fluctuation processing method according to another exemplary embodiment of the present application. As shown in fig. 8, the method may be performed by the server 101 in the data fluctuation processing system framework shown in fig. 1. It should be understood that the method may be applied to other exemplary implementation environments and is specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
As shown in fig. 8, the data fluctuation processing method at least includes steps S810 to S860, and the following details are described as follows:
step S810, obtaining a sampling file corresponding to the data interface, where the sampling file includes response information of the data interface for data call in a preset time period.
Optionally, the response information in this embodiment of the application includes response time, a response code, and a response packet carrying a preset parameter.
For example, if the preset time period is set to 15min, that is, the sampling time for sampling the data output by the data interface every time is 15min, after a 15min sampling period is finished, the sampling file obtained in the time period includes response information of a plurality of data interfaces for data callFor example, the obtained response information includes first response information, second response information, … …, and nth response information, where the content in the response information includes response time, response code, and a response packet carrying preset parameters, and the response time in the first response information is t1The response time in the second response information is t2… …, the response time in the Nth response message is tN(ii) a The response code in the first response message is 200, the response code in the second response message is 200, … …, and the response code in the nth response message is 403; the first response information includes the first user point query result l1Response message L of1The second response information includes a second user point query result l2Response message L of2… …, the Nth response message contains the query result l carrying the third user integralNResponse message L ofN
In step S820, a fluctuation value is calculated from the response information.
Optionally, the fluctuation value is calculated according to the response information, and specifically, the influence parameter may be determined according to the response information; the influence parameters comprise at least one of response time, response codes and preset parameters contained in the response messages; if the influence parameters are determined to be response time and response codes according to the response information, determining an overtime response rate according to the response time, determining an error reporting rate according to the response codes, and then calculating a fluctuation value according to the overtime response rate and the error reporting rate.
Optionally, the fluctuation value is calculated according to the response information, specifically, the response time included in each response information is obtained, then the total number of the response times and the response time are obtained by statistics according to each response time and are the number of the timeout response times, and then the timeout response rate is determined according to the total number of the response times and the number of the timeout response times.
Optionally, the error reporting rate is determined according to the response codes, specifically, the response codes included in each response message are obtained, then the total number of the response codes and the number of the response codes that are correct response codes are obtained according to statistics of each response code, and then the error reporting rate is determined according to the total number of the response codes and the number of the correct response codes.
Step S830, judging whether the resource inlet associated with the data interface is stable according to the fluctuation value; if not, step S840 is performed, and if not, step S850 is performed.
Step S840, switching the resource entry to a standby resource entry, so as to provide data for the data interface through the standby resource entry.
Step S850, judging whether the data provided for the data interface is a standby resource entrance; if the entry is a standby resource entry, step S860 is executed, otherwise, step S810 is executed again.
Step S860, the standby resource entry is replaced with the original resource entry, so as to provide data for the data interface through the original resource entry, and step S810 is executed again.
Optionally, please refer to the foregoing embodiment for the specific implementation process of steps S810 to S850, which is not described herein again.
As can be seen from the above, in the embodiment of the present application, first, a fluctuation value is obtained by analyzing and calculating a sampling file sampled at a data interface, and a stable condition of a resource entry providing data for the data interface is determined according to the fluctuation value, if it is determined that the resource entry providing data for the data interface is unstable, it indicates that all resource entries associated with the data interface are unstable, and all resource entries associated with the data interface are replaced with standby resource entries to provide standby data for the data interface through the standby resource entries; if the resource entry providing data for the data interface is determined to be stable, the resource entry providing data for the data interface is recovered stably or is kept stable all the time, at this time, whether the data provided for the data interface is a standby resource entry is judged, if the data provided for the data interface is determined to be provided by the standby resource entry, the standby resource entry is recovered to be the original resource entry, the data is provided for the data interface through the original resource entry, and sampling is continuously performed on the data interface after replacement is completed, so that the stability of the resource entry associated with the data interface is continuously monitored.
Therefore, the automatic recovery of the resource inlet can avoid the sporadic nature of the sample data analysis result, if the sample is an sporadic event, the sample can automatically recover the original resource inlet after a sampling period, the influence on the system is reduced, and the stability of the system is ensured to the maximum extent. If the spare resource inlet is determined not to provide data for the data interface, sampling is continuously carried out on the data interface, and the data output condition of the data interface is continuously analyzed, so that the stability of the resource inlet associated with the data interface is continuously monitored, and unstable resource inlets are timely processed.
Fig. 9 is a block diagram of a data fluctuation processing apparatus shown in an exemplary embodiment of the present application. The device can be applied to the implementation environment shown in fig. 1, and is specifically configured in the server 101. The apparatus may also be applied to other exemplary implementation environments, and is specifically configured in other devices, and the embodiment does not limit the implementation environment to which the apparatus is applied.
As shown in fig. 9, the exemplary data fluctuation processing apparatus includes:
an obtaining module 910, configured to obtain a sampling file corresponding to a data interface, where the sampling file includes response information of the data interface for data call in a preset time period;
a calculation module 920 configured to calculate a fluctuation value according to the response information;
a determining module 930 configured to determine whether the resource entry associated with the data interface is stable according to the fluctuation value;
the switching module 940 is configured to switch the resource entry to the standby resource entry if the resource entry associated with the data interface is unstable, so as to provide data for the data interface through the standby resource entry.
In one embodiment of the present application, the calculation module 920 further comprises:
an influence parameter determination module configured to determine an influence parameter according to the response information; the influence parameters comprise at least one of response time, response codes and preset parameters contained in the response messages;
and the fluctuation value calculation module is configured to calculate a fluctuation value according to the influence parameter.
In one embodiment of the present application, the fluctuation value calculation module further includes:
the first determining submodule is configured to determine an overtime response rate according to the response time and determine an error report rate according to the response code if the influence parameters are determined to be the response time and the response code according to the response information;
and the first calculation submodule is configured to calculate the fluctuation value according to the timeout response rate and the error reporting rate.
In one embodiment of the present application, the first determination submodule further includes:
a timeout response rate determination unit configured to acquire response times contained in the respective pieces of response information; counting the total number of response time and the number of response time as overtime response time according to each response time; determining the timeout response rate according to the total number of the response times and the number of the timeout response times; wherein the response information is multiple.
In one embodiment of the present application, the first determination submodule further includes:
an error rate determination unit configured to acquire response codes contained in the respective pieces of response information; counting the total number of the response codes and the number of the response codes which are correct according to each response code; determining an error report rate according to the total number of the response codes and the number of the correct response codes; wherein the response information is multiple.
In one embodiment of the present application, the determining module 930 further comprises:
a comparison unit configured to compare the fluctuation value with a preset fluctuation threshold;
the judging unit is configured to determine that the resource inlet associated with the data interface is unstable if the fluctuation value is greater than a preset fluctuation threshold value; and if the fluctuation value is less than or equal to the preset fluctuation threshold value, determining that the resource inlet associated with the data interface is stable.
In one embodiment of the present application, the switching module 940 further includes:
a first switching unit configured to switch a resource bit associated with the data interface to a standby resource bit corresponding to the associated resource bit if one master resource bit corresponds to one standby resource bit; the resource entry comprises a main resource bit storing data, and the standby resource entry comprises a standby resource bit storing standby data.
A second switching unit configured to switch the resource bit associated with the data interface to a standby resource bit corresponding to the associated resource bit if the plurality of active resource bits share one standby resource bit; the resource entry comprises a main resource bit storing data, and the standby resource entry comprises a standby resource bit storing standby data.
It should be noted that the data fluctuation processing apparatus provided in the foregoing embodiment and the data fluctuation processing method provided in the foregoing embodiment belong to the same concept, and specific ways for the modules and units to perform operations have been described in detail in the method embodiment, and are not described herein again. In practical applications, the data fluctuation processing apparatus provided in the foregoing embodiment may allocate the above functions to different functional modules according to needs, that is, divide the internal structure of the apparatus into different functional modules to complete all or part of the above described functions, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the electronic device to implement the data fluctuation processing method provided in the above-described embodiments.
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. It should be noted that the computer system 1000 of the electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage portion 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input/Output (I/O) interface 1005 is also connected to the bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. When the computer program is executed by a Central Processing Unit (CPU)1001, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application also provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the data fluctuation processing method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data fluctuation processing method provided in the above-mentioned embodiments.
The above description is only a preferred exemplary embodiment of the present application, and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A data fluctuation processing method, comprising:
acquiring a sampling file corresponding to a data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period;
calculating a fluctuation value according to the response information;
determining whether a resource inlet associated with the data interface is stable according to the fluctuation value;
and if the data interface is unstable, switching the resource entry into a standby resource entry so as to provide data for the data interface through the standby resource entry.
2. The method according to claim 1, wherein the response information includes response time, response code and response packet carrying preset parameters; the calculating the fluctuation value according to the response information comprises:
determining an influence parameter according to the response information; wherein the influence parameter includes at least one of the response time, the response code, and a preset parameter contained in the response packet;
and calculating the fluctuation value according to the influence parameters.
3. The method of claim 2, wherein said calculating the fluctuation value from the response information comprises:
if determining that the influence parameters are the response time and the response code according to the response information, determining an overtime response rate according to the response time, and determining an error report rate according to the response code;
and calculating the fluctuation value according to the timeout response rate and the error reporting rate.
4. The method of claim 3, wherein the response information is plural; the determining the timeout response rate according to the response time includes:
acquiring response time contained in each response message;
counting the total number of response time and the number of response time as overtime response time according to each response time;
determining the timeout response rate according to the total number of the response times and the number of the timeout response times.
5. The method of claim 3, wherein the response information is plural; the determining the error reporting rate according to the response code includes:
acquiring a response code contained in each piece of response information;
counting the total number of the response codes and the number of the response codes which are correct according to each response code;
and determining the error reporting rate according to the total number of the response codes and the number of the correct response codes.
6. The method according to any one of claims 1 to 5, wherein the determining whether the resource entry associated with the data interface is stable according to the fluctuation value comprises:
comparing the fluctuation value with a preset fluctuation threshold value;
if the fluctuation value is larger than the preset fluctuation threshold value, determining that the resource inlet associated with the data interface is unstable;
and if the fluctuation value is less than or equal to the preset fluctuation threshold value, determining that the resource inlet associated with the data interface is stable.
7. The method of any of claims 1 to 5, wherein the resource entry comprises a primary resource bit having data stored therein, and wherein the backup resource entry comprises a backup resource bit having backup data stored therein; the switching the resource entry to a standby resource entry includes:
if one main resource bit corresponds to one standby resource bit, switching the resource bit associated with the data interface into the standby resource bit corresponding to the associated resource bit;
or,
and if the plurality of main resource bits share one standby resource bit, switching the resource bit associated with the data interface into the standby resource bit corresponding to the associated resource bit.
8. A data fluctuation processing apparatus, characterized in that the apparatus comprises:
the acquisition module is configured to acquire a sampling file corresponding to a data interface, wherein the sampling file comprises response information of the data interface aiming at data calling in a preset time period;
a calculation module configured to calculate a fluctuation value from the response information;
the determining module is configured to determine whether the resource inlet associated with the data interface is stable according to the fluctuation value;
and the switching module is configured to switch the resource entry to a standby resource entry if the data interface is unstable, so as to provide data for the data interface through the standby resource entry.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the data fluctuation processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the data fluctuation processing method of any one of claims 1 to 7.
CN202111647736.4A 2021-12-29 2021-12-29 Data fluctuation processing method and device, electronic equipment and computer readable medium Pending CN114328692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111647736.4A CN114328692A (en) 2021-12-29 2021-12-29 Data fluctuation processing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111647736.4A CN114328692A (en) 2021-12-29 2021-12-29 Data fluctuation processing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN114328692A true CN114328692A (en) 2022-04-12

Family

ID=81016151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111647736.4A Pending CN114328692A (en) 2021-12-29 2021-12-29 Data fluctuation processing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN114328692A (en)

Similar Documents

Publication Publication Date Title
CN108513271B (en) Short message distribution method and device based on multiple short message channels
CN109104336B (en) Service request processing method and device, computer equipment and storage medium
CN108776934A (en) Distributed data computational methods, device, computer equipment and readable storage medium storing program for executing
CN113094136A (en) Page display control method and device, storage medium and electronic equipment
CN111954173B (en) Method, device, server and computer readable storage medium for sending short message
US20230269304A1 (en) Method and apparatus for processing notification trigger message
CN111629224B (en) Live broadcast information processing method and device, computer storage medium and electronic equipment
CN113723061B (en) Data processing method and device based on multi-user collaboration framework
CN109428926B (en) Method and device for scheduling task nodes
CN112994934B (en) Data interaction method, device and system
CN117395233A (en) Live link optimization method, device and computer readable storage medium
CN114328692A (en) Data fluctuation processing method and device, electronic equipment and computer readable medium
CN112004161A (en) Processing method and device of address resources, terminal equipment and storage medium
CN113472638B (en) Edge gateway control method, system, device, electronic equipment and storage medium
CN114125066B (en) Method and device for processing service request
CN114900477A (en) Message processing method, server, electronic device and storage medium
CN109218411B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN111625375A (en) Account reservation method and device, storage medium and electronic equipment
CN117424936B (en) Video edge gateway autonomous scheduling monitoring method, device, equipment and medium
KR102598919B1 (en) Method and apparatus for providing counseling service
CN113778504B (en) Publishing method, publishing system and routing device
CN115062595A (en) Push information generation method and device, electronic equipment and storage medium
CN118524084A (en) Domain name management method, device, electronic equipment and readable storage medium
CN118827681A (en) Overload protection method, device, apparatus, storage medium and program product
CN117857463A (en) Method and device for sending message

Legal Events

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