Method, device, equipment and storage medium for preventing software degradation

By making software changes in a sandbox environment consistent with the production environment and comparing performance data, the problem of low performance testing accuracy after software updates is solved, and the performance testing accuracy and user experience improvement after software change is achieved.

CN110347605BActive Publication Date: 2025-03-14BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910629898.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-12
Publication Date
2025-03-14
Estimated Expiration
2039-07-12

AI Technical Summary

Technical Problem

During the software update process, it is difficult for the existing technology to accurately test the software's changed latency performance and cloud service performance, resulting in low test accuracy, high rollback cost and poor user experience.

Method used

By making software changes in a pre-built sandbox environment that is consistent with the production environment configuration, and diverting real-time user requests of the production environment to the sandbox environment for processing, the software performance data of the sandbox environment and the production environment are extracted and compared separately to determine whether the software has deteriorated after the software changes.

Benefits of technology

Accurate and objective testing of the software change process is achieved, preventing software degradation, reducing rollback costs, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110347605B_ABST
    Figure CN110347605B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a method, device, equipment and storage medium for preventing software degradation. The method includes: generating a change order according to a software change request, making software changes in a pre-built sandbox environment, the sandbox environment being consistent with the production environment configuration of the software to be changed online; directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing; extracting software performance data for processing real-time user requests from the sandbox environment and the production environment respectively; comparing and analyzing the software performance data, and judging whether the software to be changed is degraded after the change according to the results of the comparative analysis. The embodiments of the present invention make software changes in a sandbox environment that is consistent with the production environment configuration, and direct user requests to achieve consistency between the test environment and the user request and the actual environment, and improve the accuracy and objectivity of software performance testing in combination with performance data analysis and comparison, thereby preventing software degradation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer software technology, and in particular to a method, apparatus, device and storage medium for preventing software degradation. Background Art

[0002] With the rapid development of mobile Internet and AI technology, more and more cloud + terminal services have emerged, providing convenience for users' lives. As user needs become more and more diverse, the service software will also be rapidly iterated and upgraded to meet the diverse needs of users.

[0003] However, in the process of software updates, the performance of the update is often able to meet the diverse needs of users, but the latency performance of the updated software and the performance of cloud services are ignored. Latency is the most obvious experience that users can directly feel, and increased latency will cause a poor experience for users.

[0004] At present, when testing updated software, the test environment and request components are often inconsistent with the actual online environment and request components, resulting in different test performance data from the actual online performance data, and thus low test accuracy. If the actual online software is tested directly, there will be a lag in testing and problem discovery, the cost of rolling back the software after the update is high, and it will cause a poor experience for users. In addition, for various testing methods, data analysis and conclusions are all based on human subjective judgment, resulting in non-objective test results. Summary of the invention

[0005] The embodiments of the present invention provide a method, apparatus, device and storage medium for preventing software degradation, so as to achieve accurate and objective testing of the software change process, thereby preventing software degradation.

[0006] In a first aspect, an embodiment of the present invention provides a method for preventing software degradation, the method comprising:

[0007] Generating a change order according to the software change request, wherein the change order records information related to the software change to be made to the software to be changed;

[0008] According to the change order, software changes are made in a pre-built sandbox environment, wherein the configuration of the sandbox environment is consistent with the production environment in which the software to be changed is run online;

[0009] Directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing;

[0010] Extracting software performance data for processing the real-time user request from the sandbox environment and the production environment respectively;

[0011] The software performance data of the sandbox environment and the production environment are compared and analyzed, and it is determined whether the software to be changed is degraded after the change according to the result of the comparison and analysis.

[0012] In a second aspect, an embodiment of the present invention provides a detection device for preventing software degradation, the device comprising:

[0013] A change order generation module, used to generate a change order according to a software change request, wherein the change order records information related to the software change to be made to the software to be changed;

[0014] A sandbox environment software change module, used to make software changes in a pre-built sandbox environment according to the change order, wherein the sandbox environment is consistent with the production environment configuration of the software to be changed running online;

