Method and device for constructing photovoltaic power station design rule base based on dynamic multi-dimensional tree

Through the photovoltaic power station design rule database method based on dynamic multi-dimensional trees, the problem that traditional rule database is difficult to adapt to multi-dimensional classification and complex relationships is solved, and the flexibility and efficient query capabilities of the rule database are achieved.

CN120162325APending Publication Date: 2025-06-17CHINA HUADIAN ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510165438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the design of photovoltaic power stations, due to the wide variety of rules, complex content and the need for multi-dimensional classification, the traditional single-dimensional tree rule library structure is difficult to adapt, making it difficult to manage and query design rules.

Method used

The photovoltaic power station design rule base method based on dynamic multidimensional trees is adopted to design dynamic multidimensional tree data structure by determining dimensions based on needs, building independent subtrees, and dynamic correlation through cross nodes. Enter the core content and extended information of each rule into the database table, and use natural language processing technology to parse new rules, extract content and its scope of change, and support multi-dimensional joint query.

Benefits of technology

It realizes the flexible adaptation of the rule base to changes, clearly expresses the interaction between rules, supports automatic addition, update and change tracking of rules, greatly improves the efficiency of rule retrieval, and supports rapid query and efficient rule matching under complex conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162325A_ABST
    Figure CN120162325A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device, equipment and a medium for constructing a photovoltaic power station design rule base based on a dynamic multi-dimensional tree, and the method comprises the steps: determining dimensions according to the design requirements of a photovoltaic power station, constructing an independent sub-tree based on the dimensions, and designing a dynamic multi-dimensional tree data structure through the dynamic association of cross nodes; inputting the core content and the extension information of each rule into a corresponding database table; when a new rule is updated, analyzing the new rule based on a natural language processing technology, extracting the content of the new rule and the change range of the new rule, and updating the rule base; based on a multi-dimension joint query function, corresponding rules are queried according to function classification and risk level dimensions, so that the problem that design rules of a photovoltaic power station are difficult to manage and query due to the fact that the rules are various in type and complex in content and have multi-dimension classification requirements is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power station design, and particularly to a method, device, equipment and medium for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree. Background Art

[0002] The design of a photovoltaic power station needs to follow a large number of industry standards, national codes and enterprise regulations. These rules are diverse in type, complex in content, and there is a need for multi-dimensional classification, such as classification by function, risk level classification and applicable scenario classification. The traditional tree-like rule library structure is usually limited to single-dimensional classification and is difficult to meet the following requirements:

[0003] 1. Multi-dimensional classification requirements: Rules need to be classified in multiple dimensions, such as the combination of function classification and risk level classification.

[0004] 2. Complex relationships between rules: There may be relationships such as dependencies, constraints, conflicts and collaborations between rules, and these relationships cannot be intuitively expressed by traditional single-dimensional classification.

[0005] 3. Dynamic expansion of rules: With the release of new rules and the change of business requirements, the rule library needs to support dynamic expansion of dimensions and levels.

[0006] 4. Efficient query and management: In a large-scale rule library, the query efficiency is low, and it is difficult to quickly obtain rule information.

[0007] Therefore, there is an urgent need to propose a method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree to solve the technical problem that it is difficult to manage and query the design rules of a photovoltaic power station due to the large variety of rules, complex content and the need for multi-dimensional classification. Summary of the Invention

[0008] To overcome the problems existing in the related art, the present disclosure provides a method, device, equipment and medium for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree to solve the technical problem that it is difficult to manage and query the design rules of a photovoltaic power station due to the large variety of rules, complex content and the need for multi-dimensional classification.

[0009] One or more embodiments of the present specification provide a method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree, including the following steps:

[0010] Determine dimensions according to the requirements of photovoltaic power station design, construct independent subtrees based on the dimensions, and dynamically associate through cross nodes to design a dynamic multi-dimensional tree data structure;

[0011] Enter the core content and extended information of each rule into the corresponding database table;

[0012] When there is a new rule update, parse the new rule based on natural language processing technology, extract the content and change scope of the new rule, and update the rule library;

[0013] Based on the joint query function of multiple dimensions, query the corresponding rules according to the function classification and risk level dimensions.

[0014] Preferably, inputting the core content and extended information of each rule into the corresponding database table specifically includes the following content:

