Auth0-based energy router's acquisition configuration template management system and method
Patent Information
- Application Number
- CN202311213133.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-20
AI Technical Summary
[0006]本发明的技术任务是提供一种基于Auth0的能源路由器的采集配置模板管理系统及方法,来解决如何提高能源路由器中设备数据点的采集配置效率,同时实现能源管理中设备配置一致性以及认证安全性的问题
[0062] (i) This invention is a data acquisition and configuration template management system for energy routers based on Auth0. In the system architecture, Auth0 is used in an independent authentication and authorization module, which provides a secure and reliable authentication foundation for the entire system. At the same time, this invention achieves decoupling and reuse of the energy router's authorization and authentication functions through interaction with the Auth0 interface. This not only simplifies the development and maintenance of the system, but also enhances the overall security of the system and ensures the reliable management of user identity and permissions.
Smart Images

Figure CN117811760B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital energy application development technology in the power industry, specifically to a data acquisition and configuration template management system and method for an energy router based on Auth0. Background Technology
[0002] In today's energy management field, energy routers play a crucial role in data monitoring and acquisition. However, energy routers from different manufacturers use different communication protocols and device configurations, leading to confusion in data management. At the same time, ensuring system security and user authentication also presents challenges.
[0003] ① Diverse communication protocols and device configurations: Energy routers from different manufacturers use their own different communication protocols and device configurations, resulting in complex and diverse data management, making it difficult to manage and operate in a unified manner;
[0004] ② Security and authentication challenges: Ensuring system security and user authentication is an ongoing challenge, especially in diverse device and protocol environments.
[0005] Therefore, how to improve the efficiency of data point acquisition and configuration in energy routers, while ensuring consistency of device configuration and authentication security in energy management, is a technical problem that urgently needs to be solved. Summary of the Invention
[0006] The technical objective of this invention is to provide an Auth0-based energy router data acquisition and configuration template management system and method to address how to improve the efficiency of data acquisition and configuration of device data points in energy routers, while simultaneously ensuring device configuration consistency and authentication security in energy management.
[0007] The technical task of this invention is achieved in the following way: a data acquisition and configuration template management system for an energy router based on Auth0. The system deploys a front-end UI layer, a business layer, a data layer, a database, and a running environment sequentially from the front end to the back end. The front-end UI layer deploys a user interface, through which users log in to the system and create data acquisition and configuration templates for different protocols and different device types.
[0008] The business layer includes an authentication and authorization module, a template management module, an energy router interface module, and a system log module.
[0009] The authentication and authorization module is used to manage user authentication and authorization.
[0010] The template management module works in conjunction with the authentication and authorization module and the energy router interface module to store and manage configuration templates for data points collected from different protocols and devices. Centralized management ensures configuration consistency while providing convenient selection.
[0011] The energy router interface module is used to communicate with the energy router, making the acquisition and configuration of energy device data points simple and efficient;
[0012] The system log module is used to record the operation history of the business layer and to search for operation history records.
[0013] Preferably, the authentication and authorization module adopts the Auth0 authentication and authorization module, which is used to manage user login and authentication, and ensures that only authorized users can access the system, providing a high level of security;
[0014] Before authentication by the Auth0 authentication and authorization module, an authentication service is first created on the third-party Auth0 service, and the key parameters client ID and secret are pre-stored on the template system server. The authentication and authorization process is as follows:
[0015] (1) The user initiates a login request to the template system server, along with a redirect address;
[0016] (2) The template system server redirects users to the Auth0 service login page;
[0017] (3) User logs in. After verification, the user is redirected to step (4).
[0018] (4) The Auth0 service returns a code to the template system server;
[0019] (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token;
[0020] (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information;
[0021] (7) The template system server caches user information and its corresponding access_token;
[0022] (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token;
[0023] (9) The user requests the template system server user information, carrying the access_token parameter.
[0024] More preferably, the working process of the template management module is as follows:
[0025] Configure the template management page: Select the template corresponding to the protocol and device type, and display all templates of the protocol and device type. Add, delete or edit the corresponding modules as needed;
[0026] Configure the template details page: edit the specific template;
[0027] Generate template data: Generate corresponding template data based on the table data edited on the template management page and the template details page.
[0028] More preferably, the key tables of this system include the table template, the table template_parameters, and the table template_popularity;
[0029] The `template` table is used in the template management page. For example, at the top of the page, select "modbusTCP" in the "Protocol" selection box and "Root Bus" in the "Device Type" selection box (key value is "OriginBus"). When you click the "Add" button, fill in the template name "Template Example", and add this data to the database as a record via the API interface. The record will have "name" as "Template Example", "device_type" as "OriginBus", "protocol" as "modbusTCP", and "create_time" as the current time.
[0030] The `template_parameters` table is used on the template details page. For example, when clicking "Enter Template" on a specific item in the "Template Management" table, the URL of this page includes the ID of the template item (which can be obtained at any time), leading to the "Template Details" page. After editing the data points on this page, clicking the "Save" button in the upper right corner of the page adds or updates a record to the database via the API. Here, "template_id" is the ID of the template item, "datum" is the string generated from the JSON data serialization of all data points, and "create_time" is the current time.
[0031] The `template_popularity` table is used during cloud synchronization with the energy router to update the popularity data (`popularity`) corresponding to any template table (`template_id`). The update time (`update_time`) is the time of this update action.
[0032] Ideally, the popularity data should be sorted as follows:
[0033] Data collection: Collecting data on the frequency of template usage and related searches can reflect the template's popularity;
[0034] Popularity calculation: For each item, its popularity index is calculated based on the collected data; the calculation method for the popularity index includes simply counting the number of clicks or views or using a weighted method to assign different weights to different behaviors;
[0035] Search ranking: Based on the calculated popularity index, all templates are sorted, and templates with higher popularity are ranked first during the query.
[0036] Real-time updates: Since popularity changes over time, the popularity metrics of the templates need to be updated regularly to ensure the accuracy of the recommendation results.
[0037] A method for managing data acquisition configuration templates in an Auth0-based energy router is described below:
[0038] User login authentication: Users enter credentials through the user interface, and the authentication and authorization module verifies the user's identity;
[0039] Data collection configuration selection: Authenticated users can select an applicable template from the stored data collection point configuration templates;
[0040] Energy data acquisition: The energy router interface module matches the selected configuration template and performs the data acquisition process.
[0041] Preferably, the authentication and authorization module adopts the Auth0 authentication and authorization module, which is used to manage user login and authentication, and ensures that only authorized users can access the system, providing a high level of security;
[0042] Before authentication by the Auth0 authentication and authorization module, an authentication service is first created on the third-party Auth0 service, and the key parameters client ID and secret are pre-stored on the template system server. The authentication and authorization process is as follows:
[0043] (1) The user initiates a login request to the template system server, along with a redirect address;
[0044] (2) The template system server redirects users to the Auth0 service login page;
[0045] (3) User logs in. After verification, the user is redirected to step (4).
[0046] (4) The Auth0 service returns a code to the template system server;
[0047] (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token;
[0048] (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information;
[0049] (7) The template system server caches user information and its corresponding access_token;
[0050] (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token;
[0051] (9) The user requests the template system server user information, carrying the access_token parameter.
[0052] More preferably, the key tables in this method include the table template, the table template_parameters, and the table template_popularity;
[0053] The `template` table is used in the template management page. For example, at the top of the page, select "modbusTCP" in the "Protocol" selection box and "Root Bus" in the "Device Type" selection box (key value is "OriginBus"). When you click the "Add" button, fill in the template name "Template Example", and add this data to the database as a record via the API interface. The record will have "name" as "Template Example", "device_type" as "OriginBus", "protocol" as "modbusTCP", and "create_time" as the current time.
[0054] The `template_parameters` table is used on the template details page. For example, when clicking "Enter Template" on a specific item in the "Template Management" table, the URL of this page includes the ID of the template item (which can be obtained at any time), leading to the "Template Details" page. After editing the data points on this page, clicking the "Save" button in the upper right corner of the page adds or updates a record to the database via the API. Here, "template_id" is the ID of the template item, "datum" is the string generated from the JSON data serialization of all data points, and "create_time" is the current time.
[0055] The template_popularity table is used during cloud synchronization with the energy router to update the popularity data (popularity) corresponding to any template table (template_id). The update time (update_time) is the time of the update action.
[0056] The popularity data is sorted as follows:
[0057] Data collection: Collecting data on the frequency of template usage and related searches can reflect the template's popularity;
[0058] Popularity calculation: For each item, its popularity index is calculated based on the collected data; the calculation method for the popularity index includes simply counting the number of clicks or views or using a weighted method to assign different weights to different behaviors;
[0059] Search ranking: Based on the calculated popularity index, all templates are sorted, and templates with higher popularity are ranked first during the query.
[0060] Real-time updates: Since popularity changes over time, the popularity metrics of the templates need to be updated regularly to ensure the accuracy of the recommendation results.
[0061] The data acquisition and configuration template management system and method for energy routers based on Auth0 of the present invention have the following advantages:
[0062] (i) This invention is a data acquisition and configuration template management system for energy routers based on Auth0. In the system architecture, Auth0 is used in an independent authentication and authorization module, which provides a secure and reliable authentication foundation for the entire system. At the same time, this invention achieves decoupling and reuse of the energy router's authorization and authentication functions through interaction with the Auth0 interface. This not only simplifies the development and maintenance of the system, but also enhances the overall security of the system and ensures the reliable management of user identity and permissions.
[0063] (ii) This invention solves the problem of data collection point configuration differences between different manufacturers, different protocols and different devices. By centrally managing the configuration templates of various devices, users can easily cope with complex and diverse configuration needs without having to repeatedly customize configurations for different devices and different protocols. The connection between the energy router and this template system gives users the ability to access various configuration templates in real time, thereby greatly reducing configuration time and improving work efficiency.
[0064] (iii) This invention solves the problem of inconsistent data acquisition configurations among different manufacturers, protocols and devices, thereby improving system consistency and operational efficiency;
[0065] (iv) By combining the Auth0 authentication and authorization module, this invention aims to provide a method that can decouple and reuse the authentication and authorization functions of energy routers, thereby simplifying the development process, enhancing the overall system security, and optimizing authentication security.
[0066] (V) This invention solves the problems of inefficient data acquisition and configuration, inconsistency, and authentication security of device data points in energy routers. It integrates multiple technical components to achieve efficient data acquisition, configuration, and secure authentication.
[0067] (vi) This invention greatly simplifies the configuration process of energy routers and improves the efficiency and consistency of data collection; at the same time, through the application of the Auth0 authentication and authorization module, the security of the system is significantly improved, bringing innovative solutions to the field of energy management.
[0068] (vii) By utilizing the Auth0 authentication and authorization module, this invention can optimize the authentication function of the energy router, reduce security risks, and simplify the complexity of the entire system.
[0069] (viii) This invention solves the configuration problem. By introducing a “configuration template collection system”, it can solve the problem of diverse device configurations, save configuration time, and improve operational efficiency.
[0070] (ix) The present invention enhances security, and the overall security and stability of the present invention are also improved, enabling users to manage data more reliably and providing strong support for the development of the energy management field. Attached Figure Description
[0071] The invention will be further described below with reference to the accompanying drawings.
[0072] Appendix Figure 1 A schematic diagram of the data acquisition configuration template management system for Auth0-based energy routers;
[0073] Appendix Figure 2 Sequence diagram for the Auth0 authentication and authorization module;
[0074] Appendix Figure 3 This is a flowchart illustrating the use of the present invention and the energy router system;
[0075] Appendix Figure 4 This is a schematic diagram of the key table design of the present invention. Detailed Implementation
[0076] The data acquisition and configuration template management system and method for the Auth0-based energy router of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0077] Example 1:
[0078] As attached Figure 1 As shown, this embodiment provides a data acquisition and configuration template management system for an energy router based on Auth0. The system deploys a front-end UI layer, a business layer, a data layer, a database, and a runtime environment sequentially from the front-end to the back-end. The front-end UI layer deploys a user interface, through which users log in to the system and create data acquisition and configuration templates for different protocols and device types.
[0079] The business layer includes an authentication and authorization module, a template management module, an energy router interface module, and a system log module.
[0080] The authentication and authorization module is used to manage user authentication and authorization.
[0081] The template management module works in conjunction with the authentication and authorization module and the energy router interface module to store and manage configuration templates for data points collected from different protocols and devices. Centralized management ensures configuration consistency while providing convenient selection.
[0082] The energy router interface module is used to communicate with the energy router, making the acquisition and configuration of energy device data points simple and efficient;
[0083] The system log module is used to record the operation history of the business layer and to search for operation history records.
[0084] The authentication and authorization module in this embodiment adopts the Auth0 authentication and authorization module. The Auth0 authentication and authorization module is used to manage user login and authentication, and ensures that only authorized users can access the system, providing a high level of security.
[0085] As attached Figure 2 As shown, before authentication, the Auth0 authentication and authorization module first creates an authentication service on the third-party Auth0 service and pre-stores the key parameters client ID and secret in the template system server. The authentication and authorization process is as follows:
[0086] (1) The user initiates a login request to the template system server, along with a redirect address;
[0087] (2) The template system server redirects users to the Auth0 service login page;
[0088] (3) User logs in. After verification, the user is redirected to step (4).
[0089] (4) The Auth0 service returns a code to the template system server;
[0090] (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token;
[0091] (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information;
[0092] (7) The template system server caches user information and its corresponding access_token;
[0093] (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token;
[0094] (9) The user requests the template system server user information, carrying the access_token parameter.
[0095] The working process of the template management module in this embodiment is as follows:
[0096] Configure the template management page: Select the template corresponding to the protocol and device type, and display all templates of the protocol and device type. Add, delete or edit the corresponding modules as needed;
[0097] Configure the template details page: edit the specific template;
[0098] Generate template data: Generate corresponding template data based on the table data edited on the template management page and the template details page.
[0099] As attached Figure 3 As shown, the specific process of using this embodiment and the energy router system is as follows:
[0100] Process 1 (Authentication Successful): For example, when a user logs into the system for the first time, they will be automatically redirected to the "Login" page. Once the user completes the "Authentication and Authorization" process described above, they can access the "Template Management" page of the "Template Management System".
[0101] Process 2 ("Template Management" Page Configuration): Enter the "Template Management" page. You will see two drop-down menus for "Protocol" and "Device Type" in the top left corner; "Export" and "Restore" buttons in the top right corner; "Add" and "Refresh" buttons in the bottom column; and a table below with columns for "Name" and "Operation". When the table contains data, the "Operation" column has "Edit", "Delete", and "Enter Template" buttons.
[0102] At the top of the page, select the corresponding "Protocol" and "Device Type" dropdown menus to edit the template for that "Protocol" and "Device Type". After selection, the table on this page will automatically refresh to display all templates for that "Protocol" and "Device Type". Click the "Add" button to bring up a dialog box, fill in the "Name", and click "Save" to add the item. The table will also refresh to display the item. The "Operation" column of the table has three buttons: "Edit", "Delete", and "Enter Template". Clicking the "Edit" button allows you to modify the "Name" of the item, clicking the "Delete" button allows you to delete the item, and clicking "Enter Template" will take you to the "Template Details" page, which will be described in detail in "Process 3" below.
[0103] Process 3 ("Template Details" Page Configuration): Following "Process 2" above, clicking "Enter Template" on a template field in the table takes you to the "Template Details" page, ready for editing. The top left corner of the page features a tab bar for "Five Remote Controls" ("AI", "DI", "ACC", "AO", "DO"), with "AI" selected by default. The top right corner contains "Back" and "Save" buttons. Below is the "Data Points" table. The first column contains checkboxes for batch operations. The remaining columns are defined by the configuration file. For example, if the configuration file simultaneously satisfies the conditions for "Protocol" and "Device Type" with data like [{"label":"Name","value":"name"},{"label":"Start Position","value":"start"}], then the table columns will be "Name" and "Start Position". Right-clicking in the table area automatically brings up a menu bar with options including "Add Point", "Batch Add Point", "Delete Point", "Batch Delete Point", "Export Excel", and "Import Excel".
[0104] You can select the "Five Remotes" tab, and the table below will refresh to display all data points for that template and the "Five Remotes" type. Users can also click on a cell to directly edit the data. To save to the database, click the "Save" button in the upper right corner of the page. Right-clicking and selecting "Add Point" will automatically add a row to the table. Right-clicking and selecting "Batch Add Points" will bring up a dialog box; entering "Number of Data Points" as 'n' and clicking "OK" will automatically add 'n' columns to the table. Moving the mouse over an item in the table and right-clicking and selecting "Delete Point" will bring up a deletion prompt dialog box; clicking "OK" will delete that data point item. To delete data points in batches, check the checkboxes in the first column of the points you want to delete, right-click and select "Batch Delete Points," and a deletion prompt dialog box will appear; clicking "OK" will delete the selected data point items. When you right-click and select "Export Excel Spreadsheet", the data in the current spreadsheet will be exported as an Excel spreadsheet file and downloaded automatically. If you want to reuse these data points in other "Template Details" spreadsheets, you can right-click and select "Import Excel Spreadsheet" and choose the file to import.
[0105] When users want to return to the "Template Details" page, they can click the "Back" button in the top right corner of the page.
[0106] Process 4 (Generate Template Data): When users edit table data using the "Template Management" page and the "Template Details" page, the database will be updated in real time with the data related to these templates.
[0107] Process 5-1 (Cloud Synchronization): The "Template Management System" provides an API interface for data export. This interface can provide template data on the system. After authentication and authorization, the "Energy Router System" can request the corresponding template data from this interface and synchronize it to its own system's database.
[0108] Step 5-2 (Import File): Clicking the "Export" button in the upper right corner of the "Template Management" page automatically exports the encrypted template data file. The "Energy Router System" can then read the data from this file and synchronize it to its own system database by decrypting the data file using the key.
[0109] As attached Figure 4 As shown, the key tables of this system include the table template, the table template_parameters, and the table template_popularity;
[0110] The `template` table is used in the template management page. For example, at the top of the page, select "modbusTCP" in the "Protocol" selection box and "Root Bus" in the "Device Type" selection box (key value is "OriginBus"). When you click the "Add" button, fill in the template name "Template Example", and add this data to the database as a record via the API interface. The record will have "name" as "Template Example", "device_type" as "OriginBus", "protocol" as "modbusTCP", and "create_time" as the current time.
[0111] The `template_parameters` table is used on the template details page. For example, when clicking "Enter Template" on a specific item in the "Template Management" table, the URL of this page includes the ID of the template item (which can be obtained at any time), leading to the "Template Details" page. After editing the data points on this page, clicking the "Save" button in the upper right corner of the page adds or updates a record to the database via the API. Here, "template_id" is the ID of the template item, "datum" is the string generated from the JSON data serialization of all data points, and "create_time" is the current time.
[0112] The `template_popularity` table is used during cloud synchronization with the energy router to update the popularity data (`popularity`) corresponding to any template table (`template_id`). The update time (`update_time`) is the time of this update action.
[0113] The popularity data sorting in this embodiment is as follows:
[0114] ① Data collection: Collecting data on the number of times the template is used and the number of related searches can reflect the popularity of the template;
[0115] ②Popularity Calculation: For each item, its popularity index is calculated based on the collected data; the calculation methods for the popularity index include simply counting the number of clicks or views or using a weighted method to assign different weights to different behaviors;
[0116] ③ Search ranking: Based on the calculated popularity index, all templates are ranked, and templates with higher popularity are ranked first during the query;
[0117] ④ Real-time updates: Since popularity changes over time, the popularity metrics of the templates need to be updated regularly to ensure the accuracy of the recommendation results.
[0118] Example 2:
[0119] This embodiment provides a method for managing the data acquisition configuration templates of an Auth0-based energy router, as detailed below:
[0120] S1. User Login Authentication: Users enter credentials through the user interface, and the authentication and authorization module verifies the user's identity.
[0121] S2. Data Collection Configuration Selection: Verified users can select an applicable template from the stored data collection point configuration templates;
[0122] S3, Energy Data Acquisition: The energy router interface module matches the selected configuration template and executes the data acquisition process.
[0123] As attached Figure 2 As shown, the authentication and authorization module in this embodiment adopts the Auth0 authentication and authorization module. The Auth0 authentication and authorization module is used to manage user login and authentication, and ensure that only authorized users can access the system, providing a high level of security.
[0124] Before authentication by the Auth0 authentication and authorization module, an authentication service is first created on the third-party Auth0 service, and the key parameters client ID and secret are pre-stored on the template system server. The authentication and authorization process is as follows:
[0125] (1) The user initiates a login request to the template system server, along with a redirect address;
[0126] (2) The template system server redirects users to the Auth0 service login page;
[0127] (3) User logs in. After verification, the user is redirected to step (4).
[0128] (4) The Auth0 service returns a code to the template system server;
[0129] (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token;
[0130] (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information;
[0131] (7) The template system server caches user information and its corresponding access_token;
[0132] (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token;
[0133] (9) The user requests the template system server user information, carrying the access_token parameter.
[0134] As attached Figure 4 As shown, the key tables in this method include the template table, the template_parameters table, and the template_popularity table;
[0135] The `template` table is used in the template management page. For example, at the top of the page, select "modbusTCP" in the "Protocol" selection box and "Root Bus" in the "Device Type" selection box (key value is "OriginBus"). When you click the "Add" button, fill in the template name "Template Example", and add this data to the database as a record via the API interface. The record will have "name" as "Template Example", "device_type" as "OriginBus", "protocol" as "modbusTCP", and "create_time" as the current time.
[0136] The `template_parameters` table is used on the template details page. For example, when clicking "Enter Template" on a specific item in the "Template Management" table, the URL of this page includes the ID of the template item (which can be obtained at any time), leading to the "Template Details" page. After editing the data points on this page, clicking the "Save" button in the upper right corner of the page adds or updates a record to the database via the API. Here, "template_id" is the ID of the template item, "datum" is the string generated from the JSON data serialization of all data points, and "create_time" is the current time.
[0137] The template_popularity table is used during cloud synchronization with the energy router to update the popularity data (popularity) corresponding to any template table (template_id). The update time (update_time) is the time of the update action.
[0138] The popularity data is sorted as follows:
[0139] ① Data collection: Collecting data on the number of times the template is used and the number of related searches can reflect the popularity of the template;
[0140] ②Popularity Calculation: For each item, its popularity index is calculated based on the collected data; the calculation methods for the popularity index include simply counting the number of clicks or views or using a weighted method to assign different weights to different behaviors;
[0141] ③ Search ranking: Based on the calculated popularity index, all templates are ranked, and templates with higher popularity are ranked first during the query;
[0142] ④ Real-time updates: Since popularity changes over time, the popularity metrics of the templates need to be updated regularly to ensure the accuracy of the recommendation results.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data acquisition and configuration template management system for an energy router based on Auth0, characterized in that, The system is deployed sequentially from front end to back end, consisting of a front-end UI layer, a business layer, a data layer, a database, and a runtime environment. The front-end UI layer deploys the user interface, through which users log in to the system and create collection configuration templates for different protocols and device types. The business layer includes an authentication and authorization module, a template management module, an energy router interface module, and a system log module. The authentication and authorization module is used to manage user authentication and authorization. The template management module works in conjunction with the authentication and authorization module and the energy router interface module to store and manage configuration templates for data points collected from different protocols and devices. The energy router interface module is used to communicate with the energy router; The system log module is used to record the operation history of the business layer and to search for operation history records; The authentication and authorization module adopts the Auth0 authentication and authorization module, which is used to manage user login and authentication, and ensures that only authorized users can access the system, providing a high level of security. Before authentication by the Auth0 authentication and authorization module, an authentication service is first created on the third-party Auth0 service, and the key parameters client ID and secret are pre-stored on the template system server. The authentication and authorization process is as follows: (1) The user initiates a login request to the template system server, with a redirect address attached; (2) The template system server redirects the user to the Auth0 service login page; (3) User logs in, and after verification, proceeds to step (4); (4) The Auth0 service returns a code to the template system server; (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token; (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information; (7) The template system server caches user information and its corresponding access_token; (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token; (9) The user requests the template system server user information, carrying the access_token parameter.
2. The data acquisition and configuration template management system for energy routers based on Auth0 according to claim 1, characterized in that, The specific working process of the template management module is as follows: Configure the template management page: Select the template corresponding to the protocol and device type, and display all templates of the protocol and device type. Add, delete or edit the corresponding modules as needed; Configure the template details page: edit the specific template; Generate template data: Generate corresponding template data based on the table data edited on the template management page and the template details page.
3. The data acquisition and configuration template management system for energy routers based on Auth0 according to claim 1 or 2, characterized in that, The key tables in this system include the table template, the table template_parameters, and the table template_popularity; The `template` table is used in the template management page. The `template_parameters` table is used on the template details page; The template_popularity table is used during cloud synchronization with the energy router to update the popularity data corresponding to any template table. The update time is the time of the update action.
4. The data acquisition and configuration template management system for energy routers based on Auth0 according to claim 3, characterized in that, The popularity data is sorted as follows: Data collection: Collect data on the frequency of template usage and related search volume; Popularity calculation: For each item, its popularity index is calculated based on the collected data; the calculation method for the popularity index includes counting the number of clicks or page views or using a weighted method to assign different weights to different behaviors; Search ranking: Based on the calculated popularity index, all templates are sorted, and templates with higher popularity are ranked first during the query. Real-time updates: The popularity metrics of templates are updated regularly to ensure the accuracy of recommendation results.
5. A method for managing data acquisition configuration templates in an Auth0-based energy router, characterized in that, The method is as follows: User login authentication: Users enter credentials through the user interface, and the authentication and authorization module verifies the user's identity; Data collection configuration selection: Authenticated users can select an applicable template from the stored data collection point configuration templates; Energy data acquisition: The energy router interface module matches the selected configuration template and executes the data acquisition process; The authentication and authorization module adopts the Auth0 authentication and authorization module, which is used to manage user login and authentication, and ensures that only authorized users can access the system, providing a high level of security. Before authentication by the Auth0 authentication and authorization module, an authentication service is first created on the third-party Auth0 service, and the key parameters client ID and secret are pre-stored on the template system server. The authentication and authorization process is as follows: (1) The user initiates a login request to the template system server, with a redirect address attached; (2) The template system server redirects the user to the Auth0 service login page; (3) User logs in, and after verification, proceeds to step (4); (4) The Auth0 service returns a code to the template system server; (5) The template system server requests the Auth0 service, carrying the parameters code, client ID and secret, to obtain the access_token; (6) The template system server requests the Auth0 service, carrying the access_token parameter, to obtain user information; (7) The template system server caches user information and its corresponding access_token; (8) The template system server redirects to the address attached to the client's original request, and the message contains the access_token; (9) The user requests the template system server user information, carrying the access_token parameter.
6. The data acquisition configuration template management method for an energy router based on Auth0 according to claim 5, characterized in that, The key tables for this method include the template table, the template_parameters table, and the template_popularity table; The `template` table is used in the template management page. The `template_parameters` table is used on the template details page; The template_popularity table is used during cloud synchronization with the energy router to update the popularity data corresponding to any template table. The update time is the time of the update action. The popularity data is sorted as follows: Data collection: Collect data on the frequency of template usage and related search volume; Popularity calculation: For each item, its popularity index is calculated based on the collected data; the calculation method for the popularity index includes counting the number of clicks or page views or using a weighted method to assign different weights to different behaviors; Search ranking: Based on the calculated popularity index, all templates are sorted, and templates with higher popularity are ranked first during the query. Real-time updates: The popularity metrics of templates are updated regularly to ensure the accuracy of recommendation results.
Citation Information
Patent Citations
WEB application centralized release permission management system and method
CN111510461A
Template method for flexibly configuring equipment data acquisition
CN114780085A