A method and device for intelligent industrial production data configuration processing
Through the permission management and data isolation mechanism of the configuration management platform, the unified management and information leakage of microservices in intelligent industrial production is solved, and an efficient and secure data configuration process is achieved, and multilingual and framework compatibility is supported.
Patent Information
- Application Number
- CN202510891073.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-30
AI Technical Summary
In the intelligent industrial production scenario, there are efficiency bottlenecks in the traditional data configuration process, especially in the flexible manufacturing scenario, it is difficult to quickly respond to changes in production strategies, and the existing configuration management platform cannot achieve unified management of various microservices, which poses the risk of information leakage and the large configuration workload.
By deploying the configuration management platform, responding to the access request of microservices, assigning permissions, determining operation permissions based on user permissions, obtaining and issuing configuration data, realizing unified management and secure isolation of each microservice, using redis for data storage, supporting different languages and frameworks, and adding permission control and auditing functions of configuration items.
It realizes unified management of various microservices, reduces configuration workload and information leakage risks, improves the security and efficiency of data configuration, and supports multilingual and framework compatibility.
Smart Images

Figure CN120378235B_ABST
Abstract
Description
Technical Field
[0001] The present 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 current smart industrial production scenarios, the data configuration process faces significant efficiency bottlenecks. Traditional process platforms rely on built-in form engines to create business forms. Their styles and functions are highly standardized, making them difficult to adapt to the diverse data interaction needs of the industrial sector. Industrial production systems typically have deployed specialized data collection and business management modules, but existing technologies cannot directly reuse the native data interfaces of these systems. Users are forced to repeatedly develop forms with similar functions within the process platform, which not only wastes resources but also leads to lengthy and error-prone configuration processes due to the separation of platform forms from industrial system data models.
[0003] Especially in flexible manufacturing scenarios, where production lines frequently adjust, business processes must quickly respond to changes in production strategies. Traditional models require IT personnel to deeply engage in form development and process integration, which is time-consuming and inflexible. Industrial data often involves real-time requirements and security-sensitive requirements. The existing architecture, which separates forms from business systems, makes it difficult to ensure efficient data synchronization and operational security.
[0004] Microservices, or microservices architecture, is a cloud-native architectural approach that encompasses numerous loosely coupled, independently deployable small components or services within a single application. A configuration management platform, also known as a configuration center or configuration management system, can quickly help administrators implement dynamic service discovery and configuration. With services at the core, administrators can manage all application configurations in a more dynamic manner, making configuration more efficient. The services configured by the configuration management platform can be microservices, and each microservice can be connected to the configuration management platform, which can then configure each microservice.
[0005] However, common configuration management platforms allow microservices connected to each other to view each other, which poses a risk of information leakage. In addition, the microservices cannot be managed in a unified manner, which increases the configuration workload and limits the configuration function of the configuration management platform. Summary of the Invention
[0006] The exemplary embodiments of the present application provide a method and device for intelligent industrial production data configuration processing, which realizes the unified management of various microservices, reduces the configuration workload, and reduces the risk of information leakage.
[0007] According to a first aspect of an exemplary embodiment, a method for configuring and processing intelligent industrial production data is provided. The method is applied to an intelligent industrial production data configuration and processing device, which may be a terminal device or a server. A configuration management platform may be deployed in the intelligent industrial production data configuration and processing device, and the configuration management platform executes the method, including:
[0008] Responding to an access request sent by at least one microservice, determining at least one microservice to access;
[0009] For each microservice in the at least one accessed microservice, 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;
[0010] Obtain the user's query request and determine the user's operation permissions based on pre-configured user permissions; the operation permissions include permissions for accessible microservices and permissions to process multiple configuration items corresponding to the accessible microservices;
[0011] Determine the target microservice indicated by the query request; wherein the target microservice is any one of at least one microservice within the user's operation authority;
[0012] 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;
[0013] The configuration data of the obtained configuration items is sent to the user's corresponding microservice.
[0014] According to a second aspect of the exemplary embodiment, there is provided an intelligent industrial production data configuration processing device, comprising a display screen and a processor:
[0015] The processor is configured to execute;
[0016] Responding to an access request sent by at least one microservice, determining at least one microservice to access;
[0017] For each microservice in the at least one accessed microservice, 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;
[0018] Obtain the user's query request on the user operation page and determine the user's operation permissions based on 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;
[0019] Determine the target microservice indicated by the query request; wherein the target microservice is any one of at least one microservice within the user's operation authority;
[0020] 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;
[0021] Send the configuration data of the obtained configuration items to the user's corresponding microservice;
[0022] The display is configured to:
[0023] Displays relevant information of at least one connected microservice and request information of the query request.
[0024] In an embodiment of the present application, an intelligent industrial production data configuration processing device is deployed with a configuration management platform, which responds to an access request sent by at least one microservice and determines at least one microservice to be accessed; for each of the at least one microservice to be accessed, 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 of the microservice when it is accessed, thereby overcoming the problem of data leakage caused by arbitrary access to each microservice. When a user of a microservice needs to obtain configuration data of other microservices, the user's query request is obtained, and the user's operation permission is determined based on the pre-configured user permission. Here, the operation permission includes the permission to the accessible microservices and the processing permission to multiple configuration items corresponding to the accessible microservices. Such a setting can clarify the permissions of different users. Each user can only operate on the microservices and configuration items within the permission, thereby achieving data isolation and ensuring the security of the configuration items. Furthermore, the target microservice indicated by the query request is determined based on the user's query request. Here, the target microservice is any one of at least one microservice within the user's operational permissions. Because different pre-configured interfaces have different access characteristics, the access interface corresponding to the query request is applied. Based on the permission identifier of the target microservice, the configuration data for the configuration item corresponding to the query request is retrieved from the target microservice, and the retrieved configuration data for the configuration item is sent to the user's corresponding microservice. This effectively prevents information leakage by setting user permissions and setting permission identifiers for microservice access permissions. Retrieving configuration data for different microservices through different interfaces enables unified management of each microservice and reduces configuration workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 The following is a schematic diagram showing the structure of a configuration system provided by an embodiment of the present application;
[0027] Figure 2 The following is an exemplary diagram of the system architecture of a configuration management platform provided in an embodiment of the present application;
[0028] Figure 3 A schematic diagram exemplarily shows a visual operation interface of a configuration management module provided in an embodiment of the present application;
[0029] Figure 4 The following is a flowchart of a method for configuring and processing intelligent industrial production data provided by an embodiment of the present application;
[0030] Figure 5 A schematic diagram of a redis configuration item structure provided by an embodiment of the present application is exemplarily shown;
[0031] Figure 6 A schematic diagram exemplarily illustrates query characteristics of different interfaces provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram exemplarily illustrates a query process of a fourth interface provided in an embodiment of the present application;
[0033] Figure 8 A schematic diagram exemplarily illustrates a method for accessing configuration data of different types of target microservices provided in an embodiment of the present application;
[0034] Figure 9 A schematic diagram of an intelligent industrial production data configuration processing device provided in an embodiment of the present application is exemplarily shown. DETAILED DESCRIPTION
[0035] In order to make the purpose, 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 drawings in the embodiments of the present application.
[0036] For ease of understanding, the terms involved in the embodiments of this application are explained below:
[0037] (1) Microservices, or microservice architecture, is a cloud-native architectural approach that includes many small, loosely coupled, and independently deployable components or services within a single application. These services typically have their own technology stack, including a database and data management model; 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 demarcation lines typically called bounded contexts. Microservices are characterized by code that is easier to update, allowing new features or functionality to be added directly without having to update the entire application, and using different technology stacks and different programming languages for different components. Components can be scaled independently of each other, reducing the waste and cost associated with having to scale the entire application.
[0038] (2) Configuration management platform, which can be deployed on an intelligent industrial production data configuration processing device with data processing capabilities. The intelligent industrial production data configuration processing device can be a terminal device or a server. The configuration management platform can quickly help managers realize 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, making configuration more efficient. Common configuration management platforms include nacos, zk, sping-cloud, etc. The service here can refer to microservices. Each microservice can be connected to the configuration management platform, realize its own configuration through the configuration management platform, and then apply the configured microservice to perform the corresponding function.
[0039] The configuration management platform occupies a very important position in the microservice framework. It separates the configuration from each application and manages the configuration in a unified manner. The application itself does not need to manage the configuration, which reduces the workload of configuration management during the development and deployment process.
[0040] However, traditional configuration management platforms have no permission control for configuration items, and the configurations of different microservice architectures can be viewed by each other, posing the risk of information leakage. Configuration modifications take effect immediately without an audit function, resulting in a high risk of misoperation. Modification operators are not recorded, and there is no supervision function for malicious or misoperation. There is no configuration modification history function, and modifications can only be recorded manually by operations and maintenance or developers, with no way to quickly roll back and restore the configuration. Tongxiang only supports the Java development language, and the development framework is mostly limited to the Spring Boot framework, making it incompatible with services written in other languages or frameworks.
[0041] To this end, an embodiment of the present application provides a method for intelligent industrial production data configuration processing. This method uses Redis for data storage and Hypertext Transfer Protocol (HTTP) for configuration retrieval. Specifically, permission control is set for configuration items. When different microservice architectures view each other's data, the access permissions of the microservice architectures must be determined. Modified configuration items require auditing to reduce the possibility of misoperation. The information of the operator who modified the configuration is recorded to trace the source of malicious and misoperation operations and implement supervision. A history of configuration changes is recorded to enable rapid rollback and restoration of configurations. Furthermore, services in other languages or frameworks are supported.
[0042] After introducing the design concepts of the embodiments of this application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of this application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of this application and are not limiting. In specific implementations, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0043] refer to Figure 1 , shows a structural diagram of a configuration system, which includes a configuration management platform, microservice 1, microservice 2 and microservice 3. Only three microservices are used as an example for explanation.
[0044] To further illustrate the technical solutions provided by the embodiments of the present application, the following is a detailed description of the technical solutions in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide the 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 no creative work. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application.
[0045] The following combination Figure 1 The application scenario shown, Figure 2 A system architecture diagram of a configuration management platform is shown. The configuration management platform includes a management module and a service module.
[0046] The management module includes a configuration management unit, an access management unit, a permission management unit, and an operation log management unit. For example, the configuration management unit can provide a visual operation interface for adding, deleting, modifying, checking, reviewing, and publishing configuration items. Figure 3This is a schematic diagram of a visual user interface for a configuration management module provided in an embodiment of the present application. The access management unit provides functions for registering, deactivating, enabling, and deleting microservices connected to the configuration management platform. The permissions management unit provides microservice account, organization, role, menu, and permissions management. The operation log management unit provides query functionality for configuration item operation records and a quick rollback function for log entries.
[0047] The service module can provide management services and API services. The management service provides background service functions for the management module; the API service provides API services for obtaining configuration items through HTTP coordination.
[0048] 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 related information of configuration items. The Redis cluster is used to store configuration item information, system keys, callback lists and other information.
[0049] The following combination Figure 2 The system structure diagram of the configuration management platform shown in the figure is as follows: Figure 4 A flowchart of an intelligent industrial production data configuration processing method is shown. The method is applied to an intelligent industrial production data configuration processing device. A configuration management platform can be deployed in the intelligent industrial production data configuration processing device, and the configuration management platform executes the intelligent industrial production data configuration processing method.
[0050] The technical solutions provided in the embodiments of the present application are described.
[0051] S401: Respond to an access request sent by at least one microservice and determine at least one microservice to access.
[0052] S402: For each microservice in the at least one connected microservice, assign an authority identifier to the microservice according to the type of the microservice.
[0053] The permission identifier is used to indicate the permission of the microservice when it is accessed.
[0054] S403: Obtain the user's query request and determine the user's operation authority based on pre-configured user authority.
[0055] The operation permissions include permissions for accessible microservices and permissions for processing multiple configuration items corresponding to the accessible microservices.
[0056] S404: Determine the target microservice indicated by the query request.
[0057] The target microservice is any one of at least one microservice within the user's operation authority.
[0058] S405: Apply the access interface corresponding to the query request, and obtain configuration data of the configuration item corresponding to the query request in the target microservice based on the permission identifier of the target microservice.
[0059] S406: Send the acquired configuration data of the configuration item to the microservice corresponding to the user.
[0060] In an embodiment of the present application, an intelligent industrial production data configuration processing device is deployed with a configuration management platform, which responds to an access request sent by at least one microservice and determines at least one microservice to be accessed; for each of the at least one microservice to be accessed, 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 of the microservice when it is accessed, thereby overcoming the problem of data leakage caused by arbitrary access to each microservice. When a user of a microservice needs to obtain configuration data of other microservices, the user's query request is obtained, and the user's operation permission is determined based on the pre-configured user permission. Here, the operation permission includes the permission to the accessible microservices and the processing permission to multiple configuration items corresponding to the accessible microservices. Such a setting can clarify the permissions of different users. Each user can only operate on the microservices and configuration items within the permission, thereby achieving data isolation and ensuring the security of the configuration items. Furthermore, the target microservice indicated by the query request is determined based on the user's query request. Here, the target microservice is any one of at least one microservice within the user's operational permissions. Because different pre-configured interfaces have different access characteristics, the access interface corresponding to the query request is applied. Based on the permission identifier of the target microservice, the configuration data for the configuration item corresponding to the query request is retrieved from the target microservice, and the retrieved configuration data for the configuration item is sent to the user's corresponding microservice. This effectively prevents information leakage by setting user permissions and setting permission identifiers for microservice access permissions. Retrieving configuration data for different microservices through different interfaces enables unified management of each microservice and reduces configuration workload.
[0061] Regarding S401 , each microservice can be connected to the configuration management platform so that each microservice can be managed uniformly through the configuration management platform. For example, microservice 1 can obtain configuration data of microservice 2 through the configuration management platform.
[0062] Among them, each microservice sends an access request to the configuration management platform, and the configuration management platform responds after receiving each access request, so the configuration management platform can determine at least one microservice to be accessed.
[0063] Regarding S402, each microservice is registered when it connects to the configuration management platform. The configuration management platform then assigns a permission identifier based on the type of microservice. This identifier indicates the access permissions for the microservice and is used to isolate configuration items and prevent information leakage. Furthermore, subsequent microservices must carry this permission identifier when accessing configuration data from the configuration management platform.
[0064] 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 a dedicated permission identifier; for an open service, the permission identifier includes a dedicated permission identifier; for a private service, the permission identifier includes a dedicated permission identifier and dedicated key information.
[0065] Regarding S403, for example, the developer or operations staff of microservice 1 (hereinafter referred to as the user) needs to access the configuration management platform to obtain configuration data for other microservices. The configuration management platform receives the user's query request. Since the configuration management platform has pre-configured user permissions for different users, it can determine the user's operational permissions. These operational permissions include permissions for accessible microservices (which microservices can be accessed) and permissions to process multiple configuration items corresponding to the accessible microservices (which configuration items can be accessed within the accessible microservices).
[0066] Among them, users can be divided into two categories. If the user is a first type of user (for example, an ordinary user with configuration permissions), the processing permissions for multiple configuration items are the operation permissions for multiple configuration items; if the user is a second type of user (an audit user with review permissions and release permissions), the processing permissions for multiple configuration items are the review permissions and release permissions for the operation permissions of the first type of user.
[0067] In addition, the configuration management platform can pre-build a first database and a second database. The first database is used to store the results of operations on multiple configuration items corresponding to accessible microservices, while the second database is used to store the review and release results of these operations, as well as the current and historical values of each configuration item. The first database is a MySQL database, and the second database is a Redis database.
[0068] In other words, ordinary users only have the permission to operate configuration items. The operation results are only recorded in the MySQL database and reviewed and released by the reviewer. The reviewer has the permission to review and release the configuration items of ordinary users. Only after the review and release will the configuration items be written to Redis for other microservices to obtain.
[0069] Specifically, ordinary personnel can perform relevant add, delete, modify and query operations on the configuration of the access microservices to which they have been assigned operation permissions. If the operation requires review, a pending review message reminder will be sent to the reviewer of the access microservice. All operation data of ordinary personnel are obtained from the MySQL database.
[0070] Auditors can audit the audit configuration under their own name. If there is no problem in the audit, it can be published directly. The configuration data in redis will be updated during the release. The configuration will take effect immediately after the release. At the same time, the current value and historical value of the configuration will be recorded to facilitate subsequent modification history review and quick rollback. If there is a problem with the audit, it can be rejected. The rejected configuration data will not be included in the modification history.
[0071] Therefore, adding an audit function after configuration items are modified can effectively reduce system failures caused by configuration item operation errors.
[0072] In addition, the data storage format in the second database is: using the hash structure of Redis 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 configuration data is used as a record in the hash structure.
[0073] Figure 5 A schematic diagram of a redis configuration item structure provided for an embodiment of the present application. Among them, key value 1 can be hiedu-pulic, key value 2 can be hiedu-portal, and key value 1 and key value 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.
[0074] Therefore, user permissions include the permission to operate the configuration items of the connected microservices. By controlling each user to only have the permission to add, delete, modify and query the configuration items in the specified connected microservices, data isolation can be achieved, ensuring the security of the configuration items of the access configuration management platform and effectively preventing information leakage.
[0075] In S404, a target microservice indicated by the query request is determined, wherein the target microservice is any one of at least one microservice within the user's operation authority, that is, the target microservice is one of the microservices that the user wants to access and obtain configuration data.
[0076] In S405, the configuration management platform pre-configures multiple query interfaces, including a first interface for querying a specified configuration item of a specified microservice, a second interface for querying a specified configuration item of a public microservice, a third interface for querying all configuration items of a specified microservice, and a fourth interface for querying changed configuration items within the specified microservice. These interfaces refer to APIs. The configuration management platform provides configuration data acquisition capabilities through the use of APIs, addressing issues that traditional configuration management platforms lack support for different languages or frameworks.
[0077] Figure 6 A schematic diagram of query characteristics of different interfaces provided in an embodiment of the present application.
[0078] First interface: used to query the specified configuration items of a specified microservice.
[0079] Path: / getItem(String sysCode, String item,String secret, BooleanusePublicSys)
[0080] Input parameters:
[0081] sysCode: Access permission identifier for the configuration management platform
[0082] item: configuration item
[0083] secret: The permission identifier sysCode corresponds to the key value configured in the configuration management platform of the microservice. If the microservice is an open service, this value is empty.
[0084] usePublicSys: whether to query the configuration of public services, the default is not to query, if true
[0085] At the same time, query the configuration items in the public service. If the public service and the specified sysCodesysCode
[0086] If items exist in the microservice at the same time, the specified result will prevail.
[0087] Second interface: used to query the specified configuration items of public microservices.
[0088] Path: / getPublicItem(String item)
[0089] Input parameters:
[0090] item: configuration item
[0091] The third interface is used to query all configuration items of a specified microservice.
[0092] Optionally, the third interface queries all configuration items of the specified microservice in the following manner: all configuration items of the specified microservice are loaded into the environment variables of the microservice to obtain all configuration items from the environment variables.
[0093] In other words, each microservice can use this interface to obtain all configuration items at once at startup and load them into its own environment variables. All subsequent parameters can be obtained directly from the environment variables. If the environment variables do not exist, the configuration item query interface can be used to obtain configuration data from the configuration management platform.
[0094] Path: / getAllItem(String sysCode,String secret,Boolean usePublicSys)
[0095] Input parameters:
[0096] For details on the parameters, refer to the first interface and the second interface.
[0097] The fourth interface is used to query the changed configuration items in the specified microservice.
[0098] Optional, reference Figure 7 The fourth interface queries the changed configuration items in the specified microservice in the following way:
[0099] S701: Return all configuration items of the specified microservice to the microservice.
[0100] S702: Add the specified callback address to the callback list.
[0101] S703: Monitor data changes using the Redis key value corresponding to the permission identifier received through the fourth interface.
[0102] S704: Automatically call back the specified callback address based on the monitored changed key value to obtain the changed configuration item.
[0103] That is to say, after the microservice calls this interface, the configuration management platform will return all the queried configuration items at once, and add the callback address to the redis callback list. The microservice will monitor the data changes of the redis key corresponding to the sysCode permission identifier passed in the interface, and add the refresAddr callback address to the redis callback list. The redis monitoring mechanism will automatically call back the specified rereshAddr after detecting the corresponding key configuration change. The callback supports fault tolerance and will retry three times within 6 seconds after the callback fails. If all three attempts fail, it is assumed that the microservice at the address has been offline, and the callback address will be deleted from the callback list.
[0104] This design ensures that when the configuration parameters of the configuration items of the accessed microservices change, the microservices that obtain the configuration data can obtain the configuration data of the changed configuration items immediately without the need to re-acquire, review, and publish.
[0105] Path: / getAllItemByrefresh(String sysCode,String secret,BooleanusePublicSys,String rereshAddr,Map<String,Object> params)
[0106] Input parameters:
[0107] rereshAddr: refresh callback address (automatically implemented by each microservice, written according to the framework of each microservice)
[0108] params: refresh callback address (automatically implemented by each microservice, written according to the framework of each microservice)
[0109] Among them, the dynamic refresh of configuration items after modification is achieved with the help of Redis's key value change listener, which has higher availability and efficiency compared with the related art that relies on file change monitoring.
[0110] The four API types described above are configured and used over HTTP, without platform language restrictions. Specific usage scenarios are provided. This completely isolates the application from the configuration management platform, allowing data exchange over HTTP and unrestricted application deployment. This reduces the risk of information leakage, resolves the incompatibility of configuration management platforms based on different languages or frameworks, and enables unified management.
[0111] Therefore, the access interface corresponding to the query request can be applied, and the configuration data of the configuration item corresponding to the query request can be obtained in the target microservice based on the permission identifier of the target microservice. Figure 8This is a schematic diagram of different methods for accessing configuration data of target microservices provided in an embodiment of the present application, specifically including the following methods:
[0112] 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.
[0113] When registering such a target microservice on the configuration management platform, it is assigned a unique permission identifier. Therefore, when other microservices retrieve data, they can directly access it without passing in any permission identifier. For configuration data shared by multiple services, a configuration management platform generally only needs to configure a public service.
[0114] Method 2: If the target microservice is an open service, the configuration data of the configuration item corresponding to the query request is obtained in the target microservice through the permission identifier of the target microservice.
[0115] For such target microservices, a unique permission identifier is assigned when they are registered on the configuration management platform. Therefore, when other microservices obtain data, the permission identifier needs to be passed in. This can be used for microservices with low security and that allow other microservices to directly obtain configuration data.
[0116] 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.
[0117] For this type of target microservice, a unique permission identifier and unique key information are assigned when registering on the configuration management platform. When other microservices obtain data, both the permission identifier and key must be passed in. If the configuration only allows this microservice to use it alone, this type can be used.
[0118] The configuration management platform based on Redis for data storage in the embodiment of the present application expands the usage restrictions of the configuration management platform and supports functions such as permission-based viewing of configuration items, configuration modification auditing, modification history tracking, and cross-platform use. Specifically, configuration item viewing increases permission control and improves information security; an audit function is added during configuration release to reduce the risk of engine failure due to the lack of an audit environment for configuration modifications; and configuration acquisition via the HTTP protocol solves 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.
[0119] like Figure 9As shown, based on the same inventive concept, an embodiment of the present application provides 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.
[0120] The processor 101 is configured to execute;
[0121] Responding to an access request sent by at least one microservice, determining at least one microservice to access;
[0122] For each microservice in the at least one accessed microservice, 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;
[0123] Obtain the user's query request on the user operation page and determine the user's operation permissions based on 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;
[0124] Determine the target microservice indicated by the query request; wherein the target microservice is any one of at least one microservice within the user's operation authority;
[0125] 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;
[0126] Send the configuration data of the obtained configuration items to the user's corresponding microservice;
[0127] The display is configured to perform:
[0128] Displays relevant information of at least one connected microservice and request information of the query request.
[0129] In an optional implementation, if the user is a first type of user, the processing authority for the multiple configuration items is the operation authority for the multiple configuration items; wherein the first type of user is a user with configuration authority;
[0130] If the user is a second type of user, the processing authority for multiple configuration items is the review authority and release authority for the operation authority of the first type of user; the second type of user is a user with review authority and release authority.
[0131] In an optional implementation, the processor 101 is further configured to: pre-build the first database and the second database;
[0132] The first database is used to store operation results of multiple configuration items corresponding to accessible microservices;
[0133] The second database is used to store the audit results and release results of the operation results, as well as the current value and historical value of each configuration item;
[0134] The first database is MySQL database, and the second database is Redis database.
[0135] In an optional embodiment, the data storage format in the second database is:
[0136] The hash structure of Redis is used to store configuration data. The identifier of each connected microservice is used as the key value of the hash value, and each configuration data is used as a record in the hash structure.
[0137] In an optional implementation, the processor 101 is specifically configured to execute:
[0138] If the target microservice is a public service, the configuration data of the configuration item corresponding to the query request is directly obtained from the target microservice;
[0139] If the target microservice is an open service, the configuration data of the configuration item corresponding to the query request is obtained in the target microservice through the permission identifier of the target microservice;
[0140] 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.
[0141] In an optional embodiment, the processor 101 is further configured to execute:
[0142] Identify the service information in the query request and determine the access interface corresponding to the query request based on the pre-configured relationship between the service information and the query interface.
[0143] In an optional embodiment, the pre-configured multiple query interfaces include:
[0144] The first interface for querying the specified configuration items of a specified microservice;
[0145] A second interface for querying specified configuration items of public microservices;
[0146] The third interface is used to query all configuration items of a specified microservice;
[0147] The fourth interface is used to query the changed configuration items in the specified microservice.
[0148] In an optional embodiment, the processor 101 is further configured to execute, instructing the third interface to query all configuration items of the specified microservice in the following manner:
[0149] Load all configuration items of the specified microservice into the environment variables of the microservice to obtain all configuration items from the environment variables.
[0150] In an optional embodiment, the processor 101 is further configured to execute, instructing the fourth interface to query the changed configuration items in the specified microservice in the following manner:
[0151] Return all configuration items of the specified microservice to the microservice;
[0152] Add the specified callback address to the callback list;
[0153] Monitor data changes using the Redis key value corresponding to the permission identifier passed in through the fourth interface;
[0154] According to the key value that is monitored for changes, the specified callback address is automatically called back to obtain the changed configuration items.
[0155] The application embodiment also provides a computer storage medium, which stores computer program instructions. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned intelligent industrial production data configuration processing method.
[0156] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0158] These computer program instructions may 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, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0160] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for configuring and processing intelligent industrial production data, characterized in that: include: Responding to an access request sent by at least one microservice, determining at least one microservice to access; For each microservice in the at least one accessed microservice, assign a permission identifier to the microservice according to the type of the microservice; wherein the permission identifier is used to indicate the permission of the microservice when it is accessed; Obtaining a user's query request and determining the user's operation permissions based on 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 a target microservice indicated by the query request; wherein the target microservice is any one of at least one microservice within the operation authority of the user; Applying the access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtaining configuration data of the configuration item corresponding to the query request in the target microservice; The configuration data of the obtained configuration items is sent to the microservice corresponding to the user.
2. The method according to claim 1, characterized in that If the user is a first type of user, the processing authority for the multiple configuration items is the operation authority for the multiple configuration items; wherein the first type of user is a user with configuration authority; If the user is a second type of user, the processing authority for multiple configuration items is the review authority and release authority for the operation authority of the first type of user; the second type of user is a user with review authority and release authority.
3. The method according to claim 2, characterized in that The method further comprises: pre-building a first database and a second database; The first database is used to store operation results of multiple configuration items corresponding to accessible microservices; The second database is used to store the audit results and release results of the operation results and the current value and historical value 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: The configuration data is stored using the hash structure of Redis. The identifier of each connected microservice is used as the key value of the hash value, and each configuration data is used as a record in the hash structure.
5. The method according to claim 1, characterized in that The acquiring, in the target microservice based on the permission identifier of the target microservice, configuration data of the configuration item corresponding to the query request 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, obtaining 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, 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.
6. The method according to claim 1, characterized in that The method further comprises: The service information in the query request is identified, and the access interface corresponding to the query request is determined based on a pre-configured relationship between the service information and the query interface.
7. The method according to claim 6, characterized in that Multiple pre-configured query interfaces include: The first interface for querying the specified configuration items of a specified microservice; A second interface for querying specified configuration items of public microservices; The third interface is used to query all configuration items of a specified microservice; The fourth interface is used to query the changed configuration items in the specified microservice.
8. The method according to claim 7, characterized in that 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; Monitor data changes by obtaining the redis key value corresponding to the permission identifier passed in by the fourth interface; According to the key value that is monitored for changes, the specified callback address is automatically called back to obtain the changed configuration items.
10. An intelligent industrial production data configuration processing device, characterized in that: Includes display and processor; The processor is configured to execute; Responding to an access request sent by at least one microservice, determining at least one microservice to access; For each microservice in the at least one accessed microservice, assign a permission identifier to the microservice according to the type of the microservice; wherein the permission identifier is used to indicate the permission of the microservice when it is accessed; Obtaining a query request from a user on the user operation page, and determining the user's operation permissions based on 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 a target microservice indicated by the query request; wherein the target microservice is any one of at least one microservice within the operation authority of the user; Applying the access interface corresponding to the query request, and based on the permission identifier of the target microservice, obtaining 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: Display relevant information of at least one accessed microservice and request information of the query request.
Citation Information
Patent Citations
Micro-service data exchange method and device
CN111327619A
Micro-service calling method and device, equipment and storage medium
CN116723247A