[0015] Store the core content in the node table of the database;

[0016] Store the extended information in the rule table and / or distributed file system, and dynamically load it through indexing.

[0017] Preferably, the database table records multiple relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaboration relationships.

[0018] Preferably, automatically parsing the rule text based on natural language processing technology to extract the rule content and its change scope specifically includes the following content:

[0019] Extract the change scope of the rule content by comparing rule hash values.

[0020] Preferably, the joint query function based on multiple dimensions for querying rules according to function classification and risk level dimensions further includes the following steps:

[0021] Use Redis as a memory cache to cache high-frequency query results;

[0022] Based on the full-text retrieval function of Elasticsearch, query rules through keywords.

[0023] One or more embodiments of this specification provide an apparatus for constructing a photovoltaic power station design rule library based on a dynamic multi-dimensional tree, including an initialization module, an input module, an update module, and a query module;

[0024] The initialization module is used to determine dimensions according to the requirements of photovoltaic power station design, construct independent subtrees based on the dimensions, and dynamically associate through cross nodes to design a dynamic multi-dimensional tree data structure;

[0025] The input module is used to input the core content and extended information of each rule into the corresponding database table;

[0026] The update module is used to, when there is a new rule update, parse the new rule based on natural language processing technology, extract the content and change scope of the new rule, and update the rule library;

[0027] The query module is used to query rules according to the function classification and risk level dimensions based on the joint query function of multiple dimensions.

[0028] Preferably, the input module includes a first storage unit and a second storage unit;

[0029] The first storage unit is used to store the core content in the node table;

[0030] The second storage unit is used to store the extended information in the rule table and / or the distributed file system and dynamically load it by reference.

[0031] Preferably, the database table records multiple relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaboration relationships.

[0032] One or more embodiments of this specification provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for constructing a photovoltaic power station design rule base based on a dynamic multi-dimensional tree as described above.

[0033] One or more embodiments of this specification provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the steps of the method for constructing a photovoltaic power station design rule base based on a dynamic multi-dimensional tree as described above.

[0034] The method, device, equipment, and medium for constructing a photovoltaic power station design rule base based on a dynamic multi-dimensional tree provided by this disclosure have the advantages that by determining dimensions according to the requirements of photovoltaic power station design, constructing independent sub-trees based on the dimensions, and dynamically associating through cross nodes, a dynamic multi-dimensional tree data structure is designed, which can dynamically adjust the classification dimensions and levels according to requirements to ensure that the rule base can flexibly adapt to changes; the core content and extended information of each rule are entered into the corresponding database table, which can clearly express the interaction between different rules, effectively solve the problems of rule conflicts and collaborative applications, and ensure the correct execution of design specifications; when there is a new rule update, the new rule is parsed based on natural language processing technology, the new rule content and its change scope are extracted, and the rule base is updated to support automatic addition, update, and change tracking of rules to ensure that the rule base content is always up-to-date and accurate; based on the joint query function of multiple dimensions, the corresponding rules are queried according to the function classification and risk level dimensions, greatly improving the rule retrieval efficiency and supporting fast query and efficient rule matching under complex conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] To more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0036] Figure 1 A schematic flowchart of a method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree provided for one or more embodiments of this specification;

[0037] Figure 2 A schematic structural diagram of a device for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree provided for one or more embodiments of this specification;

[0038] Figure 3 A schematic structural diagram of a computer device provided for one or more embodiments of this specification. Detailed implementation manners

[0039] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will clearly and completely describe the technical solutions in one or more embodiments of this specification in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only some embodiments of this specification, rather than all embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this invention document.

[0040] The following will make a detailed description of the present invention in conjunction with the detailed implementation manners and the drawings of the specification.

[0041] Method embodiment

[0042] According to an embodiment of the present invention, a method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree is provided. As Figure 1 shown, it is a schematic flowchart of the method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree provided for this embodiment. The method for constructing a design rule library of a photovoltaic power station based on a dynamic multi-dimensional tree according to an embodiment of the present invention includes the following steps:

[0043] S110. Determine dimensions according to the requirements of photovoltaic power station design, construct independent subtrees based on the dimensions, and dynamically associate through cross nodes to design a dynamic multi-dimensional tree data structure.

