Method and device for realizing automatic flow adjustment

By obtaining and analyzing the status information of the target device in real time and adjusting the traffic dynamically, the problem of traffic caused by the inability to adapt to real-time changes in the prior art is solved, and the flexibility and efficiency of flow control are improved.

CN120017595APending Publication Date: 2025-05-16HANGZHOU LIFESMART TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510177502.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing traffic control strategies rely on static rules and cannot be dynamically adjusted according to real-time changes in network traffic, resulting in traffic congestion and inefficient data transmission.

Method used

By obtaining the associated data information of the target device in real time, including the status of the target device at the next moment, detecting its importance and frequent requests, and dynamically adjusting traffic.

Benefits of technology

It realizes dynamic adjustment of traffic according to changes in equipment status, avoids traffic congestion and low data transmission efficiency, and improves the flexibility and adaptability of traffic control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017595A_ABST
    Figure CN120017595A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart contracts, and discloses a method and a device for realizing automatic flow adjustment. The method comprises the following steps: acquiring associated data information of target equipment; wherein the associated data information comprises a target equipment state, the target equipment state is the equipment state of the target equipment at the next moment, and the target equipment is any one of the multiple pieces of equipment; if the device state of the target device at the current moment is different from the target device state, detecting the importance degree and the request frequency degree of the target device state, and generating a detection result; and adjusting the flow of the target equipment according to the detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart contract technology, and in particular to a method and device for realizing automatic flow adjustment. Background Art

[0002] With the rapid development of Internet technology, network data traffic has shown an explosive growth trend. Whether it is social media, online video, e-commerce, or emerging technologies such as cloud computing, big data, and the Internet of Things, they have greatly promoted the increase of network data traffic. In this case, how to effectively manage, regulate and optimize network data traffic to ensure the security, stability and efficient operation of the network has become an important topic in the field of network management and optimization. Traffic control strategies have emerged and have gradually become a key link in network architecture design and operation and maintenance.

[0003] Most existing traffic control strategies rely on traditional centralized management systems and static rules. Specifically, centralized management systems usually consist of a central controller that monitors and manages the data traffic of the entire network, and classifies, prioritizes, and schedules the data in the network through preset static rules. These static rules are usually formulated based on historical data of network traffic and are used to limit the data transmission rate.

[0004] Since static rules cannot be dynamically adjusted according to real-time changes in network traffic, when the status of devices in the network changes, static rules often cannot respond effectively, leading to problems such as traffic congestion and low data transmission efficiency. Summary of the invention

[0005] In view of this, the present invention provides a method and device for automatically adjusting flow rate.

[0006] In a first aspect, the present invention provides a method for automatically adjusting traffic, the method comprising: obtaining associated data information of a target device; wherein the associated data information comprises: a target device state, the target device state being the device state of the target device at the next moment, the target device being any one of a plurality of devices; if the device state of the target device at the current moment is different from the target device state, detecting the importance of the target device state and the frequency of requests, and generating a detection result; and adjusting the traffic of the target device according to the detection result.

[0007] The method for automatically adjusting traffic provided by this embodiment obtains the associated data information of the target device in real time, including the state of the target device at the next moment, so that the system can quickly respond to changes in the network and device status, thereby making timely traffic adjustments. Compared with traditional static rules, this method can dynamically adjust traffic according to changes in device status, avoiding problems such as traffic congestion and low data transmission efficiency caused by the inability of static rules to adapt to real-time changes.

[0008] At the same time, the detection results are generated by combining the importance of the device status and the frequency of requests, which can more accurately reflect the actual demand of the device for network traffic, thereby making more reasonable traffic allocation. This enables the system to flexibly adapt to the needs of different device types and different application scenarios, and improves the flexibility and adaptability of traffic control.

[0009] In one possible implementation, the traffic of the target device is adjusted according to the detection result, including: if the detection result indicates that the importance level is greater than the importance threshold and / or the request frequency is greater than the request threshold, reducing the traffic of the target device; if the detection result indicates that the importance level is not greater than the importance threshold and / or the request frequency is not greater than the request threshold, increasing the traffic of the target device.

[0010] The method for automatically adjusting traffic provided in this embodiment can reduce the traffic of the target device to avoid overload when the task it processes is of high importance or the request is frequent, ensuring that the key task is processed in a timely manner and preventing the system from crashing due to excessive resource consumption. Conversely, for devices of lower importance or infrequent requests, increasing the traffic can improve resource utilization and make the overall system performance more balanced.

[0011] In one possible implementation, the associated data information also includes security warning information; wherein the method also includes: when the security warning information of the target device is obtained, increasing the traffic of the target device; directing the traffic of the target device to the security service node corresponding to the security warning information, so as to process the security warning information through the security service node.

[0012] The method for automatically adjusting traffic provided in this embodiment can increase the traffic of the target device and direct it to the security service node immediately when the target device has a security warning message, so as to ensure that the security service can quickly access and handle potential security threats. This immediate response helps to reduce the impact scope and time of security incidents and reduce losses.

[0013] Furthermore, by directing traffic to dedicated security service nodes, the professional security functions provided by these nodes (such as intrusion detection, malicious traffic filtering, security auditing, etc.) can be used to enhance the security protection capabilities of the system. This helps to build a more solid security line of defense against external attacks and internal threats.

[0014] In a possible implementation, the associated data information also includes user behavior information; wherein the method further includes: determining usage information of the target device according to the user behavior information; and adjusting the traffic of the target device according to the usage information of the target device.

[0015] The method for automatically adjusting traffic provided in this embodiment can more accurately understand the user's usage habits and needs for the target device by analyzing the user behavior information, so that the system can dynamically adjust the traffic to meet the user's personalized needs and provide a smoother and more responsive service experience. At the same time, adjusting the traffic according to the usage information of the target device can ensure that sufficient resource support is provided when the user demand peaks, and release excess resources when the demand is low, avoiding resource waste and improving the overall resource utilization efficiency.

[0016] In one possible implementation, the associated data information also includes: the number of devices; wherein the method also includes: detecting whether the number of devices has changed; if the number of devices has changed, detecting whether the number of devices has increased; if the number of devices has increased, increasing the traffic of the service cluster for the newly added devices; wherein the service cluster indicates the collection of all devices.

[0017] The method for automatically adjusting traffic provided in this embodiment enables the system to automatically identify and respond to changes when the number of devices increases, and ensures that all devices can obtain sufficient service support by increasing the traffic of the service cluster, thereby improving the flexibility and scalability of the system.

[0018] In a possible implementation, the associated data information also includes: data transmission traffic; wherein the method also includes: detecting whether the data transmission traffic exceeds the traffic threshold; if the data transmission traffic exceeds the traffic threshold, obtaining the behavior data information of the target device; and adjusting the traffic of the target device according to the behavior data information of the target device.

[0019] The method for automatically adjusting traffic provided in this embodiment can identify traffic anomalies by monitoring data transmission traffic and setting thresholds. Once the traffic exceeds the threshold, the system will further analyze the behavior data of the target device to more accurately understand the cause of the traffic anomaly and make traffic adjustment decisions accordingly, thereby ensuring the reasonable allocation and efficient use of resources.

[0020] Furthermore, analyzing the behavior data of the target device not only helps identify the cause of traffic anomalies, but may also reveal potential security threats. For example, abnormal data transmission patterns may indicate the risk of malicious attacks or data leaks. By adjusting traffic in a timely manner and taking appropriate security measures, the system can enhance overall security.

[0021] In one possible implementation, if there are multiple target devices, the method also includes: obtaining the priority of each target device; if at least two target devices are executed, sorting each target device according to the priority of the target device to obtain a sorting result; wherein the sorting result indicates that each target device is sorted in order from high to low priority; according to the sorting result, allocating traffic to the target device with high priority so that the target device with high priority performs the target operation according to the allocated traffic.

[0022] The method for automatically adjusting traffic provided in this embodiment can ensure that resources are first allocated to tasks with higher priority, more importance or more urgency by sorting according to the priority of target devices, thereby ensuring that key services and operations are supported in a timely and adequate manner.

[0023] In a second aspect, the present invention provides a device for adjusting the flow of a device, the device comprising: an acquisition module, used to obtain associated data information of a target device; wherein the associated data information comprises: a target device state, the target device state being the device state of the target device at the next moment, and the target device being any one of a plurality of devices; a detection module, used to detect the importance of the target device state and the frequency of requests if the device state of the target device at the current moment is different from the target device state, and generate a detection result; an adjustment module, used to adjust the flow of the target device according to the detection result.

[0024] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for automatically adjusting flow according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for automatically adjusting flow rate according to the first aspect or any corresponding embodiment thereof.

[0026] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for automatically adjusting flow rate according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 is a flow chart of a method for automatically adjusting flow according to an embodiment of the present invention;

[0029] Figure 2 is a structural block diagram of a flow adjustment device of a device according to an embodiment of the present invention;

[0030] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] Based on relevant technologies, we know that with the rapid development of Internet technology, network data traffic has shown an explosive growth trend. Whether it is social media, online video, e-commerce, or emerging technologies such as cloud computing, big data, and the Internet of Things, they have greatly promoted the increase of network data traffic. In this case, how to effectively manage, regulate and optimize network data traffic to ensure the security, stability and efficient operation of the network has become an important topic in the field of network management and optimization. Traffic control strategies have emerged and have gradually become a key link in network architecture design and operation and maintenance.

[0033] Most existing traffic control strategies rely on traditional centralized management systems and static rules. Specifically, centralized management systems usually consist of a central controller that monitors and manages the data traffic of the entire network, and classifies, prioritizes, and schedules the data in the network through preset static rules. These static rules are usually formulated based on historical data of network traffic and are used to limit the data transmission rate.

[0034] Since static rules cannot be dynamically adjusted according to real-time changes in network traffic, when the status of devices in the network changes, static rules often cannot respond effectively, leading to problems such as traffic congestion and low data transmission efficiency.

[0035] Based on this, the present invention provides a method for automatically adjusting traffic flow. By acquiring the associated data information of the target device in real time, including the state of the target device at the next moment, the system can quickly respond to changes in the network and device status, thereby making timely traffic adjustments. Compared with traditional static rules, this method can dynamically adjust traffic flow according to changes in device status, avoiding problems such as traffic congestion and low data transmission efficiency caused by the inability of static rules to adapt to real-time changes.

[0036] At the same time, the detection results are generated by combining the importance of the device status and the frequency of requests, which can more accurately reflect the actual demand of the device for network traffic, thereby making more reasonable traffic allocation. This enables the system to flexibly adapt to the needs of different device types and different application scenarios, and improves the flexibility and adaptability of traffic control.

[0037] According to an embodiment of the present invention, a method embodiment for realizing automatic flow adjustment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] In this embodiment, a method for automatically adjusting flow is provided, which can be used in computer equipment, such as computers, servers, etc. Figure 1 is a flow chart of a method for automatically adjusting flow according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0039] Step S101, obtaining associated data information of a target device; wherein the associated data information includes: a target device state, the target device state is a device state of the target device at the next moment, and the target device is any one of a plurality of devices.

[0040] The method of automatically adjusting traffic can be achieved through smart contracts. The specific contents of the smart contract are as follows:

[0041] Smart contracts are a form of contract that is automatically executed, transparent and tamper-proof, and is applied to blockchain technology. In the context of smart homes and traffic control, smart contracts have many significant advantages and can effectively overcome the shortcomings of traditional traffic control strategies. Smart contracts are automated and responsive in real time, and are automatically executed through programmed rules without human intervention. They can respond to changes in system status in real time, automatically adjust traffic control strategies in cloud services based on dynamic data and rules, optimize resource usage, improve system response speed, and ensure device stability.

[0042] In this embodiment, the implementation of smart contracts includes: blockchain platform selection, device and cloud service integration, contract triggering and execution. The specific contents are as follows:

[0043] The execution of smart contracts requires a blockchain platform that supports smart contracts. Blockchain platforms include Ethereum, Hyperledger, EOS, TRON, etc.

[0044] Device-side and cloud service integration: Device-side SDK / protocol: The device communicates with the cloud service platform through IoT protocols (such as MQTT, CoAP, HTTP). The device sends data through the SDK and adjusts its behavior according to the rules of the smart contract.

[0045] Cloud service platform: The cloud uses a microservice architecture to receive and process requests from devices, and executes traffic control strategies through smart contracts.

[0046] Contract triggering and execution: Event-driven triggering. When the device status or user behavior changes, the event triggers the execution of the smart contract and adjusts the traffic control strategy.

[0047] Timing trigger: Regularly check and adjust the flow control requirements according to the scheduled time (such as daily or weekly).

[0048] The solution of this embodiment is applied in the blockchain, that is, the flow adjustment of the device can be achieved through the smart contract.

[0049] The target device may represent any one of the multiple devices, and the target device may be any device in a smart home, such as a door lock, a refrigerator, etc., which is not specifically limited here.

[0050] The associated data information may represent various data related to the target device, which are used to describe the state, performance, configuration or other important attributes of the device. In this embodiment, the associated data information specifically refers to the state of the target device.

[0051] The state of the target device may be the device state of the target device at the next moment, wherein the device state may indicate whether the target device fails, for example, whether a door lock fails, whether a refrigerator fails, etc., which are not specifically limited here.

[0052] The predicted state information of the target device at the next moment can be collected from various data sources (such as device sensors, log files, management systems, etc.). It can be predicted by machine learning models or inferred based on historical data and other relevant factors.

[0053] As an example, in a smart home system, step S101 can be used to obtain status information of each smart device, such as the temperature setting of the air conditioner, the status of the light, the alarm status of the security system, etc., in order to achieve more intelligent home control. For example: the smart home system contains multiple smart light bulbs, and the user can automatically adjust the light brightness according to the time. Step S101 is executed: the system collects the current status information (such as brightness, color temperature) and time information of each light bulb. Then, based on the user's preference settings and the current time, predict the state that each light bulb should have at the next moment. Automatically adjust the brightness and color temperature of each light bulb according to the prediction results to meet the lighting effect expected by the user.

[0054] Step S102: If the device state of the target device at the current moment is different from the target device state, the importance and request frequency of the target device state are detected to generate a detection result.

[0055] The importance of the target device status can represent the importance of the target device status to the entire system or business, which may specifically involve factors such as device criticality, task priority, etc. The request frequency can represent the frequency of requests for target device status changes, reflecting the urgency or periodicity of status changes.

[0056] Specifically, first compare the actual state of the target device at the current moment with the expected target state. If the two are different, it means that action needs to be taken. Then, detect the importance of this state change (for example, whether it affects the core business) and the frequency of requests (for example, whether this change occurs occasionally or frequently). Based on this information, generate a detection result, which will be used to guide subsequent traffic adjustments.

