Abnormal identification method, device and computer equipment for cloud applications
By performing image feature extraction and weighting processing on cloud application screens, the problem of insufficient log records in the existing technology is solved, the accuracy and feasibility of cloud application anomaly identification are improved, and efficient identification of cloud application anomalies is achieved.
Patent Information
- Application Number
- CN202410925599.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing cloud application anomaly identification methods based on log records have low accuracy in abnormal scenarios. Especially when log records are insufficient or missing, it is difficult to effectively identify anomalies in cloud application operation.
By obtaining the image feature vector of the cloud application screen to be identified, the scene feature vector and the target feature weight vector in the abnormal scene, weighting processing and similarity calculation are performed to determine whether the cloud application is abnormal and reduce the impact of the scene state on the recognition accuracy.
It improves the feasibility and accuracy of cloud application anomaly identification, reduces the difficulty and cost of parsing different log recording specifications, and enhances the accuracy of identification results.
Smart Images

Figure CN118467231B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device and computer equipment for identifying abnormalities in cloud applications. Background Art
[0002] With the development of cloud application technology (such as cloud gaming), more and more cloud applications are running on cloud platforms. However, there may be exceptions when cloud applications are running, such as operation crashes, computing resource exceptions, network exceptions, and login failures. The above exceptions need to be identified.
[0003] In the related art, the type of abnormality in the cloud application is usually identified based on the log records related to the abnormality generated when the cloud application is running. However, since many abnormal scenarios do not generate relevant logs or generate few logs, the existing log-based methods for analyzing abnormalities in the operation of cloud applications are less feasible or accurate. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device and computer-readable storage medium for identifying anomalies in cloud applications that can improve feasibility or accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for identifying anomalies of cloud applications, comprising:
[0006] Obtaining an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector;
[0007] Obtaining a scene feature vector and a target feature weight vector of a sample cloud application screen under an abnormal scenario, which are respectively recorded as a second vector and a third vector, wherein the third vector is one of at least one feature weight vector, and the second vector and the feature weight vector are determined according to a sample image feature vector of a designated area of at least one frame of a sample cloud application screen under an abnormal scenario;
[0008] Based on the third vector, weighted processing is performed on the first vector and the second vector to obtain a fourth vector and a fifth vector, similarity between the fourth vector and the fifth vector is calculated, and whether an abnormality occurs during the operation of the cloud application is determined according to the similarity.
[0009] In a second aspect, the present application also provides a cloud application anomaly identification device, comprising:
[0010] A first acquisition module is used to acquire an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector;
[0011] A second acquisition module is used to acquire a scene feature vector and a target feature weight vector of a sample cloud application screen in an abnormal scene, which are respectively recorded as a second vector and a third vector, wherein the third vector is one of at least one feature weight vector, and the second vector and the feature weight vector are determined according to a sample image feature vector of a designated area of at least one frame of a sample cloud application screen in an abnormal scene;
[0012] The judgment module is used to perform weighted processing on the first vector and the second vector based on the third vector to obtain the fourth vector and the fifth vector, calculate the similarity between the fourth vector and the fifth vector, and judge whether an abnormality occurs during the operation of the cloud application according to the similarity.
[0013] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements an embodiment of the method of the first aspect when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method embodiment of the first aspect is implemented.
[0015] The above-mentioned cloud application abnormality identification method, device, computer equipment and computer-readable storage medium, when the cloud application is running, a cloud application screen will be generated, and the cloud application screen is also relatively easy to obtain. By comparing the image feature vector of the cloud application screen to be identified with the scene feature vector corresponding to a certain abnormal scene, it can be determined whether the cloud application screen to be identified belongs to the abnormal scene, so it is more feasible than using log records. At the same time, no matter what kind of cloud application, it can be identified by image feature comparison, without the need to parse separately for different log record specifications, so that it is less difficult and less costly to implement, and more feasible. In addition, based on the target feature weight vector, the image feature vector corresponding to the cloud application screen to be identified is weighted, which can reduce the impact of the scene state that is not closely related to the abnormal scene, so that the similarity calculation results of the fourth vector and the fifth vector are more accurate, and the subsequent recognition results of whether the cloud application is abnormal will also be more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0017] FIG1 is an application environment diagram of a method for identifying abnormalities in cloud applications in one embodiment;
[0018] FIG2 is a schematic diagram of a flow chart of a method for identifying abnormalities of cloud applications in one embodiment;
[0019] FIG3 is a schematic diagram of the structure of an image feature in one embodiment;
[0020] FIG4 is a schematic diagram of a flow chart of a method for identifying abnormalities in cloud applications in another embodiment;
[0021] FIG5 is a structural block diagram of an abnormality identification device for cloud applications in one embodiment;
[0022] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] In response to the problems existing in the prior art, an embodiment of the present application provides a method for identifying abnormalities in cloud applications. Cloud applications may be applications involving screen display, such as cloud games and live broadcasts, which are not specifically limited in the embodiments of the present application. The main technical concept of the method is that when an application involving screen display is abnormal, abnormal content related to the abnormal scene will usually be displayed on the screen. The image features of the screen image under the abnormal scene can reflect which abnormal scene it may be. By comparing the image features of the screen image to be identified with the image features of the screen image under a certain abnormal scene, it can be determined whether the screen image to be identified belongs to this abnormal scene.
[0025] Furthermore, different scene states may exist in the same abnormal scene, resulting in different screen images displayed even in the same abnormal scene. For example, in the abnormal scene of failed login, different screen images will be displayed in different scene states (such as logging in at different time periods, logging in by different users, etc.). Specifically, when logging in at two different time periods, daytime and nighttime, the login interface during the daytime can present a light-toned interface, while the login interface at night can present a dark-toned interface, which makes the screen images displayed when logging in at different time periods different. In addition, the screen images displayed when different users log in may also be different.
[0026] It can be understood that the scene state will affect the display content in the screen image, which may have a negative impact on the accuracy of subsequent recognition of abnormal scenes. In order to reduce the impact of the scene state, combined with the previous content, before "comparing the image features of the screen image to be identified with the image features of the screen image in a certain abnormal scene", the "image features of the screen image in a certain abnormal scene" and the "image features of the screen image to be identified" can be processed separately to reduce the negative impact that the scene state may have on the recognition accuracy. After processing, feature comparison is performed to determine whether the screen image to be identified belongs to this abnormal scene.
[0027] The abnormal identification method of cloud applications provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the cloud server 102 communicates with the server 104 (i.e., the analysis center server) through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The cloud application runs in the cloud server 102, and the cloud server 102 can collect the cloud application screen generated during the operation of the cloud application and send the cloud application screen to the server 104. After receiving the cloud application screen, the server 104 can sample it, use the sampled cloud application screen as the cloud application screen to be identified, and obtain the image feature vector of the specified area of the cloud application screen to be identified, which is recorded as the first vector. For a certain abnormal scene, the server 104 can obtain the scene feature vector and the target feature weight vector of the sample cloud application screen under the abnormal scene, which are recorded as the second vector and the third vector respectively. Based on the third vector, the first vector and the second vector are weighted respectively to obtain the fourth vector and the fifth vector, and the similarity of the fourth vector and the fifth vector is calculated. According to the similarity, it is judged whether an abnormality occurs during the operation of the cloud application.
[0028] The above content mainly describes the process in which the cloud server 102 obtains the cloud application screen and sends it to the server 104 for abnormal identification. The server 104 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0029] In an exemplary embodiment, as shown in FIG2 , a method for identifying abnormalities in cloud applications is provided, which is described by taking the method applied to the server 104 in FIG1 as an example, and includes the following steps 202 to 206. Among them:
[0030] Step 202 : obtaining an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector.
[0031] Among them, the cloud application screen to be identified is the screen image of the cloud application running on the cloud server. The image feature vector can be obtained by extracting features from the specified area of the cloud application screen to be identified. Specifically, a neural network model such as a CNN (Convolutional Neural Networks) model can be used for feature extraction, and the embodiments of the present application do not specifically limit this. It can be understood that if a neural network model is used for feature extraction, the extracted image features are usually in matrix form; and in order to obtain an image feature vector, the image features in matrix form can be converted into image features in vector form.
[0032] In addition, the designated area may correspond to an abnormal scene, because for a certain abnormal scene, the display area of the abnormal content in the abnormal scene is usually fixed, that is, the abnormal scene may correspond to a designated area. For example, when the abnormal display mode is to display the abnormal content through a pop-up window, the abnormal area may be the area where the abnormal pop-up window is located. Of course, different abnormal display modes may correspond to different abnormal areas, and the embodiments of the present application do not specifically limit this. Since when extracting the image feature vector, only the image features in the abnormal area need to be extracted, and all the features of the entire image do not need to be extracted, the amount of calculation can be reduced.
[0033] Step 204, obtain the scene feature vector and target feature weight vector of the sample cloud application screen under the abnormal scene, and record them as the second vector and the third vector respectively; wherein the third vector is one of at least one feature weight vector, and the second vector and the feature weight vector are determined according to the sample image feature vector of the specified area of at least one frame of the sample cloud application screen under the abnormal scene.
[0034] Specifically, the abnormal scenarios can refer to the description in the previous content, such as operation crash, computing resource abnormality, network abnormality and login failure. As can be seen from the previous content, different scene states may exist in the same abnormal scenario, resulting in different displayed screen images even for the same abnormal scenario. That is, for different scene states, at least one frame of sample cloud application screen can be obtained accordingly, and feature extraction can be further performed to obtain the sample image feature vector of the specified area of the sample cloud application screen.
[0035] After obtaining the sample image feature vector, the sample image feature vectors of each of the multiple frames of the sample cloud application screen can be integrated. In actual implementation, the image features of different sample image feature vectors at the same position can be integrated to obtain the integrated image features at the corresponding position to reduce the impact of different scene states of the abnormal scene, thereby obtaining the scene feature vector corresponding to the abnormal scene. The integration method can be taking the mean, median or mode, etc., which is not specifically limited in the embodiments of the present application.
[0036] The above content is mainly the process of determining the scene feature vector corresponding to the abnormal scene, and the target feature weight vector corresponding to the abnormal scene can also be determined based on the same principle. Specifically, the image features of different sample image feature vectors at the same position can be integrated to obtain the integrated image features at the corresponding position, and then the integrated image features of each position are adjusted to obtain the weights of each position. The weights at each position can constitute a feature weight vector. In this way, at least one feature weight vector can be obtained, and a feature weight vector is selected from at least one feature weight vector as the target feature weight vector. It should be noted that the reason why the target feature weight vector is obtained in this step is because there can be multiple feature weight vectors, and the target feature weight vector as the third vector is one of the feature weight vectors. The reason why there can be multiple feature weight vectors may be related to how to adjust the image features after integration at each position.
[0037] Step 206: Perform weighted processing on the first vector and the second vector based on the third vector to obtain a fourth vector and a fifth vector.
[0038] As can be seen from the previous content, the target feature weight vector may refer to the weights set for the image feature positions corresponding to the display positions of the abnormal content in the screen image. Therefore, the target feature weight vector can be divided into weights of multiple positions, and the image feature vector as the first vector can be divided into image features of multiple positions, and the number of weight positions can be the same as the number of feature positions. On this basis, the image feature vector corresponding to the cloud application screen to be identified can be weighted based on the target feature weight vector to obtain a fourth vector. As for the scene feature vector as the second vector, the second vector is also weighted based on the third vector to obtain a fifth vector. Weighted processing refers to summing the product of the element values at the same positions of two vectors.
[0039] Step 208: Calculate the similarity between the fourth vector and the fifth vector, and determine whether an abnormality occurs during the operation of the cloud application based on the similarity.
[0040] Among them, the similarity can be in the form of cosine similarity, Euclidean distance or Manhattan distance, etc., and the embodiments of the present application do not specifically limit this. Since each abnormal scene corresponds to a scene feature vector and a target feature weight vector, the similarity under each abnormal scene can be calculated based on the first vector and the second vector and the third vector under each abnormal scene. In actual implementation, it can be determined whether there is a situation where the similarity under each abnormal scene is greater than the preset similarity. If so, it can be determined that the corresponding abnormality has occurred during the operation of the cloud application. Or further, the maximum similarity can be selected from the similarities under each abnormal scene, and then it can be determined whether the maximum similarity is greater than the preset similarity. If the maximum similarity is greater than the preset similarity, it can be determined that the corresponding abnormality has occurred during the operation of the cloud application.
[0041] In the above-mentioned cloud application abnormality identification method, cloud applications will generate cloud application screens when they are running, and cloud application screens are also relatively easy to obtain. By comparing the image feature vector of the cloud application screen to be identified with the scene feature vector corresponding to a certain abnormal scene, it can be determined whether the cloud application screen to be identified belongs to the abnormal scene, which is more feasible than using log records. At the same time, no matter what kind of cloud application, it can be identified by image feature comparison, without the need to parse separately for different log record specifications, so it is less difficult and less costly to implement, and more feasible.
[0042] In addition, by weighting the image feature vector corresponding to the cloud application screen to be identified based on the target feature weight vector, the impact of scene states that are not closely related to abnormal scenes can be reduced, making the similarity calculation results of the fourth vector and the fifth vector more accurate, and the subsequent identification results of whether the cloud application has abnormalities will also be more accurate.
[0043] In an exemplary embodiment, the element value at position i in each feature weight vector is determined based on a specified threshold and the image feature value at position i in at least one sample image feature vector, and the specified threshold is determined based on at least one sample image feature vector.
[0044] Specifically, the scene state refers to a state that occurs in an abnormal scenario and affects the display content of the cloud application screen. For example, the time period in which the login is made and the user who logs in mentioned in the previous content can be used as the scene state. Of course, in addition to these contents, there can be other scene states, which are not specifically limited in the embodiments of the present application. In addition, the time period in which the login is made and the user who logs in can also be used as sub-scene states, that is, the scene state mentioned in the embodiments of the present application can be composed of multiple sub-scene states. As for how to constitute, it can be set according to the actual application scenario, which is not specifically limited in the embodiments of the present application.
[0045] The number of sample cloud application screens can be the same as the number of scene state types, that is, each scene state corresponds to a sample cloud application screen to constitute at least one frame of sample cloud application screen in different scene states. Of course, it is also possible that not one scene state corresponds to one frame of sample cloud application screen, but one scene state corresponds to multiple frames of sample cloud application screens. On this basis, multiple frames of sample cloud application screens in different scene states can also be constructed. It should be noted that because it involves the need to obtain the sample image feature vector of the sample cloud application screen, when there are multiple frames of sample cloud application screens corresponding to the scene state, the sample image feature vectors of the multiple frames of sample cloud application screens in the same scene state can be integrated as a sample image feature vector.
[0046] Regarding the method of extracting sample image feature vectors from the sample cloud application screen, reference can be made to the aforementioned method of extracting image feature vectors from the cloud application screen to be identified, and the embodiments of the present application do not specifically limit this. It should be noted that in actual implementation, the feature extraction method used for the sample cloud application screen and the cloud application screen to be identified may be the same or different. The feature extraction methods used by different sample cloud application screens may be the same or different. However, in order to facilitate subsequent processing, the number of image feature positions of different sample image feature vectors may be the same, and may also be the same as the number of image feature positions of the image feature vector of the cloud application screen to be identified.
[0047] FIG3 is a schematic diagram of multiple sample image feature vectors. In FIG3, a_1 to a_n can represent the image features at n positions of the sample image feature vector a of a specified area of a sample cloud application screen under a certain abnormal scene, and b_1 to b_n can represent the image features at n positions of the sample image feature vector b of a specified area of another sample cloud application screen under the abnormal scene, and so on. It can be seen that the number of sample image feature vectors in FIG3 is m, that is, corresponding to m frames of sample cloud application screens.
[0048] Among them, a_1, b_1, c_1, ..., m_1 represent features at the same position. If they are the features of the image feature vectors of the specified area of the m-frame cloud application screen at the first position, then a_2, b_2, c_2, ..., m_2 can be the features of the image feature vectors of the specified area of the m-frame cloud application screen at the second position, and so on. In order to facilitate the explanation of the degree of discreteness, the image features of m sample image feature vectors at the first position are taken as an example for explanation.
[0049] For example, when extracting features from an image, characteristic values are usually extracted, that is, the image features at each position in FIG. 3 can be specifically a numerical value. If the characteristic values at the first position are 2.3, 2.2, 2.4, 2.4, ..., 2.1, that is, the different characteristic values at the first position are relatively close, it can be said that the discreteness of the characteristic values at the first position is low. Corresponding to the display content in the sample cloud application screen, that is, the image content differences of different sample cloud application screens at the corresponding display positions of the first position are small. The small difference in image content can indicate that even if the scene state has changed, the image content of multiple sample cloud application screens in different scene states of the same abnormal scene at the corresponding display position has not changed much. That is, the image content at this display position basically does not change with the change of the scene state, is not closely related to the scene state, and is likely to be related only to the abnormal scene.
[0050] If the eigenvalues at the first position are 200.3, 50.2, 10.4, 250.4, ..., 100.1, that is, the different eigenvalues at the first position are not very close, it can be said that the discreteness of the eigenvalues at the first position is relatively high. Corresponding to the display content in the sample cloud application screen, that is, different sample cloud application screens, the image content at the display position corresponding to the first position is quite different. If the image content is quite different, it can be said that the scene state has changed, and the image content at the corresponding display position of multiple sample cloud application screens under different scene states of the same abnormal scene has also changed significantly. That is, the image content at this display position will change with the change of the scene state, and is closely related to the scene state.
[0051] In order to measure the degree of dispersion, a difference value may be further determined. The difference value may be a variance or a standard deviation, which is not specifically limited in the present embodiment. Taking the difference value as the standard deviation as an example, the standard deviation of the m eigenvalues a_1, b_1, c_1, ..., m_1 may be calculated and used as the difference value of the first position.
[0052] After determining the difference value of each position, the element value of each position in a corresponding feature weight vector can be determined according to the specified threshold and the difference value of each position. For example, for position i, if the difference value of position i is greater than the specified threshold, 0 can be used as the element value of position i, otherwise, 1 can be used as the element value of position i. Of course, the difference between the specified threshold and the difference value of position i, or the result of normalizing the difference, can also be used as the element value of position i.
[0053] In an exemplary embodiment, the specified threshold is a specified number quantile of difference values corresponding to image feature values at each position in at least one sample image feature vector;
[0054] If the difference value corresponding to the image feature value at position i in at least one sample image feature vector is greater than the specified threshold, the element value at position i in the corresponding feature weight vector is 0; if the difference value corresponding to the image feature value at position i in at least one sample image feature vector is less than or equal to the specified threshold, the element value at position i in the corresponding feature weight vector is 1;
[0055] The difference value is the standard deviation or variance of the image feature value at position i in at least one sample image feature vector.
[0056] Among them, the quantile can be determined according to the numerical concentration trend of the difference values at different image feature positions, and the specified number of quantiles can be set according to the needs. The numerical concentration trend refers to the tendency of different data in a pile of data to be concentrated together because of their close sizes. Therefore, the proportion of the data volume concentrated together in a pile of data can also be determined. For example, taking a total of n image feature positions, and the difference values of the n positions are 20.1, 20.4, 20.2, 20.8, 20.6, 21.1, 40.2, 42.1, 85.1, 92.5... as an example, it can be seen that among the presented difference values, the 6 difference values of 20.1, 20.4, 20.2, 20.8, 20.6, and 21.1 are relatively close in size and show a trend of being concentrated together. At the same time, if there are a total of 12 difference values, the data volume of these 6 difference values also accounts for half.
[0057] Quantiles are mainly used to divide the value range of difference values, and the different value ranges divided can correspond to a conversion method from difference values to element values. The method of determining the quantile can be to determine the average value, weighted average value, truncated average value or median of the difference values at all positions, etc., which is not specifically limited in the embodiments of the present application. Among them, the quantile can be determined according to a preset percentage, and the value range of the preset percentage can be 80% to 95%, which is not specifically limited in the embodiments of the present application. Taking the total number of all difference values as 100 and the preset percentage as 80% as an example, if the corresponding quantile of 80% of the difference values at all positions is A, then 80% can mean that the number of difference values less than A in 100 difference values is 80.
[0058] After determining multiple quantiles, the feature weight vector corresponding to each quantile can be determined. For example, if the quantile is A, then A is used to divide the value range of the difference value, and two value ranges of [-∞, A] and (A, +∞] can be obtained. Among them, the difference value in [-∞, A] can be converted into an element value according to the first conversion method, and the difference value in (A, +∞] can be converted into an element value according to the second conversion method. Therefore, the difference value at each position can be converted into an element value, thereby obtaining a feature weight vector.
[0059] Among them, the conversion method can be directly set to a certain value or calculated using a functional relationship, and the embodiments of the present application do not specifically limit this. It should be noted that because the difference value in (A, +∞] will be greater than the difference value in [-∞, A], and the larger the difference value, the greater the relationship with the scene state. In order to reduce the impact of the scene state, the element value converted from the difference value in (A, +∞] can be smaller than the element value converted from the difference value in [-∞, A]. For example, when the difference value is greater than the specified threshold, the corresponding element value of the feature weight vector can be set to 0. When the difference value is less than or equal to the specified threshold, the corresponding element value of the feature weight vector can be set to 1.
[0060] Since there are multiple specified thresholds, there are also multiple corresponding feature weight vectors. Based on the multiple feature weight vectors, the target feature weight vector corresponding to the abnormal scene can be determined. The determination method can be to select from them, or to reconstruct or select according to the degree of aggregation of the candidate feature weight vectors, which is not specifically limited in the embodiments of the present application.
[0061] In this embodiment, based on the numerical concentration trend of the difference value at each position, a specified number of quantiles is determined as the specified threshold. The specified threshold can divide the value range of the difference value, and for the value range into which the difference value at each position falls, a corresponding conversion method can be selected for conversion. Since the degree of influence brought by the scene state can be set through a pre-set conversion method, the implementation is more flexible.
[0062] In an exemplary embodiment, the process of determining the target feature weight vector includes:
[0063] For each of the at least one feature weight vector, weighting the second vector based on the feature weight vector to obtain a sixth vector;
[0064] Performing weighted processing on at least one sample image feature vector based on the feature weight vector to obtain at least one seventh vector;
[0065] The average of the similarities between the sixth vector and at least one seventh vector is calculated as the vector evaluation value corresponding to the feature weight vector, and the feature weight vector corresponding to the maximum vector evaluation value is used as the target feature weight vector.
[0066] For any feature weight vector, when weighted processing is performed on the sample image feature vector based on the feature weight vector, since there is at least one sample image feature vector, at least one seventh vector can be obtained by weighted processing on at least one sample image feature vector based on the feature weight vector. Therefore, the similarity between the sixth vector and the seventh vector is also at least one. Among them, the similarity can be cosine similarity or Euclidean distance, etc. There are many ways to determine the vector evaluation value corresponding to the feature weight vector, such as the mean value of the similarity adopted in the embodiment of the present application, which can be specifically referred to the following formula:
[0067] ;
[0068] in, Represents the feature weight vector The vector evaluation value of represents the feature vector of the i-th sample image, Represents the second vector, and n represents n sample image feature vectors. represents the sixth vector, Represents the seventh vector corresponding to the i-th sample image feature vector. It means calculating the similarity between the sixth vector and the seventh vector, summing up and averaging N similarities to obtain the vector evaluation value.
[0069] After determining the vector evaluation value corresponding to each feature weight vector, the feature weight vector corresponding to the maximum vector evaluation value can be selected from multiple feature weight vectors as the target feature weight vector corresponding to the abnormal scene. Of course, other selection methods can also be used, and the embodiments of the present application do not specifically limit this.
[0070] In an exemplary embodiment, the process of acquiring the sample image feature vector includes:
[0071] By extracting features from the designated area of the sample cloud application screen in abnormal scenarios, the sample image feature vector is obtained.
[0072] In this embodiment, the process of obtaining the sample image feature vector is the same as the process of obtaining the image feature vector corresponding to the cloud application screen to be identified in the previous embodiment, and will not be repeated here. Since the sample image features obtained by feature extraction can be converted into the sample image feature vector, it is convenient for subsequent similarity calculation.
[0073] In an exemplary embodiment, the second vector is a mean value of at least one sample image feature vector.
[0074] Specifically, taking Figure 3 as an example, a_1 to a_n in Figure 3 can represent the values of each element of the first sample image feature vector, b_1 to b_n can represent the values of each element of the second sample image feature vector, and so on. Among them, a_1, b_1, c_1, ..., m_1 can represent the image features of m different sample image feature vectors at the first position, and the average value of a_1, b_1, c_1, ..., m_1 can be calculated as the scene feature at the first position, and so on. The scene features at each position can constitute the scene feature vector of the sample cloud application screen in the abnormal scene, that is, the second vector.
[0075] In this embodiment, since the mean value can reflect the central tendency of the numerical value, it can more accurately characterize the integrated image features of the sample cloud application screen under different scene states of the same abnormal scene.
[0076] In an exemplary embodiment, obtaining an image feature vector of a specified area of a cloud application screen to be identified includes:
[0077] A cloud application screen is obtained from a cloud server, and the obtained cloud application screen is sampled according to a preset sampling rate, and the sampled cloud application screen is used as the cloud application screen to be identified; a specified area of the cloud application screen to be identified is identified, and an image feature vector of the specified area is obtained.
[0078] The cloud application screen may be obtained by collecting the screen according to the preset parameter group. The preset parameter group may be obtained by the following methods, including but not limited to: for each candidate parameter group in multiple candidate parameter groups, obtaining the recognition accuracy rate after text recognition of the cloud application screen collected according to the candidate parameter group; and selecting the preset parameter group from the multiple candidate parameter groups according to the corresponding recognition accuracy rate of each candidate parameter group.
[0079] Specifically, the parameter group may be composed of at least one parameter related to display, such as resolution, bit rate, etc. The text recognition method may be OCR (Optical Character Recognition), which is not specifically limited in the embodiment of the present application. When selecting the preset parameter group, the candidate parameter group corresponding to the maximum recognition accuracy rate may be selected, which is not specifically limited in the embodiment of the present application.
[0080] For example, the preset parameter group may include a resolution of 1280*XXX and a bit rate of 4000000 bit / s, wherein the width of the resolution is 1280 and the height is not fixed, and the ratio of 1280 to XXX may be the same as the ratio of the width to the height of the display resolution of a certain terminal.
[0081] In addition, cloud application screens can be continuously collected by means of screen recording and other methods, and multiple continuous cloud application screens collected can exist as cloud application videos, and the cloud server can be used to save cloud application videos. In actual implementation, cloud application videos can be obtained from the cloud server, and the obtained cloud application videos can be sampled according to a preset sampling rate. Among them, if the sampling rate of the cloud application screen is too high, it will result in too many cloud application screens to be identified, resulting in excessive calculation amount. Therefore, in actual implementation, the cloud application video can be sampled according to the preset sampling rate, so as to control the calculation amount during identification. For example, it can be sampled at 1.25 frames per second or other sampling rates, and the embodiments of the present application do not make specific limitations on this.
[0082] After sampling and obtaining the cloud application screen to be identified, the specified area of the cloud application screen to be identified can be identified, and the image feature vector of the specified area can be obtained. The relevant explanation of the specified area can refer to the previous content, and the process of obtaining the image feature vector can refer to the process of obtaining the sample image feature vector, which will not be repeated here.
[0083] It should be noted that the above-mentioned process is mainly based on a cloud application screen to be identified to determine whether an abnormality occurs during the operation of the cloud application. In actual implementation, the cloud application screen to be identified can be sampled according to a preset sampling rate, that is, multiple consecutive cloud application screens to be identified can be sampled. When an abnormality occurs in a cloud application, the process of displaying abnormal content usually does not last only for one frame, that is, there may be multiple consecutive frames of cloud application screens that will display abnormal content under the same abnormal scene. Considering that it may not be accurate enough to determine the possible abnormality based solely on the abnormal scene to which a cloud application screen to be identified belongs. Therefore, in actual implementation, each cloud application screen to be identified can determine the abnormal scene to which it belongs, and it can also determine whether the abnormal scenes to which multiple consecutive cloud application screens to be identified belong are the same. If they are all the same, the corresponding abnormal scene can be considered to be accurate as the recognition result.
[0084] In this embodiment, since the cloud application screen can be sampled at a preset sampling rate, the amount of calculation can be reduced. In addition, display-related parameters may affect the screen display, and the recognition accuracy rate after text recognition on the cloud application screen can reflect the degree of negative impact of the parameters on the screen display. By selecting a preset parameter group from multiple candidate parameter groups based on the recognition accuracy rate, a preset parameter group with a smaller degree of negative impact can be selected, thereby reducing the impact of the display-related parameters on the screen display.
[0085] For ease of understanding, in an exemplary embodiment, the overall method flow provided by the embodiment of the present application is now described in conjunction with a cloud gaming scenario. Referring to FIG. 4 , the specific implementation may be shown in the following process steps:
[0086] In step 402, the cloud server collects cloud application screens generated during the operation of the cloud application according to multiple candidate parameter groups, performs text recognition on the collected cloud application screens to obtain a recognition accuracy rate, and selects a preset parameter group according to the corresponding recognition accuracy rate of each candidate parameter group.
[0087] Step 404, according to the preset parameter group, collect cloud application screens generated during the operation of the cloud application; for any abnormal scenario, obtain multiple sample cloud application screens under different scenario states of the abnormal scenario, and obtain sample image feature vectors of each of the multiple sample cloud application screens.
[0088] Step 406, obtain the standard deviation of the features of different sample image feature vectors at the same position, and determine a specified number of quantiles according to the standard deviation of each position as the specified threshold; for each specified threshold, when the standard deviation of any position is greater than the specified threshold, the element value of the position in the feature weight vector corresponding to the specified threshold is set to 0, and when the standard deviation of the position is less than or equal to the specified threshold, the element value of the position is set to 1, so as to obtain the feature weight vector corresponding to the specified threshold.
[0089] Step 408, for each feature weight vector, weight the scene feature vector of the sample cloud application screen in the abnormal scene based on the feature weight vector to obtain a sixth vector; weight the feature vector of at least one sample image based on the feature weight vector to obtain at least one seventh vector; calculate the mean of the similarities between the sixth vector and at least one seventh vector as the vector evaluation value corresponding to the feature weight vector, and take the feature weight vector corresponding to the maximum vector evaluation value as the target feature weight vector.
[0090] Step 410: weighting the scene feature vector corresponding to the abnormal scene based on the target feature weight vector corresponding to the abnormal scene to obtain a fifth vector corresponding to the abnormal scene.
[0091] Among them, steps 402 to 410 are mainly data preparation processes. After obtaining the scene feature vector and target feature weight vector corresponding to each abnormal scene, they can be saved in the database. In the subsequent step 412 of actual abnormal identification, the scene feature vector and target feature weight vector corresponding to each abnormal scene can be called from the database. In addition, in actual implementation, the database can be updated at intervals in the same manner as above.
[0092] Step 412, according to a preset sampling rate, the cloud application screen obtained from the cloud server is sampled to obtain the cloud application screen to be identified, and the corresponding image feature vector is obtained; based on the target feature weight vector corresponding to a certain abnormal scene, the image feature vector to be identified is weighted to obtain a fourth vector; the similarity between the fourth vector and the fifth vector corresponding to the abnormal scene is calculated, and according to the relationship between the similarity and the preset threshold, if the similarity is greater than the preset threshold, it can be determined that the cloud application screen to be identified is a cloud application screen generated under the abnormal scene, that is, an abnormality occurred during the operation of the cloud application.
[0093] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0094] Based on the same inventive concept, the embodiment of the present application also provides a cloud application anomaly identification device for implementing the cloud application anomaly identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more cloud application anomaly identification devices provided below can refer to the limitations of the cloud application anomaly identification method above, and will not be repeated here.
[0095] In an exemplary embodiment, as shown in FIG5 , a cloud application anomaly identification device is provided, including:
[0096] A first acquisition module 502 is used to acquire an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector;
[0097] The second acquisition module 504 is used to obtain a scene feature vector and a target feature weight vector of the sample cloud application screen in the abnormal scene, which are respectively recorded as a second vector and a third vector, wherein the third vector is one of the at least one feature weight vector, and the second vector and the feature weight vector are determined according to the sample image feature vector of the designated area of at least one frame of the sample cloud application screen in the abnormal scene;
[0098] The judgment module 506 is used to perform weighted processing on the first vector and the second vector based on the third vector to obtain a fourth vector and a fifth vector, calculate the similarity between the fourth vector and the fifth vector, and judge whether an abnormality occurs during the operation of the cloud application according to the similarity.
[0099] The above-mentioned abnormality identification device for cloud applications generates a cloud application screen when the cloud application is running, and the cloud application screen is also relatively easy to obtain. By comparing the image feature vector of the cloud application screen to be identified with the scene feature vector corresponding to a certain abnormal scene, it can be determined whether the cloud application screen to be identified belongs to the abnormal scene, which is more feasible than using log records. At the same time, no matter what kind of cloud application, it can be identified by image feature comparison, without the need to parse separately for different log record specifications, so it is less difficult and less costly to implement, and more feasible.
[0100] In addition, by weighting the image feature vector corresponding to the cloud application screen to be identified based on the target feature weight vector, the impact of scene states that are not closely related to abnormal scenes can be reduced, making the similarity calculation results of the fourth vector and the fifth vector more accurate, and the subsequent identification results of whether the cloud application has abnormalities will also be more accurate.
[0101] The implementation process of the cloud application anomaly identification device provided in the embodiment of the present application is consistent with the cloud application anomaly identification method provided in the embodiment of the present application, and the effect that can be achieved is also the same as the cloud application anomaly identification method provided in the embodiment of the present application, and will not be repeated here.
[0102] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store scene feature vectors and target feature weight vectors corresponding to abnormal scenes. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned abnormal identification method of the cloud application is implemented.
[0103] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0104] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, each step of the cloud application anomaly identification method in the aforementioned embodiment is implemented.
[0105] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the cloud application anomaly identification method in the aforementioned embodiment are implemented.
[0106] In an exemplary embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the various steps of the cloud application anomaly identification method in the aforementioned embodiment.
[0107] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0108] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0109] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for identifying abnormalities in cloud applications, characterized in that: The method comprises: Obtaining an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector; Obtaining a scene feature vector and a target feature weight vector of a sample cloud application screen under an abnormal scene, which are recorded as a second vector and a third vector respectively, wherein the third vector is one of at least one feature weight vector, and the second vector and the feature weight vector are determined according to a sample image feature vector of a designated area of at least one frame of a sample cloud application screen under an abnormal scene, and the target feature weight vector is used to reduce the influence of a scene state that is not closely related to the abnormal scene; Based on the third vector, weighted processing is performed on the first vector and the second vector to obtain a fourth vector and a fifth vector, similarity between the fourth vector and the fifth vector is calculated, and whether an abnormality occurs during the operation of the cloud application is determined according to the similarity.
2. The method according to claim 1, characterized in that The element value at position i in each feature weight vector is determined according to a specified threshold and the image feature value at position i in at least one sample image feature vector, and the specified threshold is determined according to at least one sample image feature vector.
3. The method according to claim 2, characterized in that The specified threshold is a specified number quantile of difference values corresponding to the image feature values at each position in at least one sample image feature vector; If the difference value corresponding to the image feature value at position i in at least one sample image feature vector is greater than the specified threshold, the element value at position i in the corresponding feature weight vector is 0; if the difference value corresponding to the image feature value at position i in at least one sample image feature vector is less than or equal to the specified threshold, the element value at position i in the corresponding feature weight vector is 1; The difference value is the standard deviation or variance of the image feature value at position i in at least one sample image feature vector.
4. The method according to any one of claims 1 to 3, characterized in that The process of determining the target feature weight vector includes: For each feature weight vector of at least one feature weight vector, weighting the second vector based on the feature weight vector to obtain a sixth vector; Performing weighted processing on at least one sample image feature vector based on the feature weight vector to obtain at least one seventh vector; The average of the similarities between the sixth vector and at least one seventh vector is calculated as the vector evaluation value corresponding to the feature weight vector, and the feature weight vector corresponding to the maximum vector evaluation value is used as the target feature weight vector.
5. The method according to any one of claims 1 to 3, characterized in that The process of obtaining the sample image feature vector includes: By performing feature extraction on a designated area of the sample cloud application screen in the abnormal scenario, a sample image feature vector is obtained.
6. The method according to any one of claims 1 to 3, characterized in that The second vector is a mean value of at least one sample image feature vector.
7. The method according to claim 1, characterized in that The step of obtaining an image feature vector of a designated area of a cloud application screen to be identified includes: Obtaining a cloud application screen from a cloud server, and sampling the obtained cloud application screen according to a preset sampling rate, and using the sampled cloud application screen as the cloud application screen to be identified; Identify a designated area of the cloud application screen to be identified, and obtain an image feature vector of the designated area.
8. A cloud application anomaly identification device, characterized in that: The device comprises: A first acquisition module is used to acquire an image feature vector of a designated area of a cloud application screen to be identified, recorded as a first vector; A second acquisition module is used to obtain a scene feature vector and a target feature weight vector of a sample cloud application screen under an abnormal scene, which are respectively recorded as a second vector and a third vector, wherein the third vector is one of at least one feature weight vector, and the second vector and the feature weight vector are determined according to a sample image feature vector of a designated area of at least one frame of the sample cloud application screen under the abnormal scene, and the target feature weight vector is used to reduce the impact of a scene state that is not closely related to the abnormal scene; The judgment module is used to perform weighted processing on the first vector and the second vector based on the third vector to obtain a fourth vector and a fifth vector, calculate the similarity between the fourth vector and the fifth vector, and judge whether an abnormality occurs during the operation of the cloud application according to the similarity.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