[0044] The dynamic multi-dimensional tree supports hierarchical classification of rules across multiple dimensions. Each dimension can be regarded as an independent subtree, and the dimensions are dynamically associated through cross nodes.

[0045] Multi-dimensional support: Rules can be classified in multiple dimensions, such as functional classification (e.g., electrical, structural) and risk level classification (e.g., high, medium, low risk).

[0046] Cross-dimensional association: Rules in different dimensions are associated through cross nodes to form a rule network.

[0047] Dynamic expansion: The classification levels and the number of nodes in each dimension can be dynamically adjusted as new rules are added or business requirements change.

[0048] Example structure

[0049] Dimension 1 (Functional classification)

[0050] Electrical rules:

[0051] Component wiring

[0052] Inverter configuration

[0053] Structural rules:

[0054] Bracket foundation

[0055] Wind load design

[0056] Dimension 2 (Risk level)

[0057] High risk:

[0058] Wind load design

[0059] Component tilt angle

[0060] Low risk:

[0061] Inverter configuration

[0062] Cross-dimensional association

[0063] The rule "Component wiring" is associated with the rule "Wind load design" through the applicable scenario.

[0064] Data structure design:

[0065] 1. Each node contains the following fields:

[0066] node_id: The unique identifier of the node.

[0067] dimension: The dimension to which the node belongs (e.g., "Functional classification").

[0068] parent_id: The identifier of the parent node.

[0069] rule_id: Identifier for referencing rule content.

[0070] 2. Example (JSON format):

[0071] {

[0072] "node_id":"N1",

[0073] "dimension":"Function classification",

[0074] "parent_id":null,

[0075] "name":"Component inclination rule",

[0076] "rule_id":"R1"

[0077] }

[0078] Data processing method

[0079] 1. Rule data storage

[0080] Use a relational database (MySQL, PostgreSQL) to store rule library data, supporting transaction management and index optimization.

[0081] Store the detailed content of the rules in JSON format to support semi-structured data storage.

[0082] 2. Multi-dimensional classification data processing

[0083] The rule data is stored in the nodes table according to different dimensions (such as function classification, risk level), and each dimension corresponds to a subtree.

[0084] Form a tree structure through the parent_id and classify the attribution through the dimension.

[0085] 3. Cross-dimensional relationship mapping

[0086] Use the cross-index method to establish the relationship between different dimensions.

[0087] The rule_relations table is used to store the dependencies, constraints, conflicts, and collaboration relationships between rules.

[0088] Data transmission method:

[0089] 1. Front-end request data format

[0090] Use HTTP RESTful API or GraphQL for rule query and management, and the data format is JSON.

[0091] Request example:

[0092] {

[0093] "dimension": "Functional classification",

[0094] "category": "Electrical rules",

[0095] "rule_name": "Component wiring"

[0096] }

[0097] 2. Back - end data return format

[0098] The multi - dimensional classification results are returned in the standard JSON format:

[0099] {

[0100] "node_id": "N1",

[0101] "dimension": "Functional classification",

[0102] "parent_id": null,

[0103] "name": "Component wiring",

[0104] "rule_id": "R1",

[0105] "relations":

[0106] {

[0107] "relation_type": "Constraint",

[0108] "related_rule": "Wind load design"

[0109] }

[0111] }

[0112] S120. Enter the core content and extended information of each rule into the corresponding database table. The nodes of the dynamic multi - dimensional tree structure are stored in the database, and the parent node, dimension, and rule information of each node can be dynamically adjusted.

[0113] Database table design:

[0114] CREATE TABLE nodes(

[0115] node_id VARCHAR(50) PRIMARY KEY, ​

[0116] name VARCHAR(100),

[0117] dimension VARCHAR(50),

[0118] parent_id VARCHAR(50),

[0119] rule_id VARCHAR(50),

[0120] FOREIGN KEY(rule_id) REFERENCES rules(rule_id) );

[0122] S130. When there is a new rule update, parse the new rule based on natural language processing technology (Natural Language Processing, NLP). For example, use BERT or GPT to parse the rule text, extract the rule content, applicable scenarios, and constraints, extract the new rule content and its change scope, and judge the rule update based on TF-IDF or similarity calculation, and update the rule base.

[0123] S140. Based on the joint query function of multiple dimensions, query the corresponding rules according to the function classification and risk level dimensions.