[0057] Step S103: adjusting the flow of the target device according to the detection result.

[0058] According to the detection result generated in step S102, the network traffic of the target device is adjusted accordingly. If the target state is very important and the request is frequent, the traffic may need to be increased to ensure the performance of the device. Conversely, if the target state is not so important or the request is not frequent, the traffic may be reduced to save resources.

[0059] As an example, in a smart home system, if a user often watches streaming videos at night (the target device status is high bandwidth demand), and this behavior is very important (high importance level) and occurs frequently (high request frequency level), the system will ensure that network traffic is preferentially allocated to the video playback device.

[0060] As an example, in a smart home system, if a door lock fails, the request frequency of the device can be reduced to avoid frequent data transmission.

[0061] The method for automatically adjusting traffic provided by this embodiment obtains the associated data information of the target device in real time, including the state of the target device at the next moment, so that the system can quickly respond to changes in the network and device status, thereby making timely traffic adjustments. Compared with traditional static rules, this method can dynamically adjust traffic according to changes in device status, avoiding problems such as traffic congestion and low data transmission efficiency caused by the inability of static rules to adapt to real-time changes.

[0062] At the same time, the detection results are generated by combining the importance of the device status and the frequency of requests, which can more accurately reflect the actual demand of the device for network traffic, thereby making more reasonable traffic allocation. This enables the system to flexibly adapt to the needs of different device types and different application scenarios, and improves the flexibility and adaptability of traffic control.

[0063] In a possible implementation, the above step S103 includes:

[0064] Step S1031: if the detection result indicates that the importance level is greater than the importance threshold and / or the request frequency level is greater than the request threshold, reduce the traffic of the target device.

[0065] If the detection result indicates that the importance of the target device is greater than the importance threshold, or the request frequency is greater than the request threshold (or both are met), due to limited system resources, it is necessary to give priority to other more important or more frequently requested devices, then the traffic of the target device shall be reduced; or because the current status of the target device is good enough and does not require additional traffic support, then the traffic of the target device shall be reduced.

[0066] Step S1032: if the detection result indicates that the importance level is not greater than the importance threshold and / or the request frequency level is not greater than the request threshold, increase the traffic of the target device.

[0067] If the detection result indicates that the importance of the target device is not greater than the importance threshold, and the request frequency is not greater than the request threshold (neither is satisfied), that is, the current status of the target device needs to be improved, or the system resources are relatively abundant and more traffic can be allocated to the target device, then the traffic of the target device is increased.

[0068] As an example, there are multiple devices in a smart home system, including smart speakers, smart cameras, smart lighting systems, etc. The system needs to dynamically adjust the traffic based on the user's usage habits and the status of the device.

[0069] Users often use smart speakers to play music or news at night, so their requests may be more frequent. However, if the system detects that the current status of the smart speaker (such as volume, sound quality) is good enough and other devices (such as smart cameras, which are performing security monitoring) are more important, the system may temporarily reduce the traffic of the smart speaker (such as lowering the bit rate of music playback) to ensure that the smart camera has enough bandwidth for high-definition monitoring.

[0070] If the importance of the smart lighting system is not high (for example, users rarely use the smart dimming function) and the request frequency is not high (for example, users usually only adjust the lights at specific times), the system may increase the traffic of the smart lighting system (for example, increase its response speed or increase the frequency of sending control instructions) to improve the user experience or conduct system testing. However, this situation may be rare in actual applications, because we usually expect to give priority to key services or high-frequency request devices when resources are limited.

[0071] The method for automatically adjusting traffic provided in this embodiment can reduce the traffic of the target device to avoid overload when the task it processes is of high importance or the request is frequent, ensuring that the key task is processed in a timely manner and preventing the system from crashing due to excessive resource consumption. Conversely, for devices of lower importance or infrequent requests, increasing the traffic can improve resource utilization and make the overall system performance more balanced.

[0072] In a possible implementation, the associated data information further includes security warning information; wherein the method further includes:

[0073] Step a1: when the security warning information of the target device is obtained, the flow of the target device is increased.

[0074] Security alert information can represent a signal or message sent by a target device indicating that it may face security threats or has been attacked. When the system or monitoring tool detects that a target device sends a security alert message, it immediately takes action to increase the network traffic of the device. The purpose of this is to ensure that the security alert information can be quickly transmitted to the relevant security processing system so as to respond to and handle potential security threats in a timely manner.

[0075] As an example, when a security alarm occurs on a device, the contract can temporarily relax the rate limit to allow more data to flow into the cloud for processing. For example, when a doorbell is pressed, the contract can allow the device to upload more frequent video streams or real-time images.

[0076] Step a2: directing the traffic of the target device to the security service node corresponding to the security warning information, so that the security warning information is processed by the security service node.