[0015] A traffic diversion module, used for diverting real-time user requests for the software to be changed in the production environment to the sandbox environment for processing;

[0016] A delay data extraction module, used to extract software performance data for processing the real-time user request from the sandbox environment and the production environment respectively;

[0017] The judgment module is used to compare and analyze the software performance data in the sandbox environment and the production environment, and judge whether the software to be changed is degraded after the change according to the result of the comparison and analysis.

[0018] In a third aspect, an embodiment of the present invention further provides a device, the device comprising:

[0019] one or more processors;

[0020] A memory for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing software degradation as described in any one of the embodiments of the present invention.

[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for preventing software degradation as described in any one of the embodiments of the present invention.

[0023] In the embodiment of the present invention, a sandbox environment that is consistent with the production environment configuration is pre-built, and real-time user requests in the production environment are directed to the sandbox environment, so that the sandbox environment and the production environment are kept completely consistent, thereby making the test environment and requests completely consistent with the actual production environment and requests, thereby ensuring the accuracy of the test data. By making software changes in the sandbox environment, and obtaining software performance data for processing real-time user requests in the sandbox environment and the production environment respectively, the software performance data is analyzed and compared, so that it is possible to accurately analyze whether the changed software has degraded, and then debug the changed software to prevent software degradation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of a method for preventing software degradation in Embodiment 1 of the present invention;

[0025] Figure 2 is a schematic diagram of software changes in the first embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of real-time user request diversion in Embodiment 1 of the present invention;

[0027] Figure 4 is a flow chart of a method for preventing software degradation in Embodiment 2 of the present invention;

[0028] Figure 5 is a flowchart of a specific implementation process of a method for preventing software degradation in Embodiment 2 of the present invention;

[0029] Figure 6 This is a schematic diagram of software delay indicator data monitoring in Embodiment 2 of the present invention;

[0030] Figure 7 is a schematic diagram of anti-degradation processing in Embodiment 2 of the present invention;

[0031] Figure 8 It is a schematic diagram of the structure of a detection device for preventing software degradation in Embodiment 3 of the present invention;

[0032] Fig. 9 It is a structural diagram of a device in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0034] Embodiment 1

[0035] Figure 1 This is a flow chart of a method for preventing software degradation in the first embodiment of the present invention. The method for preventing software degradation provided in this embodiment can be applied to accurately test the software when updating it to prevent the degradation of the changed software. The method can be specifically performed by a detection device for preventing software degradation. The device can be implemented by software and / or hardware. The device can be integrated in a device. The device can be a computer device or a server, which is equipped with an anti-degradation system, a change system, a drainage system, a monitoring system, and a deployment system, etc. See Figure 1 , the method of the embodiment of the present invention specifically includes:

[0036] S110: Generate a change order according to the software change request, wherein the change order records information related to the software change to be performed on the software to be changed.

[0037] The software may be software in a cloud service, and the cloud service may be a face recognition service, a voice recognition service, a fingerprint recognition service, etc. The software change request may be a request generated in response to a technician's operation to update the software. The change order is generated based on the configuration input of the front end, and contains information related to the software change to be changed, such as the download address of the software package to be updated, the object of the change, the server allocation information, etc. The software to be changed is the software that needs to be updated. Figure 2 As shown, the change order includes information on a series of update operations for adding, deleting, modifying and checking the software, which is used to trigger software changes in the production environment and the sandbox environment, such as triggering the software to change from version 1.0 to version 1.1.

[0038] Specifically, the technician can update the software through the front-end interface. After the server or computer device receives the software change request, it generates a software change request form based on the front-end configuration input when the technician requests it, so as to update the software to be changed according to the software change form.

[0039] S120. According to the change order, make software changes in a pre-built sandbox environment, wherein the sandbox environment is configured consistent with the production environment in which the software to be changed is running online.

