A method for testing the accuracy of data rollback after factory reset in a multi-mode scenario
By acquiring system data and network change indicators in multi-mode scenarios, calculating data consistency and reliability of scene change, the adaptability and accuracy of data rollback tests in the existing technology are solved, and more efficient multi-modes are achieved Data rollback analysis and abnormal detection in scenarios.
Patent Information
- Application Number
- CN202411170079.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-26
AI Technical Summary
In multi-mode scenarios, it is difficult for the existing technology to achieve accuracy testing of data rollback, resulting in poor adaptability and insufficient testing effect. Especially in complex distributed systems, the linkage and configuration differences of each mode scenario lead to files The analysis is low.
By obtaining system data and network change indicators before and after rollback in different mode scenarios, including file number, file size, file timestamp and device configuration parameters, the data consistency indicators and the reliability of scene changes are calculated, and the reliability of file changes and scenarios are combined with file changes and the reliability of scenarios. Change reliability, obtain test indicators in multimodal scenarios, and are used for abnormal analysis and accuracy evaluation of data rollback.
It effectively improves the test adaptability and effect of data rollback in multi-mode scenarios, can accurately characterize abnormal situations and network environment changes during data rollback, and ensures the integrity and reliability of data rollback.
Smart Images

Figure CN118672934B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data rollback testing, and in particular to a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario. Background Art
[0002] In the current computer system and data management environment, accuracy testing of data recovery and system rollback is critical. Especially in multi-mode scenarios, such as complex environments such as IoT devices, cloud computing platforms, and large data centers, it is particularly important to ensure the integrity and accuracy of data when a failure occurs or when it needs to be restored to factory settings. Data rollback refers to restoring a system or device to its factory settings, including restoring to the initial configuration, initial data state, and initial software version. The system can correctly roll back existing data, configurations, and software versions to the initial state or set state to ensure system reliability and data integrity.
[0003] Existing methods are usually optimized for specific types of data or specific system environments. In this way, since modern system architectures are often distributed and heterogeneous, involving a complex combination of multiple hardware platforms and software components, each mode scenario in the multi-mode scenario has corresponding configuration requirements, network requirements, and file format requirements, and different mode scenarios will also affect each other in the same device. As a result, the adaptability of data rollback accuracy testing in multi-mode scenarios is poor and the test effect is insufficient. Summary of the invention
[0004] In order to solve the technical problems of poor adaptability and insufficient test effect of data rollback accuracy test in multi-mode scenarios, the present invention provides a method for testing the accuracy of data rollback after factory restoration in multi-mode scenarios. The technical scheme adopted is as follows:
[0005] The present invention proposes a method for testing the accuracy of data rollback after factory recovery in a multi-mode scenario, the method comprising:
[0006] In different mode scenarios, the system data before and after the rollback during the factory restore process, as well as the network change indicators during the rollback process, are obtained respectively. The system data includes the number of files, file size, file timestamp, and device configuration parameters;
[0007] Determine the data consistency index of the rollback process for each mode scenario based on the number of files, file size, and file timestamp differences of the same-name files before and after the rollback in the same mode scenario; determine the reliability of file changes in data rollback in multi-mode scenarios based on the data consistency index in different mode scenarios;
[0008] Determine the parallel test interaction index of each mode scenario according to the changes in device configuration parameters of any mode scenario and other mode scenarios before and after rollback, and determine the reliability of the scenario change in the rollback process by combining the parallel test interaction index and the network change index;
[0009] In combination with the reliability of the file change and the reliability of the scenario change, the test indicators for data rollback in the multi-mode scenario are determined; and the abnormal analysis of the factory recovery process is implemented based on the test indicators.
[0010] Furthermore, the method for obtaining the data consistency index of the mode scenario rollback process includes:
[0011] Perform one-to-one same-name matching on the files before and after the rollback to determine matched file pairs and unmatched files;
[0012] Taking the difference in the sizes of the two files in the file pair as a size difference factor;
[0013] Taking the difference between the file timestamps of the two files in the file pair as a time difference factor;
[0014] The number of all unmatched files is used as the quantity difference factor;
[0015] The size difference factor, the time difference factor and the quantity difference factor are combined to obtain a data consistency index of the rollback process of the corresponding mode scenario.
[0016] Furthermore, the data consistency index of the rollback process of the corresponding mode scenario is obtained by combining the size difference factor, the time difference factor and the quantity difference factor, including:
[0017] Calculate the product of the size difference factor, the time difference factor and the quantity difference factor to obtain a rollback difference index;
[0018] The rollback difference index is subjected to negative correlation normalization processing to obtain a data consistency index.
[0019] Furthermore, the method for obtaining the reliability of file changes in data rollback in the multi-mode scenario includes:
[0020] Calculate the mean of the data consistency index in all mode scenarios and normalize it to obtain the rollback consistency coefficient;
[0021] The absolute value of the difference between the data consistency indexes in any two different mode scenarios is taken as the mode consistency difference corresponding to the two different mode scenarios; the mean of the mode consistency difference of all mode scenarios is calculated to obtain the multi-mode difference mean;
[0022] Performing negative correlation mapping and normalization processing on the multi-mode difference means to obtain a rollback stability coefficient;
[0023] The rollback consistency coefficient and the rollback stability coefficient are forwardly integrated to obtain the reliability of file changes in data rollback in a multi-mode scenario.
[0024] Furthermore, negative correlation mapping is performed on the multi-mode difference means and normalized to obtain a rollback stability coefficient, including:
[0025] The negative number of the multi-mode difference mean is normalized to the maximum and minimum values to obtain the rollback stability coefficient.
[0026] Furthermore, the device configuration parameters include a subnet mask, and the method for obtaining the parallel test interaction index of the mode scenario includes:
[0027] Take any mode scenario as the scenario to be tested, average the difference in subnet mask values between the scenario to be tested and each other mode scenario before data rollback, and obtain the mask change coefficient before rollback;
[0028] Averaging the difference in subnet mask values between the scenario to be tested and each other mode scenario after data rollback to obtain a mask change coefficient after rollback;
[0029] The difference between the mask change coefficient before the rollback and the mask change coefficient after the rollback is calculated, and a maximum and minimum value normalization process is performed to obtain a parallel test interaction index.
[0030] Furthermore, the network change index includes a network delay duration, and the reliability of the scene change of the rollback process is determined by combining the parallel test interaction index and the network change index, including:
[0031] Calculate the product of the parallel test interaction index and the corresponding network delay duration in each mode scenario, negate the product value and perform maximum and minimum value normalization processing to obtain the target change degree of the mode scenario;
[0032] The mean of the target change degrees of all mode scenarios is taken as the reliability of the scenario change in the rollback process.
[0033] Furthermore, combining the reliability of the file change and the reliability of the scenario change, the test index of data rollback in the multi-mode scenario is determined, including:
[0034] The product of the file change reliability and the scene change reliability is calculated as a test indicator for data rollback in a multi-mode scene.
[0035] Furthermore, an abnormal analysis of the factory recovery process is performed according to the test index, including:
[0036] When the test indicator is greater than a preset indicator threshold, it is determined that the data rollback operation is normal; otherwise, it is determined that the data rollback operation is abnormal.
[0037] Furthermore, the preset indicator threshold is 0.3.
[0038] The present invention has the following beneficial effects:
[0039] The embodiment of the present invention obtains system data before and after rollback and network change indicators during the rollback process in different mode scenarios, thereby performing data rollback analysis on the multi-mode scenario. Compared with the rollback analysis of the single-mode scenario, the multi-mode scenario involves possible linkages between different mode scenarios and configuration differences between different mode scenarios, resulting in lower accuracy of the rollback file analysis directly based on the single-mode scenario. Therefore, the embodiment of the present invention determines the file change reliability of data rollback through the dimensions of file quantity, file size, and file timestamp. The file change reliability can effectively characterize whether there is an abnormal situation of data residue or loss during the data rollback process; then, the parallel test interaction index and the network change index are obtained to determine the scene change reliability of the rollback process. The scene change reliability can accurately characterize the network environment change characteristics during the rollback process, and then combine the file changes in the multi-scenes and the network changes during the data rollback of the multi-mode scenario to obtain the final test index. The test index is the index information obtained by considering the complexity of the multi-mode scenario and the network fluctuation, which can effectively realize the abnormal analysis of the data rollback process and improve the adaptability and test effect of the data rollback accuracy test in the multi-mode scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flow chart of a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by an embodiment of the present invention;
[0042] Figure 2 A structural diagram of a system for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of the specific implementation method, structure, features and effects of a method for testing the accuracy of data rollback after factory recovery in a multi-mode scenario proposed by the present invention, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The following is a detailed description of a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by the present invention in conjunction with the accompanying drawings.
[0046] See also Figure 1 , which shows a flow chart of a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by an embodiment of the present invention, the method comprising:
[0047] S101: Under different mode scenarios, respectively obtain system data before and after rollback during factory recovery, and network change indicators during the rollback process, wherein the system data includes file quantity, file size, file timestamp, and device configuration parameters.
[0048] The implementation scenarios of the embodiments of the present invention include: data rollback scenarios after factory restoration, and multi-mode scenarios generally refer to tests performed under different operating modes or environmental conditions, including but not limited to: normal mode, safe mode, recovery mode, virtualized environment, fault recovery mode, etc.
[0049] It should be noted that existing testing methods may not cover all possible recovery modes and scenarios, resulting in some data or functions not being tested, and lack of comprehensive verification methods to ensure the accuracy and consistency of recovered data and device status. In addition, modern systems are often distributed and heterogeneous, involving a complex combination of multiple hardware platforms and software components. The complexity of the system architecture increases the difficulty of data management and recovery in different modes and scenarios. Therefore, it is necessary to accurately test data rollback in different modes and scenarios.
[0050] Among them, factory restore means restoring the data to the preset state when it just left the factory. It should be noted that data recovery only represents the deletion and recovery of data generated during the user's use process, and the overall changes to the system files are small. Therefore, by conducting a specific analysis of the system data and network change indicators during the rollback process, the data rollback effect can be effectively judged.
[0051] Among them, system data includes file quantity, file size, file timestamp and device configuration parameters. File timestamp is the time point recorded when the file changes, and network change indicators are network delay, packet loss and other indicator information during the rollback process. This type of information is obtained by analyzing the system before and after the rollback, and there is no restriction on this.
[0052] S102: Determine the data consistency index of the rollback process of each mode scenario based on the number of files, file sizes and file timestamp differences of the files with the same name before and after the rollback in the same mode scenario; determine the reliability of file changes in data rollback in multi-mode scenarios based on the data consistency indexes in different mode scenarios.
[0053] Among them, the same-name files are files with the same file name. It should be noted that since the overall system architecture is a multi-layer architecture, that is, a nested architecture in which folders are contained within folders, the present invention analyzes each folder as a complete individual, that is, the corresponding file size is the size of all data contained in the folder, and the corresponding same-name folders represent folders with the same name. For example, the system will have a "tool" folder before and after the rollback, and the "tool" folders before and after the rollback will be treated as files with the same name, and the corresponding part of the same-name files will change, and there will also be cases where no data changes occur. It should be further noted that since the system may contain multiple folders with the same name, such as a data folder, the same-name folders in the embodiment of the present invention also have the meaning of the same file location, that is, the file location has not changed, and the folders with the same file name are the same-name folders; therefore, in the embodiment of the present invention, the data consistency index of the rollback process of each mode scenario is determined according to the number of files, file size and file timestamp differences of the same-name files before and after the rollback in the same mode scenario.
[0054] Furthermore, in some embodiments of the present invention, a method for obtaining data consistency indicators of a pattern scenario rollback process includes: performing one-to-one same-name matching on files before and after the rollback to determine matched file pairs and unmatched files; taking the difference in size between two files in the file pair as a size difference factor; taking the difference in file timestamps between the two files in the file pair as a time difference factor; taking the number of all unmatched files as a number difference factor; and combining the size difference factor, the time difference factor, and the number difference factor to obtain a data consistency indicator of the corresponding pattern scenario rollback process.
[0055] It should be noted that in order to ensure that the calculation results are meaningful, when specific fractional calculations are involved, in order to prevent the denominator from being 0, when the denominator is 0, a parameter adjustment factor is added to the denominator to avoid the situation where it is 0. The value of the parameter adjustment factor is set by the implementer according to the actual situation, for example 0.01, and this application does not impose any special restrictions.
[0056] It should be noted that, in order to facilitate calculation, all indicator data involved in the calculation in the embodiment of the present invention are preprocessed to eliminate the dimension effect. The specific means of eliminating the dimension effect are technical means well known to those skilled in the art and are not limited here.
[0057] The data consistency index is the consistency of the data before and after the rollback. It can be understood that it is a function to verify whether the user data of a scene mode is accurately restored after the device is restored to factory mode. If a lot of changes are found in the folder data during the execution process, it means that additional data deletion, addition and modification have occurred, which means that the mode of performing factory restoration has been affected.
[0058] The difference in the sizes of the two files in the file pair is used as the size difference factor. The file size is the memory usage of the data in the file, and its specific symbol is kb. That is, the numerical difference in the memory usage of the two files is used as the size difference factor.
[0059] In the embodiment of the present invention, the difference is specifically expressed as a difference feature between two numerical values. The absolute value of the difference between the two numerical values can be calculated to represent the difference, that is, the difference in the sizes of two files in the file pair, which represents the absolute value of the difference in the numerical values occupied by the two files in memory. Other differences are calculated in the same way and will not be elaborated on.
[0060] Among them, the difference in file timestamps of the two files in the file pair is used as the time difference factor. Since the file timestamp represents the time point recorded when the file changes, the corresponding time difference factor represents the time difference between the two files. The larger the time difference factor, the larger the corresponding time difference before and after the data rollback, that is, the more and more complicated the data changes, and the overall rollback process is also prone to abnormalities due to excessive duration. Therefore, the embodiment of the present invention analyzes this feature through the time difference factor.
[0061] Among them, the number of all unmatched files is used as the quantity difference factor. The unmatched files are files that existed before the data rollback but disappeared after the rollback, or files that did not exist before the data rollback but were generated after the rollback. The more the number of these files, the higher the complexity of the corresponding process.
[0062] Therefore, the present invention combines the size difference factor, the time difference factor and the quantity difference factor to obtain the data consistency index of the rollback process of the corresponding mode scenario.
[0063] Furthermore, in some embodiments of the present invention, the product of the size difference factor, the time difference factor and the quantity difference factor is calculated to obtain a rollback difference index; the rollback difference index is negatively correlated and normalized to obtain a data consistency index.
[0064] Since the larger the values of the size difference factor, time difference factor, and quantity difference factor are, the larger the data complexity changes before and after the corresponding rollback are, the larger the value of the rollback difference index is, the greater the data changes before and after the rollback are, and the data consistency index is obtained by negative correlation normalization.
[0065] It should be noted that a positive correlation indicates that there is a same-direction change relationship between the independent variable and the dependent variable, that is, the larger the independent variable is, the larger the dependent variable is; a negative correlation indicates that there is an opposite-direction change relationship between the independent variable and the dependent variable, that is, the smaller the independent variable is, the larger the dependent variable is; the specific manifestations of the positive correlation and the negative correlation are determined by actual applications and are not particularly limited in this application.
[0066] Therefore, in an embodiment of the present invention, the negative value of the rollback difference index can be calculated, and the negative value can be normalized by the maximum and minimum values to obtain the data consistency index, or the inverse of the rollback difference index can be calculated, and the inverse can be linearly normalized to obtain the data consistency index, and there is no limitation on this.
[0067] It is understandable that the data consistency index can accurately characterize the consistency degree of data before and after rollback. In order to avoid the influence of a single mode scenario, the embodiment of the present invention can combine all mode scenarios to obtain their corresponding data consistency indicators respectively, so as to realize the analysis of the reliability of file changes.
[0068] Furthermore, in some embodiments of the present invention, a method for obtaining the reliability of file changes in data rollback in a multi-mode scenario includes: calculating the mean of the data consistency index in all mode scenarios, and normalizing it to obtain a rollback consistency coefficient; taking the absolute value of the difference between the data consistency index in any two different mode scenarios as the mode consistency difference corresponding to the two different mode scenarios; calculating the mean of the mode consistency differences of all mode scenarios to obtain a multi-mode difference mean; performing negative correlation mapping on the multi-mode difference mean and normalizing it to obtain a rollback stability coefficient; forwardly fusing the rollback consistency coefficient and the rollback stability coefficient to obtain the reliability of file changes in data rollback in the multi-mode scenario.
[0069] It should be noted that when analyzing all scenarios, it is necessary not only to analyze the overall numerical size of the corresponding data consistency index, but also to analyze the overall stability. Therefore, the embodiment of the present invention calculates the rollback stability coefficient to analyze the stability of the rollback state under different mode scenarios.
[0070] In an embodiment of the present invention, negative correlation mapping is performed on the multi-mode difference mean and normalized to obtain a rollback stability coefficient, including: normalizing the negative number of the multi-mode difference mean to the maximum and minimum values to obtain the rollback stability coefficient.
[0071] That is to say, the embodiment of the present invention realizes negative correlation mapping by obtaining negative numbers, and realizes normalization processing by using the maximum and minimum value normalization method, thereby obtaining the rollback stability coefficient.
[0072] The rollback stability coefficient can characterize the stability characteristics of data rollback in different mode scenarios. The rollback consistency coefficient and the rollback stability coefficient are forward integrated to obtain the file change reliability of data rollback in multi-mode scenarios. The forward integration in the embodiment of the present invention is the corresponding positively correlated numerical integration. In the embodiment of the present invention, the product of the rollback consistency coefficient and the rollback stability coefficient can be calculated as the file change reliability, or the sum of the rollback consistency coefficient and the rollback stability coefficient can be calculated as the file change reliability, and there is no limitation on this.
[0073] S103: Determine the parallel test interaction index of each mode scenario according to the changes in device configuration parameters of any mode scenario and other mode scenarios before and after rollback, and determine the reliability of the scenario change in the rollback process by combining the parallel test interaction index and the network change index.
[0074] Among them, the device configuration parameter is the corresponding subnet mask. When the data is rolled back, changes will occur in the network identification, that is, changes will occur in the subnet mask. Under normal circumstances, the subnet mask changes in numerical value in sequence. Therefore, when the subnet mask value fluctuates greatly, that is, multiple network changes occur, the corresponding network change process for parallel testing in multi-mode scenarios is more complicated. Therefore, the parallel test interaction index is obtained to characterize the complexity of the network change process.
[0075] Furthermore, in some embodiments of the present invention, any mode scenario is taken as the scenario to be tested, and the difference in subnet mask values between the scenario to be tested and each other mode scenario before data rollback is averaged to obtain the mask change coefficient before rollback; the difference in subnet mask values between the scenario to be tested and each other mode scenario after data rollback is averaged to obtain the mask change coefficient after rollback; the difference between the mask change coefficient before rollback and the mask change coefficient after rollback is calculated, and the maximum and minimum value normalization processing is performed to obtain the parallel test interaction index.
[0076] By calculating the mask change coefficient before rollback, the numerical distribution of the subnet mask before rollback is obtained. By calculating the mask change coefficient after rollback, the numerical distribution of the subnet mask after rollback is obtained. Then, the difference in numerical distribution is analyzed to obtain the parallel test interaction index. That is, the larger the value of the parallel test interaction index, the greater the change of the subnet mask, that is, the data produces more complex subnet mask changes.
[0077] The network variation index in the embodiment of the present invention may specifically be the network delay duration, that is, specific analysis is performed through the network delay duration.
[0078] Furthermore, in some embodiments of the present invention, the parallel test interaction index and the network change index are combined to determine the reliability of the scene change in the rollback process, including: calculating the product of the parallel test interaction index and the corresponding network delay duration in each mode scenario, negating the product value and performing maximum and minimum value normalization processing to obtain the target change degree of the mode scenario; and taking the average of the target change degrees of all mode scenarios as the reliability of the scene change in the rollback process.
[0079] It should be noted that the longer the network delay time is, the more complex the corresponding network changes are, which is prone to rollback anomalies, or it is prone to complex network changes due to rollback anomalies. Therefore, the product of the parallel test interaction index and the corresponding network delay time is calculated in each mode scenario, the product value is negative and normalized to the maximum and minimum values to obtain the target change degree of the mode scenario. The larger the target change degree value is, the smaller the network fluctuation is. Therefore, the average value of the target change degree of all mode scenarios is calculated as the reliability of the scene change in the rollback process.
[0080] S104: Determine test indicators for data rollback in multi-mode scenarios based on the reliability of file changes and the reliability of scenario changes; and perform abnormal analysis of the factory recovery process based on the test indicators.
[0081] Among them, the reliability of file changes is a reliability analysis based on the dimension of rollback data, while the reliability of scene changes is a reliability analysis based on the overall network change scene. Therefore, the present invention combines the reliability of file changes and the reliability of scene changes to achieve the test of overall data rollback. It avoids testing the overall data rollback based only on the data rollback situation in a single mode, ensuring the multi-scenario stability of data rollback and the applicability of complex systems.
[0082] Furthermore, in an embodiment of the present invention, the file change reliability and the scene change reliability are combined to determine the test index for data rollback in a multi-mode scenario, including: calculating the product of the file change reliability and the scene change reliability as the test index for data rollback in a multi-mode scenario.
[0083] Among them, since the value range of file change reliability is a normalized value, and the value range of scene change reliability is also a normalized value, the product of file change reliability and scene change reliability is calculated in the embodiment of the present invention to obtain the test index of data rollback in a multi-mode scenario.
[0084] It can be understood that the value range of this test indicator is also [0,1]. When the value of the test indicator is larger, the reliability of file changes and the reliability of scene changes are larger, that is, the stability of the overall data rollback and the file changes are better. Therefore, accurate test analysis of the rollback operation can be achieved based on the test indicator.
[0085] Furthermore, in some embodiments of the present invention, an abnormality analysis of the factory recovery process is implemented based on the test index, including: when the test index is greater than a preset index threshold, determining that the data rollback operation is normal; otherwise, determining that the data rollback operation is abnormal.
[0086] The preset indicator threshold is a threshold value of the test indicator, specifically 0.3. Of course, in other embodiments of the present invention, the preset threshold may also be determined according to actual detection requirements, and there is no limitation to this.
[0087] That is to say, when the test index is greater than 0.3, it is determined that the data rollback operation is normal; when the test index is less than or equal to 0.3, it is determined that the data rollback operation is abnormal. Thus, a more accurate and effective data rollback accuracy test can be achieved.
[0088] The embodiment of the present invention obtains system data before and after rollback and network change indicators during the rollback process in different mode scenarios, thereby performing data rollback analysis on multi-mode scenarios. Compared with the rollback analysis of single-mode scenarios, multi-mode scenarios involve possible linkages between different mode scenarios and configuration differences between different mode scenarios, resulting in lower accuracy of rollback file analysis directly based on single-mode scenarios. Therefore, the embodiment of the present invention determines the file change reliability of data rollback through the dimensions of file quantity, file size, and file timestamp. The file change reliability can effectively characterize whether there is an abnormal situation of data residue or loss during the data rollback process; then, parallel test interaction indicators and network change indicators are obtained to determine the scene change reliability of the rollback process. The scene change reliability can accurately characterize the network environment changes during the rollback process, and then combine the file changes in multiple scenarios and the changes in the network during the data rollback of the multi-mode scenario to obtain the final test indicator. The test indicator is the indicator information obtained by considering the complexity of the multi-mode scenario and the network fluctuation, which can effectively realize the abnormal analysis of the factory recovery process.
[0089] Some other embodiments of the present invention also provide a data rollback accuracy test system after factory recovery in a multi-mode scenario, see Figure 2 , Figure 2 This is a structural diagram of a system for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by an embodiment of the present invention. The system 600 includes a memory 601, a processor 602, and a computer program 603 stored in the memory 601 and executable on the processor 602. When the processor 602 executes the computer program 603, the steps of the method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario as described above are implemented.
[0090] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by the above embodiment.
[0091] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario provided by the above embodiment.
[0092] Among them, the system, computer-readable storage medium or computer program product provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0093] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0094] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for testing the accuracy of data rollback after factory recovery in a multi-mode scenario, characterized in that: The method comprises: In different mode scenarios, the system data before and after the rollback during the factory restore process, as well as the network change indicators during the rollback process, are obtained respectively. The system data includes the number of files, file size, file timestamp, and device configuration parameters; Determine the data consistency index of the rollback process for each mode scenario based on the number of files, file size, and file timestamp differences of the same-name files before and after the rollback in the same mode scenario; determine the reliability of file changes in data rollback in multi-mode scenarios based on the data consistency index in different mode scenarios; Determine the parallel test interaction index of each mode scenario according to the changes in device configuration parameters of any mode scenario and other mode scenarios before and after rollback, and determine the reliability of the scenario change in the rollback process by combining the parallel test interaction index and the network change index; In combination with the reliability of the file change and the reliability of the scenario change, the test indicators for data rollback in the multi-mode scenario are determined; and the abnormal analysis of the factory recovery process is implemented based on the test indicators.
2. A method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: The method for obtaining the data consistency index of the mode scenario rollback process includes: Perform one-to-one same-name matching on the files before and after the rollback to determine matched file pairs and unmatched files; Taking the difference in the sizes of the two files in the file pair as a size difference factor; Taking the difference between the file timestamps of the two files in the file pair as a time difference factor; The number of all unmatched files is used as the quantity difference factor; The size difference factor, the time difference factor and the quantity difference factor are combined to obtain a data consistency index of the rollback process of the corresponding mode scenario.
3. A method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 2, characterized in that: The combining of the size difference factor, the time difference factor and the quantity difference factor to obtain a data consistency index of the corresponding mode scenario rollback process includes: Calculate the product of the size difference factor, the time difference factor and the quantity difference factor to obtain a rollback difference index; The rollback difference index is subjected to negative correlation normalization processing to obtain a data consistency index.
4. The method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: The method for obtaining the reliability of file changes in data rollback in the multi-mode scenario includes: Calculate the mean of the data consistency index in all mode scenarios and normalize it to obtain the rollback consistency coefficient; The absolute value of the difference between the data consistency indexes in any two different mode scenarios is taken as the mode consistency difference corresponding to the two different mode scenarios; the mean of the mode consistency difference of all mode scenarios is calculated to obtain the multi-mode difference mean; Performing negative correlation mapping and normalization processing on the multi-mode difference means to obtain a rollback stability coefficient; The rollback consistency coefficient and the rollback stability coefficient are forwardly integrated to obtain the reliability of file changes in data rollback in a multi-mode scenario.
5. A method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 4, characterized in that: The multi-mode difference means are negatively correlated and normalized to obtain a rollback stability coefficient, including: The negative number of the multi-mode difference mean is normalized to the maximum and minimum values to obtain the rollback stability coefficient.
6. The method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: The device configuration parameters include a subnet mask, and the method for obtaining the parallel test interaction index of the mode scenario includes: Take any mode scenario as the scenario to be tested, average the difference in subnet mask values between the scenario to be tested and each other mode scenario before data rollback, and obtain the mask change coefficient before rollback; Averaging the difference in subnet mask values between the scenario to be tested and each other mode scenario after data rollback to obtain a mask change coefficient after rollback; The difference between the mask change coefficient before the rollback and the mask change coefficient after the rollback is calculated, and a maximum and minimum value normalization process is performed to obtain a parallel test interaction index.
7. The method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: The network change index includes the network delay duration, and the reliability of the scene change of the rollback process is determined by combining the parallel test interaction index and the network change index, including: Calculate the product of the parallel test interaction index and the corresponding network delay duration in each mode scenario, negate the product value and perform maximum and minimum value normalization processing to obtain the target change degree of the mode scenario; The mean of the target change degrees of all mode scenarios is taken as the reliability of the scenario change in the rollback process.
8. The method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: Combining the reliability of the file change and the reliability of the scenario change, the test indicators for data rollback in the multi-mode scenario are determined, including: The product of the file change reliability and the scene change reliability is calculated as a test indicator for data rollback in a multi-mode scene.
9. The method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 1, characterized in that: According to the test indicators, abnormal analysis of the factory reset process is performed, including: When the test indicator is greater than a preset indicator threshold, it is determined that the data rollback operation is normal; otherwise, it is determined that the data rollback operation is abnormal.
10. A method for testing the accuracy of data rollback after factory restoration in a multi-mode scenario according to claim 9, characterized in that: The preset indicator threshold is 0.3.