[0124] The method provided in this embodiment can determine the dimensions according to the requirements of photovoltaic power station design, construct independent subtrees based on the dimensions, and dynamically associate through cross nodes to design a dynamic multi-dimensional tree data structure, which can dynamically adjust the classification dimensions and levels according to the requirements, ensuring that the rule base can flexibly adapt to changes; enter the core content and extended information of each rule into the corresponding database table, which can clearly express the interaction between different rules, effectively solve the problems of rule conflicts and collaborative applications, and ensure the correct execution of design specifications; when there is a new rule update, parse the new rule based on natural language processing technology, extract the new rule content and its change scope, and update the rule base, supporting automatic addition, update, and change tracking of rules, ensuring that the content of the rule base always remains up-to-date and accurate; based on the joint query function of multiple dimensions, query the corresponding rules according to the function classification and risk level dimensions, greatly improving the rule retrieval efficiency, and supporting fast query and efficient rule matching under complex conditions.

[0125] In one embodiment, entering the core content and extended information of each rule into the corresponding database table specifically includes the following content:

[0126] Store the core content in the node table of the database, including fields such as description, version, applicable_conditions, priority, etc., for quick query.

[0127] Store the extended information in a scalable manner using distributed file storage (such as HDFS, MinIO), store it in the rule table and / or distributed file system, and dynamically load it through indexes.

[0128] Example design

[0129] 1. Rule core content table:

[0130] CREATE TABLE rules(

[0131] rule_id VARCHAR(50) PRIMARY KEY,

[0132] description TEXT,

[0133] version VARCHAR(10),

[0134] applicable_conditions TEXT,

[0135] priority INT );

[0137] 2. Rule core content JSON storage:

[0138] Full-text search: Use Elasticsearch to support keyword queries.

[0139] In the rule content, the priority field is used to represent the priority of the rule. Priority is a measure of the importance or execution order of a rule in certain situations, and is usually used to resolve conflicts between rules or determine the application order of rules. The value of priority is a static attribute used to represent the default importance level of a rule, usually defined by the rule designer according to business requirements when the rule is created.

[0140] The method provided in this embodiment separates the core content and extended information of the rule to support efficient query and flexible expansion.

[0141] In one embodiment, the database table records multiple relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaboration relationships.

[0142] Specifically, the dependency relationship: The application of rule A requires the conditions of rule B to be met.

[0143] Constraint relationship: Rule A restricts the parameters of Rule B.

[0144] Conflict relationship: The contents of Rule A and Rule B are mutually contradictory.

[0145] Collaboration relationship: Multiple rules are combined to achieve a specific goal.

[0146] Data processing method

[0147] 1. Storage of rule relationships

[0148] Use the rule_relations table to store the relationships between rules:

[0149] CREATE TABLE rule_relations(

[0150] relation_id INT PRIMARY KEY,

[0151] rule_id_1 VARCHAR(50),

[0152] rule_id_2 VARCHAR(50),

[0153] relation_type VARCHAR(20),

[0154] priority INT,

[0155] FOREIGN KEY(rule_id_1) REFERENCES rules(rule_id),

[0156] FOREIGN KEY(rule_id_2) REFERENCES rules(rule_id) );

[0158] orelation_type

[0159] Optional values:

[0160] Dependency

[0161] Constraint

[0162] Conflict

[0163] Collaboration

[0164] 2. Data update

[0165] New relationship between rules:

[0166] INSERT INTO rule_relations(relation_id,rule_id_1,rule_id_2,relation_type,priority)

[0167] VALUES(1,'R1001','R1002','Constraint',2);

[0168] Data transfer method

[0169] 1. Add rule relation

[0170] Request:

[0171] {

[0172] "rule_id_1":"R1001",

[0173] "rule_id_2":"R1002",

[0174] "relation_type":"Constraint",

[0175] "priority":2

[0176] }

[0177] Response:

[0178] {

[0179] "message":"Rule relation has been created",

[0180] "relation_id":1

[0181] }

[0182] The method provided in this embodiment can ensure the logical coherence of rule application, avoid conflicts, facilitate the rapid evaluation of impacts when modifying, adding, and deleting rules, improve the efficiency of rule library maintenance, support accurate query of associated rules, adapt to complex design scenarios, and enhance the accuracy of rule application.

[0183] In one embodiment, the rule text is automatically parsed based on natural language processing technology to extract the rule content and its change scope, which specifically includes the following content:

[0184] Extract the change scope of the rule content by comparing rule hash values.

[0185] Rule version management:

[0186] Use the version field for version control, and use created_at and updated_at to record the change time.

[0187] Determine whether an update is needed by calculating the change of the rule text using the MD5 hash.

[0188] Version backtracking uses a timestamp indexing method to support querying of historical versions.

[0189] Data transfer method:

[0190] 1. New rule

[0191] Example of a front-end POST request:

[0192] {

[0193] "rule_id":"R1001",

[0194] "description":"The component inclination angle should be between 20° and 30°.",

[0195] "version":"v1.0",

[0196] "applicable_conditions":["Ground photovoltaic power station"],

[0197] "priority":1

[0198] }

[0199] SQL for inserting into the backend database:

[0200] INSERT INTO rules(rule_id,description,version,applicable_conditions,priority)

[0201] VALUES('R1001','The component inclination angle should be between 20° and 30°.','v1.0','Ground photovoltaic power station',1);

[0202] 2. Rule query

[0203] Request:

[0204] {

[0205] "rule_id":"R1001"

[0206] }

[0207] Response:

[0208] {

[0209] "rule_id":"R1001",

[0210] "description": "The inclination angle of the component should be between 20° and 30°.",

[0211] "version": "v1.0",

[0212] "applicable_conditions": ["Ground-mounted PV power station"],

[0213] "priority": 1

[0214] }

[0215] Data processing method:

[0216] 1. Natural Language Processing (NLP)

[0217] Use BERT or GPT to parse the rule text and extract rule content, applicable scenarios, and constraints.

[0218] Rule change detection: Based on TF-IDF or similarity calculation to judge rule updates.

[0219] 2. Automatic update

[0220] Calculate the hash value of the rule text:

[0221] import hashlib

[0222] def generate_hash(text):

[0223] return hashlib.md5(text.encode()).hexdigest()

[0224] Judge whether it is new or updated:

[0225] def update_rule_database(rule_text):

[0226] rule_hash = generate_hash(rule_text)

[0227] if is_new_rule(rule_hash):

[0228] add_rule_to_database(rule_text)

[0229] else:

[0230] update_existing_rule(rule_text)

[0231] Data transmission method:

[0232] 1. Automatic parsing rule

[0233] Request:

[0234] {

[0235] "rule_text": "The component inclination angle should be between 20° and 30°.",

[0236] "version": "v1.1"

[0237] }

[0238] Response:

[0239] {

[0240] "message": "The rule has been updated",

[0241] "updated_fields": ["version", "description"]

[0242] }

[0243] The method provided in this embodiment uses natural language processing technology to automatically parse the rule text, accurately extract the rule content and its change range. Specifically, by comparing the rule hash values, the change range of the rule content can be efficiently and accurately identified, realizing intelligent analysis and change monitoring of the rule text, improving the processing efficiency and accuracy, and providing strong data support for relevant business processes.

[0244] In one embodiment, based on the joint query function of multiple dimensions, querying rules according to the function classification and risk level dimensions further includes the following steps:

[0245] Support joint query based on multiple dimensions (such as function classification, risk level), use Redis as the in-memory cache, and cache the high-frequency query results.

[0246] Based on the full-text retrieval function of Elasticsearch, query rules through keywords.

[0247] Data processing method:

[0248] 1. Multi-dimensional index optimization

[0249] Adopt

[0250] B+ tree index

[0251] Improve query efficiency:

[0252] CREATE INDEX idx_dimension ON nodes(dimension);

[0253] Use

[0254] Redis

[0255] to perform high-frequency query caching:

[0256] import redis

[0257] r = redis.Redis(host='localhost', port=6379, db=0)

[0258] r.set('rule_R1001', 'The component inclination angle should be between 20° and 30°.')

[0259] 2. Full-text search

[0260] Adopt

[0261] Elasticsearch

[0262] to provide keyword query:

[0263] {

[0264] "query": {

[0265] "match": {

[0266] "description": "Component inclination angle"

[0267] }

[0268] }

[0269] }

[0270] Data transmission method

[0271] 1. Caching query

[0272] Request:

[0273] {

[0274] "query": "Component inclination angle"

[0275] }

[0276] Response:

[0277] {

[0278] "rule_id": "R1001",

[0279] "description": "The inclination angle of the component should be between 20° and 30°."

[0280] }

[0281] The method provided in this embodiment, based on the multi-dimensional joint query of function classification and risk level, can meet the accurate positioning requirements of rules in complex business scenarios. By using Redis to cache high-frequency query results, it greatly improves the query speed, reduces the response time, and relieves the database pressure. At the same time, with the help of the full-text search of Elasticsearch, users can conveniently query rules through keywords, which greatly improves the flexibility and efficiency of querying and optimizes the rule query experience in all aspects.

[0282] The following is further illustrated through specific implementation cases:

[0283] Embodiment 1: Multi-dimensional Classification and Rule Query

[0284] Background:

[0285] The design rules of a photovoltaic power station often cover multiple dimensions, such as function classification, risk level, etc. The traditional tree structure is difficult to meet the management requirements of multi-dimensional classification and complex relationships between rules. In this embodiment, a rule base is constructed through a dynamic multi-dimensional tree model, which supports multi-dimensional classification, dynamic expansion, and efficient query.

[0286] Technical implementation:

[0287] 1. Dynamic multi-dimensional tree structure

[0288] A rule base structure for multi-dimensional classification is designed, where each dimension represents an independent subtree. For example, the function classification dimension includes "electrical rules" and "structural rules", and the risk level dimension includes "high risk" and "low risk". The rules of these two dimensions are associated through cross nodes to form a multi-dimensional rule network.

[0289] 2. Rule content storage

[0290] The database is used to store rule node information. Each node contains a unique node identifier, the dimension it belongs to, the parent node identifier, and the referenced rule ID. The core content of the rule is stored in the rule table, and the relevant rule is retrieved by querying the rule ID.

[0291] 3. Query example:

[0292] If a user wants to query the rules with "function classification" being "electrical rules" and "risk level" being "low risk", they can use the following query statement for retrieval:

[0293] SELECT*FROM nodes

[0294] WHERE dimension = 'Functional Classification' AND name LIKE '%Electrical%'

[0295] AND node_id IN (SELECT node_id FROM nodes WHERE dimension = 'Risk Level' AND name LIKE '%Low Risk%');

[0296] The system supports this multi - dimensional joint query through a dynamic multi - dimensional tree model and returns the rules that meet the conditions.

[0297] Application Scenario:

[0298] Designers can quickly retrieve relevant design rules based on specific functions and risk levels, avoiding the cumbersome rule tables in manual searches.

[0299] During the design process, the system automatically recommends applicable rules according to the risk level, improving work efficiency and safety.

[0300] Example 2: Management of Complex Relationships between Rules

[0301] Background:

[0302] There are often complex relationships such as dependencies, constraints, and conflicts among the rules in the design of photovoltaic power stations. This example solves this problem through a dynamic multi - dimensional tree structure combined with the management of complex relationships between rules.

[0303] Technical Implementation:

[0304] 1. Management of Relationships between Rules

[0305] To handle relationships such as dependencies, constraints, and conflicts between rules, a rule relationship table is designed. This table records various relationship types between rules, including "dependency", "constraint", "conflict", and "synergy".

[0306] 2. Relationship Examples:

[0307] Rule A "Component Wiring" depends on Rule B "Inverter Configuration".

[0308] Rule C "Wind Load Design" conflicts with Rule D "Foundation Embedment Depth".

[0309] CREATE TABLE rule_relations(

[0310] relation_id INT PRIMARY KEY,

[0311] rule_id_1 VARCHAR(50),

[0312] rule_id_2 VARCHAR(50),

[0313] relation_type VARCHAR(20), -- Dependency, constraint, conflict, collaboration

[0314] priority INT,

[0315] FOREIGN KEY(rule_id_1) REFERENCES rules(rule_id),

[0316] FOREIGN KEY(rule_id_2) REFERENCES rules(rule_id) );

[0318] 3. Example of querying relationships:

[0319] Query the conflict relationship between "wind load design" and "foundation embedment depth":

[0320] SELECT * FROM rule_relations

[0321] WHERE rule_id_1 = 'R1' AND rule_id_2 = 'R2' AND relation_type = 'conflict';

[0322] Application scenario:

[0323] When determining rules, designers can automatically identify dependencies, conflicts, and other relationships between rules to avoid design conflicts.