[0040] Among them, the sandbox environment is used to provide an isolated environment for the running program. The sandbox environment is pre-built according to the production environment. The sandbox environment is consistent with the production environment configuration of the software to be changed online, so as to ensure that the test environment is consistent with the software running environment in the actual application, thereby ensuring the reliability and accuracy of the test data. The sandbox environment can be built using a pre-designed deployment system to achieve complete consistency with the actual production system at both the hardware and software levels. For example, its CPU, memory, operating system, kernel, software, server, number of interfaces and other configurations are completely consistent.

[0041] Specifically, the change system in the server or computer makes software changes in the pre-built sandbox environment according to the change order, thereby ensuring that the hardware, system, software and configuration of the sandbox environment and the production environment are completely consistent. The software in the sandbox environment is updated to a new version, while the production environment retains the version before the update, and the software is tested, so as to timely and accurately analyze the problems after the software update compared to before the update, so as to debug and optimize the updated software in a timely manner.

[0042] Optionally, according to the change order, before making a software change in the pre-built sandbox environment, the method further includes: interrupting the real-time user request diversion performed when the software to be changed was last changed. Specifically, in order to effectively ensure the normal update of the software in the current sandbox environment, the real-time user request diversion performed when the software to be changed was last changed is interrupted, thereby preventing the software in the sandbox environment from continuing to execute the diverted real-time user requests, resulting in the failure of the software to be updated normally.

[0043] S130: directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing.

[0044] The real-time user request is a normal request from the user to the software to be changed in the production environment. The traffic diversion system in the server or computer device diverts the real-time user request in the online production environment to the sandbox environment, so that the request components in the sandbox environment and the production environment are consistent to ensure the authenticity and accuracy of the test.

[0045] Optionally, directing the real-time user requests for the software to be changed in the production environment to the sandbox environment for processing includes: obtaining the real-time user requests for the software to be changed in the production environment; and forwarding the real-time user requests to the sandbox environment for processing. Figure 3As shown, the production environment generates real-time user requests for the user's operation to change the software, and the drainage system in the server or computer device obtains the real-time user requests generated in the production environment, and then forwards the obtained real-time user requests to the sandbox environment, and the sandbox environment further processes the real-time user requests. In a test cycle, all real-time user requests in the production cycle can be drained, or a part of the real-time user requests can be randomly or specified. The conditions of the real-time user requests for drainage can also be determined according to business needs or test needs. In the embodiment of the present invention, the number and type of the real-time user requests for drainage are not specifically limited. By diverting real-time user requests to the sandbox environment, the requests processed in the sandbox environment are kept consistent with the requests processed in the production environment, and the test data in the sandbox environment can represent the test data in the production environment, thereby improving the accuracy of the test data.

[0046] S140. Extract software performance data for processing the real-time user request from the sandbox environment and the production environment respectively.

[0047] The performance data may be data on the performance of the software in the sandbox environment and the production environment when processing real-time user requests, such as image, fingerprint, and voice recognition accuracy, recognition time, etc. Software performance data can be used as a factor in judging whether the software has degraded. Therefore, the detection system in the server or computer device extracts the software performance data of processing real-time user requests in the sandbox environment and the production environment, so as to judge whether the changed software has degraded based on the obtained software performance data in the sandbox environment and the production environment.

[0048] S150, comparing and analyzing the software performance data in the sandbox environment and the software performance data in the production environment, and determining whether the software to be changed is degraded after being changed according to the result of the comparative analysis.

[0049] Specifically, if the changed software degrades, the software performance data when processing real-time user requests in the sandbox environment will change from the software performance data when processing the same real-time user request in the production environment. Therefore, in an embodiment of the present invention, the respective software performance data obtained from the sandbox environment and the production environment are analyzed and compared, and the analysis and comparison results are used to determine whether the software to be changed degrades after the change, resulting in poor performance. If it is determined that the software degrades after the change, the software change is intercepted to prevent the current production environment from continuing to change the software, and the software is debugged and optimized before the software is changed. By comparing and analyzing the software performance data in the production environment and the software performance data in the sandbox environment that is consistent with the production environment configuration, the updated software is tested in advance in the sandbox environment, thereby solving the test errors caused by the inconsistency between the test environment and the production environment and the inconsistency of the request data, as well as the lag problem of retesting after the software is updated in the production environment, and improving the accuracy and efficiency of the test.

