技术领域Technical Field
本发明涉及智能控制技术领域,更具体地说,本发明涉及一种智能家居系统。The present invention relates to the field of intelligent control technology, and more specifically, to a smart home system.
背景技术Background Art
智能家居系统是一种利用先进的自动化技术,将家居生活环境与各种智能设备和服务集成的解决方案,这些智能系统通过连接家中的设备,如照明、空调、安全系统、娱乐设备等到一个共同的网络上,实现这些设备的远程控制、监控以及自动化操作。用户可以通过智能手机、平板电脑或其他网络设备,无论身在何处都能控制家中的智能设备,从而提供便利、提高能效并增强家居安全。Smart home system is a solution that uses advanced automation technology to integrate home living environment with various smart devices and services. These smart systems connect home devices such as lighting, air conditioning, security systems, entertainment equipment, etc. to a common network to achieve remote control, monitoring and automation of these devices. Users can control smart devices in their home through smartphones, tablets or other network devices, no matter where they are, thus providing convenience, improving energy efficiency and enhancing home security.
现有技术存在的不足:Deficiencies of existing technologies:
当前智能家居系统中,大多数复杂的通信交互、设备控制以及模型训练等任务都由云端负责处理,这种集中式的任务处理方法虽然在资源整合和管理上具有一定优势,但也带来了诸多问题。首先,它显著增加了云端的负担,因为所有的数据处理和分析任务都需要通过云端进行,这不仅增加了数据传输的流量,还可能导致云服务器的过载,其次,这种依赖云端处理的模式在设备控制方面引入了显著的时延,特别是在网络状况不佳的情况下,延迟问题更为严重,这直接影响了用户体验和系统的实时响应能力,因此,当前的智能家居系统亟需改进,以减轻云端的负担,并解决因集中式处理带来的时延和安全问题。In the current smart home system, most complex communication interactions, device control, model training and other tasks are handled by the cloud. Although this centralized task processing method has certain advantages in resource integration and management, it also brings many problems. First, it significantly increases the burden on the cloud, because all data processing and analysis tasks need to be performed through the cloud, which not only increases the traffic of data transmission, but may also cause overload of the cloud server. Secondly, this mode of relying on cloud processing introduces significant delays in device control, especially in poor network conditions. The delay problem is more serious, which directly affects the user experience and the real-time response capability of the system. Therefore, the current smart home system urgently needs to be improved to reduce the burden on the cloud and solve the delay and security problems caused by centralized processing.
发明内容Summary of the invention
为了克服现有技术的上述缺陷,本发明先确定智能家居设备的性能指标和最佳任务类型,根据任务类型和性能指标对智能家居系统产生的任务进行分配,结合规则引擎和机器学习确定当前网络和设备状态下的最优执行规则作为预定义的规则,对模型进行训练后与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,确定模型是否适配预定义的规则,根据模型的预测状态适配情况,生成不同信号进行智能家居的管理控制,以解决上述背景技术中提出的问题。In order to overcome the above-mentioned defects of the prior art, the present invention first determines the performance indicators and optimal task types of smart home devices, allocates the tasks generated by the smart home system according to the task types and performance indicators, combines the rule engine and machine learning to determine the optimal execution rules under the current network and device status as predefined rules, analyzes the matching situation between the trained model and the predefined rules, obtains the adaptation impact information generated in the rule matching process, determines whether the model is adapted to the predefined rules, and generates different signals for management and control of the smart home according to the adaptation of the predicted state of the model, so as to solve the problems raised in the above-mentioned background technology.
为实现上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:
一种智能家居系统,包括任务分配模块、规则预定义模块、适配分析模块以及智能控制模块,各模块之间通过信号连接;A smart home system includes a task allocation module, a rule pre-definition module, an adaptation analysis module and an intelligent control module, and each module is connected through a signal;
任务分配模块,用于对云端和各边缘设备的处理能力、存储空间和网络条件进行评估,确定智能家居设备的性能指标,通过系统需求和能力评估,确定智能家居设备的最佳任务类型,根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配;The task allocation module is used to evaluate the processing capacity, storage space and network conditions of the cloud and each edge device, determine the performance indicators of the smart home device, determine the best task type for the smart home device through system requirements and capability evaluation, and allocate the tasks generated by the smart home system according to the determined task type and performance indicators;
规则预定义模块,用于智能家居的任务分配时结合规则引擎和机器学习确定在当前网络和设备状态下最优执行规则,并作为预定义的规则,对智能家居的执行规则策略进行控制,并使用历史数据对模型进行训练;The rule pre-definition module is used to combine the rule engine and machine learning to determine the optimal execution rules under the current network and device status when allocating tasks for smart homes. It also controls the execution rule strategy of smart homes as pre-defined rules and trains the model using historical data.
适配分析模块,用于对训练完毕的模型预测结果与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,确定模型的预测结果是否适配预定义的规则;The adaptation analysis module is used to analyze the matching between the prediction results of the trained model and the predefined rules, obtain the adaptation impact information generated during the rule matching process, and determine whether the prediction results of the model are adapted to the predefined rules;
智能控制模块,用于根据模型的预测状态与预定义的规则的适配情况进行分析,生成分析结果,并根据分析结果执行相应规则。The intelligent control module is used to analyze the adaptation of the model's prediction state to the predefined rules, generate analysis results, and execute corresponding rules based on the analysis results.
在一个优选的实施方式中,智能家居的任务分配时结合规则引擎和机器学习确定在当前网络和设备状态下最优执行规则,对智能家居的执行规则策略进行控制,并使用历史数据对模型进行训练,具体步骤包括:In a preferred embodiment, when allocating tasks in a smart home, a rule engine and machine learning are combined to determine the optimal execution rules under the current network and device status, control the execution rule strategy of the smart home, and use historical data to train the model. The specific steps include:
收集需求,定义智能家居系统中的关键任务,包括数据收集、处理、存储和控制指令的执行,确定智能家居系统需求;Collect requirements and define key tasks in smart home systems, including data collection, processing, storage and execution of control instructions, and determine smart home system requirements;
对云端和各边缘设备的处理能力、存储空间和网络条件进行评估,包括CPU速度、内存大小和存储空间,检查设备连接的网络速度和稳定性,评估云端和各边缘设备的能源效率和电源需求,确定云端和各边缘设备的能力评估结果;Evaluate the processing power, storage space, and network conditions of the cloud and each edge device, including CPU speed, memory size, and storage space; check the network speed and stability of the device connection; evaluate the energy efficiency and power requirements of the cloud and each edge device; and determine the capacity evaluation results of the cloud and each edge device;
根据系统需求和能力评估结果,确定每个智能家居设备的最佳任务类型,根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配。According to the system requirements and capability evaluation results, the optimal task type for each smart home device is determined, and the tasks generated by the smart home system are allocated according to the determined task type and performance indicators.
在一个优选的实施方式中,智能家居的任务分配时结合规则引擎和机器学习确定在当前网络和设备状态下最优执行规则,对智能家居的执行规则策略进行控制,并使用历史数据对模型进行训练,具体步骤包括:In a preferred embodiment, when allocating tasks in a smart home, a rule engine and machine learning are combined to determine the optimal execution rules under the current network and device status, control the execution rule strategy of the smart home, and use historical data to train the model. The specific steps include:
明确需要执行的各种任务的特性,包括数据处理、用户请求响应、视频流处理,将任务分为常规任务和复杂任务,常规任务使用规则引擎处理,复杂任务使用机器学习模型预测;Identify the characteristics of various tasks that need to be performed, including data processing, user request response, and video stream processing, and divide the tasks into routine tasks and complex tasks. Routine tasks are processed using rule engines, and complex tasks are predicted using machine learning models.
从智能家居系统中收集历史数据,包括任务类型、执行位置、网络状态、设备负载,并对历史数据进行预处理;Collect historical data from the smart home system, including task type, execution location, network status, device load, and pre-process the historical data;
使用卡方检验、决策树或递归特征消除确定历史数据的信息量特征并作为主要特征,采用长短期记忆神经网络作为模型,使用预处理后历史数据作为训练样本进行模型的训练;Use chi-square test, decision tree or recursive feature elimination to determine the information content characteristics of historical data and use them as the main features. Use long short-term memory neural network as the model and use the preprocessed historical data as training samples to train the model.
将主要特征和预处理后的历史数据作为训练数据输入模型中,训练数据包括训练集和测试集,使用训练集进行模型训练,使用测试集评估模型的泛化能力,模型训练后得到智能家居执行规则的预测结果。The main features and preprocessed historical data are input into the model as training data. The training data includes a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the generalization ability of the model. After the model is trained, the prediction results of the smart home execution rules are obtained.
在一个优选的实施方式中,对训练完毕的模型预测结果与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,包括以下步骤:In a preferred embodiment, analyzing the matching between the trained model prediction results and the predefined rules to obtain the adaptation impact information generated during the rule matching process includes the following steps:
适配影响信息包括预测波动信息、周期变化信息,预测波动信息中包括云边收敛平稳指数,周期变化信息中包括变化趋势适应指数;The adaptation impact information includes predicted fluctuation information and periodic change information. The predicted fluctuation information includes the cloud edge convergence stability index, and the periodic change information includes the change trend adaptation index.
将预测波动信息中的云边收敛平稳指数、周期变化信息中的变化趋势适应指数联立生成控制稳定系数;The cloud edge convergence stability index in the forecast fluctuation information and the change trend adaptation index in the periodic change information are combined to generate the control stability coefficient;
云边收敛平稳指数与控制稳定系数成正比关系、变化趋势适应指数与控制稳定系数成正比关系。The cloud edge convergence stability index is proportional to the control stability coefficient, and the change trend adaptation index is proportional to the control stability coefficient.
在一个优选的实施方式中,云边收敛平稳指数的获取方式为:In a preferred embodiment, the cloud edge convergence stability index is obtained as follows:
获取单位时间内模型的预测数据并作为样本,获取样本个数n、模型预测值以及实际测量值,计算测量误差值,计算表达式为:式中,sji、yci分别表示第i个样本的实际测量值与模型预测值,获取实际测量均值SJavg与模型预测均值YCavg,计算收敛确定值:获取模型输出从初始波动到达到稳定状态所需的样本个数m,计算预测平稳值,计算表达式为:计算云边收敛平稳指数,计算表达式为:The predicted data of the model in unit time is obtained as samples, the number of samples n, the model predicted value and the actual measured value are obtained, and the measurement error value is calculated. The calculation expression is: Where sji and yci represent the actual measured value and model predicted value of the ith sample, respectively. The actual measured mean SJavg and the model predicted mean YCavg are obtained, and the convergence determination value is calculated: Obtain the number of samples m required for the model output to reach a stable state from the initial fluctuation, and calculate the predicted stable value. The calculation expression is: Calculate the cloud edge convergence stability index, the calculation expression is:
在一个优选的实施方式中,变化趋势适应指数的获取方式为:In a preferred embodiment, the change trend adaptation index is obtained in the following manner:
获取时间序列数据,使用线性回归提取变化趋势,确定时间序列的观测点数量N,定义时间变量t,获取通过变化趋势提取得到的趋势值,趋势值计算表达式为:yt=β0+β1t,式中,β0是截距,β1是斜率,使用模型对未来的数据点进行预测得到预测值,计算趋势误差值,计算表达式为:式中,是模型在时间t的预测值,计算趋势残差值,计算表达式为:获取趋势平均值yavg,计算得到变化趋势适应指数,计算表达式为:Obtain time series data, use linear regression to extract the change trend, determine the number of observation points N of the time series, define the time variable t, obtain the trend value obtained by extracting the change trend, and the trend value calculation expression is: yt = β0 + β1 t, where β0 is the intercept and β1 is the slope. Use the model to predict future data points to obtain the predicted value, and calculate the trend error value. The calculation expression is: In the formula, is the predicted value of the model at time t, and the trend residual value is calculated. The calculation expression is: Get the trend average value yavg and calculate the change trend adaptation index. The calculation expression is:
在一个优选的实施方式中,将获取到云边收敛平稳指数YBS、变化趋势适应指数BHQ进行归一化分析生成控制稳定系数,将控制稳定系数标定为Kx,表达式为:式中,Kx为控制稳定系数,z1、z2为云边收敛平稳指数YBS、变化趋势适应指数BHQ的预定义比例系数,且z1、z2均大于0。In a preferred embodiment, the obtained cloud edge convergence stability index YBS and change trend adaptation index BHQ are normalized and analyzed to generate a control stability coefficient, and the control stability coefficient is calibrated as Kx , and the expression is: WhereKx is the control stability coefficient,z1 andz2 are the predefined proportional coefficients of the cloud edge convergence stability index YBS and the change trend adaptation index BHQ, andz1 andz2 are both greater than 0.
在一个优选的实施方式中,用于根据模型的预测状态与预定义的规则的适配情况进行分析,生成分析结果,并根据分析结果执行相应规则,包括以下步骤:In a preferred embodiment, the method for analyzing the adaptation of the predicted state of the model to the predefined rules, generating analysis results, and executing corresponding rules according to the analysis results includes the following steps:
将模型的预测状态与预定义的规则的适配情况进行分析得到的控制稳定系数与预先设置的控制阈值进行对比;The control stability coefficient obtained by analyzing the adaptation of the model's predicted state to the predefined rules is compared with the pre-set control threshold;
若控制稳定系数大于或等于控制阈值,则生成预测准确信号,执行预定义的规则;If the control stability coefficient is greater than or equal to the control threshold, a prediction accuracy signal is generated and the predefined rules are executed;
若控制稳定系数小于控制阈值,则生成异常预测信号,进行智能家居规则的控制调整。If the control stability coefficient is less than the control threshold, an abnormal prediction signal is generated and the control adjustment of the smart home rules is performed.
本发明一种智能家居系统的技术效果和优点:The technical effects and advantages of a smart home system of the present invention are as follows:
本发明先确定智能家居设备的性能指标和最佳任务类型,根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配,结合规则引擎和机器学习确定在当前网络和设备状态下的最优执行规则作为预定义的规则,对智能家居的执行规则策略进行控制,并对模型进行训练,对训练完毕的模型预测结果与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,确定模型的预测结果是否适配预定义的规则,并根据模型的预测状态适配情况,生成不同信号进行智能家居的管理控制,从而减轻了云端的负担,提高了智能家居系统的数据处理效率。The present invention first determines the performance indicators and optimal task types of smart home devices, allocates tasks generated by the smart home system according to the determined task types and performance indicators, combines the rule engine and machine learning to determine the optimal execution rules under the current network and device status as predefined rules, controls the execution rule strategy of the smart home, and trains the model. The matching situation between the trained model prediction results and the predefined rules is analyzed, the adaptation impact information generated in the rule matching process is obtained, it is determined whether the prediction results of the model are adapted to the predefined rules, and different signals are generated according to the adaptation situation of the prediction status of the model to manage and control the smart home, thereby reducing the burden on the cloud and improving the data processing efficiency of the smart home system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明一种智能家居系统的结构示意图。FIG. 1 is a schematic structural diagram of a smart home system according to the present invention.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
为了实现上述目的,图1给出了本发明一种智能家居系统的结构示意图,具体包括任务分配模块、规则预定义模块、适配分析模块以及智能控制模块,各模块之间通过信号连接;In order to achieve the above object, FIG1 shows a schematic diagram of the structure of a smart home system of the present invention, which specifically includes a task allocation module, a rule pre-definition module, an adaptation analysis module and an intelligent control module, and each module is connected by a signal;
任务分配模块,用于对云端和各边缘设备的处理能力、存储空间和网络条件进行评估,确定智能家居设备的性能指标,通过系统需求和能力评估,确定智能家居设备的最佳任务类型,根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配;The task allocation module is used to evaluate the processing capacity, storage space and network conditions of the cloud and each edge device, determine the performance indicators of the smart home device, determine the best task type for the smart home device through system requirements and capability evaluation, and allocate the tasks generated by the smart home system according to the determined task type and performance indicators;
规则预定义模块,用于智能家居的任务分配时结合规则引擎和机器学习确定在当前网络和设备状态下最优执行规则,并作为预定义的规则,对智能家居的执行规则策略进行控制,并使用历史数据对模型进行训练;The rule pre-definition module is used to combine the rule engine and machine learning to determine the optimal execution rules under the current network and device status when allocating tasks for smart homes. It also controls the execution rule strategy of smart homes as pre-defined rules and trains the model using historical data.
适配分析模块,用于对训练完毕的模型预测结果与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,确定模型的预测结果是否适配预定义的规则;The adaptation analysis module is used to analyze the matching between the prediction results of the trained model and the predefined rules, obtain the adaptation impact information generated during the rule matching process, and determine whether the prediction results of the model are adapted to the predefined rules;
智能控制模块,用于根据模型的预测状态与预定义的规则的适配情况进行分析,生成分析结果,并根据分析结果执行相应规则。The intelligent control module is used to analyze the adaptation of the model's prediction state to the predefined rules, generate analysis results, and execute corresponding rules based on the analysis results.
云边协同的智能家居系统是指一个结合了云计算和边缘计算技术的智能环境,使得数据处理、存储和分析可以更接近数据来源地,即用户的家庭,同时也利用云端资源进行更深层次的数据处理和智能决策。这种协同模式旨在提高响应速度、减少网络延迟和带宽使用,同时增加数据处理的可靠性和安全性,在智能家居系统的应用场景中包括多个组成部分和步骤,具体如下:The cloud-edge collaborative smart home system refers to an intelligent environment that combines cloud computing and edge computing technologies, allowing data processing, storage, and analysis to be closer to the data source, that is, the user's home, while also using cloud resources for deeper data processing and intelligent decision-making. This collaborative model aims to improve response speed, reduce network latency and bandwidth usage, and increase the reliability and security of data processing. The application scenarios of the smart home system include multiple components and steps, as follows:
边缘设备中包括智能家居设备如智能灯泡、恒温器、安全摄像头等,都具备一定的计算能力,可以进行数据的初步处理;Edge devices include smart home devices such as smart light bulbs, thermostats, security cameras, etc., which all have certain computing capabilities and can perform preliminary processing of data;
边缘设备中还具有更强大能力的设备,即边缘节点设备,能够执行更复杂的数据处理和存储任务,以及临时数据缓存,如路由器、家庭服务器或专用边缘服务器;There are also more powerful devices in the edge devices, namely edge node devices, which can perform more complex data processing and storage tasks, as well as temporary data caching, such as routers, home servers or dedicated edge servers;
云端服务通常是指云平台,云平台提供大规模数据存储、分析和高级智能功能,如人工智能驱动的数据分析和机器学习模型;Cloud services usually refer to cloud platforms, which provide large-scale data storage, analysis, and advanced intelligent functions, such as artificial intelligence-driven data analysis and machine learning models;
对智能家居系统进行设计,确定系统的具体需求,包括功能需求、性能指标和安全需求,从而设计适合家庭环境的网络拓扑结构,包括选择合适的边缘设备和节点,将各种智能家居设备(边缘设备)与边缘节点连接,配置网络以确保稳定可靠的数据传输。Design the smart home system and determine the specific requirements of the system, including functional requirements, performance indicators and security requirements, so as to design a network topology suitable for the home environment, including selecting appropriate edge devices and nodes, connecting various smart home devices (edge devices) with edge nodes, and configuring the network to ensure stable and reliable data transmission.
制定数据处理策略,确定数据应在边缘设备处理或者数据应上传云端处理,即优化云端以及边缘设备任务的分配确定动态任务分配策略,具体步骤如下:Formulate a data processing strategy to determine whether data should be processed on the edge device or uploaded to the cloud for processing, that is, optimize the allocation of tasks on the cloud and edge devices to determine a dynamic task allocation strategy. The specific steps are as follows:
对系统需求和能力进行评估,首先收集需求,定义智能家居系统中的关键任务,如数据收集、处理、存储和控制指令的执行,系统运行过程中的关键任务,例如数据采集(如温度、湿度传感器数据)、数据处理(如分析消费者用电习惯)、存储需求(如历史数据存储)以及控制命令的执行(如自动调节空调温度);Evaluate system requirements and capabilities. First, collect requirements and define key tasks in smart home systems, such as data collection, processing, storage, and execution of control commands. Key tasks during system operation, such as data collection (e.g., temperature and humidity sensor data), data processing (e.g., analyzing consumer electricity usage habits), storage requirements (e.g., historical data storage), and execution of control commands (e.g., automatically adjusting air conditioning temperature);
对云端和各边缘设备进行能力评估,例如设备处理能力、存储空间和网络条件进行评估,了解各智能家居设备的性能指标,包括CPU速度、内存大小和存储空间,检查设备连接的网络速度和稳定性,特别是对于需要实时处理的任务,评估设备的能源效率和电源需求,特别是在电源供应不稳定的环境中运行的设备,例如,对摄像头进行评估分析,摄像头配备的处理器是否能够快速分析视频数据,或者需要将数据发送到云端处理,摄像头上传高清视频流需要的带宽,以及本地网络是否支持这样的带宽,摄像头在无电源备份的情况下,电源波动可能影响视频录制质量和数据完整性等。Evaluate the capabilities of the cloud and edge devices, such as device processing power, storage space, and network conditions. Understand the performance indicators of each smart home device, including CPU speed, memory size, and storage space. Check the network speed and stability of the device connection, especially for tasks that require real-time processing. Evaluate the energy efficiency and power requirements of the device, especially for devices operating in environments with unstable power supplies. For example, evaluate and analyze the camera to see whether the processor equipped with the camera can quickly analyze video data or needs to send data to the cloud for processing. The bandwidth required for the camera to upload a high-definition video stream and whether the local network supports such bandwidth. When the camera has no power backup, power fluctuations may affect the video recording quality and data integrity.
通过系统需求和能力评估,确定每个智能家居设备的最佳任务类型,并根据设备的能力适当地分配任务,这不仅提高了系统的效率和响应速度,还能确保在关键任务执行时系统的稳定性和可靠性。By evaluating system requirements and capabilities, the optimal task type for each smart home device is determined, and tasks are appropriately assigned based on the capabilities of the device. This not only improves the efficiency and responsiveness of the system, but also ensures the stability and reliability of the system when critical tasks are performed.
根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配,例如,实时数据处理和紧急响应可能更适合在边缘执行,而大数据分析和长期存储可能更适合在云端;Assign tasks generated by smart home systems based on identified task types and performance metrics. For example, real-time data processing and emergency response may be more suitable for execution at the edge, while big data analysis and long-term storage may be more suitable for the cloud.
例如,使用规则来快速决定任务分配,即通过设定一系列的逻辑规则,系统可以根据实时监测到的环境和设备状态,自动决定任务是在云端处理还是在边缘设备上执行,首先,需要定义影响任务分配决策的关键因素,如:设备负载状态包括CPU使用率、内存占用等,网络状况包括延迟、带宽使用率等,任务特性包括计算密集型或数据密集型,紧急程度,预期响应时间等;For example, using rules to quickly determine task allocation, that is, by setting a series of logical rules, the system can automatically decide whether the task is processed in the cloud or executed on the edge device based on the real-time monitored environment and device status. First, it is necessary to define the key factors that affect the task allocation decision, such as: device load status including CPU usage, memory usage, etc., network conditions including latency, bandwidth usage, etc., task characteristics including computing intensive or data intensive, urgency, expected response time, etc.;
基于影响任务分配的决策关键因素,制定一组规则进行任务分配,如果设备CPU使用率超过75%,则将数据处理任务转移到云端;如果网络延迟低于100ms,优先在边缘设备执行实时响应任务;对于数据安全级别高的任务,无论设备负载如何,始终在边缘设备上进行处理;Based on the key decision factors that affect task allocation, a set of rules are formulated for task allocation. If the device CPU usage rate exceeds 75%, the data processing task is transferred to the cloud. If the network delay is less than 100ms, the real-time response task is performed on the edge device first. For tasks with a high data security level, they are always processed on the edge device regardless of the device load.
对规则编码集成到智能家居系统中,根据运行情况和用户反馈,调整和优化规则,例如,可以调整CPU使用率的阈值,或改进对网络延迟的响应策略,以适应实际操作中遇到的特殊情况。The rules are encoded and integrated into the smart home system. According to the operation status and user feedback, the rules can be adjusted and optimized. For example, the threshold of CPU usage can be adjusted, or the response strategy to network delay can be improved to adapt to special situations encountered in actual operation.
智能家居的任务分配是结合规则引擎和机器学习确定在当前网络和设备状态下的最优执行规则作为预定义的规则,对智能家居的执行规则策略进行控制,并使用历史数据对模型进行训练;The task allocation of smart homes is to combine the rule engine and machine learning to determine the optimal execution rules under the current network and device status as predefined rules, control the execution rule strategy of smart homes, and use historical data to train the model;
明确需要执行的各种任务的特性,如数据处理、用户请求响应、视频流处理等,将任务分为常规任务和复杂任务,常规任务适用于规则引擎处理,复杂任务适用于机器学习模型预测,基于经验确定固定规则来快速处理常规任务,例如,对于低延迟要求的任务,如门铃摄像头的实时视频处理,规则可以直接指定在边缘设备上执行,可在智能家居系统中集成规则引擎,如使用Droo l s或Node-RED等工具,实现规则的自动化执行;Clarify the characteristics of various tasks that need to be performed, such as data processing, user request response, video stream processing, etc., and divide the tasks into routine tasks and complex tasks. Routine tasks are suitable for rule engine processing, and complex tasks are suitable for machine learning model prediction. Fixed rules are determined based on experience to quickly process routine tasks. For example, for tasks with low latency requirements, such as real-time video processing of doorbell cameras, rules can be directly specified to be executed on edge devices. The rule engine can be integrated into the smart home system, such as using tools such as Droo l s or Node-RED to realize the automatic execution of rules;
从智能家居系统中收集历史数据,包括任务类型、执行位置(云端或边缘)、网络状态(延迟、带宽)、设备负载等,从收集的数据中提取有用的特征,用于训练机器学习模型,包括历史数据的预处理,如规范化、编码和选择关键特征:Collect historical data from the smart home system, including task type, execution location (cloud or edge), network status (latency, bandwidth), device load, etc., extract useful features from the collected data for training machine learning models, including preprocessing of historical data, such as normalization, encoding, and selection of key features:
对数值型数据,如CPU使用率、内存使用量、延迟等进行规范化,以确保这些特征在相同的尺度上被模型评估。常用的方法包括最小-最大规范化或Z得分规范化(标准化);Normalize numerical data such as CPU usage, memory usage, latency, etc. to ensure that these features are evaluated by the model on the same scale. Common methods include minimum-maximum normalization or Z-score normalization (standardization);
对分类数据进行编码,例如,任务类型和网络类型是分类变量,可以使用独热编码(One-Hot Encod i ng)将其转换为数值型数据,例如,对于任务类型(数据分析、视频处理等),如果有三种类型,数据分析可以编码为1,0,0,视频处理为0,1,0;Encode categorical data. For example, task type and network type are categorical variables, which can be converted into numerical data using One-Hot Encoding. For example, for task types (data analysis, video processing, etc.), if there are three types, data analysis can be encoded as 1, 0, 0, and video processing can be encoded as 0, 1, 0.
使用统计方法(如卡方检验)、基于模型的特征选择(如使用决策树)或迭代方法(如递归特征消除)来选择最有信息量的特征,如,可能发现网络延迟对任务执行位置的选择影响最大,因此选择将其作为主要特征;Use statistical methods (such as chi-squared test), model-based feature selection (such as using decision trees), or iterative methods (such as recursive feature elimination) to select the most informative features. For example, you may find that network latency has the greatest impact on the choice of task execution location, so you choose it as the main feature.
采用长短期记忆神经网络(LSTM)作为模型,使用历史数据作为训练样本进行模型的训练,利用处理好的特征和历史任务执行结果(如任务是否在边缘设备上成功执行)作为训练数据,历史数据被分为训练集用于模型学习,测试集则用来评估模型的泛化能力,80%的数据用作训练集,20%的数据用作测试集,使用划分后的训练集对模型进行训练,使用测试集评估模型的准确性、召回率和F1得分等性能指标,将训练好的模型对新数据进行预测,并根据训练模型的预测结果确定与预定义的规则的匹配情况。A long short-term memory neural network (LSTM) is used as the model, and historical data is used as training samples for model training. The processed features and historical task execution results (such as whether the task is successfully executed on the edge device) are used as training data. The historical data is divided into a training set for model learning, and the test set is used to evaluate the generalization ability of the model. 80% of the data is used as a training set and 20% of the data is used as a test set. The model is trained using the divided training set, and the test set is used to evaluate the model's performance indicators such as accuracy, recall rate, and F1 score. The trained model is used to predict new data, and the matching with the predefined rules is determined based on the prediction results of the training model.
具体的模型输入包括任务类型、执行位置、网络状态和设备负载,输出结果是预定义规则的适配情况;The specific model inputs include task type, execution location, network status, and device load, and the output is the adaptation of predefined rules;
假设智能家居系统中包括一个智能温控系统,该系统的目的是根据家庭成员的偏好和当前房间的温度自动调节空调的工作状态,预定义规则的规则一是房间温度超过25℃且有人在房间内,则空调应调至冷气模式;规则二是房间温度低于18℃且有人在房间内,则空调应调至暖气模式;规则三是没有人在房间内,空调应保持关闭状态;Assume that a smart home system includes a smart temperature control system. The purpose of the system is to automatically adjust the working state of the air conditioner according to the preferences of family members and the current room temperature. The predefined rules are as follows: if the room temperature exceeds 25°C and someone is in the room, the air conditioner should be adjusted to cooling mode; if the room temperature is below 18°C and someone is in the room, the air conditioner should be adjusted to heating mode; if no one is in the room, the air conditioner should remain off;
模型接收到的输入包括当前房间温度、房间内是否有人的检测结果(通过传感器或摄像头),以及历史数据中的设定偏好;The model receives inputs such as the current room temperature, detection of occupancy in the room (via sensors or cameras), and set preferences from historical data;
模型分析当前输入数据,并预测出最适合的空调设置状态;The model analyzes the current input data and predicts the most suitable air conditioning setting state;
假设模型预测房间温度为26℃,房间内有人。根据预定义的规则一,模型的输出应该是“开启空调,调至冷气模式”,将模型的输出与预定义规则进行匹配,检查模型的输出是否与规则相适配情况。Assume that the model predicts that the room temperature is 26°C and there is someone in the room. According to predefined rule 1, the model output should be "turn on the air conditioner and adjust it to cooling mode". Match the model output with the predefined rule to check whether the model output is compatible with the rule.
在智能家居系统中,预定义规则的匹配通常是将数据上传到云端进行处理,然而,在某些情况下,边缘设备端处理数据可能会更加有效,具有更高的准确率和效率,这种情况下,采用边缘端处理数据的方式可以带来更多优势,边缘设备可以立即对数据进行处理和分析,无需等待数据上传到云端再返回处理结果,从而实现更快的实时响应,将部分数据处理任务在边缘端完成可以减少对云端服务器的负担,降低数据传输量和处理延迟,提高整个系统的性能和稳定性,因此,在设计智能家居系统时,可以根据具体情况和需求,合理选择数据处理的位置进行分析,从而根据分析结果选择更优的控制策略,进而提高智能家居的管理效率。In smart home systems, matching predefined rules usually involves uploading data to the cloud for processing. However, in some cases, edge device processing may be more effective with higher accuracy and efficiency. In this case, edge data processing can bring more advantages. Edge devices can process and analyze data immediately without waiting for data to be uploaded to the cloud and then return the processing results, thereby achieving faster real-time response. Completing some data processing tasks at the edge can reduce the burden on cloud servers, reduce data transmission volume and processing delays, and improve the performance and stability of the entire system. Therefore, when designing a smart home system, you can reasonably select the location of data processing for analysis based on specific circumstances and needs, and then select a better control strategy based on the analysis results, thereby improving the management efficiency of the smart home.
适配分析模块对训练模型的预测结果与规则匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,适配影响信息包括预测波动信息、周期变化信息,适配影响信息是用来分析智能家居设备在进行工作时,确定是否适配预定义的规则,根据适配情况进而调整策略。The adaptation analysis module analyzes the prediction results of the training model and the rule matching situation, and obtains the adaptation impact information generated in the rule matching process. The adaptation impact information includes prediction fluctuation information and periodic change information. The adaptation impact information is used to analyze whether the smart home devices are adapted to the predefined rules when they are working, and then adjust the strategy according to the adaptation situation.
预测波动信息包括云边收敛平稳指数并标定为YBS,周期变化信息包括变化趋势适应指数并标定为BHQ;The predicted fluctuation information includes the cloud edge convergence stability index and is calibrated as YBS, and the periodic change information includes the change trend adaptation index and is calibrated as BHQ;
预测波动信息中的云边收敛平稳指数表示在智能家居系统中云计算与边缘计算之间任务分配的预测结果的波动情况,是用来衡量模型预测结果的稳定性和一致性的指标,云边收敛平稳指数主要反映了在一个给定时间段内,模型对于云端与边缘设备任务分配预测的波动程度和收敛速度情况,云边收敛平稳指数衡量模型在连续多个预测周期中任务分配决策的变化幅度,波动性越大,说明模型输出的稳定性越差,可能受到数据输入波动、模型参数设置或外部环境影响较大;The cloud-edge convergence stability index in the prediction fluctuation information indicates the fluctuation of the prediction results of task allocation between cloud computing and edge computing in the smart home system. It is an indicator used to measure the stability and consistency of the model prediction results. The cloud-edge convergence stability index mainly reflects the fluctuation degree and convergence speed of the model's prediction of task allocation between cloud and edge devices within a given time period. The cloud-edge convergence stability index measures the change range of the model's task allocation decision in multiple consecutive prediction cycles. The greater the volatility, the worse the stability of the model output, which may be greatly affected by data input fluctuations, model parameter settings or external environment.
云边收敛平稳指数会对以下方面产生作用:The cloud edge convergence stability index will have an effect on the following aspects:
性能监控:通过实时计算云边收敛平稳指数,系统管理员和维护人员可以快速识别模型性能可能存在的问题,如参数设置不当、模型过度拟合或欠拟合等;Performance monitoring: By calculating the cloud-edge convergence stability index in real time, system administrators and maintenance personnel can quickly identify possible problems with model performance, such as improper parameter settings, model overfitting or underfitting, etc.
调优依据:云边收敛平稳指数提供了一个量化指标,帮助技术团队对模型进行精细调优,优化模型的学习率、正则化参数或其他影响模型稳定性的参数。Tuning basis: The cloud edge convergence stability index provides a quantitative indicator to help the technical team fine-tune the model and optimize the model's learning rate, regularization parameters, or other parameters that affect the model's stability.
云边收敛平稳指数作为一个评估智能家居系统中模型预测稳定性的关键指标,帮助系统设计者和维护者更好地理解和优化模型在实际操作中的表现,特别是在涉及云计算与边缘计算的复杂环境中。通过监控和优化云边收敛平稳指数,可以显著提高系统的可靠性和用户的满意度。As a key indicator for evaluating the prediction stability of models in smart home systems, the cloud-edge convergence stability index helps system designers and maintainers better understand and optimize the performance of models in actual operations, especially in complex environments involving cloud computing and edge computing. By monitoring and optimizing the cloud-edge convergence stability index, the reliability of the system and user satisfaction can be significantly improved.
云边收敛平稳指数的获取方式为:The cloud edge convergence stability index is obtained as follows:
获取单位时间内模型的预测数据并作为样本,获取样本个数n、模型预测值以及实际测量值,计算测量误差值,计算表达式为:式中,sji、yci分别表示第i个样本的实际测量值与模型预测值,获取实际测量均值SJavg与模型预测均值YCavg,计算收敛确定值:获取模型输出从初始波动到达到稳定状态所需的样本个数m,计算预测平稳值,计算表达式为:计算云边收敛平稳指数,计算表达式为:The predicted data of the model in unit time is obtained as samples, the number of samples n, the model predicted value and the actual measured value are obtained, and the measurement error value is calculated. The calculation expression is: Where sji and yci represent the actual measured value and model predicted value of the ith sample, respectively. The actual measured mean SJavg and the model predicted mean YCavg are obtained, and the convergence determination value is calculated: Obtain the number of samples m required for the model output to reach a stable state from the initial fluctuation, and calculate the predicted stable value. The calculation expression is: Calculate the cloud edge convergence stability index, the calculation expression is:
需要说明的是,模型的预测数据可以包括每个预测周期内的任务分配决策,以及对应的实际系统负载、网络状况等相关参数;在模型进行预测时,通过归一化方法记录下每次预测的输出作为预测值,实际测量值是在预测时刻或预测周期内对应的实际测量值得到;获取模型输出从初始波动到达到稳定状态所需的样本数目。It should be noted that the model's prediction data may include the task allocation decisions within each prediction cycle, as well as the corresponding actual system load, network status and other related parameters; when the model makes a prediction, the output of each prediction is recorded as the prediction value through the normalization method, and the actual measurement value is the actual measurement value corresponding to the prediction time or prediction cycle; the number of samples required for the model output to reach a stable state from the initial fluctuation is obtained.
周期变化信息中的变化趋势适应指数用来表示模型对智能家居中各设备产生的时间序列数据中对长期趋势变化的适应情况,帮助分析和理解模型在面对数据趋势性变化时的表现,变化趋势适应指数衡量的是模型预测结果与实际数据趋势之间的吻合程度,反映了模型捕捉和跟随数据中长期变化趋势的能力,变化趋势适应指数会对以下方面产生影响:The change trend adaptation index in the periodic change information is used to indicate the model's adaptation to the long-term trend changes in the time series data generated by each device in the smart home, helping to analyze and understand the model's performance in the face of data trend changes. The change trend adaptation index measures the degree of fit between the model's prediction results and the actual data trend, reflecting the model's ability to capture and follow the long-term trend of the data. The change trend adaptation index will have an impact on the following aspects:
结构调整:变化趋势适应指数的反馈可以直接影响模型的架构设计,如果指数小,这表明模型对趋势的适应性不足,可能需要选择或设计更适合捕捉趋势的模型,如集成更多长短期记忆单元的神经网络,或者加入自回归成分的复合模型;Structural adjustment: The feedback of the changing trend adaptation index can directly affect the model architecture design. If the index is small, it means that the model is not adaptable enough to the trend, and it may be necessary to select or design a model that is more suitable for capturing the trend, such as a neural network that integrates more long-term and short-term memory units, or a composite model that adds autoregressive components.
效能评估:变化趋势适应指数可以衡量模型在实际应用中能够有效理解和预测数据趋势,这对于预测精度至关重要,高趋势适应指数通常意味着模型在不同的测试情况下都能保持较好的性能。Performance evaluation: The trend adaptation index can measure the model's ability to effectively understand and predict data trends in practical applications, which is crucial for prediction accuracy. A high trend adaptation index usually means that the model can maintain good performance under different test conditions.
变化趋势适应指数的获取方式为:The change trend adaptation index is obtained as follows:
获取时间序列数据,使用线性回归提取变化趋势,确定时间序列的观测点数量N,定义时间变量t,获取通过变化趋势提取得到的趋势值,趋势值计算表达式为:yt=β0+β1t,式中,β0是截距,β1是斜率,使用模型对未来的数据点进行预测得到预测值,计算趋势误差值,计算表达式为:式中,是模型在时间t的预测值,计算趋势残差值,计算表达式为:获取趋势平均值yavg,计算得到变化趋势适应指数,计算表达式为:Obtain time series data, use linear regression to extract the change trend, determine the number of observation points N of the time series, define the time variable t, obtain the trend value obtained by extracting the change trend, and the trend value calculation expression is: yt = β0 + β1 t, where β0 is the intercept and β1 is the slope. Use the model to predict future data points to obtain the predicted value, and calculate the trend error value. The calculation expression is: In the formula, is the predicted value of the model at time t, and the trend residual value is calculated. The calculation expression is: Get the trend average value yavg and calculate the change trend adaptation index. The calculation expression is:
需要说明的是,时间序列数据是根据时间顺序排列,并且是连续的数据;定义时间变量代表时间序列的每个观测点。例如,如果数据是按日收集的,t可以是从1到N的整数,其中N是观测期内的总天数;使用统计软件或编程库(如Python的statsmode l s)进行线性回归,得到β0、β1,β0是截距,表示当t=0时的预测值,β1是斜率,表示随时间t增长,即预测值的变化率。It should be noted that time series data is arranged in chronological order and is continuous data; the time variable is defined to represent each observation point of the time series. For example, if the data is collected daily, t can be an integer from 1 to N, where N is the total number of days in the observation period; linear regression is performed using statistical software or programming libraries (such as Python's statsmode ls) to obtain β0 and β1 , where β0 is the intercept, indicating the predicted value when t = 0, and β1 is the slope, indicating the rate of change of the predicted value as time t increases.
将预测波动信息、周期变化信息联立生成控制稳定系数;The predicted fluctuation information and periodic variation information are combined to generate the control stability coefficient;
将获取到云边收敛平稳指数YBS、变化趋势适应指数BHQ进行归一化分析生成控制稳定系数,将控制稳定系数标定为Kx,表达式为:式中,Kx为控制稳定系数,z1、z2为云边收敛平稳指数YBS、变化趋势适应指数BHQ的预定义比例系数,且z1、z2均大于0。The cloud edge convergence stability index YBS and the change trend adaptation index BHQ are obtained and normalized to generate the control stability coefficient. The control stability coefficient is calibrated as Kx and the expression is: WhereKx is the control stability coefficient,z1 andz2 are the predefined proportional coefficients of the cloud edge convergence stability index YBS and the change trend adaptation index BHQ, andz1 andz2 are both greater than 0.
本实施例使用的是加权求和的方式,将云边收敛平稳指数和变化趋势适应指数结合起来,生成一个综合的控制稳定系数,这个控制稳定系数可以作为智能家居系统的输入参数,用于确定智能家居的规则执行情况。This embodiment uses a weighted summation method to combine the cloud-edge convergence stability index and the change trend adaptation index to generate a comprehensive control stability coefficient. This control stability coefficient can be used as an input parameter of the smart home system to determine the execution of smart home rules.
需要说明的是,预定义比例系数的大小是为了将各个参数进行量化得到的一个具体的数值,其为了便于后续比较,关于系数的大小,取决于样本数据的多少及本领域技术人员对每一组样本数据初步设定对应的预定义比例系数;并不唯一,只要不影响参数与量化后数值的比例关系即可,如云边收敛平稳指数与控制稳定系数成正比关系,对云边收敛平稳指数和变化趋势适应指数进行归一化处理,使具有相同的量纲和范围,这可以通过将原始数据减去均值并除以标准差,或者将数据映射到[0,1]的范围来实现。It should be noted that the size of the predefined proportional coefficient is to quantify each parameter to obtain a specific numerical value. In order to facilitate subsequent comparison, the size of the coefficient depends on the amount of sample data and the preliminary setting of the corresponding predefined proportional coefficient for each group of sample data by technical personnel in this field. It is not unique, as long as it does not affect the proportional relationship between the parameter and the quantized numerical value. For example, the cloud edge convergence stability index is proportional to the control stability coefficient. The cloud edge convergence stability index and the change trend adaptation index are normalized to have the same dimension and range. This can be achieved by subtracting the mean from the original data and dividing it by the standard deviation, or mapping the data to the range of [0, 1].
云边收敛平稳指数越大、变化趋势适应指数越大,所生成的控制稳定系数越大,表明了模型在进行规则预测时,准确率越高,进行智能家居调控预测时不易受到波动影响,与预定义的匹配规则的适配程度越高,模型预测与预定义规则的一致性提高了决策的可信度,决策者可以依赖模型输出来做出更精准的业务决策。The larger the cloud-edge convergence stability index and the change trend adaptation index, the larger the generated control stability coefficient, which indicates that the model has a higher accuracy when making rule predictions, is less susceptible to fluctuations when making smart home control predictions, and has a higher degree of adaptation to predefined matching rules. The consistency between model predictions and predefined rules improves the credibility of decisions, and decision makers can rely on model outputs to make more accurate business decisions.
云边收敛平稳指数越小、变化趋势适应指数越小,所生成的控制稳定系数越小,预测出的智能家居控制规则与预定义的匹配规则越容易出现不适应的情况,模型在预测时与预定义的规则不够适配且对趋势的适应性较弱,可能需要频繁的外部调整规则来纠正模型。The smaller the cloud-edge convergence stability index and the change trend adaptation index, the smaller the generated control stability coefficient, and the more likely the predicted smart home control rules are to be incompatible with the predefined matching rules. The model is not sufficiently adapted to the predefined rules during prediction and has weak adaptability to trends. Frequent external adjustment rules may be required to correct the model.
将生成的控制稳定系数与预先设置的控制阈值进行对比,生成预测准确信号和异常预测信号;Compare the generated control stability coefficient with the preset control threshold to generate a prediction accuracy signal and an abnormal prediction signal;
获取到控制稳定系数后,将控制稳定系数与控制阈值进行对比;After obtaining the control stability coefficient, the control stability coefficient is compared with the control threshold;
若控制稳定系数大于或等于控制阈值,则表明模型的预测结果具有较高的准确性和稳定性,生成预测准确信号,模型预测性能良好,模型的预测结果与预定义规则的适配程度高,智能家居系统可以更可靠地执行自动化规则,进而确保家庭环境的舒适性、安全性和能源效率;If the control stability coefficient is greater than or equal to the control threshold, it indicates that the prediction results of the model have high accuracy and stability, generate prediction accuracy signals, the model prediction performance is good, the model prediction results are highly compatible with the predefined rules, and the smart home system can more reliably execute the automation rules, thereby ensuring the comfort, safety and energy efficiency of the home environment;
如果控制稳定系数小于控制阈值,这可能表明模型的预测结果与预定义的匹配规则存在一定的不确定性或波动性,生成异常预测信号,这种情况下,可能需要对模型进行进一步的调整或修正或者更改预定义的规则;If the control stability coefficient is less than the control threshold, this may indicate that there is a certain degree of uncertainty or volatility between the model's prediction results and the predefined matching rules, generating an abnormal prediction signal. In this case, it may be necessary to further adjust or modify the model or change the predefined rules;
一种可能的处理方式是通过增加数据量或改进模型算法来提高模型的预测准确性,这可能涉及到收集更多的训练数据,优化特征选择,调整模型参数等方法,以使模型更好地捕捉数据的模式和趋势;也可以考虑引入更多的外部信息或上下文来增强模型的预测能力,比如,结合天气数据、用户行为模式或家庭活动计划等信息,可以提高模型对环境变化的适应性,从而提高预测准确性。One possible approach is to increase the amount of data or improve the model algorithm to improve the model's prediction accuracy. This may involve collecting more training data, optimizing feature selection, adjusting model parameters, and other methods to enable the model to better capture patterns and trends in the data. You can also consider introducing more external information or context to enhance the model's predictive ability. For example, combining weather data, user behavior patterns, or family activity plans can improve the model's adaptability to environmental changes, thereby improving prediction accuracy.
根据生成的预测准确信号或异常预测信号,可以进行相应的信号处理和反馈控制,如果生成了预测准确信号,可以按照预测结果执行相应智能家居的预定义规则控制策略;According to the generated accurate prediction signal or abnormal prediction signal, corresponding signal processing and feedback control can be performed. If an accurate prediction signal is generated, the predefined rule control strategy of the corresponding smart home can be executed according to the prediction result;
如果生成了异常预测信号,表明模型的预测结果存在一定的不确定性或波动性,尤其是在涉及云边协同的智能家居设备的数据处理过程中,可能需要调整数据处理规则,即在边缘端设备上可以实现部分数据处理和模型预测,以减少对云端的依赖,同时,可以在云端建立备份系统,当边缘设备端出现异常情况时,可以快速切换到云端进行处理,保证系统的连续性和稳定性,从而减轻云端的计算负荷。If an abnormal prediction signal is generated, it indicates that there is a certain degree of uncertainty or volatility in the prediction results of the model. Especially in the data processing process of smart home devices involving cloud-edge collaboration, it may be necessary to adjust the data processing rules, that is, some data processing and model prediction can be implemented on the edge device to reduce dependence on the cloud. At the same time, a backup system can be established in the cloud. When an abnormal situation occurs on the edge device, it can quickly switch to the cloud for processing to ensure the continuity and stability of the system, thereby reducing the computing load on the cloud.
例如,智能家居系统中涉及一个温度监测和控制设备,负责监测室内温度并根据预定义规则控制空调系统的开关状态。通常情况下,温度数据由设备收集并发送到云端进行处理和分析,以确定是否需要调节空调状态,在某些情况下,由于网络问题或设备故障,边缘设备端可能无法将数据及时上传到云端,导致数据处理延迟或异常情况的发生,这时,就可以采取边缘设备端处理数据的方式来应对异常情况;For example, a temperature monitoring and control device is involved in a smart home system, which is responsible for monitoring the indoor temperature and controlling the on/off status of the air conditioning system according to predefined rules. Normally, temperature data is collected by the device and sent to the cloud for processing and analysis to determine whether the air conditioning status needs to be adjusted. In some cases, due to network problems or device failures, the edge device may not be able to upload data to the cloud in time, resulting in data processing delays or abnormal situations. At this time, the edge device can process data to deal with abnormal situations;
温度监测设备具有一定的处理能力,可以在本地对收集到的温度数据进行预处理和分析。例如,设备可以实时监测温度数据,并根据预定义规则判断当前室内温度是否超出了设定范围,如果边缘设备端检测到室内温度异常,例如,温度超出了预定义范围,就会生成异常预测信号,表明系统可能存在问题或需要采取相应措施;Temperature monitoring equipment has certain processing capabilities and can pre-process and analyze the collected temperature data locally. For example, the device can monitor temperature data in real time and determine whether the current indoor temperature exceeds the set range based on predefined rules. If the edge device detects an abnormal indoor temperature, for example, the temperature exceeds the predefined range, an abnormal prediction signal will be generated, indicating that there may be a problem with the system or that corresponding measures need to be taken;
当边缘端出现异常情况时,系统可以自动切换到云端进行处理,云端备份系统可以接收边缘设备发送的异常预测信号,并进行进一步的数据处理和分析,例如,云端系统可以重新评估当前温度情况,制定调节空调状态的策略,并发送指令给边缘设备执行相应操作;When an abnormal situation occurs on the edge, the system can automatically switch to the cloud for processing. The cloud backup system can receive the abnormal prediction signal sent by the edge device and perform further data processing and analysis. For example, the cloud system can re-evaluate the current temperature, formulate a strategy for adjusting the air conditioning status, and send instructions to the edge device to perform corresponding operations.
通过这种方式,对预定义的规则进行控制调整,从而控制智能家居系统可以在边缘设备端处理部分数据,减少对云端的依赖,同时在出现异常情况时能够快速切换到云端进行处理,确保系统的连续性和稳定性,从而减轻云端的计算负荷。In this way, the predefined rules are controlled and adjusted, so that the smart home system can process part of the data on the edge device side, reducing dependence on the cloud. At the same time, when an abnormal situation occurs, it can quickly switch to the cloud for processing, ensuring the continuity and stability of the system, thereby reducing the computing load on the cloud.
综上所述,当生成异常预测信号时,在涉及云边协同的智能家居设备中,需要采取控制措施来应对异常情况,保障系统的稳定性和可靠性,这些措施包括本地处理与备份、异常检测与修正、动态调整策略以及用户提示与反馈等,可以帮助系统有效应对异常情况,并最大程度地减小异常对系统性能的影响,提高智能家居的使用效率。To sum up, when an abnormal prediction signal is generated, control measures need to be taken in smart home devices involving cloud-edge collaboration to deal with abnormal situations and ensure the stability and reliability of the system. These measures include local processing and backup, anomaly detection and correction, dynamic adjustment strategies, and user prompts and feedback, which can help the system effectively deal with abnormal situations, minimize the impact of anomalies on system performance, and improve the efficiency of smart home use.
需要说明的是,此实施例中有关的阈值信息是专业人员预先进行设置的,不在此进行过多解释,例如,控制稳定阈值时基于历史数据分析、预期的模型性能以及业务需求来确定,实施例中部分参数英文字母存在相同的情况,但在使用时解释具有不同的含义,也不在此进行一一解释。It should be noted that the relevant threshold information in this embodiment is pre-set by professionals and will not be explained in detail here. For example, the control of the stability threshold is determined based on historical data analysis, expected model performance and business needs. Some parameters in the embodiments have the same English letters, but have different meanings when used, which will not be explained one by one here.
本发明先确定智能家居设备的性能指标和最佳任务类型,根据确定的任务类型和性能指标对智能家居系统产生的任务进行分配,在智能家居的任务分配时结合规则引擎和机器学习确定在当前网络和设备状态下的最优执行规则作为预定义的规则,对智能家居的执行规则策略进行控制,并对模型进行训练,对训练完毕的模型预测结果与预定义的规则之间匹配情况进行分析,获取进行规则匹配过程中产生的适配影响信息,确定模型的预测结果是否适配预定义的规则,并根据模型的预测状态适配情况,生成不同信号进行智能家居的管理控制,从而减轻了云端的负担,提高了智能家居系统的数据处理效率。The present invention first determines the performance indicators and optimal task types of smart home devices, allocates tasks generated by the smart home system according to the determined task types and performance indicators, combines rule engines and machine learning to determine the optimal execution rules under the current network and device states as predefined rules when allocating tasks in the smart home, controls the execution rule strategy of the smart home, trains the model, analyzes the matching situation between the trained model prediction results and the predefined rules, obtains the adaptation impact information generated in the rule matching process, determines whether the prediction results of the model are adapted to the predefined rules, and generates different signals for management and control of the smart home according to the adaptation situation of the prediction state of the model, thereby reducing the burden on the cloud and improving the data processing efficiency of the smart home system.
上述公式均是去量纲取其数值计算,公式是由采集大量数据进行软件模拟得到最近真实情况的一个公式,公式中的预定义参数由本领域的技术人员根据实际情况进行设置。The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The predefined parameters in the formula are set by technicians in this field according to actual conditions.
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
最后:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410695309.0ACN118466238B (en) | 2024-05-31 | 2024-05-31 | A smart home system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410695309.0ACN118466238B (en) | 2024-05-31 | 2024-05-31 | A smart home system |
| Publication Number | Publication Date |
|---|---|
| CN118466238Atrue CN118466238A (en) | 2024-08-09 |
| CN118466238B CN118466238B (en) | 2025-05-23 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410695309.0AActiveCN118466238B (en) | 2024-05-31 | 2024-05-31 | A smart home system |
| Country | Link |
|---|---|
| CN (1) | CN118466238B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119068880A (en)* | 2024-11-07 | 2024-12-03 | 四川大学 | Smart home intelligent control method, system and storage medium based on voice recognition |
| CN119511750A (en)* | 2024-11-20 | 2025-02-25 | 标注未来(南京)科技有限公司 | A smart home control system based on artificial intelligence |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112866357A (en)* | 2021-01-05 | 2021-05-28 | 浪潮软件科技有限公司 | Lightweight cloud-edge collaborative smart home edge computing safety protection method |
| CN113406893A (en)* | 2021-07-14 | 2021-09-17 | 南通大学 | Intelligent home system based on edge gateway and application thereof |
| WO2023089350A1 (en)* | 2021-11-19 | 2023-05-25 | Telefonaktiebolaget Lm Ericsson (Publ) | An architecture for a self-adaptive computation management in edge cloud |
| CN117407160A (en)* | 2023-10-11 | 2024-01-16 | 东南大学 | A hybrid deployment method of online tasks and offline tasks in edge computing scenarios |
| CN117640634A (en)* | 2023-11-28 | 2024-03-01 | 华能江苏综合能源服务有限公司 | Cloud edge end cooperation method and system for integrated management of intelligent monitoring system |
| WO2024099313A1 (en)* | 2022-11-08 | 2024-05-16 | 华南理工大学 | Cloud-edge-end collaborative intelligent infant care system and method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112866357A (en)* | 2021-01-05 | 2021-05-28 | 浪潮软件科技有限公司 | Lightweight cloud-edge collaborative smart home edge computing safety protection method |
| CN113406893A (en)* | 2021-07-14 | 2021-09-17 | 南通大学 | Intelligent home system based on edge gateway and application thereof |
| WO2023089350A1 (en)* | 2021-11-19 | 2023-05-25 | Telefonaktiebolaget Lm Ericsson (Publ) | An architecture for a self-adaptive computation management in edge cloud |
| WO2024099313A1 (en)* | 2022-11-08 | 2024-05-16 | 华南理工大学 | Cloud-edge-end collaborative intelligent infant care system and method |
| CN117407160A (en)* | 2023-10-11 | 2024-01-16 | 东南大学 | A hybrid deployment method of online tasks and offline tasks in edge computing scenarios |
| CN117640634A (en)* | 2023-11-28 | 2024-03-01 | 华能江苏综合能源服务有限公司 | Cloud edge end cooperation method and system for integrated management of intelligent monitoring system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119068880A (en)* | 2024-11-07 | 2024-12-03 | 四川大学 | Smart home intelligent control method, system and storage medium based on voice recognition |
| CN119068880B (en)* | 2024-11-07 | 2025-01-24 | 四川大学 | Smart home intelligent control method, system and storage medium based on voice recognition |
| CN119511750A (en)* | 2024-11-20 | 2025-02-25 | 标注未来(南京)科技有限公司 | A smart home control system based on artificial intelligence |
| Publication number | Publication date |
|---|---|
| CN118466238B (en) | 2025-05-23 |
| Publication | Publication Date | Title |
|---|---|---|
| CN118466238A (en) | A smart home system | |
| CN117176560B (en) | Monitoring equipment supervision system and method based on Internet of things | |
| CN118316190B (en) | Electric power system monitoring system based on Internet of things | |
| CN119335938A (en) | Remote operation method of industrial equipment based on distributed identification and control optimization | |
| CN118694005B (en) | Regional power consumption monitoring and controlling method, system, medium and program product | |
| CN118732529A (en) | A method and system for controlling intelligent household appliances | |
| CN119532944B (en) | Intelligent operation and maintenance method and system for air conditioning system based on Internet of things technology | |
| CN118981672B (en) | Non-intrusive intelligent state perception and fault warning system for circuit breaker operating mechanism | |
| CN119892476A (en) | Network anomaly detection and automatic processing method, system, storage medium and equipment | |
| CN119148664A (en) | Intelligent factory management platform and management method based on digital twinning | |
| CN119828481A (en) | Cockpit multi-scene switching output control method based on artificial intelligence | |
| CN118966566A (en) | A method for evaluating the operating performance and efficiency of distributed photovoltaic power stations | |
| CN117666448B (en) | Energy saving method, device, equipment and medium based on Internet of things energy consumption prediction | |
| CN118612093A (en) | A switch operation status online monitoring system | |
| CN119443382B (en) | A method and system for optimizing the efficiency of power data value extraction | |
| CN120065746B (en) | Building energy consumption optimization method based on artificial intelligence | |
| CN119271675B (en) | Production data management method, system, equipment and medium based on industrial Internet of things | |
| CN119398206B (en) | A method for optimizing energy consumption of IoT devices based on artificial intelligence | |
| CN120494069A (en) | Equipment operation and maintenance data management system and method based on intelligent computing | |
| CN120434267A (en) | A smart tunnel equipment management method and system based on edge computing | |
| CN120358262A (en) | Intelligent control method and device for power communication equipment based on intelligent power application | |
| CN120065746A (en) | Building energy consumption optimization method based on artificial intelligence | |
| CN118612772A (en) | Offshore wind farm communication system based on 5G and Lora networking | |
| CN120218532A (en) | A method and system for adaptive concentrator configuration based on reinforcement learning | |
| CN119782883A (en) | A modular hydrogen UPS intelligent management and fault prediction method suitable for data centers |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | Effective date of registration:20250429 Address after:324000 Room 205, Building 1, No. 2 Jiangwan Road, Quzhou City, Zhejiang Province (self declared) Applicant after:Quzhou Baishijian Cultural Communication Co.,Ltd. Country or region after:China Address before:Room 401, Building 1, No. 17 Xinran Street, Xihu District, Hangzhou City, Zhejiang Province 310012 Applicant before:Zhejiang jietejia Intelligent Technology Co.,Ltd. Country or region before:China | |
| TA01 | Transfer of patent application right | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |