Resource availability determination method and device of civil aviation business software and storage medium
By determining the software category and testing environment of civil aviation business software based on business needs and conducting stress tests in these environments, the problem of unreasonable resource expenditure assessment in the existing technology is solved, and the accurate evaluation of resource expenditure information and the improvement of evaluation efficiency is achieved.
Patent Information
- Application Number
- CN202411792273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, a general evaluation model is used to evaluate resource expenditures on civil aviation business software, resulting in unreasonable resource expenditure assessment.
By determining the software category to which the civil aviation business software belongs based on business needs, building a corresponding test environment, and conducting stress tests in the test environment to obtain test data to determine resource cost information.
It realizes an accurate assessment of resource cost information of civil aviation business software, solves the problem of unreasonable resource cost evaluation, and improves the efficiency and accuracy of resource evaluation.
Smart Images

Figure CN119759717A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource assessment, and in particular, to a method, device and storage medium for determining resource costs of civil aviation business software. Background Art
[0002] With the rapid development of information technology and the increasing popularity of Internet applications, all walks of life have an increasing demand for efficient, stable and flexible IT resource management systems, especially for large enterprises in the fields of aviation, finance, telecommunications, etc. The transaction volume and data volume processed by their business systems are growing exponentially. The business systems in the civil aviation field cover flight reservations, ticket processing, passenger services and other aspects. These systems need to process massive amounts of real-time data, ensure high concurrency and low-latency transaction processing capabilities, and ensure the security and stability of the system. When it is necessary to deploy new services or upgrade existing business systems, they will face the problem of how to determine the required server resources. Traditional resource evaluation methods are often based on experience, estimation or simple formulas, which are difficult to accurately reflect the real resource requirements of the system under the microservice architecture. When facing different software configuration requirements, traditional resource evaluation methods often use a standard or universal evaluation model without fully considering the characteristics of civil aviation business software and the differences in business scenarios, which may lead to insufficient or excessive test resource configuration.
[0003] There is no effective solution to the problem that the resource cost evaluation of civil aviation business software using a general evaluation model in related technologies leads to unreasonable resource cost evaluation. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device and storage medium for determining resource cost of civil aviation business software, so as to solve the problem of unreasonable resource cost evaluation caused by using a general evaluation model to evaluate the resource cost of civil aviation business software in the related technology.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining resource cost of civil aviation business software is provided. The method comprises: determining the software category to which the civil aviation business software to be evaluated belongs according to business requirements; determining the test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which the civil aviation business software consumes resources when it is actually applied; performing stress testing on the civil aviation business software in the test environment to obtain test data, wherein stress testing refers to simulating the actual business load in the test environment; and determining the resource cost information of the civil aviation business software based on the test data.
[0006] Furthermore, the software category to which the civil aviation business software belongs is one of the following: transaction category, query category and communication protocol category, among which the transaction category civil aviation business software refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the query category civil aviation business software refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the communication protocol category civil aviation business software refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
[0007] Furthermore, before determining the test environment corresponding to the software category to which the civil aviation business software belongs, the method also includes: if the software category of the civil aviation business software is a communication protocol category, then building a test environment of the same scale as the production environment, wherein an equal-scale test environment means that the built test environment is the same as the production environment; if the software category of the civil aviation business software is a transaction category or a query category, then building a test environment of the same proportion as the production environment, wherein an equal-proportion test environment means that the hardware equipment model of the built test environment is the same as the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the equal proportion.
[0008] Furthermore, within the test environment, the civil aviation business software is stress tested to obtain test data including: if the software category to which the civil aviation business software belongs is a communication protocol category, the civil aviation business software is stress tested in a test environment of equal scale according to the actual production business volume, and multiple CPU consumption values and / or multiple memory consumption values are collected during the test to obtain test data; based on the test data, the resource usage information of the civil aviation business software is determined including: calculating the average of multiple CPU consumption values and / or the average of multiple memory consumption values to obtain resource usage information.
[0009] Furthermore, in the test environment, the business indicators of the software to be evaluated are stress tested, and the test data obtained include: if the software category to which the civil aviation business software belongs is transaction category or query category, the inflection point is determined through capacity testing, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; a scalability stress test is performed within the range of the inflection point, and different business indicator stress values are applied to the test environment to obtain test data.
[0010] Furthermore, if the test data includes multiple CPU consumption values, determining the resource usage information of the civil aviation business software based on the test data includes: establishing the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model; determining the resource usage information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0011] Furthermore, if the test data includes multiple memory consumption values, determining the resource usage information of the civil aviation business software based on the test data includes: if within a preset time range, it is detected that the difference between the multiple memory consumption values is within a preset difference, then determining the resource usage information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values.
[0012] Furthermore, after determining the resource usage information of the civil aviation business software based on the test data, the method also includes: predicting resource change requirements within a future preset time period based on the resource usage information of the civil aviation business software; and determining a corresponding resource adjustment strategy based on the resource change requirements.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for determining resource cost of civil aviation business software is provided. The device comprises: a first determination unit, used to determine the software category to which the civil aviation business software to be evaluated belongs according to business requirements; a second determination unit, used to determine the test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which the civil aviation business software consumes resources when it is actually applied; a test unit, used to perform stress testing on the civil aviation business software in the test environment to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; and a third determination unit, used to determine the resource cost information of the civil aviation business software according to the test data.
[0014] Furthermore, the software category to which the civil aviation business software belongs is one of the following: transaction category, query category and communication protocol category, among which the transaction category civil aviation business software refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the query category civil aviation business software refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the communication protocol category civil aviation business software refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
[0015] Furthermore, the device also includes: a first construction unit, which is used to build a test environment of the same scale as the production environment if the software category of the civil aviation business software is a communication protocol category, wherein an equal-scale test environment means that the constructed test environment is the same as the production environment; a second construction unit, which is used to build a test environment of the same proportion as the production environment if the software category of the civil aviation business software is a transaction category or a query category, wherein an equal-proportion test environment means that the hardware equipment model of the constructed test environment is the same as the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the equal proportion.
[0016] Furthermore, the testing unit includes: a first testing module, which is used to perform stress testing on the civil aviation business software in a test environment of equal scale according to actual production business volume if the software category to which the civil aviation business software belongs is a communication protocol category, and collect multiple CPU consumption values and / or multiple memory consumption values during the test to obtain test data; a third determination unit includes a calculation module, which is used to calculate the average value of multiple CPU consumption values and / or the average value of multiple memory consumption values to obtain resource usage information.
[0017] Furthermore, the testing unit includes: a determination module, which is used to determine the inflection point through capacity testing if the software category to which the civil aviation business software belongs is a transaction category or a query category, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; a second testing module, which is used to perform scalability stress testing within the range of the inflection point, applying different business indicator pressure values to the test environment, and obtaining test data.
[0018] Furthermore, the second test module includes: an establishment submodule, which is used to establish the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model if the test data includes multiple CPU consumption values; a first determination submodule, which is used to determine the resource usage information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0019] Furthermore, the second test module includes: a second determination sub-module, which is used to determine the resource usage information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values if the test data includes multiple memory consumption values and if the difference between the multiple memory consumption values is detected to be within a preset difference within a preset time range.
[0020] Furthermore, the device includes: a prediction unit, which is used to predict the resource change requirements within a preset time period in the future based on the resource usage information of the civil aviation business software after determining the resource usage information of the civil aviation business software based on the test data; a fourth determination unit, which is used to determine the corresponding resource adjustment strategy based on the resource change requirements.
[0021] According to another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method for determining resource cost of civil aviation business software.
[0022] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a resource cost determination method for executing any one of civil aviation business software.
[0023] According to another aspect of the present application, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of any one of the above-mentioned methods for determining resource usage of civil aviation business software.
[0024] In the embodiment of the present application, the software category of the civil aviation business software to be evaluated is determined according to the business requirements; the test environment corresponding to the software category of the civil aviation business software is determined, wherein the test environment is used to simulate the environment of resource consumption of the civil aviation business software in actual application; in the test environment, the civil aviation business software is stress tested to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; according to the test data, the resource cost information of the civil aviation business software is determined, which solves the problem of unreasonable resource cost evaluation caused by using a general evaluation model to evaluate the resource cost of civil aviation business software in the related technology. In the present application, by determining the software category of the civil aviation business software to be evaluated, determining the test environment corresponding to the civil aviation business software according to the software category, stress testing the civil aviation business software in the test environment corresponding to each civil aviation business software, and obtaining accurate resource cost information according to the test data, the technical effect of improving the accuracy of the resource cost information of the civil aviation business software is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0026] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for determining resource cost of civil aviation business software is shown;
[0027] Figure 2 It is a flow chart of a method for determining resource cost of civil aviation business software provided in an embodiment of the present application;
[0028] Figure 3 It is a CPU versus TPS variation trend diagram provided according to an embodiment of the present application;
[0029] Figure 4 This is a schematic diagram of calculating the k / b value according to the least squares method provided in an embodiment of the present application;
[0030] Figure 5 This is a memory variation trend diagram with TPS provided according to an embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of an implementation model of a method for determining resource cost of civil aviation business software provided in an embodiment of the present application;
[0032] Figure 7 is a schematic diagram of a pressure test model provided according to an embodiment of the present application;
[0033] Figure 8 It is a schematic diagram of a resource cost determination device for civil aviation business software provided according to an embodiment of the present application;
[0034] Fig. 9 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0038] Example 1
[0039] According to an embodiment of the present application, a method embodiment for determining resource costs of civil aviation business software is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for determining resource costs of civil aviation business software is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0041] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0042] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the resource cost determination method of the civil aviation business software in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the resource cost determination method of the civil aviation business software mentioned above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0045] Under the above operating environment, this application provides Figure 2 The resource cost determination method for civil aviation business software is shown. Figure 2 It is a flowchart of a method for determining resource costs of civil aviation business software according to Example 1 of the present application.
[0046] Step S201, determining the software category to which the civil aviation business software to be evaluated belongs according to business requirements.
[0047] Optionally, the above-mentioned civil aviation business software can be the civil aviation business software of the civil aviation business system, and each civil aviation business software has corresponding business requirements. The above-mentioned civil aviation business software and its corresponding business requirements can be online flight booking software: users use the software to query and book flights, which involves a large number of read and write operations on the database, especially during high-traffic periods (such as holidays). The software needs to quickly respond and process a large number of concurrent requests, which has a large demand for resources; baggage check-in processing software: responsible for handling passengers' baggage check-in affairs at the airport, including generating check-in labels, updating baggage status information, etc. These operations require real-time updates to the database and processing multi-threaded concurrent requests, which have high requirements for computing resources; airline ticket settlement software: processing ticket settlement affairs between airlines and various sales agents, which requires processing a large amount of financial data and complex calculation logic, especially on monthly settlement days. The software may face high-concurrency transaction processing and has a large demand for computing resources. The above civil aviation business software and its corresponding business needs can also be flight information query software: used to query global flight time, status, inventory and other information. Due to the large amount of data and high query frequency, it consumes a lot of server resources; passenger information query software: used to query passengers' flight records, points information, etc., which requires rapid retrieval and processing of a large amount of data, and has high requirements for the server's computing and storage capabilities; airport passenger service platform software: provides airport passenger service information query including boarding gates, baggage claim areas, catering services, etc. Although a single query may not consume too many resources, considering high concurrent queries, the continuous demand for resources is still significant. The above civil aviation business software and its corresponding business needs can also be service message exchange software: responsible for protocol conversion and message transmission between different civil aviation business systems, focusing more on the reliability of data transmission rather than computing-intensive tasks, and consuming relatively little CPU and memory; civil aviation system external connection interface software: responsible for foreign distribution, interactive connection between airlines, real-time data exchange, emphasizing the real-time nature of data and the efficiency of communication rather than computing performance, and has low requirements for server resources.
[0048] In an optional embodiment, the software category to which the civil aviation business software belongs may be one of the following: transaction category, query category and communication protocol category, wherein the transaction category civil aviation business software refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the query category civil aviation business software refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the communication protocol category civil aviation business software refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
[0049] Optionally, the above-mentioned transaction-type civil aviation business software is mainly responsible for processing real-time, high-concurrency read and write interactive requests, and has high requirements for the computing power (such as CPU) and memory capacity of the server. It can be online flight booking software, baggage check-in processing software, airline ticket settlement software, etc. For transaction-type civil aviation business software, user experience and system response speed are crucial. In high-concurrency scenarios, users expect transactions to be confirmed quickly, usually requiring completion between 1 second and 3 seconds. Therefore, the above-mentioned first preset time can be between 1 second and 3 seconds, such as 1 second, 1.5 seconds, 2 seconds, 2.5 seconds, 3 seconds, etc. The above-mentioned query-type civil aviation business software is mainly responsible for real-time online query, and also needs to quickly respond to high-concurrency query requests. It has high requirements for the computing power (such as CPU) and memory capacity of the server. It can be flight information query software, passenger information query software, airport passenger service platform software, etc. For query-type civil aviation business software, although complex transaction processing is not required, it is still necessary to return query results in a short time. Generally, the query response time should be controlled between 1 second and 2 seconds to maintain a smooth user experience. Therefore, the second preset time mentioned above can be set at about 1.5 seconds, such as 1 second, 1.5 seconds, 2 seconds, etc. The civil aviation business software of the above communication protocol type is mainly responsible for protocol interaction and data transmission, and usually does not require a large amount of calculation and storage, and has low requirements on the CPU computing power and memory capacity of the server. It can be service message exchange software, civil aviation system external connection interface software, etc.
[0050] In summary, through the above technical solution, each type of civil aviation business software has its specific resource requirements and processing characteristics. Through the resource evaluation method of this technical solution, different test environments and evaluation strategies can be used for different categories of civil aviation business software to more accurately predict and allocate resources to ensure the stable operation of the system and optimize resource utilization.
[0051] Step S202, determining a test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate an environment in which resources are consumed when the civil aviation business software is actually used.
[0052] In an optional embodiment, before determining the test environment corresponding to the software category to which the civil aviation business software belongs, the method also includes: if the software category of the civil aviation business software is a communication protocol category, then building a test environment of the same scale as the production environment, wherein an equal-scale test environment means that the built test environment is the same as the production environment; if the software category of the civil aviation business software is a transaction category or a query category, then building a test environment of the same proportion as the production environment, wherein an equal-proportion test environment means that the hardware equipment model of the built test environment is the same as the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the proportion.
[0053] Optionally, the civil aviation business software of the communication protocol type can be a service message exchange software, which is used for protocol conversion and message transmission between different civil aviation business systems. In the production environment, the service message exchange software is deployed on 5 servers of the same specifications, and each server is configured with an 8-core CPU and 64GB of memory. Since the civil aviation business software belongs to the civil aviation business software of the communication protocol type, a test environment of the same scale as the production environment is set up. This means that the test environment also requires 5 servers, and the configuration of each server is exactly the same as the production environment, that is, an 8-core CPU and 64GB of memory. In this way, the test environment can completely simulate the hardware conditions of the production environment, and testers can perform real stress tests on the system to obtain resource consumption information of the software when processing data transmission and protocol interaction.
[0054] Optionally, the transaction-type civil aviation business software can be an online flight booking software, which is responsible for processing real-time flight bookings and involves a large number of concurrent read and write interactive requests. In the production environment, the online flight booking software is deployed on 10 servers, each of which is configured with a 16-core CPU and 128GB memory. Since the civil aviation business software belongs to the transaction-type civil aviation business software, a test environment that is proportional to the production environment is built. The proportional environment means that the server model is the same as the production environment, but the server specifications or quantity are adjusted according to resource evaluation requirements. For example, you can choose to build 5 servers (halved in number), each with the same configuration, that is, 16-core CPU and 128GB memory, or keep the number of servers unchanged, but adjust the configuration of each server to 8-core CPU and 64GB memory (halved in specifications) to achieve the purpose of proportional reduction of resource consumption. After building the proportional test environment, through stress testing, simulate actual business scenarios, including high-concurrency user requests and large-scale transaction processing, to evaluate the resource consumption of the software under different loads, such as CPU usage and memory usage.
[0055] Optionally, the query-type civil aviation business software can be flight information query software, which is responsible for querying information such as flight schedules, status, and inventory. In the face of frequent user query requests, it needs to respond quickly. In the production environment, the civil aviation business software is deployed on 8 servers, each of which is configured with a 12-core CPU and 96GB of memory. As a query-type civil aviation business software, the strategy of equal-proportional test environment is also adopted. For example, 2 servers can be built (the number is reduced by one-quarter), and the configuration of each server is still 12-core CPU and 96GB of memory, or the number of servers can be kept unchanged and the configuration of each server can be adjusted to 6-core CPU and 48GB of memory (the specifications are halved). In this way, multiple high-concurrency query simulations can be performed in the test environment to evaluate the resource consumption of the system during the query peak, thereby providing accurate data support for resource planning in the production environment.
[0056] In summary, through the above technical solutions, the equal-scale and equal-proportion test environment construction strategy can more accurately evaluate the resource requirements of different categories of civil aviation business software, ensure the reasonable allocation of production environment resources, and avoid resource waste. This method of adjusting the test environment according to the category of civil aviation business software helps to improve the efficiency and accuracy of resource evaluation.
[0057] Step S203, in the test environment, stress testing is performed on the civil aviation business software to obtain test data, wherein stress testing refers to simulating actual business load in the test environment.
[0058] Optionally, the stress test in the embodiments of the present application may use stress test tools, custom test scripts, etc. For example, when testing online flight booking software, scripts may be written to simulate user login, flight search, seat selection, payment, and other operations, and the number and frequency of concurrency of these operations may be controlled to simulate actual business loads. These scripts may be implemented in a programming language and perform tests by calling the system API or directly interacting with the user interface.
[0059] Optionally, stress testing is a key step to ensure that the resource assessment model accurately reflects the actual needs of civil aviation business software. It is necessary to clarify the requirements of various business indicators of the application, including TPS (transactions per second), number of users, message status, peak value, mean value, response time, and business ratio, etc. For example, stress testing flight booking software. TPS (transactions per second): Determine the maximum number of transactions that the system can handle during normal operation and peak hours. In the stress test, the target TPS can be set to 1500, that is, the system needs to process 1500 flight booking transactions per second. Number of users: Simulate the number of users online at the same time to test the performance of the system under high concurrency. For example, assuming that there are 5,000 users online at the same time making reservations during peak hours, this number of users needs to be simulated in the stress test. Message status: Define the request message type and size used in the stress test. In the stress test, it is necessary to simulate messages containing flight information, passenger information, payment information, etc., and the size of each message is about 1KB. Peak value and mean value: Evaluate the performance of the system under peak load and average load. During stress testing, there may be peak loads at certain specific times (such as holidays), when the TPS may reach 2000, while during non-peak hours, the average TPS may be around 1000. Response time: measures the time required for the system to process a request. For example, the system is required to respond within 500 milliseconds in 99% of cases to ensure a good user experience. Through these specific business indicators, stress testing implementation can more accurately simulate actual business scenarios, evaluate the performance and resource consumption of civil aviation business software under different loads, and then guide the establishment and optimization of resource evaluation models.
[0060] Optionally, the above-mentioned actual business load can be the demand and pressure on system resources (such as CPU, memory, network bandwidth, etc.) caused by activities such as user operations, data interaction and system processing in the actual operating environment of civil aviation business software. In the scenario of aviation and civil aviation business software, the actual business load can be concretized as user operations, data interaction, system processing, network communication, etc. The actual business load will vary according to the specific application scenario and time period. For example, during holidays, tourist peak seasons or special events, the business volume will increase significantly, forming a peak business load; while in non-peak hours, the business volume is relatively low, forming an average business load.
[0061] Step S204, determining resource cost information of the civil aviation business software according to the test data.
[0062] Optionally, resource assessment of civil aviation business software can not only consider actual business needs, but also operation and maintenance security issues to ensure the security and stability of the system.
[0063] In summary, the above technical scheme determines the software category of the civil aviation business software to be evaluated according to business needs; determines the test environment corresponding to the software category of the civil aviation business software, wherein the test environment is used to simulate the resource consumption environment of the civil aviation business software in actual application; in the test environment, the civil aviation business software is stress tested to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; according to the test data, the resource cost information of the civil aviation business software is determined, which solves the problem of unreasonable resource cost evaluation caused by using a general evaluation model to evaluate the resource cost of civil aviation business software in the related technology. In this application, by determining the software category of the civil aviation business software to be evaluated, determining the test environment corresponding to the civil aviation business software according to the software category, stress testing the civil aviation business software in the test environment corresponding to each civil aviation business software, and obtaining accurate resource cost information according to the test data, the technical effect of improving the accuracy of the resource cost information of the civil aviation business software is achieved.
[0064] In an optional embodiment, a stress test is performed on civil aviation business software in a test environment to obtain test data including: if the software category to which the civil aviation business software belongs is a communication protocol category, the civil aviation business software is stress tested in a test environment of equal scale according to actual production business volume, and multiple CPU consumption values and / or multiple memory consumption values are collected during the test to obtain test data; based on the test data, resource usage information of the civil aviation business software is determined including: calculating an average of multiple CPU consumption values and / or an average of multiple memory consumption values to obtain resource usage information.
[0065] For example, a stress test is performed on the service message exchange software, which belongs to the communication protocol type civil aviation business software. According to the actual business volume, the tester writes a stress test script to simulate the scenario of flight information exchange. Assuming that the service message exchange software needs to process 1,000 flight information updates per second during peak hours, the tester performs a stress test on the system according to this business volume in an equal-scale test environment, that is, sends 1,000 flight information update requests to the system per second. During the stress test, the tester can use the monitoring tool to monitor the consumption of system resources (CPU and memory) in real time, and record the CPU consumption value and memory consumption value in multiple test cycles. For example, the CPU consumption values recorded in 5 test cycles are: 1.5, 1.6, 1.4, 1.7, 1.5, and the memory consumption values are: 2GB, 2.1GB, 1.9GB, 2.2GB, 2GB. The tester performs statistical analysis on the collected CPU consumption value and memory consumption value and calculates the average value. For the CPU consumption value, the average value is (1.5+1.6+1.4+1.7+1.5) / 5=1.54; for the memory consumption value, the average value is (2+2.1+1.9+2.2+2) / 5=2.04GB. These average values are the resource usage information of the civil aviation business software when processing actual business volume.
[0066] In summary, the above technical solutions can provide a more accurate assessment of the resource requirements of civil aviation business software such as communication protocols when processing actual business volumes, which helps to reasonably configure computing resources in the production environment, ensure the stable operation of the system, and avoid waste of resources.
[0067] In an optional embodiment, a stress test is performed on the business indicators of the software to be evaluated in a test environment, and the test data obtained includes: if the software category to which the civil aviation business software belongs is a transaction category or a query category, an inflection point is determined through a capacity test, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; a scalability stress test is performed within the range of the inflection point, and different business indicator stress values are applied to the test environment to obtain test data.
[0068] Optionally, the above inflection point corresponds to the maximum business indicator pressure value that civil aviation business software can handle. Beyond this value, key performance indicators such as software response time, throughput or success rate will begin to deteriorate. The determination of the inflection point can help evaluate the resource requirements of the software under a specific business load and predict the resource expansion that may be required when the business grows in the future. For example, in the test of transaction software, as TPS gradually increases, the performance indicators such as software response time, throughput and success rate will remain in a relatively stable range until a certain business indicator pressure value, the system performance suddenly drops, the response time increases significantly, and the throughput and success rate begin to decline. This business indicator pressure value is the inflection point, which marks the resource limit of the current configuration of the software. Beyond this point, the software will not be able to maintain its original performance level and may face more serious stability problems. Perform scalability stress testing within the range of the inflection point, that is, perform scalability stress testing within the range of the maximum business indicator pressure value that civil aviation business software can handle, apply different business indicator pressure values to the test environment, and obtain test data.
[0069] For example, stress testing is performed on flight booking software, which is a transaction-based civil aviation business software that needs to handle high-concurrency transaction operations, such as real-time booking of flight seats, payment processing, and seat inventory updates. In the test environment, the flight booking system is capacity tested, and the TPS (transactions per second) is gradually increased until the system performance begins to decline significantly. This is usually reflected in increased transaction processing delays, increased error rates, or unstable system responses. For example, when TPS increases from 400 to 2500, the system's transaction processing delay begins to increase significantly, indicating that the system has reached a performance inflection point. After finding the inflection point, a scalability stress test is performed within the range of the inflection point, that is, within this TPS (2500) range, to apply load to the system. Under different TPS stress values, the system's CPU consumption and memory consumption values are collected using monitoring tools, which are the test data mentioned above.
[0070] In summary, the above technical solution, through this testing and evaluation process, can more accurately predict the resource requirements of transaction or query civil aviation business software in the production environment, and formulate reasonable resource allocation strategies, providing an important basis for the stable operation and efficient operation and maintenance of the system.
[0071] In an optional embodiment, if the test data includes multiple CPU consumption values, determining the resource usage information of the civil aviation business software based on the test data includes: establishing the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model; and determining the resource usage information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0072] For example, after stress testing the above flight booking software, test data is obtained, which includes multiple CPU consumption values. Figure 3 The figure shows the CPU changing trend with TPS according to the embodiment of the present application. It can be found that as TPS increases, the CPU consumption value also increases, and a certain linear relationship is presented. On this basis, it can be concluded that there is a certain linear relationship between TPS and CPU. A linear function is used as the CPU evaluation model: cpu =k cpu x+b cpu +n*b 固定损耗cpu ; Among them, b cpu >=0, n represents the number of servers, b 固定损耗cpu is the fixed loss value when the system starts. x represents the business indicator, that is, the value of TPS, y cpu k is the value of the CPU computing resource that needs to be evaluated. cpu and b cpu The value of is calculated using the least squares data method.
[0073] According to the CPU and TPS data collected by the test, Figure 4 Schematic diagram of calculating k / b value according to the least square method provided in the embodiment of the present application. cpu and b cpu The value of is brought into the calculation model, and the CPU calculation formula is y cpu =0.00267x+0.00022+n*b 固定损耗cpu , if the future production TPS value is 4000, the planned number of deployed servers is 10, and the fixed CPU loss at system startup is 0.2, then the CPU consumption value y cpu =0.00267*4000+0.00022+10*0.2=12.68.
[0074] Finally, considering the value of the security operation and maintenance boundary, the CPU evaluation value = [y cpu / B,y cpu / C] Calculate the CPU resources to be allocated. Assuming that the CPU safety operation and maintenance boundaries are 20% and 80%, the CPU evaluation value = [12.68 / 80%, 12.68 / 20%] = [15.85, 63.4]. The CPU resources allocated within this range are the most reasonable.
[0075] This CPU evaluation model can not only ensure that the software runs in a safe and stable environment, but also accurately predict the dynamic changes in resources caused by business fluctuations to cope with the production pressure caused by high concurrency or seasonal peaks.
[0076] In an optional embodiment, if the test data includes multiple memory consumption values, determining the resource usage information of the civil aviation business software based on the test data includes: if within a preset time range, it is detected that the difference between the multiple memory consumption values is within a preset difference, then determining the resource usage information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values.
[0077] For example, after stress testing the flight booking software, we get test data showing that the system memory resources tend to be stable when the software is running normally and there is no obvious linear relationship with the change of TPS. The change trend of memory with TPS is as follows: Figure 5 As shown in the figure, the memory consumption tends to be stable under long-term pressure, which means that the software has adapted to the pressure conditions and the memory usage has reached a stable state. Find a memory consumption value among the multiple stable memory consumption values in the figure. 2GB is the target memory consumption value mentioned above.
[0078] Figure 6 FIG. 1 is a schematic diagram of an implementation model of an optional method for determining resource cost of civil aviation business software according to this embodiment. Figure 6 In the process, the software category of the civil aviation business software to be evaluated is determined according to business requirements. The software category of the civil aviation business software is one of the following: transaction category, query category and communication protocol category. Different test environments are set up according to the software category of the civil aviation business software. If the software category of the civil aviation business software is communication protocol category, a test environment of the same scale as the production environment is set up, and the set-up test environment is the same as the production environment. If the software category of the civil aviation business software is transaction category or query category, a test environment of the same proportion as the production environment is set up. Stress test the civil aviation business software in the test environment, and collect different test data according to different business indicator values. Based on the test data, resource cost evaluation is performed; and the resource cost evaluation conclusion is obtained.
[0079] Through the implementation model of the resource cost determination method of the above-mentioned civil aviation business software, the resource cost evaluation is carried out, and the communication protocol type, transaction type and query type civil aviation business software are distinguished, and different test environment construction strategies are adopted for different software categories. For communication protocol software with low resource requirements, a test environment of the same scale as the production environment is adopted to directly simulate the resource conditions of the production environment. For transaction and query software with high resource requirements, capacity testing and scalability stress testing are carried out in a proportionally scaled test environment, which can more comprehensively evaluate the resource consumption of the system at high concurrency and business peaks, thereby obtaining more accurate resource cost information.
[0080] Figure 7This is a schematic diagram of a stress testing model according to the present embodiment. Civil aviation business software is input into the resource usage test model, and different business indicator values (TPS, number of users, message status, peak value, average value, response time, business ratio, etc.) are applied to the test evaluation environment. Multiple CPU consumption values and / or multiple memory consumption values and / or other resource values are collected, and resource usage, that is, the above-mentioned test data, is output.
[0081] By performing stress testing using one of the above stress testing models and applying different business indicator values to the test evaluation environment, such as TPS, number of users, message status, etc., the running status of the software under various load conditions can be simulated, thereby improving the accuracy of resource evaluation.
[0082] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0083] Example 2
[0084] The embodiment of the present application also provides a resource cost determination device for civil aviation business software. It should be noted that the resource cost determination device for civil aviation business software in the embodiment of the present application can be used to execute the resource cost determination method for civil aviation business software provided in the embodiment of the present application. The resource cost determination device for civil aviation business software provided in the embodiment of the present application is introduced below.
[0085] According to an embodiment of the present application, a device for implementing the resource cost determination method of the above-mentioned civil aviation business software is also provided, such as Figure 8 As shown, the device includes: a first determination unit 801, used to determine the software category to which the civil aviation business software to be evaluated belongs according to business requirements; a second determination unit 802, used to determine the test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which the civil aviation business software consumes resources during actual application; a test unit 803, used to perform stress testing on the civil aviation business software in the test environment to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; a third determination unit 804, used to determine the resource usage information of the civil aviation business software based on the test data.
[0086] The resource cost determination device of civil aviation business software provided in the embodiment of the present application determines the software category of the civil aviation business software to be evaluated according to the business requirements through the first determination unit 801; the second determination unit 802 determines the test environment corresponding to the software category of the civil aviation business software, wherein the test environment is used to simulate the environment of resource consumption of the civil aviation business software in actual application; the test unit 803 performs stress testing on the civil aviation business software in the test environment to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; the third determination unit 804 determines the resource cost information of the civil aviation business software according to the test data, which solves the problem that the resource cost evaluation of civil aviation business software using a general evaluation model in the related technology leads to unreasonable resource cost evaluation. In the present application, by determining the software category of the civil aviation business software to be evaluated, determining the test environment corresponding to the civil aviation business software according to the software category, and performing stress testing on the civil aviation business software in the test environment corresponding to each civil aviation business software, accurate resource cost information is obtained according to the test data, thereby achieving the technical effect of improving the accuracy of the resource cost information of the civil aviation business software.
[0087] Optionally, in the resource cost determination device for civil aviation business software provided in an embodiment of the present application, the software category to which the civil aviation business software in the first confirmation unit 801 belongs is one of the following: transaction class, query class and communication protocol class, wherein the transaction class civil aviation business software refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the query class civil aviation business software refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the communication protocol class civil aviation business software refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
[0088] Optionally, in the resource cost determination device for civil aviation business software provided in the embodiment of the present application, the device also includes a first construction unit, which is used to build a test environment of the same scale as the production environment if the software category of the civil aviation business software is a communication protocol class, wherein an equal-scale test environment means that the constructed test environment is the same as the production environment; and a second construction unit, which is used to build a test environment of the same proportion as the production environment if the software category of the civil aviation business software is a transaction class or a query class, wherein an equal-proportion test environment means that the hardware equipment model of the constructed test environment is the same as that of the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the proportion.
[0089] Optionally, in the resource cost determination device for civil aviation business software provided in an embodiment of the present application, the testing unit 803 includes a first testing module, which is used to perform a stress test on the civil aviation business software in a test environment of equal scale according to the actual production business volume if the software category to which the civil aviation business software belongs is a communication protocol category, and collect multiple CPU consumption values and / or multiple memory consumption values during the test to obtain test data; the third determination unit includes a calculation module, which is used to calculate the average value of multiple CPU consumption values and / or the average value of multiple memory consumption values to obtain resource cost information.
[0090] Optionally, in the resource cost determination device for civil aviation business software provided in an embodiment of the present application, the test unit 803 includes a determination module, which is used to determine the inflection point through capacity testing if the software category to which the civil aviation business software belongs is a transaction category or a query category, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; and a second test module, which is used to perform scalability stress testing within the range of the inflection point, applying different business indicator pressure values to the test environment, and obtaining test data.
[0091] Optionally, in the resource cost determination device for civil aviation business software provided in an embodiment of the present application, the second test module includes an establishment sub-module, which is used to establish the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model if the test data includes multiple CPU consumption values; and the first determination sub-module is used to determine the resource cost information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0092] Optionally, in the resource cost determination device for civil aviation business software provided in an embodiment of the present application, the second test module includes a second determination sub-module, which is used to determine the resource cost information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values if the test data includes multiple memory consumption values and if, within a preset time range, the difference between the multiple memory consumption values is detected to be within a preset difference.
[0093] Optionally, in the resource cost determination device for civil aviation business software provided in the embodiment of the present application, after the device determines the resource cost information of the civil aviation business software based on test data, it includes a prediction unit for predicting the resource change demand within a preset time period in the future based on the resource cost information of the civil aviation business software; and a fourth determination unit for determining a corresponding resource adjustment strategy based on the resource change demand.
[0094] It should be noted that the first determination unit 801, the second determination unit 802, the test unit 803 and the third determination unit 804 described above correspond to S201 to S204 in Embodiment 1, and the four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Embodiment 1 described above. It should be noted that the above modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules may also be part of a device and may be run in the computer terminal 10 provided in Embodiment 1.
[0095] Example 3
[0096] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.
[0097] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0098] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the resource cost of civil aviation business software: determine the software category to which the civil aviation business software to be evaluated belongs based on business requirements; determine the test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which resource consumption of the civil aviation business software is actually applied; perform stress testing on the civil aviation business software in the test environment to obtain test data, wherein stress testing refers to simulating the actual business load in the test environment; and determine the resource cost information of the civil aviation business software based on the test data.
[0099] Optionally, the computer terminal may execute the program code of the following steps in the method for determining resource usage of civil aviation business software: the software category to which the civil aviation business software belongs is one of the following: transaction category, query category and communication protocol category, wherein the transaction category civil aviation business software refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the query category civil aviation business software refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the communication protocol category civil aviation business software refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
[0100] Optionally, the computer terminal may execute the program code of the following steps in the method for determining resource usage of civil aviation business software: before determining the test environment corresponding to the software category to which the civil aviation business software belongs, if the software category of the civil aviation business software is a communication protocol category, then a test environment of the same scale as the production environment is constructed, wherein an equal-scale test environment means that the constructed test environment is the same as the production environment; if the software category of the civil aviation business software is a transaction category or a query category, then a test environment of the same proportion as the production environment is constructed, wherein an equal-proportion test environment means that the hardware equipment model of the constructed test environment is the same as that of the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the proportion.
[0101] Optionally, the computer terminal may execute the following program codes of the method for determining resource cost of civil aviation business software: in a test environment, stress testing the civil aviation business software to obtain test data including: if the software category to which the civil aviation business software belongs is a communication protocol category, stress testing the civil aviation business software in a test environment of equal scale is performed according to actual production business volume, and during the test, multiple CPU consumption values and / or multiple memory consumption values are collected to obtain test data; based on the test data, determining the resource cost information of the civil aviation business software includes: calculating the average of multiple CPU consumption values and / or the average of multiple memory consumption values to obtain resource cost information.
[0102] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the resource expenditure of civil aviation business software: in the test environment, the business indicators of the software to be evaluated are stress tested to obtain test data including: if the software category to which the civil aviation business software belongs is transaction category or query category, the inflection point is determined through capacity testing, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; within the range of the inflection point, a scalability stress test is performed to apply different business indicator stress values to the test environment to obtain test data.
[0103] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the resource cost of civil aviation business software: if the test data includes multiple CPU consumption values, determining the resource cost information of the civil aviation business software based on the test data includes: establishing the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model; determining the resource cost information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0104] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the resource cost of civil aviation business software: if the test data includes multiple memory consumption values, determining the resource cost information of the civil aviation business software based on the test data includes: if within a preset time range, it is detected that the difference between multiple memory consumption values is within a preset difference, then determining the resource cost information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values.
[0105] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the resource cost of civil aviation business software: after determining the resource cost information of the civil aviation business software based on the test data, predict the resource change demand within a preset time period in the future based on the resource cost information of the civil aviation business software; determine the corresponding resource adjustment strategy based on the resource change demand.
[0106] Optionally, Fig. 9 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig. 9 As shown, the electronic device may include: one or more ( Fig. 9 (only one is shown) processor 902, memory 904, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0107] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for determining the resource cost of civil aviation business software in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the resource cost determination method of civil aviation business software mentioned above is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0108] The processor can call the information and application programs stored in the memory through the transmission device to execute the above steps in the resource cost determination method of the civil aviation business software.
[0109] By adopting the embodiment of the present application, a scheme for determining the resource cost of civil aviation business software is provided. By determining the software category to which the civil aviation business software to be evaluated belongs according to business requirements; determining the test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which the civil aviation business software consumes resources when it is actually applied; in the test environment, the civil aviation business software is subjected to stress testing to obtain test data, wherein the stress test refers to simulating the actual business load in the test environment; according to the test data, the resource cost information of the civil aviation business software is determined, which solves the problem that the resource cost evaluation of civil aviation business software using a general evaluation model in the related technology leads to unreasonable resource cost evaluation. In the present application, by determining the software category of the civil aviation business software to be evaluated, determining the test environment corresponding to the civil aviation business software according to the software category, and conducting stress testing on the civil aviation business software in the test environment to obtain test data, the resource cost information of the civil aviation business software is determined, and the purpose of conducting stress testing in different test environments and obtaining resource cost evaluation information is achieved, thereby achieving the technical effect of more accurate resource cost evaluation information.
[0110] It can be understood by those skilled in the art that Fig. 9 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig. 9 The structure of the electronic device is not limited. Fig. 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig. 9 Different configurations are shown.
[0111] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0112] Example 4
[0113] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the resource cost determination method of the civil aviation business software provided in the first embodiment.
[0114] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0115] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining the software category to which the civil aviation business software to be evaluated belongs based on business requirements; determining a test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the resource consumption environment of the civil aviation business software during actual application; performing stress testing on the civil aviation business software within the test environment to obtain test data, wherein stress testing refers to simulating actual business loads in the test environment; and determining resource usage information of the civil aviation business software based on the test data.
[0116] Optionally, the storage medium is also configured to store program code for executing the following steps: the software category to which the civil aviation business software belongs is one of the following: transaction category, query category and communication protocol category, wherein the transaction category civil aviation business software refers to the civil aviation business software responsible for online transactions, facing high-concurrency read and write interaction requests, and processing and confirming transactions within a first preset time; the query category civil aviation business software refers to the civil aviation business software responsible for online queries, facing high-concurrency query requests, and responding to user query requests within a second preset time; the communication protocol category civil aviation business software refers to the civil aviation business software responsible for protocol interaction and data transmission.
[0117] Optionally, the storage medium is also configured to store program code for executing the following steps: before determining the test environment corresponding to the software category to which the civil aviation business software belongs, if the software category of the civil aviation business software is a communication protocol category, then building a test environment of the same scale as the production environment, wherein an equal-scale test environment means that the built test environment is the same as the production environment; if the software category of the civil aviation business software is a transaction category or a query category, then building a test environment of the same proportion as the production environment, wherein an equal-proportion test environment means that the hardware equipment model of the built test environment is the same as the production environment, and the specifications or quantity of the hardware equipment are adjusted according to the proportion.
[0118] Optionally, the storage medium is also configured to store program code for executing the following steps: in a test environment, stress testing the civil aviation business software to obtain test data including: if the software category to which the civil aviation business software belongs is a communication protocol category, stress testing the civil aviation business software in a test environment of equal scale according to actual production business volume, collecting multiple CPU consumption values and / or multiple memory consumption values during the test to obtain test data; based on the test data, determining the resource usage information of the civil aviation business software including: calculating the average of multiple CPU consumption values and / or the average of multiple memory consumption values to obtain resource usage information.
[0119] Optionally, the storage medium is also configured to store program code for executing the following steps: in a test environment, stress testing the business indicators of the software to be evaluated to obtain test data including: if the software category to which the civil aviation business software belongs is a transaction category or a query category, determining the inflection point through capacity testing, wherein the inflection point is the turning point between resource consumption and business performance of the software to be evaluated in the test environment; performing a scalability stress test within the range of the inflection point, applying different business indicator stress values to the test environment, and obtaining test data.
[0120] Optionally, the storage medium is also configured to store program code for executing the following steps: if the test data includes multiple CPU consumption values, determining the resource cost information of the civil aviation business software based on the test data includes: establishing the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model; determining the resource cost information of the civil aviation business software based on the relationship between the business indicators and resource consumption of the civil aviation business software.
[0121] Optionally, the storage medium is also configured to store program code for executing the following steps: if the test data includes multiple memory consumption values, determining the resource usage information of the civil aviation business software based on the test data includes: if within a preset time range, it is detected that the difference between the multiple memory consumption values is within a preset difference, then determining the resource usage information of the civil aviation business software based on the target memory consumption value among the multiple memory consumption values.
[0122] Optionally, the storage medium is also configured to store program code for executing the following steps: after determining the resource usage information of the civil aviation business software based on the test data, predicting the resource change demand within a preset time period in the future based on the resource usage information of the civil aviation business software; and determining the corresponding resource adjustment strategy based on the resource change demand.
[0123] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the method for determining resource usage of civil aviation business software.
[0124] Example 5
[0125] According to another aspect of an embodiment of the present application, a computer program product is also provided, which, when executed on a data processing device, is suitable for executing the program steps of the method for determining resource usage of civil aviation business software.
[0126] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0127] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0132] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining resource costs of civil aviation business software, characterized in that: include: Determine the software category to which the civil aviation business software to be evaluated belongs based on business requirements; Determine a test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate the environment in which the civil aviation business software consumes resources when it is actually used; Performing stress testing on the civil aviation business software in the test environment to obtain test data, wherein the stress testing refers to simulating actual business load in the test environment; The resource cost information of the civil aviation business software is determined based on the test data.
2. The method according to claim 1, characterized in that The software category to which the civil aviation business software belongs is one of the following: transaction category, query category and communication protocol category, wherein the civil aviation business software of the transaction category refers to the civil aviation business software that is responsible for online transactions, faces high-concurrency read and write interaction requests, and processes and confirms transactions within a first preset time; the civil aviation business software of the query category refers to the civil aviation business software that is responsible for online queries, faces high-concurrency query requests, and responds to user query requests within a second preset time; the civil aviation business software of the communication protocol category refers to the civil aviation business software that is responsible for protocol interaction and data transmission.
3. The method according to claim 2, characterized in that Before determining the test environment corresponding to the software category to which the civil aviation business software belongs, the method further includes: If the software category of the civil aviation business software is the communication protocol category, a test environment of the same scale as the production environment is built, wherein the test environment of the same scale means that the built test environment is the same as the production environment; If the software category of the civil aviation business software is transaction type or query type, a test environment that is equal in proportion to the production environment is built, wherein the equal-proportion test environment means that the hardware device model of the built test environment is the same as that of the production environment, and the specifications or quantity of the hardware devices are adjusted according to the equal proportion.
4. The method according to claim 3, characterized in that In the test environment, stress testing is performed on the target indicators of the civil aviation business software to obtain test data, including: if the software category to which the civil aviation business software belongs is a communication protocol category, stress testing is performed on the civil aviation business software in the test environment of the same scale according to the actual production business volume, and multiple CPU consumption values and / or multiple memory consumption values are collected during the test process to obtain test data; Determining the resource cost information of the civil aviation business software according to the test data includes: calculating an average value of the multiple CPU consumption values and / or an average value of the multiple memory consumption values to obtain the resource cost information.
5. The method according to claim 3, characterized in that: In the test environment, the business indicators of the software to be evaluated are subjected to stress testing, and the test data obtained include: If the software category to which the civil aviation business software belongs is transaction category or query category, an inflection point is determined through capacity testing, wherein the inflection point is a turning point between resource consumption and business performance of the software to be evaluated in the test environment; A scalability stress test is performed within the range of the inflection point, and different business indicator stress values are applied to the test environment to obtain test data.
6. The method according to claim 5, characterized in that If the test data includes multiple CPU consumption values, determining the resource usage information of the civil aviation business software according to the test data includes: Establishing the relationship between the business indicators and resource consumption of the civil aviation business software through a mathematical model; The resource cost information of the civil aviation business software is determined based on the relationship between the business indicators and resource consumption of the civil aviation business software.
7. The method according to claim 5, characterized in that If the test data includes multiple memory consumption values, determining the resource usage information of the civil aviation business software according to the test data includes: If within a preset time range, it is detected that the difference between the multiple memory consumption values is within a preset difference, the resource usage information of the civil aviation business software is determined based on the target memory consumption value among the multiple memory consumption values.
8. The method according to claim 1, characterized in that After determining the resource cost information of the civil aviation business software according to the test data, the method further includes: Based on the resource usage information of the civil aviation business software, predict the resource change demand within a preset time period in the future; According to the resource change requirement, a corresponding resource adjustment strategy is determined.
9. A resource cost determination device for civil aviation business software, characterized in that: include: A first determination unit is used to determine the software category to which the civil aviation business software to be evaluated belongs according to business requirements; A second determining unit is used to determine a test environment corresponding to the software category to which the civil aviation business software belongs, wherein the test environment is used to simulate an environment in which resources are consumed when the civil aviation business software is actually used; A testing unit, configured to perform a stress test on the target indicators of the civil aviation business software in the test environment to obtain test data, wherein the stress test refers to simulating an actual business load in the test environment; The third determining unit is used to determine the resource cost information of the civil aviation business software according to the test data.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the resource cost determination method for civil aviation business software as described in any one of claims 1 to 9.
11. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the method for determining resource usage of civil aviation business software as described in any one of claims 1 to 9.
12. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the steps of the method for determining resource usage of civil aviation business software as described in any one of claims 1 to 9 are implemented.