[0050] The technical solution of the embodiment of the present invention generates a change order based on a software change request, performs software changes in a pre-built sandbox environment, and the sandbox environment is consistent with the production environment configuration of the software to be changed online; the real-time user requests for the software to be changed in the production environment are directed to the sandbox environment for processing; the software performance data for processing real-time user requests are extracted from the sandbox environment and the production environment respectively; the software performance data is compared and analyzed, and it is determined whether the software to be changed is degraded after the change based on the results of the comparative analysis. The embodiment of the present invention makes software changes in a sandbox environment that is consistent with the production environment configuration, and through user request diversion, the test environment is consistent with the user request and the actual environment, and the accuracy and objectivity of the software performance test are improved in combination with the performance data analysis and comparison, thereby preventing software degradation.

[0051] Embodiment 2

[0052] Figure 4 This is a flow chart of a method for preventing software degradation in Embodiment 2 of the present invention. Figure 5 This is a flowchart of a specific implementation process of a method for preventing software degradation in Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above embodiment. For details not described in detail in this embodiment, please refer to the above embodiment. Figure 4 and Figure 5 The method for preventing software degradation provided in this embodiment may include:

[0053] S210: Generate a change order according to the software change request, wherein the change order records information related to the software change to be performed on the software to be changed.

[0054] S220. According to the change order, make software changes in a pre-built sandbox environment, wherein the sandbox environment is configured consistent with the production environment in which the software to be changed is running online.

[0055] S230: directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing.

[0056] S240, collecting module logs of all modules that process the real-time user request within a preset observation period in the sandbox environment and the production environment respectively.

[0057] Each real-time user request has a unique ID, and the module log includes delay data of each module involved in the processing link of each real-time user request obtained by tracking based on the unique ID.

[0058] The preset observation period may be a test period set by a technician according to actual conditions. Software performance data includes software delay data. Specifically, Figure 6 As shown, the monitoring system in the server or computer device collects module logs of all modules that process real-time user requests in the sandbox environment and the production environment respectively within a preset observation period. For example, in the image recognition service, when processing the user's image recognition request, it is necessary to collect the module logs of each module when processing the real-time user request through the image detection module, image recognition module, image matching module, etc., so as to facilitate further analysis of the delay data of each module based on the module log.

[0059] When analyzing the delay data of the module log, it is currently often only possible to obtain the time consumption of each module separately. For example, it is only possible to obtain the time consumption of the image monitoring module to process each real-time user request, the time consumption of the image recognition module to process each real-time user request, and the time consumption of the image matching module to process each real-time user request. Finally, the average time consumption data is calculated, and the total time consumption of each module when processing a real-time user request cannot be known, so that the performance data of the software when processing a real-time user request cannot be accurately obtained. Therefore, in an embodiment of the present invention, an ID is generated for each real-time user request in advance, so that when the software processes the real-time user request, the modules involved in the processing link when processing the real-time user request are tracked according to the ID, and the module logs of each module are further obtained, so that the delay data of each module for processing the real-time user request can be obtained according to the module log later. The above scheme can accurately obtain the delay data when processing a single or multiple real-time user requests, so that the obtained test data is more valuable for reference. Compared with the scheme of obtaining the average time consumed by a single module to process each real-time user request, the embodiment of the present invention can accurately reflect the delay performance of the software in processing user requests by processing the delay data of the modules involved in the link of a single or multiple real-time user requests, thereby improving the accuracy and reliability of the test.

[0060] S250. Extract the latency data from the module log according to the unique ID and perform statistics to obtain at least one latency indicator data for a single real-time user request in the sandbox environment and the production environment, respectively, or at least one latency indicator data obtained by aggregating at least two real-time user requests.