[0077] Once the traffic of the target device increases, the system will direct this part of the traffic to a dedicated security service node. The security service node is responsible for receiving, analyzing and processing security warning information, and then taking corresponding security measures based on the analysis results, such as isolating infected devices and preventing the spread of malicious traffic.

[0078] As an example, smart contracts can trigger load balancing adjustments based on key events or device states. For example, when a home security device detects unusual activity, a smart contract can immediately direct traffic to a dedicated security service node instead of a normal device control node.

[0079] As an example, when a smart door lock detects an abnormal unlocking attempt (such as multiple incorrect password entries), it will issue a security alert message. After the smart home system receives the security alert message from the smart door lock, it immediately increases the network traffic of the smart door lock. This is done to ensure that the security alert message can be quickly transmitted to the security processing center of the smart home system. The smart home system directs the traffic of the smart door lock to a dedicated security service node. After the security service node receives the security alert message, it will immediately analyze it. If a security threat is confirmed (such as an attempt to brute force the password), the security service node can take measures to lock the smart door lock to prevent further attacks and send a security alert to the user through the user interface of the smart home system.

[0080] The method for automatically adjusting traffic provided in this embodiment can increase the traffic of the target device and direct it to the security service node immediately when the target device has a security warning message, so as to ensure that the security service can quickly access and handle potential security threats. This immediate response helps to reduce the impact scope and time of security incidents and reduce losses.

[0081] Furthermore, by directing traffic to dedicated security service nodes, the professional security functions provided by these nodes (such as intrusion detection, malicious traffic filtering, security auditing, etc.) can be used to enhance the security protection capabilities of the system. This helps to build a more solid security line of defense against external attacks and internal threats.

[0082] In a possible implementation, the associated data information further includes user behavior information; wherein the above method further includes:

[0083] Step b1, determining usage information of the target device based on user behavior information.

[0084] User behavior information can represent the behavior data generated by users when using devices or systems, including but not limited to operating habits, usage time, usage frequency, access content, etc. Usage information can represent the usage of target devices based on the analysis of user behavior information, such as device activity, peak usage period, data transmission requirements, etc.

[0085] The system collects and analyzes user behavior information, which can come from direct user operations, device sensor data, network logs, etc. By analyzing this information, it is possible to understand the user's usage habits and needs for the target device, thereby determining the usage information of the target device.

[0086] Step b2: adjusting the traffic of the target device according to the usage information of the target device.

[0087] After obtaining the usage information of the target device, the system will adjust the traffic of the target device based on this information. For example, if the target device is frequently used in a specific time period, the system may increase the traffic allocation in that time period; if the target device is idle for a long time, the system may reduce its traffic allocation to save network resources.

[0088] As an example, the traffic limit can be adjusted based on the user's usage habits. For example, for users who frequently use smart lighting devices, the contract can gradually increase the request frequency limit of the device.

[0089] As an example, a smart home system includes a smart camera and a smart speaker.

[0090] For smart cameras: The system finds that users often check the camera's surveillance images between 8 pm and 10 pm, so it determines this time period as the camera's peak usage period. The system increases the camera's traffic allocation between 8 pm and 10 pm to ensure real-time transmission and clarity of the surveillance images; it reduces traffic allocation during other time periods to save bandwidth and storage resources.

[0091] For smart speakers: The system analyzes the user's voice command records and finds that users usually use the speakers to play news and music between 7 and 8 in the morning, so it determines this time period as the peak usage period for speakers. The system increases the speaker's traffic allocation between 7 and 8 in the morning to ensure fast response to voice commands and high-quality music playback; in other time periods, the system adjusts the traffic allocation according to actual needs to balance sound quality and energy consumption.

[0092] The method for automatically adjusting traffic provided in this embodiment can more accurately understand the user's usage habits and needs for the target device by analyzing the user behavior information, so that the system can dynamically adjust the traffic to meet the user's personalized needs and provide a smoother and more responsive service experience. At the same time, adjusting the traffic according to the usage information of the target device can ensure that sufficient resource support is provided when the user demand peaks, and release excess resources when the demand is low, avoiding resource waste and improving the overall resource utilization efficiency.

[0093] In a possible implementation, the associated data information further includes: the number of devices; wherein the above method further includes:

[0094] Step c1, detecting whether the number of devices has changed.

[0095] Step c2: if the number of devices changes, check whether the number of devices increases.

[0096] Step c3: if the number of devices increases, increase the traffic of the service cluster for the newly added devices; wherein the service cluster indicates the collection of all devices.

[0097] A service cluster can represent a collection of multiple servers or devices that work together to provide a certain service or function. In this context, the service cluster serves all connected devices.

[0098] The number of devices can represent the total number of devices connected to the smart home system or network. Specifically, the system checks the number of currently connected devices regularly or in real time and compares it with previous records to determine whether the number of devices has changed. When a change in the number of devices is detected, the system further determines whether the change is an increase or decrease. Once a new device is confirmed to have joined, the system will adjust the resource allocation of the service cluster accordingly based on the number of newly added devices and the expected data / request volume to ensure that the quality of service is not affected. This may involve measures such as increasing server processing power and expanding network bandwidth.

