Intelligent industrial production data configuration processing method and device
By configuring the management platform to manage microservices, setting permissions and user operation permissions, the problems of resource waste and information leakage of traditional platforms are solved, and efficient unified management and secure configuration of intelligent industrial production data are realized.
Patent Information
- Application Number
- CN202510891073.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-30
AI Technical Summary
In the intelligent industrial production scenario, traditional process platforms are difficult to adapt to the diversified data interaction needs in the industrial field, resulting in waste of resources, lengthy configuration processes and error-prone, and the risk of information leakage between microservices is high, so unified management cannot be achieved.
Deploy the configuration management platform, manage microservice access through permission identification, set user operation permissions, use redis for data storage, realize permission control and audit of configuration items, support multilingual frameworks, and provide multiple interfaces to obtain configuration data.
It realizes unified management of various microservices, reduces configuration workload, prevents information leakage, and improves configuration security and efficiency.
Smart Images

Figure CN120378235A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent industrial production data configuration, and in particular, to an intelligent industrial production data configuration processing method and device. Background Art
[0002] In the current intelligent industrial production scenario, there are significant efficiency bottlenecks in the data configuration process. Traditional process platforms rely on built-in form engines to create business forms, whose styles and functions are highly standardized and difficult to adapt to the diverse data interaction requirements in the industrial field. Industrial production systems usually have deployed professional data collection and business management modules, but the prior art cannot directly reuse the native data interfaces of these systems. Users are forced to repeatedly develop forms with similar functions in the process platform, which not only causes waste of resources, but also leads to a long and error-prone configuration process due to the separation of the platform form and the industrial system data model.
[0003] Especially in the flexible manufacturing scenario, the production line is adjusted frequently, and the business process needs to quickly respond to changes in production strategies. The traditional mode requires IT personnel to be deeply involved in form development and process integration, which is time-consuming and lacks flexibility. Moreover, industrial data often involves real-time requirements and security sensitivities, and the architecture of the existing form and business system being split is difficult to ensure data synchronization efficiency and operation security.
[0004] A microservice, or microservice architecture, is a cloud-native architecture approach that includes many loosely coupled and independently deployable small components or services in a single application. A configuration management platform, also known as a configuration center or configuration management system, can quickly help managers achieve dynamic service discovery and service configuration. With services as the main core, it allows managers to manage all application configurations in a more dynamic way and makes configuration more efficient. Among them, the services configured by the configuration management platform can be microservices, and each microservice can be connected to the configuration management platform, and the configuration management platform can configure each microservice.
[0005] However, in a common configuration management platform, the microservices connected to it can view each other, which poses a risk of information leakage; moreover, each microservice cannot be uniformly managed, increasing the configuration workload and restricting the configuration function of the configuration management platform. Summary of the Invention
[0006] In an exemplary embodiment of this application, an intelligent industrial production data configuration processing method and device are provided, which achieve unified management of each microservice, reduce the configuration workload, and reduce the risk of information leakage.
[0007] According to a first aspect of an exemplary embodiment, there is provided a method for processing intelligent industrial production data configuration, which is applied to an intelligent industrial production data configuration processing device. The intelligent industrial production data configuration processing device may be a terminal device or a server. A configuration management platform may be deployed in the intelligent industrial production data configuration processing device, and the configuration management platform executes the method for processing intelligent industrial production data configuration, including: Respond to access requests sent by at least one microservice, and determine the at least one microservice that has accessed; For each of the at least one microservices that has accessed, assign a permission identifier to the microservice according to the type of the microservice; wherein, the permission identifier is used to indicate the permissions when the microservice is accessed; Obtain a query request from a user, and determine the operation permissions of the user according to the pre-configured user permissions; wherein, the operation permissions include permissions for accessible microservices, and processing permissions for multiple configuration items corresponding to the accessible microservices; Determine the target microservice indicated by the query request; wherein, the target microservice is any one of the at least one microservices within the operation permissions of the user; Apply an access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration item corresponding to the query request in the target microservice; Send the obtained configuration data of the configuration item to the microservice corresponding to the user.
[0008] According to a second aspect of an exemplary embodiment, there is provided an intelligent industrial production data configuration processing device, including a display screen and a processor: The processor is configured to execute; Respond to access requests sent by at least one microservice, and determine the at least one microservice that has accessed; For each of the at least one microservices that has accessed, assign a permission identifier to the microservice according to the type of the microservice; wherein, the permission identifier is used to indicate the permissions when the microservice is accessed; Obtain a query request of the user on the user operation page, and determine the operation permissions of the user according to the pre-configured user permissions; wherein, the operation permissions include permissions for accessible microservices, and processing permissions for multiple configuration items corresponding to the accessible microservices; Determine the target microservice indicated by the query request; wherein, the target microservice is any one of the at least one microservices within the operation permissions of the user; Apply an access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration item corresponding to the query request in the target microservice; Send the obtained configuration data of the configuration item to the microservice corresponding to the user; A display screen, configured to perform: Display relevant information of at least one accessed microservice and request information of a query request.
[0009] In an embodiment of the present application, an intelligent industrial production data configuration processing device deployed with a configuration management platform responds to an access request sent by at least one microservice to determine at least one accessed microservice; for each microservice among the at least one accessed microservices, a permission identifier is assigned to the microservice according to the type of the microservice, and the permission identifier is used to indicate the permission when the microservice is accessed, overcoming the problem of data leakage caused by random access to each microservice. When a user of a microservice needs to obtain configuration data of other microservices, a query request of the user is obtained, and according to pre-configured user permissions, the operation permissions of the user are determined. Here, the operation permissions include permissions for accessible microservices and processing permissions for multiple configuration items corresponding to the accessible microservices. Such a setting can clarify the permissions of different users, and each user can only operate on microservices and configuration items within their permissions, realizing data isolation and ensuring the security of configuration items. In addition, a target microservice indicated by the query request is determined according to the query request of the user. Here, the target microservice is any one of at least one microservice within the operation permissions of the user. Since different pre-configured interfaces have different access characteristics, an access interface corresponding to the query request is applied, and based on the permission identifier of the target microservice, configuration data of a configuration item corresponding to the query request is obtained in the target microservice, and the obtained configuration data of the configuration item is sent to the microservice corresponding to the user. In this way, through the setting of user permissions and the permission identifier of microservice access permissions, information leakage is effectively prevented; through different interfaces, the acquisition of configuration data of different microservices is realized, the unified management of each microservice is achieved, and the configuration workload is reduced. Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0011] Figure 1 Exemplarily shows a schematic structural diagram of a configuration system provided by an embodiment of the present application; Figure 2 Exemplarily shows a system architecture diagram of a configuration management platform provided by an embodiment of the present application; Figure 3 Exemplarily shows a schematic diagram of a visual operation interface of a configuration management module provided by an embodiment of the present application; Figure 4 Exemplarily shown is a flowchart of an intelligent industrial production data configuration processing method provided by an embodiment of the present application; Figure 5 Exemplarily shown is a schematic diagram of a redis configuration item structure provided by an embodiment of the present application; Figure 6 Exemplarily shown is a schematic diagram of query characteristics of different interfaces provided by an embodiment of the present application; Figure 7 Exemplarily shown is a schematic diagram of a query process of a fourth interface provided by an embodiment of the present application; Figure 8 Exemplarily shown is a schematic diagram of an access method for configuration data of different types of target microservices provided by an embodiment of the present application; Figure 9 Exemplarily shown is a schematic diagram of an intelligent industrial production data configuration processing device provided by an embodiment of the present application. Detailed implementation manners
[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0013] For ease of understanding, the terms involved in the embodiments of the present application are explained below: (1) Microservices, or microservice architecture, is a cloud-native architecture approach that includes numerous loosely coupled and independently deployable small components or services in a single application. These services typically have their own technology stacks, including databases and data management models; communicate with each other through a combination of a representational state transfer (REST) application programming interface (API), event streams, and message brokers; and are organized according to business capabilities, with service separation lines commonly referred to as bounded contexts. The characteristics of microservices are that the code is easier to update, new features or functions can be directly added without having to update the entire application, different technology stacks and programming languages can be used for different components. The components can be scaled independently of each other, thus reducing waste and costs associated with having to scale the entire application.
[0014] (2) Configuration management platform, which can be deployed on an intelligent industrial production data configuration processing device with data processing capabilities. This intelligent industrial production data configuration processing device can be a terminal device or a server. The configuration management platform can quickly help managers achieve dynamic service discovery and service configuration. Taking services as the main core, it allows managers to manage all application configurations in a more dynamic way, making the configuration more efficient. Common configuration management platforms include nacos, zk, sping-cloud, etc. Here, the service can refer to a microservice, and each microservice can be connected to the configuration management platform to achieve its own configuration through the configuration management platform, and then the configured microservice can execute corresponding functions.
[0015] The configuration management platform occupies a very important position in the microservice framework. It separates the configuration from each application and uniformly manages the configuration. The application itself does not need to manage the configuration by itself, reducing the workload of configuration management in the development and deployment process.
[0016] However, in traditional configuration management platforms, there is no permission control for configuration items. The configurations of different microservice architectures can be viewed mutually, posing a risk of information leakage; the configuration takes effect directly after modification without an audit function, resulting in a relatively high risk of misoperation; there is no record of the modifying operator, and there is no supervision function for malicious and misoperations; there is no configuration modification history record function, and only operations and maintenance or development personnel can manually record the modifications, making it impossible to quickly roll back and restore the configuration; it only supports the Java development language in the same direction, and the development framework is mostly limited to the springboot framework and is not compatible with services in other languages or frameworks.
[0017] For this reason, the embodiments of this application provide an intelligent industrial production data configuration processing method. In this method, data is stored based on redis, and configuration acquisition is performed through the hypertext transfer protocol (http) protocol. Specifically, permission control is set for configuration items. When different microservice architectures view each other, it is necessary to determine the access permission of the microservice architecture; the configuration item needs to be audited after modification to reduce the possibility of misoperation; the information of the modifying operator is recorded to trace the root cause of malicious and misoperations and achieve supervision; the configuration historical modification record is provided to achieve quick rollback and restoration of the configuration; it supports services in other languages or frameworks.
[0018] After introducing the design concept of the embodiments of this application, the following briefly introduces the application scenarios applicable to the technical solutions of the embodiments of this application. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of this application rather than to limit them. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0019] ReferenceFigure 1 , which shows a schematic structural diagram of a configuration system. Among them, it includes a configuration management platform, Microservice 1, Microservice 2, and Microservice 3. Only three microservices are taken as examples for illustration.
[0020] To further illustrate the technical solutions provided by the embodiments of the present application, the following will be described in detail with reference to the accompanying drawings and specific implementation manners. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application.
[0021] The following combines Figure 1 the application scenario shown, Figure 2 which shows a system architecture diagram of a configuration management platform. The configuration management platform includes a management module and a service module.
[0022] Among them, the management module includes a configuration management unit, an access management unit, a permission management unit, and an operation log management unit. Exemplarily, the configuration management unit can provide a visual operation interface for adding, deleting, modifying, querying, auditing, and publishing configuration items. Figure 3 This is a schematic diagram of the visual operation interface of a configuration management module provided by the embodiments of the present application. The access management unit provides functions such as registration, deactivation, activation, and deletion of microservices accessing the configuration management platform. The permission management unit provides functions for account, organization, role, menu, and permission management of microservices; the operation log management unit provides a function for querying operation records of configuration items, and at the same time provides a quick rollback function for the record information in the log.
[0023] The service module can provide management services and API services. Among them, the management service provides background service functions for the management module; the API service provides an API service for obtaining configuration items externally coordinated by http.
[0024] In addition, the configuration management platform includes a mysql database and a redis database. The redis database is a redis cluster. The mysql database is used to store the business data of microservices and the relevant information of configuration items, and the redis cluster is used to store information such as configuration item information, system keys, and callback lists.
[0025] The following combines Figure 2 the system structure diagram of the configuration management platform shown, with reference to Figure 4The flowchart of an intelligent industrial production data configuration processing method is shown. This method is applied to an intelligent industrial production data configuration processing device, and a configuration management platform can be deployed in the intelligent industrial production data configuration processing device. The configuration management platform executes the intelligent industrial production data configuration processing method.
[0026] Describe the technical solution provided in the embodiments of the present application.
[0027] S401: Respond to the access requests sent by at least one microservice, and determine the at least one accessed microservice.
[0028] S402: For each of the at least one accessed microservices, assign a permission identifier to the microservice according to the type of the microservice.
[0029] Among them, the permission identifier is used to indicate the permissions when the microservice is accessed.
[0030] S403: Obtain the user's query request, and determine the user's operation permissions according to the pre-configured user permissions.
[0031] Among them, the operation permissions include the permissions for the accessible microservices and the processing permissions for the multiple configuration items corresponding to the accessible microservices.
[0032] S404: Determine the target microservice indicated by the query request.
[0033] Among them, the target microservice is any one of the at least one microservices within the user's operation permissions.
[0034] S405: Apply the access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration item corresponding to the query request in the target microservice.
[0035] S406: Send the obtained configuration data of the configuration item to the microservice corresponding to the user.
[0036] In an embodiment of the present application, an intelligent industrial production data configuration processing device deployed with a configuration management platform responds to access requests sent by at least one microservice to determine at least one accessed microservice; for each of the at least one accessed microservices, a permission identifier is assigned to the microservice according to the type of the microservice, and the permission identifier is used to indicate the permission when the microservice is accessed, which overcomes the problem of data leakage caused by random access to each microservice. When a user of a microservice needs to obtain configuration data of other microservices, the query request of the user is obtained, and according to the pre-configured user permissions, the operation permissions of the user are determined. Here, the operation permissions include the permissions for the accessible microservices and the processing permissions for multiple configuration items corresponding to the accessible microservices. Such a setting can clarify the permissions of different users, and each user can only operate on the microservices and configuration items within their permissions, realizing data isolation and ensuring the security of the configuration items. In addition, the target microservice indicated by the query request is determined according to the query request of the user. Here, the target microservice is any one of at least one microservice within the operation permissions of the user. Since different pre-configured interfaces have different access characteristics, the access interface corresponding to the query request is applied, and based on the permission identifier of the target microservice, the configuration data of the configuration item corresponding to the query request is obtained in the target microservice, and the obtained configuration data of the configuration item is sent to the microservice corresponding to the user. In this way, through the setting of user permissions and the permission identifier of microservice access permissions, information leakage is effectively prevented; through different interfaces, the acquisition of configuration data of different microservices is realized, the unified management of each microservice is achieved, and the configuration workload is reduced.
[0037] Regarding S401, each microservice can be connected to the configuration management platform so that the configuration management platform can uniformly manage each microservice. For example, Microservice 1 can obtain the configuration data of Microservice 2 through the configuration management platform.
[0038] Among them, each microservice sends an access request to the configuration management platform, and the configuration management platform responds after receiving each access request. Therefore, the configuration management platform can determine at least one accessed microservice.
[0039] Regarding S402, for each microservice, when the microservice accesses the configuration management platform, it first registers, and the configuration management platform assigns a permission identifier to it according to the type of the microservice. The permission identifier is used to indicate the permission when the microservice is accessed and is used for configuration item isolation to prevent information leakage. In addition, the microservice needs to carry this permission identifier when using the configuration management platform to obtain configuration data subsequently.
[0040] Optionally, the type of microservice can be a public service, an open service, or a private service. For a public service, the permission identifier includes an exclusive permission identifier; for an open service, the permission identifier includes an exclusive permission identifier; for a private service, the permission identifier includes an exclusive permission identifier and exclusive key information.
[0041] Regarding S403, for example, a developer or an operator (hereinafter referred to as a user) of microservice 1 wants to obtain configuration data of other microservices from the configuration management platform. The configuration management platform receives the user's query request, and since the user permissions of different users are pre-configured in the configuration management platform, the configuration management platform can determine the user's operation permissions. Here, the operation permissions include the permissions for the accessible microservices (which microservices can be accessed), and the processing permissions for multiple configuration items corresponding to the accessible microservices (among the accessible microservices, which configuration items can be accessed).
[0042] Among them, users can be divided into two categories. If the user is a user of the first type (such as an ordinary user with configuration permissions), the processing permission for multiple configuration items is the operation permission for multiple configuration items; if the user is a user of the second type (an auditing user with auditing and publishing permissions), the processing permission for multiple configuration items is the auditing permission and publishing permission for the operation permission of the user of the first type.
[0043] In addition, a first database and a second database can be pre-constructed in the configuration management platform; the first database is used to store the operation results of multiple configuration items corresponding to the accessible microservices; the second database is used to store the auditing results, publishing results, and the current and historical values of each configuration item of the operation results. The first database is a mysql database, and the second database is a redis database.
[0044] That is to say, ordinary personnel only have the operation permission for configuration items, and the operation results are only recorded in the mysql database and audited and published by the auditing personnel. The auditing personnel have the permission to audit and publish the operation of the configuration items of ordinary users, and the configuration items will only be written into the redis after being audited and published for other microservices to obtain.
[0045] Specifically, ordinary personnel can perform relevant create, delete, update, and query operations on the configurations under the accessible microservices with operation permissions. If the operation requires auditing, a message reminder for pending audit will be sent to the auditing personnel under the accessible microservices. All the operation data of ordinary personnel is obtained from the mysql database.
[0046] Reviewers can review the review configurations under their own names. If there are no problems with the review, they can directly publish. When publishing, the configuration data in Redis is updated, and the configuration takes effect immediately after publishing. At the same time, the current value and historical value of the configuration will be recorded for subsequent modification history viewing and quick rollback. If there are problems with the review, they can be rejected, and the rejected configuration data will not be included in the modification history.
[0047] Therefore, the review function is added after the configuration item is modified, which can effectively reduce system failures caused by configuration item operation errors.
[0048] In addition, the data storage format in the second database is as follows: the hash structure of Redis is used to store the configuration data. For example, the identifier of each connected microservice is used as the key value of the hash value, and each piece of configuration data is used as a record in the hash structure.
[0049] Figure 5 It is a schematic diagram of a Redis configuration item structure provided by an embodiment of the present application. Among them, key value 1 can be hiedu-pulic, key value 2 can be hiedu-portal, and key values 1 and 2 correspond to the permission identifiers of the connected microservices. Configuration item 1 is spring.datasource.url, and configuration data 1 is idbc:mysql:xxxxxxxxxx; configuration item 2 is spring.datasource.username, and configuration data 2 is hiedu; configuration item 3 is spring.datasource.password, and configuration data 3 is hiedu; configuration item 4 is oss.enable, and configuration data 4 is true; configuration item 5 is logging.level, and configuration data 5 is info; configuration item 6 is doc.rol.key, and configuration data 6 is test1.
[0050] Therefore, the user permissions include the operation permissions for the configuration items of the connected microservices. Data isolation can be achieved by controlling that each user only has the permissions to add, delete, modify, and query the configuration items in the specified connected microservices, ensuring the security of the configuration items accessing the configuration management platform and effectively preventing information leakage.
[0051] Regarding S404, determine the target microservice indicated by the query request, where the target microservice is any one of at least one microservice within the user's operation permissions. That is to say, the target microservice is one of the microservices that the user wants to access and obtain configuration data.
[0052] Regarding S405, the configuration management platform pre-configures multiple query interfaces, including a first interface for querying specified configuration items of a specified microservice, a second interface for querying specified configuration items of a common microservice, a third interface for querying all configuration items of a specified microservice, and a fourth interface for querying changed configuration items in a specified microservice. Here, the interfaces all refer to API interfaces, and the configuration management platform provides the function of obtaining configuration data in the form of applying API interfaces, solving the problem that traditional configuration management platforms under different languages or different frameworks cannot support.
[0053] Figure 6 This is a schematic diagram of the query characteristics of different interfaces provided by the embodiments of this application.
[0054] The first interface: used to query specified configuration items of a specified microservice.
[0055] Path: / getItem(String sysCode, String item, String secret, Boolean usePublicSys) Input parameters: sysCode: Permission identifier for accessing the configuration management platform item: Configuration item secret: Secret value of the configuration of the microservice corresponding to the permission identifier sysCode in the configuration management platform. If the microservice is an open service, this value is passed as empty.
[0056] usePublicSys: Whether to query the configuration of the public service. By default, it does not query. If it is passed as true Query the configuration items in the public service at the same time. If the public service and the specified sysCode The microservice both have item, the specified result shall prevail.
[0057] The second interface: used to query specified configuration items of a common microservice.
[0058] Path: / getPublicItem(String item) Input parameters: item: Configuration item The third interface: used to query all configuration items of a specified microservice.
[0059] Optionally, the third interface queries all configuration items of the specified microservice in the following way: load all configuration items of the specified microservice into the environment variables of the microservice to obtain all configuration items from the environment variables.
[0060] That is to say, each microservice can use this interface to obtain all configuration items at one time during startup and load them into its own environment variables. All subsequent parameters can be directly obtained from the environment variables. When they do not exist in the environment variables, the configuration item query interface is used to obtain configuration data from the configuration management platform.
[0061] Path: / getAllItem(String sysCode, String secret, Boolean usePublicSys) Input parameters: For the meaning of each parameter, please refer to the first interface and the second interface.
[0062] The fourth interface: used to query the changed configuration items in the specified microservice.
[0063] Optionally, refer to Figure 7 , the fourth interface queries the changed configuration items in the specified microservice in the following way: S701: Return all configuration items of the specified microservice to the microservice.
[0064] S702: Add the specified callback address to the callback list.
[0065] S703: Listen for data changes through the key value of redis corresponding to the permission identifier passed in by the obtained fourth interface.
[0066] S704: Automatically call the specified callback address according to the key value whose change is monitored, and obtain the changed configuration items.
[0067] That is to say, after the microservice calls this interface, the configuration management platform will return all the queried configuration items in full quantity at one time, and add the callback address to the redis callback list at the same time. The microservice will listen for data changes through the key of redis corresponding to the sysCode permission identifier passed in the interface, and add the refresAddr callback address to the redis callback list at the same time. After the redis listening mechanism monitors that the corresponding key configuration has changed, it will automatically call the specified rereshAddr. Fault tolerance is supported during the callback. If the callback fails, it will be retried three times within 6 seconds. If all three attempts fail, it is assumed that the microservice at this address has gone offline, and the callback address will be deleted from the callback list.
[0068] Such a design can ensure that when the configuration parameters of the configuration items of the accessed microservice change, the microservice that obtains the configuration data can obtain the configuration data of the changed configuration items in the first time, without having to obtain, review, and publish again.
[0069] Path: / getAllItemByrefresh(String sysCode, String secret, Boolean usePublicSys, String rereshAddr, Map<String, Object> params) Input parameters: rereshAddr: Refresh callback address (automatically implemented by each microservice and written according to the framework of each microservice) params: Refresh callback address (automatically implemented by each microservice and written according to the framework of each microservice) Among them, the dynamic refresh after the configuration item is modified is implemented by means of the key-value change listener of redis. Compared with the file change monitoring in related technologies, it has higher availability and efficiency.
[0070] Four types of API interfaces are set as above, configured and used based on the http protocol, without platform language restrictions, and specific usage scenarios are given. It is completely isolated from the configuration management platform, and data interaction is carried out through the http protocol, and application deployment is not restricted. It reduces the risk of information leakage, solves the problem that the configuration management platform under different languages or frameworks cannot be supported, and realizes unified management.
[0071] Therefore, the access interface corresponding to the query request can be applied, and based on the permission identifier of the target microservice, the configuration data of the configuration item corresponding to the query request can be obtained in the target microservice. Figure 8 The figure is a schematic diagram of an access method for configuration data of different types of target microservices provided by an embodiment of the present application, specifically including the following methods: Method 1: If the target microservice is a public service, directly obtain the configuration data of the configuration item corresponding to the query request in the target microservice.
[0072] For such target microservices, a dedicated permission identifier will be assigned when registering in the configuration management platform. Therefore, when other microservices obtain data, they can directly obtain it without passing in any permission identifier. For the configuration data common to multiple services, generally only one public service needs to be configured in one configuration management platform.
[0073] Method 2: If the target microservice is an open service, obtain the configuration data of the configuration item corresponding to the query request in the target microservice through the permission identifier of the target microservice.
[0074] For such target microservices, a dedicated permission identifier is assigned when registering in the configuration management platform. Therefore, when other microservices obtain data, the permission identifier needs to be passed in, which can be used for microservices with low security requirements and that allow other microservices to directly obtain configuration data.
[0075] Method 3: If the target microservice is a private service, the configuration data of the configuration item corresponding to the query request is obtained in the target microservice through the permission identifier and key of the target microservice.
[0076] For such target microservices, a dedicated permission identifier and dedicated key information are assigned when registering in the configuration management platform. When other microservices obtain data, both the permission identifier and the key must be passed in simultaneously. If the configuration is only allowed to be used by this microservice alone, this type can be used.
[0077] The configuration management platform for data storage based on Redis in the embodiments of the present application expands the usage limitations of the configuration management platform and supports functions such as permission-based viewing of configuration items, configuration modification review, modification history tracking, and cross-platform use. Specifically, permission control is added to the viewing of configuration items, improving information security; an audit function is added during configuration release, reducing the risk of engine failure that may be caused by the lack of an audit environment for configuration modification; configuration acquisition is performed through the HTTP protocol, solving the problem that traditional configuration management platforms cannot be used across platforms. Through the configuration management platform, the configurations of different microservices are uniformly and securely managed, reducing the configuration workload and the security risk of configuration information leakage.
[0078] As Figure 9 shown, based on the same inventive concept, the embodiments of the present application provide an intelligent industrial production data configuration processing device, including a processor 101 and a display screen 102, and a configuration management platform is deployed on the intelligent industrial production data configuration processing device.
[0079] The processor 101 is configured to execute; Respond to access requests sent by at least one microservice to determine the at least one microservice that accesses; For each of the at least one microservice that accesses, assign a permission identifier to the microservice according to the type of the microservice; wherein, the permission identifier is used to indicate the permissions when the microservice is accessed; Obtain a query request of the user on the user operation page, and determine the operation permissions of the user according to the pre-configured user permissions; wherein, the operation permissions include the permissions for the accessible microservices, and the processing permissions for the multiple configuration items corresponding to the accessible microservices; Determine the target microservice indicated by the query request; wherein, the target microservice is any one of the at least one microservice within the operation permissions of the user; Apply the access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration item corresponding to the query request in the target microservice; Send the obtained configuration data of the configuration item to the microservice corresponding to the user; The display screen is configured to execute: Display the relevant information of at least one accessed microservice and the request information of the query request.
[0080] In an optional implementation manner, if the user is a user of the first type, the processing permission for multiple configuration items is the operation permission for multiple configuration items; wherein, the user of the first type is a user with configuration permission; If the user is a user of the second type, the processing permission for multiple configuration items is the audit permission and the release permission for the operation permission of the user of the first type; the user of the second type is a user with audit permission and release permission.
[0081] In an optional implementation manner, the processor 101 is further configured to: pre-build a first database and a second database; The first database is used to store the operation results of multiple configuration items corresponding to the accessible microservices; The second database is used to store the audit results, release results of the operation results, as well as the current values and historical values of each configuration item; The first database is a mysql database, and the second database is a redis database.
[0082] In an optional implementation manner, the data storage format in the second database is: Use the hash structure of redis to store the configuration data; wherein, the identifier of each accessed microservice is used as the key value of the hash value, and each piece of configuration data is used as a record in the hash structure.
[0083] In an optional implementation manner, the processor 101 is specifically configured to execute: If the target microservice is a public service, directly obtain the configuration data of the configuration item corresponding to the query request in the target microservice; If the target microservice is an open service, obtain the configuration data of the configuration item corresponding to the query request in the target microservice through the permission identifier of the target microservice; If the target microservice is a private service, obtain the configuration data of the configuration item corresponding to the query request in the target microservice through the permission identifier and the secret key of the target microservice.
[0084] In an optional implementation manner, the processor 101 is further configured to execute: Identify the service information in the query request, and determine the access interface corresponding to the query request according to the relationship between the pre-configured service information and the query interface.
[0085] In an alternative embodiment, among the multiple pre-configured query interfaces, there are included: A first interface for querying specified configuration items of a specified microservice; A second interface for querying specified configuration items of a common microservice; A third interface for querying all configuration items of a specified microservice; A fourth interface for querying changed configuration items in a specified microservice.
[0086] In an alternative embodiment, the processor 101 is further configured to execute instructions to instruct the third interface to query all configuration items of a specified microservice in the following manner: Load all configuration items of the specified microservice into the environment variables of the microservice to obtain all configuration items from the environment variables.
[0087] In an alternative embodiment, the processor 101 is further configured to execute instructions to instruct the fourth interface to query the changed configuration items in a specified microservice in the following manner: Return all configuration items of the specified microservice to the microservice; Add the specified callback address to the callback list; Perform data change monitoring through the key value of redis corresponding to the permission identifier passed in by the obtained fourth interface; Automatically callback the specified callback address according to the monitored changed key value to obtain the changed configuration items.
[0088] The application embodiment also provides a computer storage medium, in which computer program instructions are stored. When the instructions run on a computer, the computer is made to execute the steps of the above-mentioned intelligent industrial production data configuration processing method.
[0089] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0090] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0091] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0093] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.
Claims
1. An intelligent industrial production data configuration processing method, characterized in that Including: Determine at least one accessed microservice in response to an access request sent by at least one microservice; For each of the at least one accessed microservices, assign a permission identifier to the microservice according to the type of the microservice; wherein, the permission identifier is used to indicate the permission when the microservice is accessed; Obtain a query request of a user, and determine the operation permission of the user according to the pre-configured user permission; wherein, the operation permission includes the permission for the accessible microservices and the processing permission for multiple configuration items corresponding to the accessible microservices; Determine the target microservice indicated by the query request; wherein, the target microservice is any one of at least one microservice within the operation permission of the user; Apply an access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration item corresponding to the query request in the target microservice; Send the obtained configuration data of the configuration item to the microservice corresponding to the user.
2. The method according to claim 1, wherein If the user is a user of the first type, the processing permission for the multiple configuration items is the operation permission for the multiple configuration items; wherein, the user of the first type is a user with configuration permission; If the user is a user of the second type, the processing permission for the multiple configuration items is the audit permission and the release permission for the operation permission of the user of the first type; the user of the second type is a user with audit permission and release permission.
3. The method according to claim 2, wherein The method further includes: pre-constructing a first database and a second database; The first database is used to store the operation results of multiple configuration items corresponding to the accessible microservices; The second database is used to store the audit results, release results of the operation results, and the current values and historical values of each configuration item; The first database is a mysql database, and the second database is a redis database.
4. The method according to claim 3, characterized in that, The data storage format in the second database is: Use the hash structure of redis to store the configuration data; wherein, the identifier of each accessed microservice is used as the key value of the hash value, and each piece of configuration data is used as a record in the hash structure.
5. The method according to claim 1, wherein The obtaining the configuration data of the configuration item corresponding to the query request in the target microservice based on the permission identifier of the target microservice includes: If the target microservice is a public service, directly obtain the configuration data of the configuration item corresponding to the query request in the target microservice; If the target microservice is an open service, obtain the configuration data of the configuration item corresponding to the query request in the target microservice through the permission identifier of the target microservice; If the target microservice is a private service, obtain the configuration data of the configuration item corresponding to the query request in the target microservice through the permission identifier and the secret key of the target microservice.
6. The method according to claim 1, characterized in that, The method further includes: Identify the service information in the query request, and determine the access interface corresponding to the query request according to the pre-configured relationship between the service information and the query interface.
7. The method according to claim 6, wherein Among the pre-configured multiple query interfaces, include: The first interface for querying specified configuration items of a specified microservice; The second interface for querying specified configuration items of a common microservice; The third interface for querying all configuration items of a specified microservice; The fourth interface for querying changed configuration items in a specified microservice.
8. The method according to claim 7, wherein The third interface queries all configuration items of the specified microservice in the following way: Load all configuration items of the specified microservice into the environment variables of the microservice to obtain all configuration items from the environment variables.
9. The method according to claim 7, characterized in that The fourth interface queries the changed configuration items in the specified microservice in the following way: Return all configuration items of the specified microservice to the microservice; Add the specified callback address to the callback list; Perform data change monitoring through the key value of redis corresponding to the permission identifier passed in by the obtained fourth interface; Automatically callback the specified callback address according to the monitored changed key value to obtain the changed configuration items.
10. An intelligent industrial production data configuration processing device, characterized in that, It includes a display screen and a processor; The processor is configured to execute; Respond to access requests sent by at least one microservice to determine the at least one accessed microservice; For each of the at least one accessed microservices, assign a permission identifier according to the type of the microservice; wherein, the permission identifier is used to indicate the permissions when the microservice is accessed; Obtain the query request of the user on the user operation page, and determine the operation permissions of the user according to the pre-configured user permissions; wherein, the operation permissions include the permissions for the accessible microservices and the processing permissions for the multiple configuration items corresponding to the accessible microservices; Determine the target microservice indicated by the query request; wherein, the target microservice is any one of at least one microservices within the operation permissions of the user; Apply the access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtain the configuration data of the configuration items corresponding to the query request in the target microservice; Send the obtained configuration data of the configuration items to the microservice corresponding to the user; The display screen is configured to execute: Display the relevant information of the at least one accessed microservice and the request information of the query request.
Citation Information
Patent Citations
Micro-service data exchange method and device
CN111327619A
Authority management method and device based on micro-service calling and storage medium
CN111786998A
Method and system for managing rpc service authority
CN114785578A
Interface calling method and device, electronic equipment and storage medium
CN115712513A
Micro-service calling method and device, equipment and storage medium
CN116723247A