[0061] Among them, the delay data of each request can be extracted according to the unique ID of each request, and after statistics, at least one delay index data of a single real-time user request can be obtained, or at least one delay index data for at least two real-time user requests can be obtained after aggregation. Exemplarily, the delay index data includes at least one of the following: single module time consumption, overall time consumption, time consumption to increase the number of modules, and time consumption of different request types. Optionally, other experimental index data can also be set according to actual test requirements to test the performance of the software from more aspects. Since delay is the most obvious experience that users can directly feel in the process of applying software, delay is an important factor in evaluating software performance. Therefore, the embodiment of the present invention obtains at least one time consumption data of single module time consumption, overall time consumption, time consumption to increase the number of modules, and time consumption of different request types, so as to compare the time consumption data when processing real-time user requests according to the sandbox environment and the production environment, and analyze the performance comparison between the software after and before the update.

[0062] S260: Compare and analyze at least one latency indicator data in the sandbox environment and the production environment according to a preset decision tree algorithm and a preset indicator threshold.

[0063] The specific algorithm adopted by the preset decision tree can be selected by the technician according to the actual situation. The preset indicator threshold can be the threshold of the delay indicator data set by the technician according to the actual situation, such as the single module time delay threshold, the overall time delay threshold, the time-consuming module number threshold, the time delay threshold of different request types, etc.

[0064] When the processing time performance changes after the software is changed, the latency indicator data when processing the same real-time user request is different. Therefore, a comparative analysis is performed on at least one latency indicator data when processing the same real-time user request in the sandbox environment and the production environment, or at least one latency indicator data obtained by aggregating at least two real-time user requests, to obtain the change in processing time performance before and after the software change.

[0065] S270: Determine whether the software to be changed is degraded after being changed according to the result of the comparative analysis.

[0066] Specifically, Figure 7 As shown, if the time-consuming delay data obtained by comparing and analyzing at least one delay indicator data in the sandbox environment and the production environment is greater than the preset indicator threshold, it is determined that the software to be changed has degraded after the change. Exemplarily, first set the single module time-consuming delay threshold to 50ms, the overall time-consuming delay threshold to 500ms, the time-consuming increase module number threshold to 4, and the time-consuming delay threshold for different request types to 30ms. Compare and analyze the single module time-consuming indicator data when processing the same real-time user request in the sandbox environment and the production environment, and obtain the difference between the single module time-consuming indicator data in the sandbox environment and the production environment as the single module time-consuming delay data. If the single module time-consuming delay data is 100ms, which is greater than the single module time-consuming delay threshold of 50ms, the change interception is triggered to prevent the production environment from changing the software. If the single module time delay is 40ms, which is less than the single module time delay threshold of 50ms, then continue to compare and analyze the overall time delay data obtained based on the overall time indicator data when processing the same real-time user request in the sandbox environment and the production environment with the overall time delay threshold, and so on, and record the test data and the software performance changes caused by the changes for subsequent tracing of problems. It should be noted that the embodiment of the present invention is an example of a specific comparative analysis method, in which the threshold selection and the comparison order of the indicator data can be set by the technician, and the embodiment of the present invention does not make specific limitations.

[0067] S280: If it is determined that the software to be changed has not been degraded after being changed, the change order is sent to the production environment, and the production environment is instructed to perform software changes on the software to be changed according to the change order.

[0068] Specifically, if the software to be changed is judged to have not degraded after the change through comparative analysis of at least one latency indicator data in the sandbox environment and the production environment, it means that the software to be changed in the production system can be changed. Therefore, the change system in the server or computer equipment sends the change order to the production system, instructing the production system to make software changes to the software to be changed according to the change order, thereby updating the software to be changed while ensuring that the software to be changed does not degrade after the change, and preventing the degradation of the software after the change from affecting the user experience. Record the test data and the software performance changes caused by the change to facilitate the subsequent tracing of the problem.