[0099] As an example, if a large number of smart devices are added to a home, smart contracts can automatically add more cloud computing resources or server nodes to handle the increased traffic.

[0100] As an example, a smart home system includes smart light bulbs, smart door locks, smart cameras and other devices. The system periodically checks the number of devices connected to the home, for example, from 3 devices to 4. The system detects that the number of devices has increased from 3 to 4, and determines that a new device has been added. In order to support the newly added smart device (such as a smart thermostat), the smart home system may increase the processing power of its cloud service or optimize the network settings to ensure that all devices can work smoothly without response delays or service quality degradation due to the addition of new devices.

[0101] The method for automatically adjusting traffic provided in this embodiment enables the system to automatically identify and respond to changes when the number of devices increases, and ensures that all devices can obtain sufficient service support by increasing the traffic of the service cluster, thereby improving the flexibility and scalability of the system.

[0102] In a possible implementation, the associated data information further includes: data transmission flow; wherein the above method further includes:

[0103] Step d1, detecting whether the data transmission flow exceeds the flow threshold.

[0104] Step d2: if the data transmission flow exceeds the flow threshold, the behavior data information of the target device is obtained.

[0105] Data transmission flow can characterize the amount of data transmitted in the network, which can be measured in bytes, kilobytes, megabytes or larger units. It reflects the total amount of data sent and received by a device in a period of time.

[0106] Traffic thresholds can be used to determine whether data transmission traffic exceeds a normal or acceptable range. Specifically, the network traffic of the target device is monitored and compared with the preset traffic threshold. When traffic exceeds the limit, the system or administrator will collect behavioral data information of the target device to understand why the device generates a large amount of traffic and whether there is any abnormal behavior.

[0107] Step d3, adjusting the traffic of the target device according to the behavior data information of the target device.

[0108] Based on the collected behavioral data information, the system or administrator can limit, optimize or reallocate the traffic of the target device to ensure the rational use of network resources and avoid potential security risks.

[0109] As an example, some devices in smart homes (such as security cameras, door locks, sensors, etc.) may generate burst traffic in certain situations. For example, when an abnormality occurs in a device or a user performs an operation, a large amount of data traffic may be generated suddenly. Smart contracts can control burst traffic.

[0110] As an example, smart contracts can automatically adjust traffic thresholds based on the behavior of a device. For example, if a door lock or security system is abnormal, the contract can allow higher burst traffic.

[0111] As an example, in a smart home, a smart speaker consumes a large amount of network traffic due to frequent playback of high-quality music, exceeding the preset traffic threshold. The smart home system detects that the traffic of the smart speaker exceeds the limit. The system collects behavioral data information of the smart speaker and finds that the smart speaker frequently plays music in a specific time period and the sound quality is set to the highest. Based on this information, the smart home system adjusts the traffic of the smart speaker, such as reducing the sound quality of music playback or limiting the playback time, to ensure that other smart home devices can use network resources normally. At the same time, the system also sends reminders to users, suggesting that users use the network functions of smart speakers reasonably.

[0112] The method for automatically adjusting traffic provided in this embodiment can identify traffic anomalies by monitoring data transmission traffic and setting thresholds. Once the traffic exceeds the threshold, the system will further analyze the behavior data of the target device to more accurately understand the cause of the traffic anomaly and make traffic adjustment decisions accordingly, thereby ensuring the reasonable allocation and efficient use of resources.

[0113] Furthermore, analyzing the behavior data of the target device not only helps identify the cause of traffic anomalies, but may also reveal potential security threats. For example, abnormal data transmission patterns may indicate the risk of malicious attacks or data leaks. By adjusting traffic in a timely manner and taking appropriate security measures, the system can enhance overall security.

[0114] In a possible implementation, if there are multiple target devices, the method further includes:

[0115] Step e1, obtaining the priority of each target device.

[0116] When there are multiple target devices, each target device needs to be executed, so the priority of each target device needs to be obtained. For example, priority A corresponds to device A, priority B corresponds to device B, etc.

[0117] Step e2, if at least two target devices are executed, sort each target device according to the priority of the target device to obtain a sorting result; wherein the sorting result indicates that each target device is sorted in order from high to low priority.

[0118] The system will sort multiple target devices according to the priority information obtained previously. The sorting result will indicate that each device is arranged in order from high to low priority for subsequent resource allocation or task scheduling.

[0119] Step e3: Allocate traffic to the target device with a high priority according to the sorting result, so that the target device with a high priority performs the target operation according to the allocated traffic.

[0120] In the actual execution process, according to the ranking of each target device in the above ranking result, traffic can be allocated to the target devices in turn, and the target devices can be executed according to the allocated traffic.

[0121] As an example, smart contracts can dynamically allocate bandwidth or computing resources based on the priority of traffic. High-priority traffic (such as emergency alarm signals, video surveillance streams, etc.) can get more bandwidth, while low-priority traffic (such as background data transmission, status updates, etc.) can be queued or buffered.