[0324] The system automatically recommends solutions to conflicting rules based on the priority of the rules, improving the accuracy and reliability of the design.

[0325] Example 3: Dynamic update and automatic semantic parsing of rules

[0326] Background:

[0327] With the continuous update of photovoltaic power station design standards and technologies, the rule base needs to support the dynamic update and semantic parsing of rules. In this example, natural language processing (NLP) technology is used to automatically parse and update the rules to ensure that the rule base always remains up-to-date.

[0328] Technical implementation:

[0329] 1. Rule parsing and update

[0330] Use natural language processing technology to parse the rule text and extract the core content and scope of application of the rule. By comparing the hash value (such as MD5) of the rule, the system determines whether the rule is a new rule. If so, it adds it to the rule database; if there is an existing identical rule, it updates the rule content by comparing the text.

[0331] def update_rule_database(rule_text):

[0332] rule_hash = generate_hash(rule_text)

[0333] if is_new_rule(rule_hash):

[0334] add_rule_to_database(rule_text)

[0335] else:

[0336] update_existing_rule(rule_text)

[0337] 2. Rule version control:

[0338] Set a version number for each rule and store the historical versions. When the rule is updated, the system automatically records the version changes of the rule and provides a version backtracking function, allowing users to view the historical versions of the rule.

[0339] Application scenarios:

[0340] When laws, regulations, and standards change, the system can automatically parse and update the rule database without manual intervention.

[0341] Users can conveniently query the historical rule versions applicable to a certain design solution to ensure that the design meets the latest specification requirements.

[0342] Example 4: Efficient query and caching mechanism

[0343] Background:

[0344] The photovoltaic power station design rule database may contain thousands of rules, and the query efficiency is crucial for the performance of the system. In this example, by introducing a caching mechanism and full-text retrieval technology, the query performance of the rule database is optimized.

[0345] Technical implementation:

[0346] 1. Caching mechanism

[0347] Use in-memory caching (such as Redis) to cache the results of frequently queried data to reduce the database query pressure and improve the query response speed.

[0348] 2. Full - text retrieval

[0349] Use Elasticsearch to perform full - text indexing on the rule content, support retrieval based on keywords, and further improve the query efficiency.

[0350] 3. Query example:

[0351] Search for relevant rules in the rule base by the keyword "tilt angle":

[0352] # Use Elasticsearch for full - text retrieval

[0353]

[0354] Application scenarios:

[0355] Designers can quickly find relevant design rules through keywords, improving work efficiency.

[0356] The system can quickly respond to large - scale query requests, ensuring good performance even in the case of a large amount of data.

[0357] Device embodiments

[0358] According to an embodiment of the present invention, there is provided a device for constructing a design rule base of a photovoltaic power station based on a dynamic multi - dimensional tree, as Figure 2 shown, which is a structural schematic diagram of the device for constructing a design rule base of a photovoltaic power station based on a dynamic multi - dimensional tree provided in this embodiment. The device for constructing a design rule base of a photovoltaic power station based on a dynamic multi - dimensional tree according to an embodiment of the present invention includes an initialization module 21, an input module 22, an update module 23, and a query module 24.

[0359] The initialization module 21 is used to determine dimensions according to the requirements of photovoltaic power station design, construct independent sub - trees based on the dimensions, and dynamically associate through cross - nodes to design a dynamic multi - dimensional tree data structure.

[0360] The input module 22 is used to input the core content and extended information of each rule into the corresponding database table.

[0361] The update module 23 is used to, when there is a new rule update, parse the new rule based on natural language processing technology, extract the content of the new rule and its change range, and update the rule base.

[0362] The query module 24 is used to, based on the joint query function of multiple dimensions, query rules according to the function classification and risk level dimensions.

[0363] The device provided in this embodiment determines dimensions according to the requirements of photovoltaic power station design through the initialization module 21, constructs independent subtrees based on the dimensions, and dynamically associates them through cross nodes to design a dynamic multi-dimensional tree data structure, which can dynamically adjust classification dimensions and levels according to requirements to ensure that the rule base can flexibly adapt to changes; the input module 22 inputs the core content and extended information of each rule into the corresponding database table, which can clearly express the interaction between different rules, effectively solve the problems of rule conflicts and collaborative applications, and ensure the correct execution of design specifications; when there is a new rule update, the update module 23 parses the new rule based on natural language processing technology, extracts the content of the new rule and its change range, and updates the rule base to support automatic addition, update, and change tracking of rules, ensuring that the content of the rule base always remains up-to-date and accurate; the query module 24, based on the combined query function of multiple dimensions, queries the corresponding rules according to the function classification and risk level dimensions, greatly improving the rule retrieval efficiency and supporting fast query and efficient rule matching under complex conditions.