[0069] The technical solution of the embodiment of the present invention generates an ID for each real-time user request in advance, so that when the software processes the real-time user request, the modules involved in the processing link when processing the real-time user request are tracked according to the ID, and in the sandbox environment and the production environment, the module logs of all modules that process the real-time user request within a preset observation period are collected, so as to obtain the delay indicator data of the software processing a single or multiple real-time user requests, and by comparing and analyzing at least one delay indicator data in the sandbox environment and the production environment, it is accurately analyzed that the software to be changed has not degraded after the change, so that the software can be intercepted when it degrades, and the production environment can be prevented from being further updated, so that the software can be updated after debugging and optimization, so as to prevent the degradation of the software after the change from causing a bad experience to the user, thereby achieving the prevention of software degradation and perfect software update.

[0070] Embodiment 3

[0071] Figure 8 This is a schematic diagram of the structure of a detection device for preventing software degradation provided by Embodiment 3 of the present invention. The device is suitable for accurately testing software when updating it to prevent the degradation of the changed software. The device can be implemented by software and / or hardware, and the device can be integrated in a device. Figure 8 , the device specifically comprises:

[0072] A change order generating module 310 is used to generate a change order according to a software change request, wherein the change order records information related to the software change to be performed on the software to be changed;

[0073] A sandbox environment software change module 320 is used to make software changes in a pre-built sandbox environment according to the change order, wherein the sandbox environment is consistent with the production environment configuration of the online running of the software to be changed;

[0074] A traffic diversion module 330 is used to divert real-time user requests for the software to be changed in the production environment to the sandbox environment for processing;

[0075] A delay data extraction module 340, used to extract software performance data for processing the real-time user request from the sandbox environment and the production environment respectively;

[0076] The judgment module 350 is used to compare and analyze the software performance data in the sandbox environment and the production environment, and judge whether the software to be changed is degraded after the change according to the result of the comparison and analysis.

[0077] Optionally, also include:

[0078] The interruption module is used to interrupt the real-time user request diversion performed when the software to be changed was last changed.

[0079] Optionally, the drainage module 330 includes:

[0080] A real-time user request acquisition unit, used to acquire real-time user requests for the software to be changed in the production environment;

[0081] The forwarding unit is used to forward the real-time user request to the sandbox environment for processing.

[0082] Optionally, the software performance data includes software latency data;

[0083] Accordingly, the delay data extraction module 340 includes:

[0084] A collection unit, used to collect module logs of all modules that process the real-time user request within a preset observation period in the sandbox environment and the production environment, respectively, wherein each real-time user request has a unique ID, and the module log includes delay data of each module involved in the processing link of each real-time user request tracked based on the unique ID;

[0085] A statistical unit is used to extract the latency data from the module log according to the unique ID and perform statistics to obtain at least one latency indicator data for a single real-time user request in the sandbox environment and the production environment, respectively, or at least one latency indicator data obtained by aggregating at least two real-time user requests.

[0086] Optionally, the latency indicator data includes at least one of the following: single module time consumption, overall time consumption, number of modules added to the time consumption, and time consumption of different request types.

[0087] Optionally, the judging module 350 includes:

[0088] The comparison and analysis unit is used to compare and analyze at least one delay indicator data in the sandbox environment and the production environment according to a preset decision tree algorithm and a preset indicator threshold.

[0089] Optionally, also include:

[0090] The change order issuing module is used to issue the change order to the production environment if it is determined that the software to be changed has not degraded after being changed, and instruct the production environment to make software changes to the software to be changed according to the change order.

[0091] According to the technical solution of the embodiment of the present invention, the change order generation module generates a change order based on the software change request, and the sandbox environment software change module performs software changes in a pre-built sandbox environment based on the change order, wherein the sandbox environment is consistent with the production environment configuration of the software to be changed online; the diversion module diverts the real-time user requests for the software to be changed in the production environment to the sandbox environment for processing; the delay data extraction module extracts the software performance data for processing the real-time user requests from the sandbox environment and the production environment respectively; the judgment module compares and analyzes the software performance data of the sandbox environment and the production environment, and judges whether the software to be changed is degraded after the change according to the results of the comparative analysis. The embodiment of the present invention makes software changes in a sandbox environment that is consistent with the production environment configuration, and diverts traffic through user requests to achieve consistency between the test environment and the user request and the actual environment, and improves the accuracy and objectivity of software performance testing in combination with performance data analysis and comparison, thereby preventing software degradation.