[0122] As an example, when multiple devices request network resources at the same time (such as smart cameras and smart speakers need to upload and download data at the same time), the smart home system will sort the devices according to the previously set priority. In this example, the smart camera will get network resources first because it has the highest priority; followed by the smart speaker; and finally the smart door lock and smart light bulb (if resources are limited, they may be temporarily restricted or delayed).

[0123] The method for automatically adjusting traffic provided in this embodiment can ensure that resources are first allocated to tasks with higher priority, more importance or more urgency by sorting according to the priority of target devices, thereby ensuring that key services and operations are supported in a timely and adequate manner.

[0124] In one possible implementation, different data models can be used in the blockchain to implement the specific solutions for each of the above steps.

[0125] Device Information Model (Device): The device information model defines the basic information of each smart home device, including the device status, traffic limit, priority, etc.

[0126] The field information of the data model is as follows:

[0127] *deviceAddress: The unique identifier (address) of the device on the blockchain. It is used to identify the smart contract of the device.

[0128] *deviceStatus: The current status of the device. Enumeration values ​​include: NORMAL: The device is operating normally. FAULTY: The device has a fault and its flow needs to be limited. ACTIVE: The device is in use and the flow limit can be controlled normally. INACTIVE: The device is not in use and the flow can be paused or reduced.

[0129] *dataRate: The current data upload rate of the device, usually expressed as the amount of data uploaded per unit time (for example, bytes / second).

[0130] *maxRateLimit: The maximum traffic limit of the device. Smart contracts can adjust the device's traffic based on this value.

[0131] *priority: The traffic priority of the device. Devices with higher priority will get more bandwidth during traffic scheduling. For example, security devices (such as doorbells and cameras) may have higher priority.

[0132] Event Information Model (Event): The event information model defines events related to the target device or environment. When an event is triggered, it will cause the flow control strategy to be adjusted. Event types include doorbell pressing, motion detection, security alarm, etc.

[0133] The field information of the data model is as follows:

[0134] *eventType: event type, enumeration values ​​include: DOORBELL_PRESSED: doorbell pressed. MOTION_DETECTED: motion detected. SECURITY_ALARM: security alarm.

[0135] *timestamp: The timestamp of the event, which records the exact time when the event occurred and is used as a reference when processing flow control strategies in the contract.

[0136] *priority: The priority of the event. Security-related events (such as security alarms) usually have a higher priority, while doorbell presses or motion detections have a lower priority.

[0137] Traffic Control Rule Model (TrafficControlRule): The traffic control rule model defines how to adjust the device's traffic control strategy based on device status, event triggers, or other conditions. Traffic control strategies include rate limiting, burst flow control, load balancing, etc.

[0138] The field information of the data model is as follows:

[0139] *deviceAddress: The device address to which the rule applies.

[0140] *rateLimitAdjustment: The adjustment amplitude of the flow rate. This value indicates the adjustment amount relative to the current maximum rate of the device. For example, 100 means increasing the flow rate by 100%, while -50 means reducing it by 50%.

[0141] *adjustmentReason: The reason for the adjustment. For example: "equipment failure", "security incident", "user behavior", etc.

[0142] *adjustmentTime: The timestamp when the adjustment takes effect.

[0143] Traffic Priority Control Model: When dealing with burst traffic and load balancing, it is necessary to define the priority of device traffic. The priority control model helps ensure that critical devices (such as security cameras) can obtain sufficient bandwidth in the event of network congestion or burst traffic.

[0144] The field information of the data model is as follows:

[0145] *deviceAddress: The address of the device, used to identify the device.

[0146] *priorityLevel: The traffic priority of the device. The higher the priority value, the higher the traffic priority of the device.

[0147] *burstThreshold: The traffic threshold allowed by the device in case of burst traffic. The unit may be the number of bytes or the amount of data in a time period. For example, the burst traffic threshold is 100MB.

[0148] Flow Control Execution: The flow control policy execution model defines how to trigger the application of flow control rules and when to execute these rules. It includes the execution of operations such as device status update, event triggering, and flow adjustment.

[0149] The field information of the data model is as follows:

[0150] *executionTime: The timestamp of the traffic control policy execution.

[0151] *deviceAddress: The device address where the flow control policy needs to be executed.

[0152] *ruleApplied: Applied traffic control rules. For example: "Reduce traffic in failure mode", "Relax traffic in security events", etc.

[0153] *adjustedDataRate: The data rate after traffic adjustment.

[0154] The method for automatically adjusting traffic provided by this embodiment is that the smart contract not only has the characteristics of automatic execution and intelligence, but also can automatically adjust the traffic control strategy according to the status, behavior and environmental conditions of the device (such as event triggering, user behavior, etc.). By combining with blockchain technology, smart contracts can execute and adjust strategies in real time, thereby improving the system response speed and reducing human intervention. In addition, smart contracts can provide fine-grained traffic control and accurately allocate bandwidth and computing resources. Especially in burst traffic scenarios, smart contracts can intelligently adjust the priority of traffic to avoid traffic conflicts or overloads. Traditional traffic control strategies are usually difficult to achieve this flexibility.

