Business system environment management method and device, computer equipment, readable storage medium and program product
By establishing communication connections with resource objects during the software development process, obtaining environmental resource data, and automatically managing when pre-configured governance conditions are met, the challenge of testing environmental environmental stability and availability guarantee in traditional technologies is solved, and the challenge of testing environmental environmental stability and availability guarantee is achieved. Efficient governance and resource utilization.
Patent Information
- Application Number
- CN202411427714.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
AI Technical Summary
In traditional technology, there are challenges in ensuring the environmental stability and availability of the test environment during software development, resulting in long failure recovery time, increasing the waiting time for testing work, and serious waste of R&D resources.
By establishing a communication connection with resource objects, obtaining environmental resource data, and automatically governing based on governance policies when pre-configured governance conditions are met, obtaining governance results and pushing them.
It realizes automated governance, reduces the workload of manual inspections, improves governance efficiency, reduces the waiting time for testing work, and ensures the stability and continuous availability of the environment.
Smart Images

Figure CN119441067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, apparatus, computer equipment, readable storage medium and program product for managing a business system environment. Background Art
[0002] With the development of Internet technology and software technology, microservices have become the main form of software systems in various industries in recent years, and the inter-service dependencies of complex banking business systems have become increasingly complex. With the iteration of business systems, the technologies used in the underlying environment of software servers have become increasingly complex, and the number of resources and resource clusters have grown rapidly, posing great challenges to the environmental stability and availability assurance in the life cycle of daily software development. And as the R&D process progresses in stages, the complexity and stability requirements of the system environment are becoming increasingly higher.
[0003] In traditional technology, when a specific environment is unavailable during R&D or testing, the person who discovers the problem reports it, and then analyzes and solves it based on the specific problem symptoms. Since problem reporting and problem solving are heavily dependent on people, the fault recovery time is long, resulting in a long waiting time for the environment to be unavailable, which significantly increases the waiting time for testing work and causes a serious waste of R&D resources. Summary of the invention
[0004] Based on this, it is necessary to provide a business system environment management method, device, computer equipment, computer-readable storage medium and computer program product that can improve testing efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a business system environment governance method, comprising:
[0006] Establishing a communication connection with the at least one resource object according to the test environment of the business system and the at least one resource object used;
[0007] Acquire environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment;
[0008] In the case where it is determined that the environmental resource data satisfies the pre-configured governance conditions, a target test environment of a target resource object corresponding to the environmental resource data is governed based on a corresponding governance policy to obtain a governance result of the target test environment of the target resource object;
[0009] Push the governance result of the target test environment of the target resource object.
[0010] In one of the embodiments, establishing a communication connection with the at least one resource object includes: determining a corresponding communication method based on the resource type of each of the resource objects, the communication method including at least one of an SSH method, an Agent method, an API interface, or an HTTP interface; based on the test environment, establishing a communication connection with the at least one resource object using the communication method.
[0011] In one of the embodiments, obtaining environmental resource data corresponding to the at least one resource object generated by the business system based on the test environment includes: obtaining a data collection frequency for each of the resource objects; and when the data collection frequency of the resource object is reached, obtaining the environmental resource data corresponding to the resource object generated by the business system based on the test environment.
[0012] In one of the embodiments, before obtaining the environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment, the method also includes: obtaining governance condition information configured for each of the resource objects and corresponding governance policy information; the governance policy information includes at least one of a data cleanup strategy, a service restart strategy, and a reporting strategy.
[0013] In one of the embodiments, pushing the governance results of the target test environment of the target resource object includes: pushing the governance results of the target test environment of the target resource object based on a pre-configured push method and a corresponding push address, and the push method includes at least one of email push and instant message push.
[0014] In one embodiment, the test environment includes at least one of a development environment, a test environment, a user acceptance test environment, and a simulation environment; the resource objects include but are not limited to a relational database, a Redis database, a message queue, a search server, and an application server.
[0015] In a second aspect, the present application provides a business system environment management device, the device comprising:
[0016] A connection module, used to establish a communication connection with at least one resource object according to the test environment of the business system and at least one resource object used;
[0017] A data acquisition module, used to acquire environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment;
[0018] A governance module, for, when it is determined that the environmental resource data satisfies a pre-configured governance condition, governing a target test environment of a target resource object corresponding to the environmental resource data based on a corresponding governance policy, and obtaining a governance result of the target test environment of the target resource object;
[0019] The result push module is used to push the governance result of the target test environment of the target resource object.
[0020] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0022] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0023] The above-mentioned business system environment governance method, device, computer equipment, computer-readable storage medium and computer program product establish a communication connection with at least one resource object according to the test environment of the business system and at least one resource object used, obtain the environmental resource data corresponding to at least one resource object generated by the business system based on the test environment operation, and when it is determined that the environmental resource data meets the pre-configured governance conditions, govern the target test environment of the target resource object based on the corresponding governance strategy to obtain the governance result of the target test environment of the target resource object, and push the governance result. It can realize automated governance based on the pre-configured governance conditions and governance strategies, thereby reducing the workload of governance through manual investigation, improving governance efficiency, and can centrally and uniformly monitor and govern multiple resource objects in multiple test environments to reduce the waiting time of testing work, and can ensure the stability and continuous availability of the environment, further improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 This is a flowchart of the traditional test environment governance;
[0026] Figure 2 A schematic diagram of a process flow of a business system environment management method in one embodiment;
[0027] Figure 3 A schematic diagram of a process flow of a business system environment management method in another embodiment;
[0028] Figure 4 A structural block diagram of a business system environment management device in an embodiment;
[0029] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] With the in-depth popularization of Internet technology, distributed architecture development, the development of open source technology, the development of computer software technologies such as continuous integration and delivery, and the maturity of agile project management systems, the technologies used in the test environment at the bottom of the software server are becoming more and more complex, resulting in a rapid increase in the number of resources and resource clusters, which brings great challenges to the stability and availability of the test environment in the life cycle of daily software development. Agile project management is particularly important for the efficiency of value delivery, so the value of automated monitoring and governance of the test environment is gradually reflected. For example, Message Quene (MQ for short) is currently widely used in the development technology of software and information systems in the Internet, finance, and different industries. Its asynchronous processing, application decoupling, and traffic peak shaving features are particularly widely used in complex banking business systems. However, the test environment has many data sources, and the development of integrated self-testing, functional testing, business acceptance testing, etc., has also increased the number of MQ messages. If the accumulated message queues are not consumed in time, it will further cause the problem of the environment being unusable.
[0032] The unavailability of the test environment will lead to waiting time for R&D personnel, waste of R&D time, and corresponding decrease in server operating efficiency and waste of related power and network resources. Traditional environmental protection methods are generally solved manually based on concrete individual problems. Due to differences in job division, key work content, and different business systems' consumption of environmental resources at different times, when problems occur in the existing test environment, due to limited manpower or capabilities, subjective initiative of personnel, etc., the attention paid to the test environment is insufficient. When the environment is unavailable, the system user (or affected person) conducts self-inspection and reports the problem, and a dedicated person from the project team or a randomly designated person performs environmental troubleshooting and environmental recovery operations to allow the interrupted test session to continue.
[0033] like Figure 1 As shown in the figure, the traditional test environment governance process mainly includes: during the functional test or business acceptance test, when it is found that a certain system function fails, the page cannot be displayed, the front-end interface requests the back-end service without return, the file cannot be generated, and other specific phenomena that the system function does not meet the expectations (that is, the environmental problem phenomenon is found), the test environment user reports and feedbacks the problem after discovering the above problem (that is, manual reporting), and the corresponding R&D personnel or configuration management engineer (Software Configuration Management Engineer, SCM) and other environmental assurance personnel conduct problem troubleshooting and synchronous verification (that is, manual processing, automatic cleanup). If the verification passes (that is, the environment is restored), the R&D process will continue to advance. If the environmental problem still exists, continue to troubleshoot until the problem is solved and the environment is restored and available.
[0034] The traditional environmental governance method is that after the actual impact of the unavailability of a specific environment occurs during the actual R&D process, the person who discovered it reports it, and then analyzes and solves it based on the specific problem manifestations. As a result, the following problems exist: The discovery and solution mechanisms for the unavailability of the test environment are all manually reported, investigated, root-caused, solved, and finally verified until the availability of the environment is restored. From problem discovery to problem solving, there is a waiting period for test-related resources in the R&D team. For large enterprises with multiple environments and systems using complex technology stack resources, the injection of environmental problems will cause a lot of waiting for the integration testing and user acceptance testing of multiple upstream and downstream systems and system groups. When important and urgent requirements enter the testing phase, environmental instability will generate additional progress risks, resulting in serious cost damage to the software development team. In the traditional troubleshooting method that relies heavily on the personal experience of engineers and their familiarity with the system architecture, when environmental failures occur, they are usually solved around individual cases, and the efficiency of environmental solutions is low. If containerization upgrades or architecture upgrades of other technical bases are involved, the original environmental governance scripts are prone to failure, and thus do not have the ability to be quickly inherited and reused. As the software industry becomes increasingly agile, the requirements for the stability and high availability of the test environment are becoming increasingly higher. The existing methods that rely heavily on manual troubleshooting by R&D personnel are no longer able to meet the requirements of agile, rapid, iterative delivery of MVP (Mininum Viable Product). In addition, because the function of the test environment is mainly to verify the correctness of business functions and demonstrate the effects, the configuration and quantity of related resources are seriously insufficient compared to the formal production environment, and there is a certain degree of competitiveness or exclusivity between environmental resources. Traditional test environment resources do not have the same system monitoring conditions as production. If the same monitoring and processing mechanisms as production are configured, additional server resources and supporting resources are required, and the hardware resource cost is high. Moreover, because the test action itself is "destructive", it is easy to frequently trigger the alarm mechanism by mistake.
[0035] Based on this, the present application provides a business system environment governance method, which improves the stability and high availability of the test environment, reduces the unavailable time of the system and services, avoids the waste of manpower in software system R&D, and reduces the cost of environmental problem investigation by automatically monitoring and automatically governing the environmental resource data of resource objects used by business systems in different environments, and pushes the governance results.
[0036] In one embodiment, Figure 2 As shown, a business system environment governance method is provided, which may include the following steps:
[0037] Step 202: Establish a communication connection with at least one resource object according to the test environment of the business system and at least one resource object used.
[0038] Among them, business system refers to a collection of software and hardware components used in an enterprise or organization to manage and support its core business processes. Business systems help organizations better manage key areas such as customer relationships, supply chains, finance, and human resources by providing automated business process management. They can also help organizations analyze data to support decision-making and provide cross-functional and cross-departmental integration, thereby providing organizations with automated and integrated business processing capabilities. For example, a business system can be a banking business system, which is the core operating system of a banking institution and is designed to help banks manage their businesses, processes, and products, and provide support for compliance, risk, and customer service.
[0039] With the continuous iteration of business systems, the complexity and stability requirements of the system environment are becoming higher and higher. Therefore, during the development and iteration of the business system, it is necessary to test its operating environment to ensure the availability and stability of the environment. Based on this, in this embodiment, a communication connection with at least one resource object can be established based on the test environment of the business system and at least one resource object used.
[0040] Specifically, the test environment can be the environment required for the business system to run, including but not limited to the development environment (Development Environment, referred to as DEV), system integration testing (System Integration Testing, referred to as SIT) environment, user acceptance testing (User Acceptance Testing, referred to as UAT) environment and simulation environment (Simulation Environment). Resource objects are specific resources used by the business system, including but not limited to relational databases, Redis databases, message queues (Message Quene, referred to as MQ), search servers (ElasticSearch, referred to as ES), application servers and other computing resources. Among them, other computing resources can be virtual machine servers, NAS (Network Attached Storage, referred to as NAS) disks and application container resources.
[0041] In this embodiment, a communication connection with at least one resource object used by the business system can be established according to the test environment of the business system. When the business system needs to run in multiple test environments, it can be connected to multiple test environments, and a communication connection with at least one resource object used by the business system can be established based on each test environment, so that multiple resource objects in multiple test environments can be centrally and uniformly monitored.
[0042] In an exemplary embodiment, establishing a communication connection with at least one resource object may specifically include: determining a corresponding communication mode based on a resource type of each resource object, and establishing a communication connection with at least one resource object using the corresponding communication mode based on a test environment.
[0043] Among them, the resource type can be determined based on the specific technology stack of the resource object, such as the database type, the middleware type, the application service type, etc. In this embodiment, the corresponding communication method can be determined based on the different resource types of the resource object, and a communication connection with the corresponding resource object can be established based on the communication method. Specifically, the communication method may include but is not limited to SSH (Secure Shell, a protocol for secure remote login and other secure network services on an insecure network) method, Agent (agent) method, API interface (Application Programming Interface, application programming interface) or HTTP (Hypertext Transfer Protocol, Hypertext Transfer Protocol) interface, etc. For example, for a database type resource object, such as a relational database, an SSH key method or an agent method can be used for access, that is, a communication connection with a relational database is established through an SSH key method or an agent method. Based on this, the corresponding communication method can be determined according to the resource type of each resource object, and the corresponding resource object can be accessed using the communication method, so as to facilitate the subsequent monitoring and management of the environmental resource data of the resource object.
[0044] Step 204: Obtain environmental resource data corresponding to at least one resource object generated by the business system running based on the test environment.
[0045] Among them, environmental resource data refers to the relevant environmental data corresponding to specific resource objects generated by the business system based on a specific test environment, which is used for environmental health analysis. Usually, for different resource types of resource objects, the corresponding environmental resource data may be different. The resource type is determined based on the specific technology stack of the resource object, such as database type, middleware type, application service type, etc. For example, in terms of database type, its corresponding environmental resource data includes but is not limited to the list of database table spaces, the utilization rate of database table spaces, etc.; in terms of middleware type, its corresponding environmental resource data includes but is not limited to the utilization rate of MQ resources, etc.; in terms of application service type, its corresponding environmental resource data includes but is not limited to disk storage space, storage utilization rate, application data files, the frequency of increase of log files, application memory utilization, etc. It can be understood that for the same resource object, the specific content of its environmental resource data based on different test environments may also be different.
[0046] In this embodiment, the environmental resource data corresponding to at least one resource object generated by the business system running based on the test environment is obtained, and specifically, the environmental resource data of each resource object generated by the business system running under each test environment can be obtained. For example, if the resource objects used by the business system include a relational database and a message queue, and the corresponding test environment includes a development environment and a system integration test environment, then the environmental resource data of the relational database and the environmental resource data of the message queue generated by the business system running under the development environment can be obtained, and the environmental resource data of the relational database and the environmental resource data of the message queue generated by the business system running under the system integration test environment can be obtained.
[0047] In an exemplary embodiment, obtaining environmental resource data corresponding to at least one resource object generated by a business system based on the operation of a test environment may specifically include: obtaining a data collection frequency for each resource object; when the data collection frequency of the resource object is reached, obtaining environmental resource data corresponding to the resource object generated by the business system based on the operation of the test environment. The data collection frequency may be a pre-configured time interval or time period for collecting data. In this embodiment, environmental resource data of resource objects under each test environment may be collected based on the pre-configured data collection frequency, thereby obtaining environmental resource data of each resource object under each test environment.
[0048] Step 206: When it is determined that the environmental resource data meets the pre-configured governance conditions, the target environment of the target resource object is governed and a governance result is obtained.
[0049] Specifically, when it is determined that the environmental resource data meets the pre-configured governance conditions, the target test environment of the target resource object corresponding to the environmental resource data is governed based on the corresponding governance policy to obtain the governance result of the target test environment of the target resource object. Among them, the governance condition can be the specific condition information configured in advance for each resource object to determine whether governance is required, such as resource utilization rate threshold, alarm value, key error code, specified parameter value, time zone value, etc. The governance policy can be a specific governance method for governing the target test environment corresponding to the corresponding resource object based on the governance condition trigger, for example, including but not limited to data cleaning strategy, service restart strategy and reporting strategy, etc. The target test environment refers to the test environment that needs to be governed, that is, the test environment corresponding to the target resource object, and the target resource object refers to the resource object corresponding to the environmental resource data that meets the governance conditions. The governance result is the relevant result of governing the target test environment of the target resource object based on the governance policy, for example, it can include the target test environment corresponding to the governance (such as the server corresponding to the environment), the target resource object and the specific content of the governance, etc.
[0050] In this embodiment, corresponding governance condition information and corresponding governance policy information can be configured in advance for each resource object. Governance condition information and corresponding governance policy information for resource objects under different test environments can also be configured based on different test environments. Thus, when it is determined that the environmental resource data meets the pre-configured governance conditions, the target environment of the target resource object can be governed to ensure the stability and continuous availability of the environment.
[0051] Step 208: Push the governance result of the target test environment of the target resource object.
[0052] Specifically, the governance results of the target test environment of the target resource object can be pushed, that is, the governance results can be communicated to the user information, so that the user can understand the situation of environmental governance in a timely manner and realize automatic monitoring of environmental governance.
[0053] In an exemplary embodiment, pushing the governance results of the target test environment of the target resource object may specifically include: pushing the governance results of the target test environment of the target resource object based on a pre-configured push method and a corresponding push address. The push methods include, but are not limited to, email push and instant message push. Specifically, if it is email push, the push address may include a specific email address, and if it is instant message push, the push address may include a specific instant messaging account, such as a WeChat account, a DingTalk account, etc. This embodiment pushes the governance results so that the information can reach the user, allowing the user to understand the environmental governance of the business system in a timely and intuitive manner.
[0054] In the above-mentioned business system environment governance method, according to the test environment of the business system and at least one resource object used, a communication connection with at least one resource object is established, and the environmental resource data corresponding to at least one resource object generated by the business system based on the test environment operation is obtained. When it is determined that the environmental resource data meets the pre-configured governance conditions, the target test environment of the target resource object is governed based on the corresponding governance strategy to obtain the governance result of the target test environment of the target resource object, and the governance result is pushed. It can realize automated governance based on the pre-configured governance conditions and governance strategies, thereby reducing the workload of governance through manual investigation, improving governance efficiency, and being able to centrally and uniformly monitor and govern multiple resource objects in multiple test environments to reduce the waiting time of testing work, and can ensure the stability and continuous availability of the environment, further improving efficiency.
[0055] In one embodiment, the business system is taken as a credit card risk control pre-loan system as an example to further illustrate the above business system environment management method. By monitoring the actual environment of the credit card risk control pre-loan system, managing the environment and automating the result notification, the project team is guaranteed to ensure continuous and stable software development, integration testing and continuous delivery of business acceptance testing. Figure 3 As shown, the following steps may be specifically included:
[0056] Step 302: resource docking.
[0057] According to the technology stack used by the credit card risk control pre-loan system, multiple test environments and different types of software service resources, i.e., resource objects, are connected. In this embodiment, resource objects may include databases, Redis databases, MQ, ES, application services, and other computing resources. Among them, other computing resources may be virtual machine servers, NAS disks, and application container resources.
[0058] Step 304: Environmental resource data collection.
[0059] According to the connected resource objects, corresponding data collection configuration is carried out, including the data collection frequency of different resources, the monitoring frequency of different resource types (such as user attributes, resource utilization rate, fixed conditions, log keywords, etc.), and based on the main data generated during the operation of the credit card risk control pre-loan system, targeted data collection is carried out for different resource objects.
[0060] Step 306: Environmental resource data analysis.
[0061] Based on the resource type and the data collection frequency configured above, the collected data is processed, intelligently analyzed and classified into possible environmental problems, which facilitates logical judgment on the utilization rate and health of environmental resources, thereby locating the resource objects that need to be governed.
[0062] Step 308, governance execution.
[0063] By configuring the governance or data cleanup rules for different resource objects, the governance instructions can be automatically executed according to the configured rules. Based on the resource objects that need to be governed located above, the governance instructions are executed.
[0064] Step 310, governance result notification.
[0065] The governance results of different resource objects in the docked test environment are communicated to users through the actually configured communication channels to complete the key information of environmental governance (such as collected data, analyzed data, specific operations of executed governance instructions, and final governance results, etc.), such as through corporate mailboxes, corporate WeChat, DingTalk, SMS or other means.
[0066] This embodiment is based on the bank's large and complex business system group to automatically monitor and manage multiple test environments with different functional purposes, and uses Python language to complete supporting development. It can be applied to the availability and continuity of multiple types of resources in the test environment of the software development process, and automatically monitors, automatically cleans, and summarizes the results of environmental monitoring of application services, container resources, databases, and middleware used in the test environment, and pushes the results of environmental management to designated stakeholders via email or mainstream communication tools. Avoid the problem of unavailable test services introduced by system resource problems during use, assist R&D personnel to quickly troubleshoot the impact of code defects and test data problems, reduce the manpower and time costs of manual troubleshooting, and have high scalability. It can make up for the manpower and financial resources consumed by enterprises or project stakeholders in ensuring the availability and stability of the test environment, and provide technical support for basic resources for software project development.
[0067] Specifically, in an exemplary embodiment, taking the resource object as the log layer analysis in the application service as an example, Figure 4 The specific governance process is as follows:
[0068] During the resource docking stage, the unified log platform is docked through the API (Application Programming Interface). The unified log platform is the basic service platform for the collection of public logs of the above-mentioned credit card risk control pre-loan system. It can archive and uniformly collect logs according to system, project and time dimensions. Then, monitor and configure the existing project list of the credit card pre-loan risk control system, including: clarify the project list to be retrieved, such as: sms (text message) log, core (system) log, user (user) log, risk (risk) log and other specific system project names; the time period for obtaining log data, such as a fixed day, specified working hours or crontab (command) set time; specify log business keyword rules: such as "implicit-integer-sign-change" (a compiler optimization option used to detect implicit integer sign conversion problems in the code), "ORA-01400" (a common error in Oracle database, which indicates an attempt to insert a NULL value into a column with a non-null constraint defined), "NoHttpResponseException" (abnormal request), "Network is unreachable" (network is unreachable), "slow sql" (SQL statement that takes a long time to execute), "SocketTimeoutException" (one of the common exceptions in Java network programming, usually indicating that the Socket connection cannot complete the expected read or connection operation within the specified timeout period), "DuplicateKeyException" (Spring A data access exception in the framework, which usually occurs when trying to insert or update data in the database and violates the uniqueness constraint), "execution of process method exception", "violation of unique constraint conditions" and other common business log keywords in the business system development process; business log level quantity, monitoring the number of log outputs at different log levels, which can be based on the Log4j (a logging tool) logging library commonly used by microservices, Slf4 (a unified interface of the logging framework) logging library and other adaptations, and can preliminarily determine whether the system has a large number of operational anomalies or log health, such as the number of system error-level logs within a specified time period.
[0069] In the environmental resource data collection and analysis phase, the monitoring log data and context of different projects obtained above are collected and analyzed, and formatted and outputted according to project requirements. For example, for the SQL (Structured Query Language) statement block in slow sql, it is judged whether the associated table in the SQL statement is missing an index, the service URL (uniform resourcelocator) and service IP address of the "NoHttpResponseException" are obtained, and the error code indicating an attempt to insert a NULL value into a non-empty column in the insert statement (a statement in SQL used to insert one or more rows of data into a database table) in the "ORA-01400" error code. In the short term, for example, a large number of error logs are output for the monitored project within 1 hour, and the output volume is N times the daily average volume, etc. Rules are configured.
[0070] In the governance execution phase, the corresponding environmental governance instructions are generated based on the above output results: for example, if the query condition field of the associated table in slow sql is missing an index, if there is no index, the instruction to add the index SQL is generated: "alter tabletable_name ADD INDEX index_name (column1,column2,...)"; if "ORA-01400", the complete insert statement and null value field of formatted output insertion are generated, such as the specific service address of "NoHttpResponseException", the instruction to call the restart script of the service, etc. If a large number of error logs are suddenly output in the project, the service stop instruction of the project will be issued.
[0071] During the governance result notification stage, the above-mentioned related operation steps are output in a formatted manner through predefined log printing, complete instruction information and instruction execution results are called, and the event platform or defect management tool is called to automatically report the bug simultaneously. The final information is output to the preconfigured recipients and CCs to complete the synchronous delivery of information.
[0072] In an exemplary embodiment, taking the resource object as a database layer as an example, the governance process is as follows:
[0073] During the resource docking stage, database resource docking for credit card risk control and pre-loan system monitoring and governance is established, which is the basic prerequisite for automated monitoring and governance of the database layer in environmental governance.
[0074] In the environmental resource data collection phase, data is collected for different relational database resources, which mainly includes two parts: one is the static view or dynamic view managed by the database itself, such as Oracle, and the implementation principles of other types of databases remain consistent. The other is the business data tables configured by users in the business system, such as flow tables, log tables, approval result tables, reconciliation tables, main credit card application submission tables, and subsidiary credit card application submission tables. Users can flexibly configure monitoring library table objects based on the special business system.
[0075] In the environmental resource data analysis and governance execution phase, it can be implemented based on the sub-rules configured by the governance rules. Specific examples include: table space usage threshold judgment: judge the table space usage: if it exceeds the specified table space usage ratio, such as 90%, configure the cleanup of the flow table table list, or if it increases rapidly to nearly 99%, temporarily issue an instruction to replace the table space of the table with a large amount of data; regular cleanup of data tables: for data with a rapid increase in short-term data volume and no business significance, you can configure a monthly / weekly scheduled truncate table table_name to save database resources; lock table judgment: for the lock table type, lock table time, lock table user and other lock table information, etc., flexibly configure them in combination with the failure experience of the business system. For example, if an individual user locks the table for more than 0.5 hours, it can automatically identify and inform the corresponding person to complete the commit operation of the database transaction; auto-increment sequence usage judgment: if the database design and use process has unreasonable auto-increment sequence usage and is about to be used up, it will automatically issue an alarm and test environment auto-increment sequence initialization operation; data collection and analysis of invalid indexes, and automatic index increase, and generate index recovery code blocks after recovery.
[0076] In the governance result notification stage, based on the completion of the above operations, the three key steps are formatted and output: such as the phenomenon of environmental problem monitoring, relevant information based on the generated complete processing instructions or automatically reported defect management information, and the final results of instruction processing and other necessary information in the software development process.
[0077] In an exemplary embodiment, taking the resource object as an ES (Elastic Search) database as an example, the governance process is as follows:
[0078] During the resource docking stage, a communication link with the ES resource cluster is established through the communication link API interface function.
[0079] During the environmental resource data collection, analysis, governance and result notification phase, the ES cluster list is obtained to determine the cluster list that needs to be monitored and governed; the utilization rate of each ES service is analyzed, and when the utilization rate reaches the set ratio upper limit, the cluster index list to be cleaned up is confirmed (index index is the basic unit for storing data); the index cleanup instruction is sent; the cleanup results are checked and confirmed, and the cleanup results are notified.
[0080] In an exemplary embodiment, taking the resource object as a server disk as an example, the management process is as follows:
[0081] In the resource connection stage, a communication link with the server cluster is established based on the communication link function, and the monitored disk usage threshold rules, cleaned disk paths, file name wildcards or file date wildcards, etc. are configured.
[0082] In the environmental resource data collection, analysis and governance stage, when the file time exceeds a certain time point under the server path configured by the previous rules, the file cleanup instruction will be executed. This will free up disk space and ensure that the disk space utilization rate meets the needs of software system operation in the long term.
[0083] During the governance result notification stage, after the server disk space is cleaned up, a polling comparison of the actual disk usage and security monitoring usage can be performed again, and the comparison results can be output to the pre-configured recipients and CC recipients to complete the information synchronization.
[0084] In an exemplary embodiment, taking Redis as an example, the governance process is as follows:
[0085] In the resource docking stage, based on the API interface function, a Redis cluster that requires environmental monitoring and management is established, and a complete cluster resource management list of the Redis host is configured.
[0086] During the environmental resource data collection, analysis and governance phase, monitor the memory unit, maximum memory value, memory usage and free memory rate of all redis resources in the current cluster. Clean up hosts whose memory usage exceeds the cleanup rules. Calculate the percentage of usage and free space in the cleaned redis cluster resource list. Configure the monitoring frequency to continuously monitor the usage of redis resources, and completely avoid the fullness of redis service resources without automated monitoring and governance measures, which will lead to systematic environmental problems such as unavailability of redis service resources.
[0087] During the governance result notification stage, the percentage of utilization and free space of the cleaned redis cluster resource list is calculated, and the calculation results are output to the pre-configured recipients and CC recipients to complete the information synchronization.
[0088] In an exemplary embodiment, taking the resource object as the interface service of the system as an example, the governance process is as follows:
[0089] During the resource docking phase, confirm the interface service bus interface number to be monitored, such as the bus interface number of the health interface service of the Enterprise Service Bus system. Confirm necessary information such as the service party IP, port, and protocol method accessed by different interfaces. Confirm the standard template message for each interface and the interface request message template. Confirm the generation rules of the business fields in the interface, such as fixed field values, random numbers, data generation rules that comply with business generation rules, multiple field combination splicing fields, and data that meets business cross-reference relationships.
[0090] During the environmental resource data collection, analysis and governance stage, the business request message is spliced to request the interface service health check, and the return code of the enterprise information service bus interface is judged. The interface return code (errorcode) is such as the common 000000 (success) or non-000000 (failure) or the unified standard of the interface response code defined within the enterprise.
[0091] In the governance result notification stage, for interface response codes other than 00000, the complete request and return messages on the server are pulled and formatted in a standardized manner according to the json or XML protocol. The failed message log is sent to the device's connected mail group or other internal enterprise communication tools in the form of interface number naming to complete the final delivery of complete information.
[0092] It is understandable that the above method is applied to the program module that can perform business system environment management, and can continuously expand or complete the automated monitoring, management and availability guarantee of various resources of the software system group at a small cost. For each system module resource, it can be integrated under the main program to expand the environmental management function, based on the parameterized configuration and modification of the rules of different resource modules, the generation and execution of modular cleanup instructions for different resource types, etc., which can all be expanded and optimized, and finally form automated environmental monitoring and environmental management based on the system group.
[0093] Compared with traditional technologies, this application can achieve the following effects: it can realize centralized and unified monitoring, cleaning and automatic and accurate notification of cleaning results for multiple types of resources in multiple test environments of the target system or system group. Targeted health monitoring, automatic operation and judgment of resources that are strongly related to the test environment and the normal software system test can be completed while using fewer system resources, and the API interface of existing communication tools can be combined to form a fast connection, complete the timely notification of verification results, and reduce lengthy manual problem reporting, analysis, resolution and environmental recovery retest notification processes. Based on the original experience of manual troubleshooting of the environment, the methodology and manual experience of troubleshooting test environment problems can be converted into systematic online analysis and judgment, getting rid of the limitations of human resources. The resources used by different technologies can be modularly adapted for use, such as collecting and analyzing the application service logs of the business system to derive possible environmental problems, hidden code problems of the system, etc. It can be applied to the credit card pre-loan system group to perform environmental health checks, continuous monitoring of environmental resource usage, automatic governance of environmental problems, and automatic notification of governance results during the operation of the system test environment, such as credit card application approval, approval rule verification, internal and external data acquisition, business strategy analysis, and approval results, to further ensure the stability and availability of the test environment and reduce the large amount of R&D resource waiting waste caused by system unavailability. It can determine whether the slow SQL of the database operation layer is missing, automatically add table index operations to the database layer first, and then add DML statements to the index and notify stakeholders of the index addition results. It can complete the unattended service health check of the enterprise information service bus interface of the system or system group, and inform the user of the complete service log of the health check. Through the iterative update of the core master model and the continuous optimization of the governance rule configuration, it can provide an automated solution for the availability governance of the test environment for personalized complex business system groups in the long term, and maintain the continuous stability of environmental services.
[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0095] Based on the same inventive concept, the embodiment of the present application also provides a business system environment management device for implementing the business system environment management method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more business system environment management device embodiments provided below can refer to the limitations of the business system environment management method above, and will not be repeated here.
[0096] In an exemplary embodiment, Figure 4 As shown, a business system environment management device is provided, including: a connection module 402, a data acquisition module 404, a management module 406 and a result push module 408, wherein:
[0097] A connection module 402, configured to establish a communication connection with at least one resource object according to a test environment of the business system and at least one resource object used;
[0098] A data acquisition module 404 is used to acquire environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment;
[0099] A governance module 406 is used to govern the target test environment of the target resource object corresponding to the environmental resource data based on the corresponding governance policy when it is determined that the environmental resource data meets the pre-configured governance conditions, and obtain a governance result of the target test environment of the target resource object;
[0100] The result push module 408 is used to push the governance result of the target test environment of the target resource object.
[0101] In an exemplary embodiment, the connection module is specifically used to: determine the corresponding communication method based on the resource type of each of the resource objects, the communication method including at least one of SSH method, Agent method, API interface or HTTP interface; based on the test environment, use the communication method to establish a communication connection with at least one of the resource objects.
[0102] In an exemplary embodiment, the data acquisition module is specifically used to: obtain the data collection frequency for each of the resource objects; when the data collection frequency of the resource object is reached, obtain the environmental resource data corresponding to the resource object generated by the business system running based on the test environment.
[0103] In an exemplary embodiment, the data acquisition module is also used to: obtain the governance condition information and corresponding governance policy information configured for each resource object; the governance policy information includes at least one of a data cleanup policy, a service restart policy, and a reporting policy.
[0104] In an exemplary embodiment, the result push module is specifically used to: push the governance result of the target test environment of the target resource object based on a preconfigured push method and a corresponding push address, and the push method includes at least one of email push and instant message push.
[0105] In an exemplary embodiment, the test environment includes at least one of a development environment, a test environment, a user acceptance test environment, and a simulation environment; the resource objects include but are not limited to a relational database, a Redis database, a message queue, a search server, and an application server.
[0106] Each module in the above-mentioned business system environment management device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0107] In an exemplary embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store corresponding environmental resource data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business system environment management method is implemented.
[0108] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0109] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0111] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0112] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0113] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0115] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for managing a business system environment, characterized in that: The method comprises: Establishing a communication connection with the at least one resource object according to the test environment of the business system and the at least one resource object used; Acquire environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment; In the case where it is determined that the environmental resource data satisfies the pre-configured governance conditions, a target test environment of a target resource object corresponding to the environmental resource data is governed based on a corresponding governance policy to obtain a governance result of the target test environment of the target resource object; Push the governance result of the target test environment of the target resource object.
2. The method according to claim 1, characterized in that: The establishing of a communication connection with the at least one resource object comprises: Based on the resource type of each resource object, determine a corresponding communication method, wherein the communication method includes at least one of an SSH method, an Agent method, an API interface, or an HTTP interface; Based on the test environment, a communication connection with the at least one resource object is established using the communication method.
3. The method according to claim 1, characterized in that The acquiring of the environment resource data corresponding to the at least one resource object generated by the business system based on the test environment operation includes: Obtaining a data collection frequency for each resource object; When the data collection frequency of the resource object is reached, the environmental resource data corresponding to the resource object generated by the business system running based on the test environment is obtained.
4. The method according to claim 1, characterized in that: Before acquiring the environment resource data corresponding to the at least one resource object generated by the business system running based on the test environment, the method further includes: Obtain governance condition information and corresponding governance policy information configured for each resource object; the governance policy information includes at least one of a data cleanup policy, a service restart policy, and a reporting policy.
5. The method according to claim 1, characterized in that The governance result of the target test environment of the target resource object is pushed, including: The governance result of the target test environment of the target resource object is pushed based on a pre-configured push method and a corresponding push address, wherein the push method includes at least one of email push and instant message push.
6. The method according to any one of claims 1 to 5, characterized in that: The test environment includes at least one of a development environment, a test environment, a user acceptance test environment, and a simulation environment; The resource objects include but are not limited to relational databases, Redis databases, message queues, search servers, and application servers.
7. A business system environment management device, characterized in that: The device comprises: A connection module, used to establish a communication connection with at least one resource object according to the test environment of the business system and at least one resource object used; A data acquisition module, used to acquire environmental resource data corresponding to the at least one resource object generated by the business system running based on the test environment; A governance module, for, when it is determined that the environmental resource data satisfies a pre-configured governance condition, governing a target test environment of a target resource object corresponding to the environmental resource data based on a corresponding governance policy, and obtaining a governance result of the target test environment of the target resource object; The result push module is used to push the governance result of the target test environment of the target resource object.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.