[0092] Embodiment 4

[0093] Fig. 9 It is a structural schematic diagram of a device provided in Embodiment 4 of the present invention. Fig. 9 A block diagram of an exemplary device 412 suitable for use in implementing embodiments of the present invention is shown. Fig. 9 The device 412 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0094] like Fig. 9As shown, device 412 is in the form of a general purpose computing device. Components of device 412 may include, but are not limited to: one or more processors or processor 416, system memory 428, and bus 418 that connects various system components (including system memory 428 and processor 416).

[0095] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0096] Device 412 typically includes a variety of computer system readable storage media. These storage media can be any available storage media that can be accessed by device 412, including volatile and non-volatile storage media, removable and non-removable storage media.

[0097] System memory 428 may include computer system readable storage media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Device 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 434 may be used to read and write non-removable, non-volatile magnetic storage media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium) may be provided. In these cases, each drive may be connected to bus 418 via one or more data storage medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0098] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in memory 428, such program modules 462 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 462 generally perform the functions and / or methods of the embodiments described herein.

[0099] Device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 426, etc.), may also communicate with one or more devices that enable a user to interact with the device 412, and / or communicate with any device that enables the device 412 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via input / output (I / O) interface 422. Furthermore, device 412 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 420. As shown, network adapter 420 communicates with other modules of device 412 via bus 418. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with device 412, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0100] The processor 416 executes various functional applications and data processing by running at least one of the other programs in the plurality of programs stored in the system memory 428, for example, a method for preventing software degradation provided by an embodiment of the present invention is implemented, including:

[0101] Generating a change order according to the software change request, wherein the change order records information related to the software change to be made to the software to be changed;

[0102] According to the change order, software changes are made in a pre-built sandbox environment, wherein the configuration of the sandbox environment is consistent with the production environment in which the software to be changed is run online;

[0103] Directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing;

[0104] Extracting software performance data for processing the real-time user request from the sandbox environment and the production environment respectively;

[0105] The software performance data of the sandbox environment and the production environment are compared and analyzed, and it is determined whether the software to be changed is degraded after the change according to the result of the comparison and analysis.

[0106] Embodiment 5

[0107] Embodiment 5 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to perform a method for preventing software degradation when executed by a computer processor:

[0108] Generating a change order according to the software change request, wherein the change order records information related to the software change to be made to the software to be changed;

[0109] According to the change order, software changes are made in a pre-built sandbox environment, wherein the configuration of the sandbox environment is consistent with the production environment in which the software to be changed is run online;

[0110] Directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing;

[0111] Extracting software performance data for processing the real-time user request from the sandbox environment and the production environment respectively;

[0112] The software performance data of the sandbox environment and the production environment are compared and analyzed, and it is determined whether the software to be changed is degraded after the change according to the result of the comparison and analysis.

[0113] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable storage media. The computer-readable storage medium may be a computer-readable signal storage medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible storage medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0114] A computer-readable signal storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal storage medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0115] The program code contained on the computer-readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0116] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0117] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for preventing software degradation, characterized in that: The method comprises: Generating a change order according to the software change request, wherein the change order records information related to the software change to be made to the software to be changed; According to the change order, software changes are made in a pre-built sandbox environment, wherein the configuration of the sandbox environment is consistent with the production environment in which the software to be changed is run online; Directing real-time user requests for the software to be changed in the production environment to the sandbox environment for processing; Extracting software performance data for processing the real-time user request from the sandbox environment and the production environment respectively; the software performance data includes software delay data; Comparing and analyzing the software performance data of the sandbox environment and the production environment, and judging whether the software to be changed is degraded after the change according to the result of the comparative analysis; The extracting of the software performance data for processing the real-time user request from the sandbox environment and the production environment respectively includes: In the sandbox environment and the production environment, respectively, module logs of all modules that process the real-time user request within a preset observation period are collected, wherein each real-time user request has a unique ID, and the module logs include latency data of each module involved in the processing link of each real-time user request tracked based on the unique ID; The latency data is extracted from the module log according to the unique ID and statistics are performed to obtain at least one latency indicator data for a single real-time user request in the sandbox environment and the production environment, respectively, or at least one latency indicator data obtained by aggregating at least two real-time user requests.