[0364] In one embodiment, the input module 22 includes a first storage unit and a second storage unit;

[0365] The first storage unit is used to store the core content in the node table;

[0366] The second storage unit is used to store the extended information in the rule table and / or the distributed file system and dynamically load it by reference.

[0367] The device provided in this embodiment stores the core content and extended information of the rules separately to support efficient query and flexible expansion.

[0368] In one embodiment, the database table records multiple relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaborative relationships.

[0369] The device provided in this embodiment can ensure the logical coherence of rule application, avoid conflicts, facilitate rapid evaluation of the impact when modifying, adding, and deleting rules, improve the maintenance efficiency of the rule base, and at the same time support accurate query of associated rules, adapt to complex design scenarios, and enhance the accuracy of rule application.

[0370] The embodiment of the present invention is a device embodiment corresponding to the above method embodiment. The specific operations of each module processing step can be understood with reference to the description of the method embodiment and will not be elaborated here.

[0371] Such as Figure 3As shown, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the method of constructing a design rule library for a photovoltaic power station based on a dynamic multi-dimensional tree in the above embodiments, or when the computer program is executed by a processor, it implements the method of constructing a design rule library for a photovoltaic power station based on a dynamic multi-dimensional tree in the above embodiments.

[0372] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or an external cache. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0373] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. The relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0374] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present invention, and the content not described in detail in the specification of the present invention belongs to the well-known technology of those skilled in the art.

Claims

1. A method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree, characterized in that: The following steps are involved: Determine the dimensions according to the requirements of photovoltaic power station design, build independent subtrees based on the dimensions, and design a dynamic multi-dimensional tree data structure through dynamic association of cross nodes; Enter the core content and extended information of each rule into the corresponding database table; When there are new rule updates, the new rules are parsed based on natural language processing technology, the new rule content and its change scope are extracted, and the rule base is updated; Based on the joint query function of multiple dimensions, the corresponding rules are queried according to the functional classification and risk level dimensions.

2. The method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 1, characterized in that: The core content and extended information of each rule are entered into the corresponding database table, specifically including the following contents: Storing the core content in a node table of a database; The extended information is stored in a rule table and / or a distributed file system and loaded dynamically through an index.

3. The method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 1, characterized in that: The database table records various relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaborative relationships.

4. The method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 1, characterized in that: The new rules are parsed based on natural language processing technology to extract the new rule content and its change range. Includes the following: Extract the change scope of the rule content by comparing the rule hash values.

5. The method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 1, characterized in that: The joint query function based on multiple dimensions, according to the query rules of function classification and risk level dimensions, also includes the following steps: Use Redis as memory cache to cache high-frequency query results; Based on the full-text search function of Elasticsearch, the rules are searched by keywords.

6. A device for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree, characterized in that: It includes initialization module, input module, update module and query module; The initialization module is used to determine the dimension according to the requirements of the photovoltaic power station design, construct an independent subtree based on the dimension, and design a dynamic multidimensional tree data structure through dynamic association of cross nodes; The entry module is used to enter the core content and extended information of each rule into the corresponding database table; The update module is used to parse the new rules based on natural language processing technology when there are new rule updates, extract the new rule content and its change scope, and update the rule base; The query module is used for joint query functions based on multiple dimensions and query rules according to functional classification and risk level dimensions.

7. The device for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 6, characterized in that: The input module includes a first storage unit and a second storage unit; The first storage unit is used to store the core content in a node table; The second storage unit is used to store the extended information in a rule table and / or a distributed file system, and dynamically load it by reference.

8. The device for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree according to claim 6, characterized in that: The database table records various relationship types supported between rules, including dependency relationships, constraint relationships, conflict relationships, and collaborative relationships.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree as described in any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a photovoltaic power station design rule base based on a dynamic multidimensional tree as claimed in any one of claims 1 to 5 are implemented.