[0155] In addition, smart contracts can be dynamically adjusted based on the real-time status of the device, environmental changes, and user behavior. For example, the device's traffic limit can be adjusted based on the user's usage frequency, or the data request frequency can be automatically adjusted when the device status changes (such as a smart door lock malfunctions).

[0156] In addition, smart contracts can achieve dynamic traffic management for a large number of devices in smart homes through integration with cloud platforms, devices, and services. Devices communicate with cloud platforms through IoT protocols and automatically adjust their behavior through the rules of smart contracts. This seamless integration means that smart home systems can easily expand and adapt to different devices and scenarios without manually configuring each device. It allows traffic control to be managed not only at the device level, but also to achieve flexible traffic scheduling across devices and scenarios.

[0157] In this embodiment, a flow adjustment device for an apparatus is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0158] This embodiment provides a flow adjustment device for a device, such as Figure 2 As shown, it includes: an acquisition module 201, which is used to acquire the associated data information of the target device; wherein the associated data information includes: a target device state, the target device state is the device state of the target device at the next moment, and the target device is any one of a plurality of devices; a detection module 202, which is used to detect the importance of the target device state and the request frequency if the device state of the target device at the current moment is different from the target device state, and generate a detection result; an adjustment module 203, which is used to adjust the traffic of the target device according to the detection result.

[0159] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0160] The flow adjustment device of the equipment in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0161] The embodiment of the present invention also provides a computer device having the above Figure 2 Flow regulating device of the device shown.

[0162] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.

[0163] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0164] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0165] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0167] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0168] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0169] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.

[0170] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0171] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0172] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for automatically adjusting flow rate, characterized in that: The method comprises: Acquire the associated data information of the target device; wherein the associated data information includes: the state of the target device, the state of the target device is the device state of the target device at the next moment, and the target device is any one of the multiple devices; If the device state of the target device at the current moment is different from the target device state, detecting the importance and request frequency of the target device state, and generating a detection result; The flow of the target device is adjusted according to the detection result.

2. The method for realizing automatic flow adjustment according to claim 1, characterized in that: The adjusting the flow of the target device according to the detection result includes: If the detection result indicates that the importance level is greater than the importance threshold and / or the request frequency level is greater than the request threshold, reducing the traffic of the target device; If the detection result indicates that the importance level is not greater than the importance threshold and / or the request frequency level is not greater than the request threshold, the traffic of the target device is increased.

3. The method for realizing automatic flow adjustment according to claim 1, characterized in that: The associated data information also includes security warning information; wherein the method further includes: When security warning information of a target device is obtained, increasing the flow of the target device; Directing the traffic of the target device to the security service node corresponding to the security warning information, so that the security warning information is processed by the security service node.

4. The method for realizing automatic flow adjustment according to claim 1, characterized in that: The associated data information also includes user behavior information; wherein the method further includes: Determining usage information of the target device according to the user behavior information; The flow of the target device is adjusted according to the usage information of the target device.

5. The method for realizing automatic flow adjustment according to claim 1, characterized in that: The associated data information also includes: the number of devices; wherein the method further includes: Detecting whether the number of devices changes; If the number of devices changes, detecting whether the number of devices increases; If the number of the devices increases, the traffic of the service cluster is increased for the newly added devices; wherein the service cluster indicates the collection of all devices.

6. The method for realizing automatic flow adjustment according to claim 1, characterized in that: The associated data information also includes: data transmission flow; wherein the method further includes: Detecting whether the data transmission flow exceeds a flow threshold; If the data transmission flow exceeds the flow threshold, obtaining behavior data information of the target device; The traffic of the target device is adjusted according to the behavior data information of the target device.

7. The method for automatically adjusting flow rate according to any one of claims 1 to 6, characterized in that: If there are multiple target devices, the method further includes: Get the priority of each target device; If at least two target devices are executed, sorting each target device according to the priority of the target device to obtain a sorting result; wherein the sorting result indicates that each target device is sorted in order from high to low priority; According to the sorting result, traffic is allocated to the target device with a high priority, so that the target device with a high priority performs a target operation according to the allocated traffic.

8. A device for automatically adjusting flow rate, characterized in that: The device comprises: An acquisition module, used to acquire associated data information of a target device; wherein the associated data information includes: a target device state, the target device state is a device state of the target device at a next moment, and the target device is any one of a plurality of devices; A detection module, configured to detect the importance and request frequency of the target device state and generate a detection result if the device state of the target device at the current moment is different from the target device state; An adjustment module is used to adjust the flow of the target device according to the detection result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for automatically adjusting flow according to any one of claims 1 to 7.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the method for automatically adjusting flow rate according to any one of claims 1 to 7.