2. The method according to claim 1, characterized in that According to the change order, before making a software change in the pre-built sandbox environment, the method further includes: The real-time user request diversion performed when the software to be changed was last changed is interrupted.

3. The method according to claim 1, characterized in that: The step of directing the real-time user request for the software to be changed in the production environment to the sandbox environment for processing includes: Obtaining real-time user requests for the software to be changed in the production environment; The real-time user request is forwarded to the sandbox environment for processing.

4. The method according to claim 1, characterized in that: The delay indicator data includes at least one of the following: single module time consumption, overall time consumption, number of modules added to the time consumption, and time consumption of different request types.

5. The method according to claim 1, characterized in that The comparing and analyzing the software performance data of the sandbox environment and the production environment, respectively, includes: According to a preset decision tree algorithm and a preset indicator threshold, a comparative analysis is performed on at least one latency indicator data in the sandbox environment and the production environment.

6. The method according to claim 1, characterized in that The method further comprises: If it is determined that the software to be changed has not been degraded after being changed, the change order is sent to the production environment, and the production environment is instructed to perform software changes on the software to be changed according to the change order.

7. A software delay anti-degradation device, characterized in that: The device comprises: A change order generation module, used to generate a change order according to a software change request, wherein the change order records information related to the software change to be made to the software to be changed; A sandbox environment software change module, used to make software changes in a pre-built sandbox environment according to the change order, wherein the sandbox environment is consistent with the production environment configuration of the software to be changed running online; A traffic diversion module, used for diverting real-time user requests for the software to be changed in the production environment to the sandbox environment for processing; A delay data extraction module, used to extract software performance data for processing the real-time user request from the sandbox environment and the production environment respectively; the software performance data includes software delay data; A judgment module, used to compare and analyze the software performance data of the sandbox environment and the production environment, and judge whether the software to be changed is degraded after the change according to the result of the comparison and analysis; Wherein, the delay data extraction module includes: A collection unit, used to collect module logs of all modules that process the real-time user request within a preset observation period in the sandbox environment and the production environment, respectively, wherein each real-time user request has a unique ID, and the module log includes delay data of each module involved in the processing link of each real-time user request tracked based on the unique ID; A statistical unit is used to extract the latency data from the module log according to the unique ID and perform statistics to obtain at least one latency indicator data for a single real-time user request in the sandbox environment and the production environment, respectively, or at least one latency indicator data obtained by aggregating at least two real-time user requests.

8. The device according to claim 7, characterized in that Also includes: The interruption module is used to interrupt the real-time user request diversion performed when the software to be changed was last changed.

9. The device according to claim 7, characterized in that The drainage module comprises: A real-time user request acquisition unit, used to acquire real-time user requests for the software to be changed in the production environment; The forwarding unit is used to forward the real-time user request to the sandbox environment for processing.

10. The device according to claim 7, characterized in that The judging module comprises: The comparison and analysis unit is used to compare and analyze at least one delay indicator data in the sandbox environment and the production environment according to a preset decision tree algorithm and a preset indicator threshold.

11. The device according to claim 7, characterized in that Also includes: The change order issuing module is used to issue the change order to the production environment if it is determined that the software to be changed has not degraded after being changed, and instruct the production environment to make software changes to the software to be changed according to the change order.

12. An electronic device, characterized in that: The device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a method for preventing software degradation as described in any one of claims 1-6.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for preventing software degradation as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Sandbox testing environment constitution system and sandbox testing environment constitution method

    CN103699479A

  • Method and apparatus for providing a test network as an IP accessible cloud service

    CN104246744A