Micro-server control method, device, equipment and storage medium
By dynamically adjusting the micro-server configuration and verifying user access data in accordance with business requests in the micro-service monitoring and management platform, the problem of inflexible micro-server management in the existing technology is solved, and more efficient service management and problem positioning is achieved.
Patent Information
- Application Number
- CN202010920499.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-09-03
AI Technical Summary
The existing microservice monitoring and management platform cannot flexibly manage micro-server based on actual business scenarios, and it is difficult to achieve dynamic adjustments such as configuration management and log management.
When receiving the service request from the micro server, it obtains configuration file information according to the service request, adjusts the configuration information of the micro server, obtains user access data and dynamically verifys, and finally sends the successfully verified data to the target micro server, thereby achieving flexible management and control based on business scenarios.
It improves the flexibility of micro-server management and can dynamically adjust the configuration and access data of micro-server according to business needs, and achieve more refined service management and problem positioning.
Smart Images

Figure CN112231168B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of micro-servers, and particularly to a method, device, equipment and storage medium for micro-server control and management. Background Art
[0002] The microservice monitoring and management platform is extended based on basic components such as Spring Boot Actuator and Spring Cloud Consul to provide functions such as service governance, service monitoring, problem location, configuration management, and log management, and can assist in quickly locating problems or making service control configuration changes when production problems occur.
[0003] Spring Boot Admin provided by Spring itself is a visual monitoring component that depends on Spring Boot Actuator to collect the running information of each service. Through Spring Boot Actuator, it is convenient to view the Health information, memory information, JVM information, configuration information, garbage collection information, etc. of each microservice, but it cannot be flexibly controlled according to the actual business scenario. Summary of the Invention
[0004] The main purpose of the present invention is to propose a method, device, equipment and storage medium for micro-server control and management, aiming to improve the flexibility of micro-server control and management.
[0005] To achieve the above object, the present invention provides a method for micro-server control and management, the method for micro-server control and management includes the following steps:
[0006] When receiving a business request of a micro-server, obtaining corresponding configuration file information according to the business request;
[0007] Adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information;
[0008] Obtaining user access data, and obtaining a corresponding target micro-server according to the user access data;
[0009] Performing dynamic verification on the user access data according to the target configuration information;
[0010] When receiving a verification result of successful verification, sending the user access data to the corresponding target micro-server.
[0011] Optionally, before adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information, the method further includes:
[0012] Obtaining the current configuration information of the micro-server;
[0013] Compare the current configuration information with the configuration file information;
[0014] When the current configuration information is inconsistent with the configuration file information, execute the step of adjusting the configuration information of each current microservice according to the configuration file information to obtain the target configuration information.
[0015] Optionally, the configuration file information includes at least one of traffic configuration information, downgrade configuration information, connection configuration information, and timeout configuration information.
[0016] Optionally, the obtaining user access data and obtaining the corresponding target microservice according to the user access data includes:
[0017] Obtain user access data and classify the user access data to obtain the corresponding data type;
[0018] Obtain service information according to the data type;
[0019] Search for the corresponding microservice number information in the preset number relationship mapping table according to the service information;
[0020] Determine the corresponding target microservice according to the microservice number information.
[0021] Optionally, before dynamically verifying the user access data according to the target configuration information, the method further includes:
[0022] Obtain a configuration file adjustment instruction and extract the adjustment type information in the configuration file adjustment instruction;
[0023] Obtain the corresponding adjustment policy information according to the adjustment type information;
[0024] Adjust the target configuration information according to the adjustment policy information to obtain the adjusted target configuration information;
[0025] The dynamically verifying the user access data according to the target configuration information includes:
[0026] Dynamically verify the user access data according to the adjusted target configuration information.
[0027] Optionally, after receiving the verification result of successful verification and sending the user access data to the corresponding target microservice, the method further includes:
[0028] Obtain the traffic interaction data between the target microservice server and the requesting client through a preset link, where the traffic interaction data includes the response time information of the target microservice server and the request time consumption information of the requesting client;
[0029] Perform traffic pressure analysis on the response time information of the target microservice server and the request time consumption information of the requesting client to obtain the target traffic pressure;
[0030] Compare the target traffic pressure with the traffic pressure threshold to obtain the target traffic pressure level;
[0031] Perform visual display according to the target traffic pressure level using a corresponding pressure display method.
[0032] Optionally, after receiving the verification result of successful verification and sending the user access data to the corresponding target microservice server, the method further includes:
[0033] Obtain the server interaction data between the target microservice servers, and obtain the client interaction data between the client and the target microservice servers;
[0034] Obtain the corresponding service interface information and service interaction permission information according to the server interaction data and the client interaction data;
[0035] Obtain the service interface status information in the service interface information, and generate a global network topology relationship according to the service interface status information;
[0036] Obtain a dynamic control permission instruction, and adjust the service interaction permission information according to the dynamic control permission instruction.
[0037] In addition, to achieve the above object, the present invention also proposes a microservice server control device, where the microservice server control device includes: a memory, a processor, and a microservice server control program stored on the memory and executable on the processor, and the microservice server control program is configured to implement the steps of the microservice server control method as described above.
[0038] In addition, to achieve the above object, the present invention also proposes a storage medium, where a microservice server control program is stored on the storage medium, and when the microservice server control program is executed by a processor, it implements the steps of the microservice server control method as described above.
[0039] In addition, to achieve the above object, the present invention also proposes a microservice server control device, where the microservice server control device includes:
[0040] An acquisition module, configured to obtain corresponding configuration file information according to the service request when receiving a service request of a microservice;
[0041] An adjustment module, configured to adjust the configuration information of each current microservice according to the configuration file information to obtain target configuration information;
[0042] The acquisition module is further configured to obtain user access data and obtain a corresponding target microservice according to the user access data;
[0043] A verification module, configured to dynamically verify the user access data according to the target configuration information;
[0044] A sending module, configured to send the user access data to the corresponding target microservice when receiving a verification result of successful verification.
[0045] The microservice management and control method proposed by the present invention, by obtaining corresponding configuration file information according to the service request when receiving a service request of a microservice; adjusting the configuration information of each current microservice according to the configuration file information to obtain target configuration information; obtaining user access data and obtaining a corresponding target microservice according to the user access data; dynamically verifying the user access data according to the target configuration information; and sending the user access data to the corresponding target microservice when receiving a verification result of successful verification, so as to flexibly adjust the configuration information of the microservice according to the service request, and dynamically verify the user access data through the configuration file information, realizing flexible management and control based on the service scenario. Description of the Drawings
[0046] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present invention;
[0047] Figure 2 It is a schematic flowchart of the first embodiment of the microservice management and control method of the present invention;
[0048] Figure 3 It is a schematic diagram of the overall process framework of the search stage of an embodiment of the microservice management and control method of the present invention;
[0049] Figure 4 It is a schematic flowchart of the second embodiment of the microservice management and control method of the present invention;
[0050] Figure 5 It is a schematic flowchart of the third embodiment of the microservice management and control method of the present invention;
[0051] Figure 6 It is a schematic diagram of the functional modules of the first embodiment of the microservice management and control device of the present invention.
[0052] The realization, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments
[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0054] Refer to Figure 1 , Figure 1 which is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.
[0055] As Figure 1 shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a button. Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
[0056] Those skilled in the art can understand that Figure 1 the device structure shown in
[0057] does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a micro-server control program.
[0058] In Figure 1 the device shown, the network interface 1004 is mainly used to connect to the external network and communicate with other network devices; the user interface 1003 is mainly used to connect to the user device and communicate with the device; the device of the present invention calls the micro-server control program stored in the memory 1005 through the processor 1001 and executes the implementation method of the micro-server control provided by the embodiment of the present invention.
[0059] Based on the above hardware structure, an embodiment of the micro-server control method of the present invention is proposed.
[0060] Refer to Figure 2 ,Figure 2 This is a schematic flowchart of the first embodiment of the micro-server control method of the present invention.
[0061] In the first embodiment, the micro-server control method includes the following steps:
[0062] Step S10, when receiving a service request of a micro-server, obtain corresponding configuration file information according to the service request.
[0063] It should be noted that the execution subject of this embodiment is the micro-service monitoring and management platform, which can be flexibly adjusted according to business requirements through the micro-service monitoring and management platform. The services of the monitoring and management platform include: web-config, web-actuator, web-umpgate, web-umpdac, and web-config. The configuration center mainly functions to obtain the micro-service configuration files in the NAS (Network Attached Storage). Web-actuator: a monitoring service responsible for handling operations related to the operation and maintenance monitoring platform. Web-umpgate: a front-end micro-service for operation and maintenance monitoring, mainly providing a web client that users can use and related access filtering. Web-umpdac: a permission service mainly responsible for functions related to user login and permissions. Among them, the configuration file information includes at least one of traffic configuration information, downgrade configuration information, connection configuration information, and timeout configuration information.
[0064] In this embodiment, the service request of the micro-server can be a service request generated when receiving a micro-server access, or a service request generated by other means. This embodiment does not limit this. It should be emphasized that to further ensure the privacy and security of the above configuration file information, the above configuration file information can also be stored in a node of a blockchain.
[0065] Step S20, adjust the configuration information of each current micro-server according to the configuration file information to obtain target configuration information.
[0066] In this embodiment, the micro-service monitoring and management platform is provided with a corresponding visual operation interface. Through the visual operation interface, the operation requirements of each service can be carried out. For example, the configuration of the micro-server can be carried out through the visual operation interface. Among them, the configuration information includes permission management, and can also include the setting of related parameters such as traffic, such as limiting traffic, downgrading, connection setting, and timeout setting, and can also include other configuration parameter information. This embodiment does not limit this.
[0067] It is understandable that in order to implement service governance, service governance operations can be carried out. Among them, the microservice monitoring and management platform also provides configuration management, and operations such as querying, adding, modifying, deleting, and publishing application configuration items can be performed using a visual interface. The application is synchronized and takes effect without restarting.
[0068] In a specific implementation, since the microservice monitoring and management platform includes a web-actuator component, information about each microservice in the current network system can be obtained by monitoring the service through the web-actuator component. The microservice information is managed in a clustered manner. When the configuration file is obtained and configured through the configuration file, information about each microservice can be viewed through the microservice monitoring and management platform. File configuration can be performed by selecting the corresponding microservice. The microservice information can be managed by name, such as micro1, micro2, etc., and can also be managed in other ways, which is not limited in this embodiment.
[0069] As Figure 3 shown in the schematic diagram of the microservice monitoring and management platform system structure, web-config: configuration center, whose main function is to obtain the microservice configuration file in the NAS, web-actuator: monitoring service, responsible for handling relevant operations of the operation and maintenance monitoring platform, storing the monitoring data in the database oracle DB for preservation, and through web-config, web-actuator, web-umpgate, and web-umpdac, web-config collects user data to generate log content, and manages and filters the generated log content.
[0070] Step S30, obtain user access data, and obtain the corresponding target microservice according to the user access data.
[0071] It should be noted that the access data includes the destination address information of the user's access. The corresponding business information can be obtained through the destination address information, and thus the corresponding target microservice can be obtained. For example, when the user accesses the database query service, the corresponding target microservice, that is, the server managing the database, can be obtained.
[0072] Step S40, dynamically verify the user access data according to the target configuration information.
[0073] In this embodiment, since the microservice monitoring and management platform includes the web-umpgate component, the front-end microservices are monitored and maintained through the web-umpgate component, which mainly provides a web client that can be used by users and relevant access filtering. The corresponding microservice information can be obtained through the access data of users, and the access data is dynamically filtered according to the microservice information. Since the configuration information of each microservice is inconsistent, the users can be verified through the corresponding configuration information. For example, when user A accesses microservice B, the authorized users of microservice B obtained are ID110 - 120, so as to obtain the ID information of the current user. If the ID information of the current user is within the ID range of the authorized users, user A is allowed to access; on the contrary, if the ID information of the current user is not within the ID range of the authorized users, user A is not allowed to access. Thus, the access data is dynamically verified according to the target configuration information to achieve dynamic data control.
[0074] Step S50, when receiving the verification result of successful verification, send the user access data to the corresponding target microservice.
[0075] In specific implementation, since the microservice monitoring and management platform includes the web-umpdac component, the permission service can be carried out through the web-umpdac component, which is responsible for functions related to user login, permissions, etc.
[0076] It should be noted that service monitoring can also be performed according to the collected user data. The user data of the client is collected through the gateway set between the client and the server, and the access data is analyzed to obtain the health information, memory information, JVM information, configuration information, garbage collection information, process information, call chain, dependency relationship, and traffic of each microservice. Problem location can also be performed according to the collected user data. Specifically, the parameters, response results, request time consumption, request client address, process number, and thread number of all requests can be viewed using the call chain visualization interface. The overall traffic pressure of the current application can be seen using the traffic monitoring visualization interface, so as to locate problems according to the collected data. Service interaction management can also be performed according to the collected user data. The service management interface can be used to publish, authorize, and take offline service interfaces and other functions to manage, monitor, and display the global topology relationship and dynamically control service interaction permissions.
[0077] In this embodiment, log management can also be performed on the collected data. Specifically, the application logs can be queried using the visualization interface, the logs within a specified time window or of a specified level can be filtered, and the application output log level can be dynamically controlled.
[0078] In this embodiment, through the above solution, when receiving a service request from a microservice, corresponding configuration file information is obtained according to the service request, where the configuration file information is stored in a blockchain; the configuration information of each current microservice is adjusted according to the configuration file information to obtain target configuration information; user access data is acquired, and a corresponding target microservice is obtained according to the user access data; the user access data is dynamically verified according to the target configuration information; when a verification result of successful verification is received, the user access data is sent to the corresponding target microservice, so that the configuration information of the microservice can be flexibly adjusted according to the service request, and the user access data can be dynamically verified through the configuration file information, realizing flexible control based on the service scenario.
[0079] In one embodiment, as Figure 4 shown, a second embodiment of the microservice control method of the present invention is proposed based on the first embodiment. In this embodiment, before step S20, the method further includes:
[0080] Step S201, obtain the current configuration information of the microservice.
[0081] In this embodiment, the current configuration information of the microservice includes at least one of traffic configuration information, downgrade configuration information, connection configuration information, and timeout configuration information, and may also include other configuration information, which is not limited in this embodiment.
[0082] Step S202, compare the current configuration information with the configuration file information.
[0083] It should be noted that, in order to ensure the configuration efficiency of the microservice, the configuration information of the microservice is not adjusted when the configuration information is obtained. Instead, the current configuration information of the microservice is judged. When the current configuration information of the microservice is consistent with the configuration file information, there is no need to reconfigure. When the current configuration information of the microservice is inconsistent with the configuration file information, the configuration information of the microservice is reconfigured, thereby improving the configuration efficiency.
[0084] When the current configuration information is inconsistent with the configuration file information, step S20 is executed.
[0085] In one embodiment, step S30 includes:
[0086] Obtain user access data, classify the user access data to obtain corresponding data types, obtain service information according to the data types, look up corresponding microservice number information in a preset number relationship mapping table according to the service information, and determine the corresponding target microservice according to the microservice number information.
[0087] In this embodiment, the data type may be a data format type. Since the data formats corresponding to each different service request are different, the corresponding service type information can be obtained according to the data format. Therefore, the corresponding service data can be sent to the corresponding micro-server according to the data type, thereby realizing the effective management of user access data.
[0088] It can be understood that, for example, when the data type is the health information of the micro-server, the corresponding service business information can be obtained according to the health information of the micro-server.
[0089] It should be noted that the preset number relationship mapping table may be a pre-established mapping table. For example, the micro-server code corresponding to the health data service information is ID110. Therefore, the corresponding micro-server code information can be determined according to the current service information, and the corresponding target micro-server can be determined according to the micro-server code information.
[0090] The solution provided in this embodiment obtains user access data, classifies the user access data to obtain the corresponding data type, obtains service information according to the data type, searches for the corresponding micro-server number information in the preset number relationship mapping table according to the service information, and determines the corresponding target micro-server according to the micro-server number information. Thus, the corresponding target micro-server is determined through the user access data, realizing the accuracy of micro-server identification.
[0091] In one embodiment, as Figure 5 shown, based on the first embodiment or the second embodiment, the third embodiment of the micro-server control method of the present invention is proposed. In this embodiment, based on the first embodiment, before the step S40, the method further includes:
[0092] Step S401, obtain a configuration file adjustment instruction, and extract the adjustment type information in the configuration file adjustment instruction.
[0093] It should be noted that the configuration file adjustment instruction includes operations such as configuration item query, addition, modification, deletion, and release, and may also include other operation information. This embodiment does not limit this. Since the configuration file adjustment instructions in this embodiment can be of various types, such as query, addition, modification, deletion, and release of configuration information adjustment types, and limit traffic, degradation, connection setting, and timeout setting in function adjustment types, etc., the corresponding adjustment type information can be obtained through the configuration file adjustment instruction. For example, through the query instruction, it can be obtained that the current configuration file adjustment instruction is for the adjustment type of configuration information, thereby realizing the effective classification of the configuration file adjustment instruction.
[0094] Step S402, obtain the corresponding adjustment strategy information according to the adjustment type information.
[0095] In this embodiment, corresponding adjustment strategy information is set according to different adjustment types, so that the target configuration information can be adjusted according to the adjustment strategy information. For example, when the adjustment type is the configuration information adjustment type, that is, a new instruction is added to the configuration file, the target configuration information can be newly configured according to the new instruction in the configuration file by adopting a new control strategy, so as to realize flexible adjustment of the target configuration information.
[0096] Step S403: Adjust the target configuration information according to the adjustment strategy information to obtain the adjusted target configuration information.
[0097] In a specific implementation, when the adjustment type is the configuration information adjustment type, that is, a new instruction is added to the configuration file, the target configuration information is newly configured, and the configuration content information in the new target configuration information is added to obtain the adjusted target configuration information.
[0098] The step S40 includes:
[0099] Dynamically verify the user access data according to the adjusted target configuration information.
[0100] In one embodiment, after step S50, the method further includes:
[0101] Obtain the traffic interaction data between the target microservice and the request client through a preset link, where the traffic interaction data includes the response time information of the target microservice and the request time consumption information of the request client.
[0102] It should be noted that since this embodiment manages the target microservice and the request client through a link, continue as Figure 3 shown, the Kafka cluster and the operation and maintenance monitoring microservice are connected through a link, so that the link data between the Kafka cluster and the operation and maintenance monitoring microservice can be obtained, and log analysis is also performed through Logstash, a platform for the transmission, processing, management and search of application program logs and events, so as to improve the data analysis ability of the microservice.
[0103] In a specific implementation, since a preset link is established between the target microservice and the request client, therefore, through the response time information of the target microservice and the request time consumption information of the request client, the network processing capabilities of each microservice can be obtained, and refined management of the microservice can be realized.
[0104] Perform traffic pressure analysis on the response time information of the target microserver and the request elapsed time information of the request client to obtain the target traffic pressure; compare the target traffic pressure with the traffic pressure threshold to obtain the target traffic pressure level; and perform visual display using the corresponding pressure display method according to the target traffic pressure level.
[0105] In this embodiment, the pressure display method can be to display with a preset color. For example, when the traffic processing pressure is large, a dark red visual display appears, so that the microserver with a large pressure can be more intuitively located. You can also use the call link visualization interface to view the parameters, response results, and request elapsed time of all requests, and locate problems based on the collected data.
[0106] In one embodiment, after step S50, the method further includes:
[0107] Obtain the server interaction data between the target microservers, and obtain the client interaction data between the client and the target microservers; obtain the corresponding service interface information and service interaction permission information according to the server interaction data and the client interaction data. Obtain the service interface status information in the service interface information, and generate a global network topology relationship according to the service interface status information; obtain the dynamic control permission instruction, and adjust the service interaction permission information according to the dynamic control permission instruction.
[0108] In this embodiment, service interaction management can also be performed according to the collected user data. The service management interface can be used to perform functions such as service interface publishing, authorization, and offline for the interaction and monitoring between services, and to display the global topology relationship and dynamically control service interaction permissions.
[0109] The solution provided in this embodiment realizes effective problem location and displays the global topology relationship by obtaining the target traffic pressure of each microserver, the server interaction data between the target microservers, and the client interaction data between the client and the target microservers, improving the flexibility of microserver control.
[0110] The present invention further provides a microserver control device.
[0111] Refer to Figure 6 , Figure 6 which is a schematic diagram of the functional modules of the first embodiment of the microserver control device of the present invention.
[0112] In the first embodiment of the microserver control device of the present invention, the microserver control device includes:
[0113] An acquisition module 10 is configured to obtain corresponding configuration file information according to the service request when receiving a service request from a microservice server.
[0114] It should be noted that the microservice monitoring and management platform can be flexibly adjusted according to service requirements. The services of the monitoring and management platform include: web-config, web-actuator, web-umpgate, web-umpdac, and web-config. The configuration center is mainly responsible for obtaining microservice configuration files in NAS (Network Attached Storage). Web-actuator is a monitoring service responsible for handling operations related to the operation and maintenance monitoring platform. Web-umpgate is a front-end microservice for operation and maintenance monitoring, mainly providing web clients that users can use and related access filtering. Web-umpdac is a permission service mainly responsible for functions related to user login and permissions. Among them, the configuration file information includes at least one of traffic configuration information, degradation configuration information, connection configuration information, and timeout configuration information.
[0115] In this embodiment, the service request of the microservice server can be a service request generated when receiving a microservice access, or a service request generated in other ways. This embodiment does not limit this. It should be emphasized that to further ensure the privacy and security of the above configuration file information, the above configuration file information can also be stored in a node of a blockchain.
[0116] An adjustment module 20 is configured to adjust the configuration information of each current microservice server according to the configuration file information to obtain target configuration information.
[0117] In this embodiment, the microservice monitoring and management platform is provided with a corresponding visual operation interface. Through the visual operation interface, operation requirements for each service can be performed. For example, the configuration of microservice servers can be performed through the visual operation interface. Among them, the configuration information includes permission management, and can also include settings of related parameters such as traffic, such as limiting traffic, degradation, connection settings, and timeout settings, and can also include other configuration parameter information. This embodiment does not limit this.
[0118] It can be understood that in order to implement service governance, service governance operations can be performed. Among them, the microservice monitoring and management platform also provides configuration management. Operations such as querying, adding, modifying, deleting, and publishing application configuration items can be performed using the visual interface, and the application is synchronized and takes effect without restarting.
[0119] In a specific implementation, since the microservice monitoring and management platform includes a web-actuator component, information about each microservice in the current network system can be obtained by monitoring the service through the web-actuator component. The microservice information is managed in a clustered manner. When the configuration file is obtained and configured through the configuration file, information about each microservice can be viewed through the microservice monitoring and management platform. By selecting the corresponding microservice for file configuration, the microservice information can be managed by name, such as Micro 1, Micro 2, etc., or it can be managed in other ways, which is not limited in this embodiment.
[0120] As Figure 3 Shown in the schematic diagram of the microservice monitoring and management platform system structure, web-config: configuration center, whose main function is to obtain the microservice configuration file in the NAS, web-actuator: monitoring service, responsible for processing relevant operations and maintenance monitoring platform services, and storing the monitoring data in the database oracle DB for preservation. Through web-config, web-actuator, web-umpgate, and web-umpdac, web-config collects user data to generate log content, and manages and filters the generated log content.
[0121] The obtaining module 10 is further configured to obtain user access data and obtain a corresponding target microservice according to the user access data.
[0122] It should be noted that the access data includes the destination address information accessed by the user. Through the destination address information, the corresponding service information can be obtained, and thus the corresponding target microservice can be obtained. For example, when the user accesses the database query service, the corresponding target microservice, that is, the server managing the database, can be obtained.
[0123] The verification module 30 is configured to dynamically verify the user access data according to the target configuration information.
[0124] In this embodiment, since the microservice monitoring and management platform includes the web-umpgate component, the front-end microservices are operationally monitored through the web-umpgate component, which mainly provides a web client that users can use and related access filtering. Corresponding microservice information can be obtained from the user's access data, and the access data is dynamically filtered based on the microservice information. Since the configuration information of each microservice is inconsistent, users can be verified through the corresponding configuration information. For example, when user A accesses microservice B, the authorized users of microservice B are obtained as ID110 - 120, and the ID information of the current user is thus obtained. If the ID information of the current user is within the ID range of the authorized users, then user A is allowed to access; on the contrary, if the ID information of the current user is not within the ID range of the authorized users, then user A is not allowed to access. Thus, the access data is dynamically verified according to the target configuration information to achieve dynamic data control.
[0125] The sending module 40 is configured to send the user access data to the corresponding target microservice when receiving a verification result indicating successful verification.
[0126] In a specific implementation, since the microservice monitoring and management platform includes the web-umpdac component, permission services can be performed through the web-umpdac component, which is responsible for functions related to user login, permissions, etc.
[0127] It should be noted that service monitoring can also be performed based on the collected user data. The user data of the client is collected through a gateway set between the client and the server, and the access data is analyzed to obtain the health information, memory information, JVM information, configuration information, garbage collection information, process information, call chain, dependency relationship, and traffic of each microservice. Problem location can also be performed based on the collected user data. Specifically, the parameters, response results, request duration, request client address, process number, and thread number of all requests can be viewed using the call chain visualization interface. The overall traffic pressure of the current application can be seen using the traffic monitoring visualization interface, so as to locate problems based on the collected data. Service interaction management can also be performed based on the collected user data. The service management interface can be used to publish service interfaces, authorize, and take offline services, etc., to manage, monitor, and display the global topology relationship, as well as dynamically control service interaction permissions.
[0128] In this embodiment, log management can also be performed on the collected data. Specifically, a visualization interface can be used to query application logs, filter logs within a specified time window or of a specified level, and the log output level of the application can be dynamically controlled.
[0129] In this embodiment, through the above solution, when receiving a service request from a micro-server, the corresponding configuration file information is obtained according to the service request, where the configuration file information is stored in a blockchain; the configuration information of each current micro-server is adjusted according to the configuration file information to obtain target configuration information; user access data is acquired, and the corresponding target micro-server is obtained according to the user access data; the user access data is dynamically verified according to the target configuration information; when receiving a verification result of successful verification, the user access data is sent to the corresponding target micro-server, so that the configuration information of the micro-server can be flexibly adjusted according to the service request, and the user access data can be dynamically verified through the configuration file information, realizing flexible control based on the service scenario.
[0130] In one embodiment, the adjustment module 20 is further configured to obtain the current configuration information of the micro-server;
[0131] Compare the current configuration information with the configuration file information;
[0132] When the current configuration information is inconsistent with the configuration file information, the step of adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information is executed.
[0133] In one embodiment, the acquisition module 10 is further configured to acquire user access data and classify the user access data to obtain corresponding data types;
[0134] Obtain service information according to the data type;
[0135] Search for corresponding micro-server number information in a preset number relationship mapping table according to the service information;
[0136] Determine the corresponding target micro-server according to the micro-server number information.
[0137] In one embodiment, the verification module 30 is further configured to obtain a configuration file adjustment instruction and extract adjustment type information in the configuration file adjustment instruction;
[0138] Obtain corresponding adjustment policy information according to the adjustment type information;
[0139] Adjust the target configuration information according to the adjustment policy information to obtain adjusted target configuration information;
[0140] Dynamically verify the user access data according to the adjusted target configuration information.
[0141] In one embodiment, the micro-server control device further includes: a display module;
[0142] The display module is configured to obtain the traffic interaction data between the target micro-server and the requesting client through a preset link, where the traffic interaction data includes the response time information of the target micro-server and the request duration information of the requesting client;
[0143] Perform traffic pressure analysis on the response time information of the target micro-server and the request duration information of the requesting client to obtain the target traffic pressure;
[0144] Compare the target traffic pressure with a traffic pressure threshold to obtain a target traffic pressure level;
[0145] Perform visual display using a corresponding pressure display method according to the target traffic pressure level.
[0146] In one embodiment, the adjustment module 20 is further configured to obtain the server interaction data between the target micro-servers, and obtain the client interaction data between the client and the target micro-servers;
[0147] Obtain corresponding service interface information and service interaction permission information according to the server interaction data and the client interaction data;
[0148] Obtain the service interface status information in the service interface information, and generate a global network topology relationship according to the service interface status information;
[0149] Obtain a dynamic control permission instruction, and adjust the service interaction permission information according to the dynamic control permission instruction.
[0150] The micro-server control device of the present invention adopts all the technical solutions of the above all embodiments, and thus has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be elaborated one by one here.
[0151] In addition, to achieve the above object, the present invention also proposes a micro-server control device, where the micro-server control device includes: a memory, a processor, and a micro-server control program stored on the memory and executable on the processor, and the micro-server control program is configured to implement the steps of the micro-server control method as described above.
[0152] In addition, an embodiment of the present invention also proposes a storage medium, on which a micro-server control program is stored, and the micro-server control program is executed by a processor to implement the steps of the micro-server control method as described above.
[0153] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information on a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.
[0154] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including the element.
[0155] The serial numbers of the above-described embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0156] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable an intelligent terminal device (which can be a mobile phone, a computer, a terminal device, an air conditioner, or a network terminal device, etc.) to execute the methods described in the various embodiments of the present invention.
[0157] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A micro-server control method, characterized in that, the micro-server control method includes: When receiving a service request from a micro-server, obtaining corresponding configuration file information according to the service request; Adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information; Obtaining user access data and classifying the user access data to obtain corresponding data types; Obtaining service information according to the data type; Searching for corresponding micro-server number information in a preset number relationship mapping table according to the service information; Determining a corresponding target micro-server according to the micro-server number information; Performing dynamic verification on the user access data according to the target configuration information; When receiving a verification result of successful verification, sending the user access data to the corresponding target micro-server.
2. The micro-server control method according to claim 1, characterized in that, Before adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information, the method further includes: Obtaining the current configuration information of the micro-server; Comparing the current configuration information with the configuration file information; When the current configuration information is inconsistent with the configuration file information, performing the step of adjusting the configuration information of each current micro-server according to the configuration file information to obtain target configuration information.
3. The micro-server control method according to claim 1, characterized in that, The configuration file information includes at least one of traffic configuration information, downgrade configuration information, connection configuration information, and timeout configuration information.
4. The micro-server control method according to any one of claims 1 to 3, characterized in that, Before performing dynamic verification on the user access data according to the target configuration information, the method further includes: Obtaining a configuration file adjustment instruction and extracting adjustment type information in the configuration file adjustment instruction; Obtaining corresponding adjustment strategy information according to the adjustment type information; Adjusting the target configuration information according to the adjustment strategy information to obtain adjusted target configuration information; The performing dynamic verification on the user access data according to the target configuration information includes: Performing dynamic verification on the user access data according to the adjusted target configuration information.
5. The micro-server control method according to any one of claims 1 to 3, characterized in that, After sending the user access data to the corresponding target micro-server when receiving a verification result of successful verification, the method further includes: Obtaining traffic interaction data between the target micro-server and the request client through a preset link, where the traffic interaction data includes response time information of the target micro-server and request time-consuming information of the request client; Performing traffic pressure analysis on the response time information of the target micro-server and the request time-consuming information of the request client to obtain target traffic pressure; Comparing the target traffic pressure with a traffic pressure threshold to obtain a target traffic pressure level; Visualize and display according to the corresponding pressure display method based on the target flow pressure level.
6. The micro-server control method according to any one of claims 1 to 3, characterized in that after receiving the verification result of successful verification and sending the user access data to the corresponding target micro-server, the method further includes: obtaining server interaction data between the target micro-servers, and obtaining client interaction data between the client and the target micro-servers; obtaining corresponding service interface information and service interaction permission information according to the server interaction data and the client interaction data; obtaining service interface status information in the service interface information, and generating a global network topology relationship according to the service interface status information; obtaining a dynamic control permission instruction, and adjusting the service interaction permission information according to the dynamic control permission instruction.
7. A micro-server control device, characterized in that the micro-server control device includes: a memory, a processor, and a micro-server control program stored on the memory and executable on the processor, and the micro-server control program is configured to implement the steps of the micro-server control method according to any one of claims 1 to 6.
8. A storage medium, characterized in that a micro-server control program is stored on the storage medium, and when the micro-server control program is executed by a processor, the steps of the micro-server control method according to any one of claims 1 to 6 are implemented.
9. A micro-server control device, characterized in that the micro-server control device includes: an acquisition module, configured to obtain corresponding configuration file information according to the service request when receiving a service request of a micro-server; an adjustment module, configured to adjust the configuration information of each current micro-server according to the configuration file information to obtain target configuration information; the acquisition module is further configured to obtain user access data, classify the user access data to obtain corresponding data types; obtain service information according to the data types; search for corresponding micro-server number information in a preset number relationship mapping table according to the service information; determine a corresponding target micro-server according to the micro-server number information; a verification module, configured to perform dynamic verification on the user access data according to the target configuration information; a sending module, configured to send the user access data to the corresponding target micro-server when receiving a verification result of successful verification.
Citation Information
Patent Citations
System micro-servitization method and terminal equipment
CN108427581A
Distributed micro-service governance system and construction method thereof
CN110602208A
Flow control method and device, computer equipment and storage medium
CN111130939A