A large building group lighting scheduling method, medium and system
By constructing a historical database of lighting scheduling for large building complexes and using a finely tuned large language model to generate lighting scheduling plans, the problems of low efficiency and omissions in lighting scheduling for large building complexes are solved, and efficient and accurate lighting scheme generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTR EIGHTH BUREAU DEV & CONSTR CO LTD
- Filing Date
- 2023-07-31
- Publication Date
- 2026-07-14
Smart Images

Figure CN116976615B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of lighting scheduling technology, and more specifically, relates to a method, medium, and system for lighting scheduling of large building complexes. Background Technology
[0002] An architectural complex is a group of individual or connected buildings that possess outstanding universal value from a historical, artistic, or scientific perspective in terms of architectural style, uniform distribution, or integration with the surrounding landscape. Based on their size and complexity, architectural complexes can be categorized as large, medium, and small. Common examples of large architectural complexes include industrial parks, large shopping malls, and large amusement parks. Large architectural complexes have both daily lighting needs and temporary event lighting needs, requiring frequent adjustments to the lighting schedule based on these varying requirements. For daily lighting needs, different areas have different lighting requirements and require different light intensities. The required lighting intensity differs between working hours or low-traffic periods and non-working hours or low-traffic periods, necessitating regular adjustments by professional staff—a repetitive and inefficient process that wastes time. For temporary event lighting needs, professional staff need to be arranged to schedule the lighting for each event. Different events have different requirements for the color temperature, brightness and color combination of the lights, so scheduling tests need to be conducted several days in advance. This is time-consuming and labor-intensive. Moreover, this scheduling is often temporary and requires manual judgment each time. The consideration may not be complete and oversights often occur, which can easily cause chaos and affect the normal progress of the event. Summary of the Invention
[0003] In view of this, the present invention provides a method, medium and system for lighting scheduling of large building complexes, which can solve the problem of oversight caused by human judgment in the daily lighting scheduling of existing large building complexes, which requires the arrangement of professional personnel to schedule the lighting.
[0004] This invention is implemented as follows:
[0005] A first aspect of the present invention provides a method for lighting scheduling in a large building complex, comprising the following steps:
[0006] S10. Construct a historical database for lighting scheduling of large building complexes, including historical scheduling texts and historical scheduling records. The historical scheduling texts are usage records for different areas within the large building complex, including usage area, time, and weather. The historical scheduling records are lighting scheduling plans for the large building complex corresponding to the historical scheduling texts, including the on-time, off-time, brightness, color, and direction of each lighting device.
[0007] S20. Obtain daily lighting information and activity information for the scheduled time period. The daily lighting information is the usage record of each lighting device within the large building complex, including the on-time, off-time, brightness, color, and direction. The activity information for the scheduled time period is the usage date, usage duration, and activity category of the usage area submitted by each unit within the large building complex.
[0008] S30. The activity information of the time period to be scheduled is extracted using the fine-tuned large language model to obtain the basic lighting scheduling requirements of the time period to be scheduled.
[0009] S40. Adjust the basic lighting scheduling requirements of the area to be scheduled within the scheduled time period based on the daily lighting information to obtain the lighting scheduling requirements for the scheduled time period.
[0010] S50. The lighting scheduling demand for the obtained time period to be scheduled is matched with the historical lighting scheduling database of the large building complex to obtain multiple data with the highest matching degree and aggregate them into a reference lighting scheduling plan.
[0011] S60. Based on the time period to be scheduled and the weather, revise the obtained reference lighting scheduling plan to obtain the lighting scheduling plan and send it to the lighting scheduling personnel.
[0012] The usage area is a lighting area used for large-scale events;
[0013] By following the steps above, the workload of operators can be reduced, time for lighting scheduling and planning can be saved, and oversights by operators during operation can be avoided, thereby improving work quality and efficiency.
[0014] Based on the above technical solution, the lighting scheduling method for large building complexes of the present invention can be further improved as follows:
[0015] The step of constructing a historical database for lighting scheduling of large building complexes includes a step of cleaning historical scheduling text, specifically:
[0016] The historical scheduling text is preprocessed to remove non-text information, including at least one or more of the following: HTML tags, data tables, special characters, whitespace characters, and images.
[0017] The historical scheduling text is converted into UTF8 format, and the converted historical scheduling text is segmented to obtain words, phrases or other tags;
[0018] Stem extraction is used to convert the words into their basic form, and word form restoration is used to restore the words to their original word form;
[0019] Check the historical scheduling text for noise and duplicate content, remove the noise and duplicate content, and standardize the vocabulary.
[0020] Regular expressions were used to clean the historical scheduling text, searching for and replacing strings with specific patterns to standardize the text. This cleaning step aims to make the historical scheduling text data cleaner and more standardized by removing useless information, correcting errors and noise, distinguishing between keywords that do not require lighting scheduling and those that do, thus improving data quality, reducing the impact of noise, and ensuring data consistency. Cleaning removes semantic duplicates, deletes stop words, and other operations to obtain the target historical text data, and identifies keywords that do not require lighting scheduling and those that do.
[0021] The step of extracting activity information for the time period to be scheduled using a fine-tuned large language model to obtain the basic lighting scheduling requirements for the time period specifically includes:
[0022] Construct a fine-tuning dataset and convert the format of the fine-tuning dataset to a format suitable for fine-tuning.
[0023] Constructing a pre-trained model includes defining task-specific layers, defining optimizers, and loss functions on the pre-trained model;
[0024] Obtain the pre-set hyperparameters of the pre-trained model, including batch size, learning rate, and number of training arguments; train the pre-trained model using the number of training arguments; and monitor the training loss and performance metrics.
[0025] The pre-trained model is tuned, including adjusting the hyperparameters, increasing the diversity of the fine-tuning dataset, evaluating the fine-tuned model, and obtaining the fine-tuned large language model.
[0026] At the start of fine-tuning, the parameters of the pre-trained model are used as initial parameters to preserve the general semantic knowledge the model has learned on large-scale pre-training data. Then, a subset of the pre-trained model's layers can be frozen, meaning their parameters are not updated, to prevent overfitting and speed up the training process.
[0027] Fine-tuning yields a large language model, which improves the performance of the pre-trained model, adapts to the basic lighting scheduling needs of the scheduled time period, achieves good results in scenarios with few samples in the historical lighting scheduling database of large building complexes, and adapts to the lighting scheduling needs of large building complexes. Supervised learning is used to fine-tune the model parameters of the large language model, making the model better adaptable to lighting scheduling requirements.
[0028] Furthermore, the specific steps of constructing the fine-tuning dataset and converting the format of the fine-tuning dataset to a format suitable for fine-tuning include:
[0029] Collect raw data, including historical scheduling text and historical scheduling records, and clean the raw data;
[0030] Label and annotate the samples in the fine-tuning dataset;
[0031] Based on the annotations and notes in the dataset, the dataset is hierarchically divided into a training set, a validation set, and a test set. The training set is used for training the model, the validation set is used for adjusting the model's hyperparameters and selecting a model, and the test set is used for evaluating the model's performance.
[0032] Convert the fine-tuned dataset to the appropriate format, including at least one or more of the following: TFRecord, HDF5, CSV, and JSON.
[0033] The fine-tuning dataset is the activity information of the time period to be scheduled, used to train the pre-trained model, including the input text for the question that the model is expected to answer and the expected answer text; the above steps can ensure that the dataset can be efficiently loaded and used during the model training process.
[0034] Furthermore, the construction of the pre-trained model also includes alignment, specifically the following steps:
[0035] The parameters of the pre-trained model are initialized, including pre-training initialization;
[0036] Alignment algorithms are selected based on the pre-trained model, including rule-based alignment, word similarity-based alignment, and sentence-level alignment.
[0037] Run the alignment algorithm to match and correspond the text to be aligned;
[0038] The alignment results are evaluated, including precision, recall, and F1 score.
[0039] Suitable formats for fine-tuning include: dialogue format and question-answer pair format. In the dialogue format, each sample includes a question and a corresponding answer; in the question-answer pair format, each sample includes a question and one or more correct answers. The samples refer to the training samples used in the pre-trained model. The text to be aligned is the input text and response text in the pre-trained model, and the F1 score represents the evaluation metric.
[0040] The step of adjusting the basic lighting scheduling requirements of the area to be scheduled based on daily lighting information to obtain the lighting scheduling requirements for the time period specifically includes:
[0041] The basic lighting scheduling requirements of the usage area during the scheduling period are imported as input text into the fine-tuned large language model.
[0042] Extract daily lighting information and activity information for the time period to be scheduled from the historical database, and match them with the basic lighting scheduling needs of the area to be used during the time period to be scheduled.
[0043] Modify the information in the basic lighting scheduling requirements of the usage area within the time period to be scheduled, and conduct simulation analysis;
[0044] Output the lighting scheduling requirements for the time period to be scheduled.
[0045] Through the above steps, the basic lighting scheduling needs of the usage area during the scheduling period are matched with daily lighting information and activity information during the scheduling period. It is then determined whether there is a conflict. If a conflict occurs, the information in the lighting scheduling needs during the scheduling period is modified so that the lighting scheduling needs during the scheduling period can be met. This reduces labor costs, avoids conflicts in the lighting scheduling needs of the usage area during the scheduling period, and improves the efficiency of lighting scheduling.
[0046] The step of matching the lighting scheduling demand for the obtained scheduling time period with the historical lighting scheduling database of the large building complex to obtain multiple data with the highest matching degree and aggregating them into a reference lighting scheduling plan specifically includes:
[0047] Extract features related to lighting scheduling from lighting scheduling demand data and historical databases for the time period to be scheduled;
[0048] The similarity between the lighting scheduling needs of the time period to be scheduled and the data in the historical lighting scheduling database of large building complexes is measured.
[0049] Calculate the similarity between the demand for the time period to be scheduled and the historical scheduling data, and sort the similarity from high to low;
[0050] Select the highest matching historical scheduling data as references, and aggregate the selected historical scheduling data to form a reference lighting scheduling plan;
[0051] The reference lighting scheduling plan is evaluated and adjusted, and then adjusted and optimized based on the evaluation results.
[0052] The features include time, usage area, weather, and text for each lighting device's on / off time, brightness, color, and direction. By extracting features related to lighting scheduling from lighting scheduling demand data for the time period to be scheduled and historical databases, it is ensured that the extracted features have consistent dimensions and ranges across different datasets.
[0053] The similarity metric includes at least one of Euclidean distance, cosine similarity, and Manhattan distance;
[0054] The aggregation methods include simple mean and weighted average, which merge multiple scheduling records that meet similarity requirements into a reference plan.
[0055] The step of revising the obtained reference lighting scheduling plan based on the time period to be scheduled and the weather to obtain the lighting scheduling plan specifically includes:
[0056] Obtain the specific time information for the time period to be scheduled, including the start and end times;
[0057] Obtain weather information for the time period to be scheduled, including light intensity, temperature, and humidity;
[0058] Based on the weather information for the time period to be scheduled, the lighting demand for different time periods is calculated using the photometric method.
[0059] Based on the obtained reference lighting scheduling plan, the lighting scheduling plan is optimized.
[0060] The calculation methods for determining lighting demand in different time periods include at least one or more of the following: photometric method, weather model, and historical data analysis.
[0061] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, which, when executed, are used to perform the above-described method for lighting scheduling of a large building complex.
[0062] A third aspect of the present invention provides a lighting control system for a large building complex, comprising the aforementioned computer-readable storage medium.
[0063] Compared with existing technologies, the beneficial effects of the lighting scheduling method, medium, and system for large building complexes provided by this invention are as follows: A historical database of lighting scheduling for large building complexes is constructed; daily lighting information and activity information for the time period to be scheduled are obtained; the activity information for the time period to be scheduled is extracted using a fine-tuned large language model to obtain the basic lighting scheduling requirements for the time period; the basic lighting scheduling requirements of the usage area within the time period to be scheduled are adjusted based on the daily lighting information to obtain the lighting scheduling requirements for the time period to be scheduled; the obtained lighting scheduling requirements for the time period to be scheduled are matched with the historical database of lighting scheduling for large building complexes to obtain multiple data with the highest matching degree and aggregated into a reference lighting scheduling plan; the obtained reference lighting scheduling plan is corrected based on the time and weather of the time period to be scheduled to obtain a lighting scheduling plan and sent to lighting scheduling personnel; through the above steps, historical data can be called using a large language model, saving time, improving efficiency, eliminating the need for manual judgment, and reducing the possibility of human judgment errors. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 A flowchart for lighting scheduling methods for large building complexes. Detailed Implementation
[0066] like Figure 1 The illustration shows an embodiment of a lighting scheduling method for a large building complex provided by the first aspect of the present invention. This embodiment includes the following steps:
[0067] S10. Construct a historical database of lighting scheduling for large building complexes, including historical scheduling texts and historical scheduling records. The historical scheduling texts are usage records for different areas within the large building complex, including the area of use, time, and weather. The historical scheduling records are the lighting scheduling plans for the large building complex corresponding to the historical scheduling texts, including the on-time, off-time, brightness, color, and direction of each lighting device.
[0068] S20. Obtain daily lighting information and activity information for the scheduled time period. Daily lighting information is the usage record of each lighting device in the large building complex, including the on time, off time, brightness, color and direction. Activity information for the scheduled time period is the usage date, usage duration and activity category of the area submitted by each unit in the large building complex.
[0069] S30. The activity information of the time period to be scheduled is extracted using the fine-tuned large language model to obtain the basic lighting scheduling requirements of the time period to be scheduled.
[0070] S40. Adjust the basic lighting scheduling requirements of the area to be scheduled based on the daily lighting information to obtain the lighting scheduling requirements for the time period to be scheduled.
[0071] S50. Match the lighting scheduling demand for the time period to be scheduled with the historical database of lighting scheduling of large building complexes to obtain multiple data with the highest matching degree and aggregate them into a reference lighting scheduling plan.
[0072] S60. Based on the time period to be scheduled and the weather, revise the obtained reference lighting scheduling plan to obtain the lighting scheduling plan and send it to the lighting scheduling personnel.
[0073] The area of use can be a building, room, or stage, etc.; the weather includes information such as temperature, humidity, and light intensity; the type of activity can be daily office work, weekly meetings, annual meetings, etc.
[0074] In the aforementioned technical solution, the step of constructing a historical database for lighting scheduling of large building complexes includes a step of cleaning historical scheduling text, specifically:
[0075] Preprocess the historical scheduling text to remove non-text information, including at least one or more of the following: HTML tags, data tables, special characters, whitespace characters, and images.
[0076] Convert the historical scheduling text to UTF8 format, and then segment the converted historical scheduling text to obtain words, phrases, or other tags;
[0077] Stem extraction is used to convert words into their basic form, and word form restoration is used to restore words to their original word form;
[0078] Check historical scheduling texts for noise and duplicate content, remove noise and duplicate content, and standardize vocabulary.
[0079] Keywords for lighting that does not require scheduling include: lighting system off, natural light, external light, energy-saving mode, daytime, and no manual operation required. For example, in an outdoor environment, if it is daytime and there is sufficient light, lighting scheduling is not needed. Keywords for lighting that requires scheduling include low light, timed scheduling, usage area, dynamic dimming, remote control scheduling, and lighting needs. For example, whether lighting scheduling is needed is determined based on the intensity of light in the environment; if the light is low, lighting scheduling is required. This specifies that the lighting system should be scheduled for a specific time period, such as automatically turning on the lights every night and automatically turning them off in the morning.
[0080] Preprocess the historical scheduling text to remove non-textual information, noise, and duplicate content. This step can be done using text cleaning tools, such as the nltk or spaCy libraries in Python. Preprocessing the historical scheduling text reduces the difficulty and error rate of subsequent processing.
[0081] Converting historical scheduling text to UTF-8 format can be achieved using Python's `open()` and `encode()` functions. UTF-8 is a commonly used text encoding method that ensures compatibility when transmitting data between different languages.
[0082] Stemming is used to transform historical scheduling text into a basic form, and a dictionary and rules are used to extract all words from the historical scheduling text. Stemming can group similar words into the same category, thereby reducing the difficulty and error rate of subsequent processing.
[0083] Check the historical scheduling text for noise and duplicate content, and remove the noise and duplicates. This step can be achieved using string manipulation functions in Python. For example, regular expressions can be used to match and remove noise and duplicate content from the historical scheduling text.
[0084] The historical scheduling text is converted into a unified vocabulary. This step can be implemented using dictionaries in Python. By analyzing and processing the historical scheduling text, it can be transformed into a unified vocabulary, thereby improving the efficiency of subsequent analysis and processing. In summary, the above details the steps for constructing a large-scale architectural lighting scheduling historical database. Through these steps, the historical scheduling text can be cleaned and preprocessed, thereby improving the efficiency and accuracy of subsequent analysis and processing.
[0085] In the above technical solution, the step of extracting activity information for the time period to be scheduled using a fine-tuned large language model to obtain the basic lighting scheduling requirements for the time period specifically includes:
[0086] Build a fine-tuning dataset and convert the format of the fine-tuning dataset to a format suitable for fine-tuning;
[0087] Building a pre-trained model includes defining task-specific layers, optimizing the optimizer, and defining the loss function on the pre-trained model;
[0088] Obtain the pre-set hyperparameters of the pre-trained model, including batch size, learning rate, and number of training arguments; train the pre-trained model using the number of training arguments; and monitor the training loss and performance metrics.
[0089] The pre-trained model is tuned, including adjusting hyperparameters, increasing the diversity of the fine-tuning dataset, and evaluating the fine-tuned model to obtain the fine-tuned large language model.
[0090] First, it is necessary to extract the activity information for the time period to be scheduled and construct a fine-tuning dataset. Specifically, natural language processing techniques can be used to preprocess the raw data, such as text classification and named entity recognition, to extract information such as usage area, time, and weather, and then convert it into a format suitable for fine-tuning, such as dialogue format or question-answer pair format.
[0091] After obtaining the fine-tuning dataset, a pre-trained model needs to be built. This pre-trained model can be used as a base model and fine-tuned to adapt to the requirements of the scheduled time period. Specifically, transfer learning can be employed to apply the feature extraction and representation methods already learned in the pre-trained model to the task, and then fine-tuning can be performed on this basis.
[0092] After obtaining the pre-trained model, it needs to be converted into a format suitable for the diverse tasks scheduled for the time period. Specifically, parameters such as weights and biases in the pre-trained model can be converted into the corresponding format and then called using a custom API or library.
[0093] When building a fine-tuned large language model, it is necessary to set the appropriate optimizer and loss function. Specifically, common optimizers such as gradient descent and Adam optimizer can be used, and appropriate parameters such as learning rate and loss function can be set.
[0094] After obtaining the optimizer and loss function, the fine-tuned large language model can be used to train on the activity information of the time period to be scheduled. Specifically, the pre-trained model can be used as a supervised learning task, and supervised learning can be performed using the fine-tuned dataset. During training, it is necessary to set the corresponding hyperparameters, optimizer, and loss function, and adjust and optimize them.
[0095] After fine-tuning, the refined large language model can be used to perform diverse tasks. Specifically, generative models, transformers, and other techniques can be employed to generate and transform tasks to meet different needs.
[0096] Finally, the fine-tuned large language model needs to be debugged and evaluated. Specifically, custom APIs or libraries can be used to debug and evaluate the fine-tuned large language model, and necessary optimizations and improvements can be made based on the evaluation results.
[0097] Furthermore, in the above technical solution, the specific steps of constructing the fine-tuning dataset and converting the format of the fine-tuning dataset to a format suitable for fine-tuning include:
[0098] Collect raw data, including historical scheduling texts and records, and clean the raw data;
[0099] Label and annotate the samples in the fine-tuning dataset;
[0100] Based on the annotations and notes in the dataset, the dataset is hierarchically divided into a training set, a validation set, and a test set. The training set is used for training the model, the validation set is used for adjusting the model's hyperparameters and selecting a model, and the test set is used for evaluating the model's performance.
[0101] Convert the fine-tuned dataset to the appropriate format, including at least one or more of the following: TFRecord, HDF5, CSV, and JSON.
[0102] The raw data includes text documents, image files, audio recordings, or other relevant data; necessary cleaning and preparation of the raw data includes noise removal, standardization of format, and uniform labeling or annotation; the fine-tuned dataset samples are labeled and annotated, including assigning classification labels to text, providing bounding boxes or image-level labels for images, and adding transcribed text to audio.
[0103] Furthermore, in the above technical solution, the construction of the pre-trained model also includes alignment, specifically the following steps:
[0104] Initialize the parameters of the pre-trained model, including pre-training initialization;
[0105] Alignment algorithms are selected based on pre-trained models, including rule-based alignment, word similarity-based alignment, and sentence-level alignment.
[0106] Run the alignment algorithm to match and correspond the text to be aligned;
[0107] The alignment results are evaluated, including precision, recall, and F1 score.
[0108] Pre-training initialization, specifically, involves wrapping each Tensor in PyTorch with Varialbl, which includes interfaces such as data and grad, and assigning values directly using these interfaces.
[0109] Alignment algorithms include: rule-based alignment; word similarity-based alignment, such as the Smith-Waterman algorithm and Levenshtein distance; sentence-level alignment, such as syntactic alignment and semantic alignment; depending on the selected alignment algorithm, the alignment result can be word-level alignment, sentence-level alignment, or paragraph-level alignment.
[0110] The alignment results are evaluated, and the F1 score is calculated using the following formula:
[0111]
[0112] Where P represents precision and R represents recall.
[0113] In the above technical solution, the step of adjusting the basic lighting scheduling requirements of the usage area within the scheduling period based on daily lighting information to obtain the lighting scheduling requirements for the scheduling period specifically includes:
[0114] The basic lighting scheduling requirements of the usage area during the scheduling period are imported as input text into the fine-tuned large language model.
[0115] Extract daily lighting information and activity information for the time period to be scheduled from the historical database, and match them with the basic lighting scheduling needs of the area to be used during the time period to be scheduled.
[0116] Modify the information in the basic lighting scheduling requirements of the usage area within the time period to be scheduled, and conduct simulation analysis;
[0117] Output the lighting scheduling requirements for the time period to be scheduled.
[0118] Perform simulation analysis: Use lighting simulation or modeling tools, such as DIALux and Relux, to simulate or analyze the information in the basic lighting scheduling requirements of the usage area during the modified scheduling time period.
[0119] In the aforementioned technical solution, the step of matching the lighting scheduling needs of the time period to be scheduled with the historical lighting scheduling database of large building complexes to obtain the multiple data with the highest matching degree and aggregating them into a reference lighting scheduling plan specifically includes:
[0120] Extract features related to lighting scheduling from lighting scheduling demand data and historical databases for the time period to be scheduled;
[0121] The similarity between the lighting scheduling needs of the time period to be scheduled and the data in the historical lighting scheduling database of large building complexes is measured.
[0122] Calculate the similarity between the demand for the time period to be scheduled and the historical scheduling data, and sort the similarity from high to low;
[0123] Select the highest matching historical scheduling data as references, and aggregate the selected historical scheduling data to form a reference lighting scheduling plan;
[0124] The reference lighting scheduling plan is evaluated and adjusted, and then adjusted and optimized based on the evaluation results.
[0125] The lighting scheduling needs of the time period to be scheduled are extracted to extract relevant features and transformed into features for reference lighting scheduling planning. This step can be achieved through data mining and analysis of the lighting scheduling needs of the time period to be scheduled. Specifically, historical lighting data of the time period to be scheduled can be statistically analyzed to extract features related to the lighting needs of the time period to be scheduled, such as weather, light intensity, and indoor and outdoor temperatures. Then, these features are transformed into the data format required for reference lighting scheduling planning and stored in a database.
[0126] Based on the defined similarity index, a matching score is assigned to each historical scheduling data point, and the matching scores are ranked. This step can be achieved by calculating the similarity between the historical scheduling data and the lighting scheduling demand for the time period to be scheduled. Specifically, a formula can be used to calculate the similarity between two data points. For example, the Euclidean distance formula is:
[0127]
[0128] Where, x i These are the components of the feature vector of historical scheduling data, y i These are the components of the feature vector of lighting scheduling demand during the time period to be scheduled, d Ω The smaller the similarity, the greater the similarity.
[0129] Cosine similarity can also be used, with the formula:
[0130]
[0131] The closer cosθ is to 1, the higher the similarity.
[0132] Alternatively, the Manhattan distance can be used, with the formula:
[0133]
[0134] Where, d f The smaller the similarity, the greater the similarity.
[0135] Then, sort them from high to low according to similarity, that is, according to the calculated d. Ω or d f Sort by size from largest to smallest, or sort by calculated cosine similarity (cosθ) from smallest to largest.
[0136] The highest-matching historical scheduling data are selected as references, and the selected historical scheduling data are aggregated to form a reference lighting scheduling plan. Specifically, the top 10 historical scheduling data are selected as features of the reference lighting scheduling plan, and the nearest neighbor clustering method is used for data aggregation to form the reference scheduling plan.
[0137] The reference lighting scheduling plan is evaluated and adjusted, and then further adjusted and optimized based on the evaluation results. This step can be achieved by evaluating and adjusting the reference lighting scheduling plan. Specifically, various evaluation metrics can be used to assess the effectiveness of the reference lighting scheduling plan, such as mean error, least squares error, and maximum error. If problems are found in the reference lighting scheduling plan, its performance can be improved by adjusting parameters or adopting other methods. For example, simulation methods can be used to verify the effectiveness of the reference lighting scheduling plan, and adjustments and optimizations can be made based on the evaluation results.
[0138] In the above technical solution, the step of revising the obtained reference lighting scheduling plan based on the time period to be scheduled and the weather to obtain the lighting scheduling plan specifically includes:
[0139] Obtain the specific time information for the time period to be scheduled, including the start and end times;
[0140] Obtain weather information for the time period to be scheduled, including light intensity, temperature, and humidity;
[0141] Based on the weather information for the time period to be scheduled, the lighting demand in different time periods is calculated using the photometric method.
[0142] Based on the obtained reference lighting scheduling plan, the lighting scheduling plan is optimized.
[0143] Obtain the specific time information of the time period to be scheduled, including the start and end times, in order to perform subsequent scheduling calculations.
[0144] The weather information for the time period to be scheduled is processed, such as determining whether there is rain, snow or other weather impact, and then incorporated into the lighting scheduling plan.
[0145] Based on weather information for the time period to be scheduled, the lighting demand for different time periods is calculated. The photometric formula is:
[0146]
[0147] Where N represents lighting requirements, L represents the required illuminance, and S represents the area of the area to be illuminated. R represents the light source output, and R represents the reflectivity.
[0148] Based on the obtained reference lighting scheduling plan, the lighting scheduling plan is optimized. For example, the number of lighting devices can be increased or decreased, or their locations or connections adjusted, to improve lighting performance and energy efficiency. Additionally, different conditions can be added or modified based on actual circumstances to ensure the accuracy and reliability of the lighting scheduling plan.
[0149] A second aspect of the present invention provides an embodiment of a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, which, when executed, are used to perform the above-described method for scheduling lighting in a large building complex.
[0150] A third aspect of the present invention provides an embodiment of a lighting control system for a large building complex, wherein the embodiment includes the aforementioned computer-readable storage medium.
[0151] Specifically, the principle of this invention is as follows: A historical database of lighting scheduling for large building complexes is constructed, including historical scheduling text and historical scheduling records. The historical scheduling text consists of usage records for different areas within the large building complex, including usage area, time, and weather. The historical scheduling records are the lighting scheduling plans for the large building complex corresponding to the historical scheduling text, including the on / off time, brightness, color, and direction of each lighting device. Daily lighting information and activity information for scheduling time periods are obtained. The daily lighting information consists of usage records for each lighting device within the large building complex, including on / off time, brightness, color, and direction. The activity information for scheduling time periods consists of information for each individual lighting device within the large building complex. The system submits information about the usage date, duration, and activity category of the area to be used. A fine-tuned large language model is used to extract activity information for the time period to be scheduled, yielding the basic lighting scheduling requirements for that period. These requirements are then adjusted based on daily lighting information to obtain the final lighting scheduling requirements for the time period. The final lighting scheduling requirements are matched against the historical lighting scheduling database of the large building complex, and the data with the highest matching degree are aggregated into a reference lighting scheduling plan. Finally, the reference lighting scheduling plan is revised based on the time and weather conditions of the time period to be scheduled, resulting in a lighting scheduling plan that is then sent to the lighting scheduling personnel.
[0152] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for lighting scheduling in a large building complex, characterized in that, Includes the following steps: S10. Construct a historical database for lighting scheduling of a large building complex, including historical scheduling text and historical scheduling records. The historical scheduling text is a record of the use of different areas within the large building complex, including the area of use, time, and weather. The historical scheduling records are the lighting scheduling plans for the large building complex corresponding to the historical scheduling text, including the on-time, off-time, brightness, color, and direction of each lighting device. S20. Obtain daily lighting information and activity information for the scheduled time period. The daily lighting information is the usage record of each lighting device inside the large building complex, including the on-time, off-time, brightness, color, and direction. The activity information for the scheduled time period is the usage date, usage duration, and activity category of the usage area submitted by each unit in the large building complex. S30. The activity information of the time period to be scheduled is extracted using the fine-tuned large language model to obtain the basic lighting scheduling requirements of the time period to be scheduled. S40. Adjust the basic lighting scheduling requirements of the area to be scheduled within the scheduled time period based on the daily lighting information to obtain the lighting scheduling requirements for the scheduled time period. S50. The lighting scheduling demand for the obtained time period to be scheduled is matched with the historical lighting scheduling database of the large building complex to obtain multiple data with the highest matching degree and aggregate them into a reference lighting scheduling plan. S60. Based on the time and weather of the time period to be scheduled, revise the obtained reference lighting scheduling plan to obtain the lighting scheduling plan and send it to the lighting scheduling personnel. The step of extracting activity information for the time period to be scheduled using a fine-tuned large language model to obtain the basic lighting scheduling requirements for the time period specifically includes: Construct a fine-tuning dataset and convert the format of the fine-tuning dataset to a format suitable for fine-tuning. Constructing a pre-trained model includes defining task-specific layers, defining optimizers, and loss functions on the pre-trained model; Obtain the pre-set hyperparameters of the pre-trained model, including batch size, learning rate, and number of training arguments; train the pre-trained model using the number of training arguments; and monitor the training loss and performance metrics. The pre-trained model is tuned, including adjusting the hyperparameters, increasing the diversity of the fine-tuning dataset, evaluating the fine-tuned model, and obtaining the fine-tuned large language model.
2. The lighting scheduling method for a large building complex according to claim 1, characterized in that, The step of constructing a historical database of lighting scheduling for large building complexes includes a step of cleaning historical scheduling text, specifically: The historical scheduling text is preprocessed to remove non-text information, including at least one or more of the following: HTML tags, data tables, special characters, whitespace characters, and images. The historical scheduling text is converted into UTF8 format, and the converted historical scheduling text is segmented to obtain words, phrases or other tags; Stem extraction is used to convert the words into their basic form, and word form restoration is used to restore the words to their original word form; Check the historical scheduling text for noise and duplicate content, remove the noise and duplicate content, and standardize the vocabulary.
3. The lighting scheduling method for a large building complex according to claim 2, characterized in that, Its features are, The steps for constructing the fine-tuning dataset and converting its format to a format suitable for fine-tuning include: Collect raw data, including historical scheduling text and historical scheduling records, and clean the raw data; Label and annotate the samples in the fine-tuning dataset; Based on the annotations and comments of the dataset, the dataset is hierarchically divided into a training set, a validation set, and a test set. The training set is used for training the model, the validation set is used for adjusting the model's hyperparameters and selecting the model, and the test set is used for evaluating the model's performance. Convert the fine-tuned dataset to the appropriate format, including at least one or more of the following: TFRecord, HDF5, CSV, and JSON.
4. A lighting scheduling method for a large building complex according to claim 3, characterized in that, Its features are, The construction of the pre-trained model also includes alignment, specifically the following steps: The parameters of the pre-trained model are initialized, including pre-training initialization; Alignment algorithms are selected based on the pre-trained model, including rule-based alignment, word similarity-based alignment, and sentence-level alignment. Run the alignment algorithm to match and correspond the text to be aligned; The alignment results are evaluated, including precision, recall, and F1 score.
5. A lighting scheduling method for a large building complex according to claim 4, characterized in that, The step of adjusting the basic lighting scheduling requirements of the usage area within the scheduled time period based on daily lighting information to obtain the lighting scheduling requirements for the scheduled time period specifically includes: The basic lighting scheduling requirements of the usage area during the scheduling period are imported as input text into the fine-tuned large language model. Extract daily lighting information and activity information for the time period to be scheduled from the historical database, and match them with the basic lighting scheduling needs of the area to be used during the time period to be scheduled. Modify the information in the basic lighting scheduling requirements of the usage area within the time period to be scheduled, and conduct simulation analysis; Output the lighting scheduling requirements for the time period to be scheduled.
6. A lighting scheduling method for a large building complex according to claim 5, characterized in that, The step of matching the lighting scheduling demand for the obtained scheduling time period with the historical lighting scheduling database of the large building complex to obtain multiple data with the highest matching degree and aggregating them into a reference lighting scheduling plan specifically includes: Extract features related to lighting scheduling from lighting scheduling demand data and historical databases for the time period to be scheduled; The similarity between the lighting scheduling needs of the time period to be scheduled and the data in the historical lighting scheduling database of large building complexes is measured. Calculate the similarity between the demand for the time period to be scheduled and the historical scheduling data, and sort the similarity from high to low; Select the highest matching historical scheduling data as references, and aggregate the selected historical scheduling data to form a reference lighting scheduling plan; The reference lighting scheduling plan is evaluated and adjusted, and then adjusted and optimized based on the evaluation results.
7. A lighting scheduling method for a large building complex according to claim 6, characterized in that, The step of revising the obtained reference lighting scheduling plan based on the time period to be scheduled and the weather to obtain the lighting scheduling plan specifically includes: Obtain the specific time information for the time period to be scheduled, including the start and end times; Obtain weather information for the time period to be scheduled, including light intensity, temperature, and humidity; Based on the weather information for the time period to be scheduled, the lighting demand for different time periods is calculated using the photometric method. Based on the obtained reference lighting scheduling plan, the lighting scheduling plan is optimized.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed, perform a lighting scheduling method for a large building complex as described in any one of claims 1-7.
9. A lighting control system for a large building complex, characterized in that, Includes the computer-readable storage medium as described in claim 8.