Disclosure of Invention
At least some embodiments of the present invention provide an information processing method, an information processing apparatus, a storage medium, a processor, and a system, so as to at least solve the technical problems in the related art that, in a node control process of a mesh network, a centralized control manner is usually adopted, which is prone to high consumption of computing power and storage resources, and causes network congestion and poor synchronization of control results.
According to an embodiment of the present invention, there is provided an information processing method including:
receiving configuration information from a terminal, wherein the configuration information comprises: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal; acquiring a status message issued by the first intelligent device based on the subscription address, wherein the information carried in the status message comprises: status data of the first smart device; the rule is parsed and an action corresponding to the state data is executed.
Optionally, the rule comprises: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, parsing the rule, and performing the action corresponding to the state data includes: analyzing the rule to obtain a first operation code corresponding to the state data and a trigger value corresponding to the first operation code; an action corresponding to the trigger value is performed.
Optionally, after receiving the configuration information from the terminal, the method further includes: and returning a configuration result to the terminal, wherein the configuration result is used for informing whether the configuration information is successfully configured on the second intelligent equipment.
According to an embodiment of the present invention, there is provided another information processing method including:
receiving configuration information from a terminal, wherein the configuration information comprises: the issuing address is determined by a multicast address newly established by an application on the terminal; issuing a status message to the second intelligent device based on the issuing address so as to enable the second intelligent device to execute an action corresponding to the status message, wherein information carried in the status message comprises: status data of the first smart device.
Optionally, pushing the status message to the second smart device based on the publishing address includes: determining status data in response to a control operation acting on the first smart device; and issuing the status message to the second intelligent device based on the issuing address and the status data.
Optionally, after receiving the configuration information from the terminal, the method further includes: and returning a configuration result to the terminal, wherein the configuration result is used for informing whether the configuration information is successfully configured on the first intelligent equipment.
According to an embodiment of the present invention, there is provided another information processing method including:
sending first configuration information to a first intelligent device to enable the first intelligent device to issue a status message to a second intelligent device, wherein the first configuration information comprises: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device; sending second configuration information to the second intelligent device to enable the second intelligent device to acquire the status message and execute an action corresponding to the status data, wherein the configuration information comprises: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Optionally, before sending the second configuration information to the second smart device, the method further includes: generating a rule, wherein the rule comprises: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, after sending the first configuration information to the first smart device, the method further includes: and receiving a first configuration result returned by the first intelligent device, wherein the first configuration result is used for informing whether the configuration information is successfully configured on the first intelligent device.
Optionally, after sending the second configuration information to the second smart device, the method further includes: and receiving a second configuration result returned by the second intelligent device, wherein the second configuration result is used for informing whether the configuration information is successfully configured on the second intelligent device.
According to an embodiment of the present invention, there is also provided an information processing apparatus including:
a receiving module, configured to receive configuration information from a terminal, where the configuration information includes: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal; the obtaining module is configured to obtain, based on the subscription address, a status message published by the first smart device, where information carried in the status message includes: status data of the first smart device; and the processing module is used for analyzing the rule and executing the action corresponding to the state data.
Optionally, the rule comprises: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, the processing module comprises: the first processing unit is used for analyzing the rule and acquiring a first operation code corresponding to the state data and a trigger value corresponding to the first operation code; and the second processing unit is used for executing the action corresponding to the trigger value.
Optionally, the apparatus further comprises: and the feedback module is used for returning a configuration result to the terminal, wherein the configuration result is used for informing whether the configuration information is successfully configured on the second intelligent equipment.
According to an embodiment of the present invention, there is also provided another information processing apparatus including:
a receiving module, configured to receive configuration information from a terminal, where the configuration information includes: the issuing address is determined by a multicast address newly established by an application on the terminal; the issuing module is configured to issue a status message to the second intelligent device based on the issuing address, so that the second intelligent device executes an action corresponding to the status message, where information carried in the status message includes: status data of the first smart device.
Optionally, the publishing module comprises: a determination unit configured to determine status data in response to a control operation acting on the first smart device; and the issuing unit is used for issuing the status message to the second intelligent equipment based on the issuing address and the status data.
Optionally, the apparatus further comprises: and the feedback module is used for returning a configuration result to the terminal, wherein the configuration result is used for informing whether the configuration information is successfully configured on the first intelligent equipment.
According to an embodiment of the present invention, there is also provided an information processing apparatus including:
the first sending module is configured to send first configuration information to the first intelligent device, so that the first intelligent device issues a status message to the second intelligent device, where the first configuration information includes: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device; a second sending module, configured to send second configuration information to a second smart device, so that the second smart device obtains the status message and executes an action corresponding to the status data, where the configuration information includes: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Optionally, the apparatus further comprises: a generating module, configured to generate a rule, where the rule includes: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, the apparatus further comprises: the first receiving module is configured to receive a first configuration result returned by the first intelligent device, where the first configuration result is used to notify whether the configuration information is successfully configured on the first intelligent device.
Optionally, the apparatus further comprises: and the second receiving module is used for receiving a second configuration result returned by the second intelligent device, wherein the second configuration result is used for informing whether the configuration information is successfully configured on the second intelligent device.
According to an embodiment of the present invention, there is further provided a processor configured to execute a program, where the program is configured to execute the information processing method in any one of the above methods when the program is executed.
According to an embodiment of the present invention, there is also provided an electronic apparatus including a memory and a processor, the memory storing a computer program therein, and the processor being configured to execute the computer program to perform the information processing method in any one of the above.
According to an embodiment of the present invention, there is also provided an information processing system including: the terminal comprises the terminal, the first intelligent equipment and the second intelligent equipment, wherein the second intelligent equipment comprises one of the information processing devices, the first intelligent equipment comprises the one of the information processing devices, and the terminal comprises the one of the information processing devices.
In at least part of embodiments of the present invention, a method of receiving configuration information from a terminal, where the configuration information includes a subscription address and a rule, and the subscription address is determined by a multicast address newly created by an application on the terminal, obtaining a status message carrying status data issued by a first smart device through the subscription address, parsing the rule, and executing an action corresponding to the status data, so as to achieve a purpose of using a decentralized localized control manner to trigger a node to execute a corresponding action in a node control process of a mesh network, thereby achieving technical effects of reducing computational pressure of a control node, reducing storage resource occupation of the control node, alleviating network congestion, and improving synchronization efficiency of a control result, and further solving a problem that a centralized control manner is usually used in a node control process of the mesh network in related technologies, which is prone to high consumption, and has high computational power and storage resource, The technical problems of network congestion and poor synchronization of control results are caused.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 3 is a schematic diagram of performing node control in a mesh network by using a weighted control method according to the related art, and as shown in fig. 3, a light sensor server model is configured in a light sensor and periodically broadcasts illumination intensity. Each controlled node is configured with a light sensor client model (light sensor client model) and its own control logic. After the controlled node receives the illumination intensity, the state of the controlled node can be set through the control logic. The control logic is dispersed into each controlled node, so that the calculation and storage tasks of the light sensor are lightened, the broadcast packet sent by the light sensor occupies less bandwidth, and the synchronism of the control result is better. In addition, since the light sensor only needs to send its own state (state) data, even if another type of controlled node is added, it is not necessary to update the existing firmware of the light sensor. However, since each controlled node needs to be configured individually, the whole configuration process is slow when the number of nodes is gradually increased.
In the process of node control in the decentralized control mode, the light sensor actually sends control rules to each controlled node when sending its state data to each controlled node. Fig. 4 is a schematic diagram of a control rule for node control by using a decentralized control method according to the related art, and as shown in fig. 4, when the light sensor sends state data of itself to each controlled node, which is lower than 1k, the bulb lamp sets the light brightness to 100 and performs a light-on operation. When the light sensor sends state data of the light sensor to each controlled node, the state data of the light sensor is higher than 1k, the bulb lamp sets the light brightness to be 50. When the light sensor sends own state data to each controlled node, the state data is higher than 10k, the bulb lamp sets the lamp brightness to be 0, and the lamp turning-off operation is executed.
In accordance with one embodiment of the present invention, there is provided an information processing method, wherein the steps shown in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and wherein, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown.
The method embodiments may be performed in an information handling system. The information processing system may include: the terminal, first smart machine and second smart machine. The terminal may be a mobile terminal, a computer terminal or a similar computing device. Taking the example of the Mobile terminal running on the Mobile terminal, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. The first intelligent device and the second intelligent device are both intelligent household devices. And the first intelligent equipment and the second intelligent equipment adopt a local automation control mode based on the weight distribution formula to carry out node control. The local automation control mode based on the weight distribution mode is a function similar to state binding. When the state of one intelligent device changes, at least one state of another at least one intelligent device can be triggered to change accordingly. In a local automation process, there will typically be a trigger (equivalent to the first smart device), an executor (equivalent to the second smart device), and a rule. A trigger refers to an intelligent device that triggers an automated operation, such as: intelligent keys, human body sensors, etc. The executor refers to an intelligent device that performs an automated operation, such as: intelligent lamps and lanterns, smart jack. In an alternative example, the sensor (e.g., a human infrared sensor) may be mounted in a doorway of a kitchen or toilet. When the user approaches, the sensor senses the presence of the user, thereby opening a complementary smart device in the kitchen or toilet, for example: intelligent dome lamp, intelligent air discharge fan etc.. At the moment, the sensor is a trigger, and the matched intelligent equipment in the kitchen or the toilet is an executor. The rules are responsible for defining the specific implementation of the executor to configure its own state data. Local automation process generation rules may be configured in an intelligent Application (APP) and sent to an executor to cause the executor to parse and execute the rules. In an alternative example, a wireless button, which can freely set the installation position. When the wireless button is used for controlling the intelligent bedside lamp to be turned on and off and a user operates the wireless button, the wireless button can issue own state data. After receiving the state data of the wireless button, the intelligent bedside lamp executes corresponding action according to logic in the rule. For example: after receiving the state data corresponding to the single-click wireless button, the intelligent bedside lamp executes an opening or closing action; after receiving the state data corresponding to the double-click wireless button, the intelligent bedside lamp performs an action of adjusting the brightness of the intelligent bedside lamp to the highest value; after receiving the state data corresponding to the long-press wireless button, the intelligent bedside lamp performs an action of adjusting the brightness of the intelligent bedside lamp to the darkest.
The mobile terminal, the first intelligent device and the second intelligent device can participate in the specific execution process of the information processing method, and the main internal structures of the mobile terminal, the first intelligent device and the second intelligent device are basically similar. The following will take the mobile terminal as an example to perform a structural description, and the first intelligent device and the second intelligent device will not be described in detail.
The mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the information processing method in the embodiments of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the information processing method described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In some embodiments, the mobile terminal has a Graphical User Interface (GUI) that a user may interact with by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction functions optionally include interaction of creating a web page, drawing, word processing, making an electronic document, gaming, videoconferencing, instant messaging, emailing, talking interfaces, playing digital video, playing digital music, and/or web browsing, etc., executable instructions for performing the human-machine interaction functions described above are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, an information processing method operating in the second intelligent device is provided, and fig. 5 is a flowchart of the information processing method according to an embodiment of the present invention, as shown in fig. 5, the flowchart includes the following steps:
step S502, receiving configuration information from the terminal, wherein the configuration information includes: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal;
step S504, acquiring a status message published by the first smart device based on the subscription address, where the information carried in the status message includes: status data of the first smart device;
in step S506, the rule is analyzed, and an action corresponding to the status data is executed.
Through the steps, the configuration information from the terminal can be received, the configuration information comprises a subscription address and a rule, the subscription address is determined by a multicast address newly established by an application on the terminal, the state information which is issued by the first intelligent device and carries the state data is obtained through the subscription address, the rule is analyzed, and the action corresponding to the state data is executed, so that the purpose of triggering the node to execute the corresponding action by adopting a distributed localized control mode in the node control process of the mesh network is achieved, the technical effects of reducing the calculation pressure of the control node, reducing the storage resource occupation of the control node, relieving the network congestion and improving the synchronization efficiency of the control result are achieved, and the technical effects that in the node control process of the mesh network in the related technology, a centralized control mode is usually adopted, the calculation capacity and the storage resource with high possibility of high expense are solved, The technical problems of network congestion and poor synchronization of control results are caused.
Optionally, the rule includes: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Fig. 6 is a schematic diagram of a rule structure according to an alternative embodiment of the present invention, and as shown in fig. 6, the structure of each rule may include, but is not limited to: at least one logic (logic) executing the rule, and a multicast address (address) and a first operation code (opcode) corresponding to each logic of the at least one logic. Each of the at least one logic may include, but is not limited to: at least one action (action) and a trigger value (trigger value) corresponding to each of the at least one action. Each action may include, but is not limited to: a second operation code (opcode) and a corresponding value (value).
Optionally, in step S506, parsing the rule and performing the action corresponding to the state data may include performing the following steps:
step S5061, parsing the rule to obtain a first operation code corresponding to the status data and a trigger value corresponding to the first operation code;
in step S5062, an operation corresponding to the trigger value is executed.
After acquiring the state data of the first intelligent device, the second intelligent device firstly needs to analyze the rule sent by the terminal APP to acquire a first operation code corresponding to the state data of the first intelligent device and a trigger value corresponding to the first operation code, then searches for an action corresponding to the trigger value, and finally executes an action corresponding to the trigger value.
Fig. 7 is a schematic logical structure diagram according to an alternative embodiment of the present invention, and as shown in fig. 7, the application scenario may include: the Bluetooth mesh switch is used for controlling the Bluetooth mesh lamp to be turned on or turned off. When a user operates the bluetooth mesh switch, the bluetooth mesh switch may issue its own state data, where the first opcode is 0x8204, and the trigger value is in an on-off state. After receiving the state data of the bluetooth mesh switch, the bluetooth mesh lamp executes the corresponding action according to logic in the rule. For example: when the state data of the Bluetooth mesh switch is 0x00, the Bluetooth mesh lamp executes a closing action; when the status data of the bluetooth mesh switch is 0x01, the bluetooth mesh lamp will perform the turn-on action.
Optionally, in step S502, after receiving the configuration information from the terminal, the method may further include the following steps:
and step S503, returning a configuration result to the terminal, wherein the configuration result is used for informing whether the configuration information is successfully configured on the second intelligent device.
After receiving the configuration information from the terminal, the second intelligent device needs to configure the subscription address and the rule locally according to the configuration information. And if the configuration is successful, the second intelligent device returns a configuration result to the terminal to inform the terminal that the configuration information is successfully configured on the second intelligent device. If the configuration fails, the second intelligent device also needs to return a configuration result to the terminal to inform the terminal that the configuration information fails to be configured on the second intelligent device. Therefore, the terminal determines whether the configuration information needs to be retransmitted or not according to the configuration result fed back by the second intelligent device.
In accordance with one embodiment of the present invention, another information processing method embodiment is provided, it should be noted that the steps illustrated in the flowchart of the figure can be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described can be performed in an order different than here.
In this embodiment, another information processing method operating on the first intelligent device is provided, and fig. 8 is a flowchart of another information processing method according to an embodiment of the present invention, as shown in fig. 8, where the flowchart includes the following steps:
step S802, receiving configuration information from a terminal, wherein the configuration information includes: the issuing address is determined by a multicast address newly established by an application on the terminal;
step S804, issuing a status message to the second intelligent device based on the issuing address, so that the second intelligent device executes an action corresponding to the status message, where information carried in the status message includes: status data of the first smart device.
Through the steps, the configuration information from the terminal can be received, the configuration information comprises the release address, the release address is determined by the multicast address newly established by the application on the terminal, the state information carrying the state data of the first intelligent equipment is released to the second intelligent equipment through the release address, so that the second intelligent equipment executes the action corresponding to the state information, the purpose of triggering the node to execute the corresponding action by adopting a distributed localized control mode in the node control process of the mesh network is achieved, the technical effects of reducing the computing pressure of the control node, reducing the storage resource occupation of the control node, relieving the network congestion and improving the synchronization efficiency of the control result are achieved, and the technical effects that the centralized control mode, the computing capacity and the storage resource with high possibility of high expense and the centralized control mode are generally adopted in the node control process of the mesh network in the related technology are further solved, The technical problems of network congestion and poor synchronization of control results are caused.
Optionally, in step S804, pushing the status message to the second smart device based on the publishing address may include performing the following steps:
step S8041, determining status data in response to a control operation acting on the first intelligent device;
step S8042, issuing a status message to the second smart device based on the issuing address and the status data.
The above control operations may include, but are not limited to: single click operation, double click operation, re-press operation, long press operation, slide operation, and voice control operation. Thus, the first smart device may establish a correspondence between the different control operations and the different status data, thereby determining the status data corresponding to the current control operation based on the correspondence. Then, the first intelligent device issues a status message to the second intelligent device based on the issuing address and the status data. For example: assuming that the first intelligent device is an infinite button and the second intelligent device is an intelligent bedside lamp, the wireless button responds to the clicking operation to determine state data corresponding to the clicking wireless button, and then state information is issued to the intelligent bedside lamp based on the issuing address and the state data. The intelligent bedside lamp will perform an opening or closing action after receiving status data corresponding to a single click of the wireless button. The wireless button may also determine status data corresponding to the double-click wireless button in response to the double-click operation, and then issue a status message to the intelligent bedside lamp based on the issue address and the status data. After receiving the state data corresponding to the double-click of the wireless button, the intelligent bedside lamp performs an action of adjusting the brightness of the intelligent bedside lamp to the maximum. The wireless button can also respond to the long-press operation to determine the state data corresponding to the long-press wireless button, and then issue the state message to the intelligent bedside lamp based on the issuing address and the state data. After receiving the state data corresponding to the long-press wireless button, the intelligent bedside lamp performs an action of adjusting the brightness of the intelligent bedside lamp to the darkest.
Optionally, in step S802, after receiving the configuration information from the terminal, the method may further include the following steps:
and step S803, returning a configuration result to the terminal, wherein the configuration result is used for notifying whether the configuration information is successfully configured on the first intelligent device.
After receiving the configuration information from the terminal, the first intelligent device needs to configure the distribution address locally according to the configuration information. And if the configuration is successful, the first intelligent device returns a configuration result to the terminal to inform the terminal that the configuration information is successfully configured on the first intelligent device. If the configuration fails, the first intelligent device also needs to return a configuration result to the terminal to inform the terminal that the configuration information fails to be configured on the first intelligent device. Therefore, the terminal determines whether the configuration information needs to be retransmitted or not according to the configuration result fed back by the first intelligent device.
In accordance with yet another information processing method embodiment of the present invention, it should be noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
In the present embodiment, a further information processing method operating in the terminal is provided, and fig. 9 is a flowchart of a further information processing method according to an embodiment of the present invention, as shown in fig. 9, the flowchart includes the following steps:
step S901, sending first configuration information to a first intelligent device, so that the first intelligent device issues a status message to a second intelligent device, where the first configuration information includes: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device;
step S904, sending second configuration information to the second smart device, so that the second smart device obtains the status message and executes an action corresponding to the status data, where the configuration information includes: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Through the steps, the first intelligent device can issue the status message to the second intelligent device by sending the first configuration information to the first intelligent device, the second configuration information is sent to the second intelligent equipment so that the second intelligent equipment acquires the state information and executes the action corresponding to the state data, the purpose of triggering the node to execute the corresponding action by adopting a weighted localized control mode in the node control process of the mesh network is achieved, thereby realizing the technical effects of reducing the calculation pressure of the control node, reducing the storage resource occupation of the control node, relieving the network congestion and improving the synchronization efficiency of the control result, and the technical problems that in the related technology, in the node control process of the mesh network, a centralized control mode is usually adopted, the network congestion and the synchronization of the control result are poor due to high computing power and storage resources which are easy to consume are solved.
Optionally, before sending the second configuration information to the second smart device in step S904, the following steps may be further included:
step S903, generating a rule, wherein the rule comprises: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
As also shown in FIG. 6, the structure of each rule may include, but is not limited to: the logic comprises logic of at least one execution rule, and address and a first opcode corresponding to each logic in at least one logic. Each of the at least one logic may include, but is not limited to: at least one action and a trigger value corresponding to each of the at least one action. Each action may include, but is not limited to: a second opcode and a corresponding value.
Optionally, in step S901, after the first configuration information is sent to the first smart device, the following steps may be further included:
step S902, receiving a first configuration result returned by the first intelligent device, where the first configuration result is used to notify whether the configuration information is successfully configured on the first intelligent device.
After receiving the configuration information from the terminal, the first intelligent device needs to configure the distribution address locally according to the configuration information. And if the configuration is successful, the first intelligent device returns a configuration result to the terminal to inform the terminal that the configuration information is successfully configured on the first intelligent device. If the configuration fails, the first intelligent device also needs to return a configuration result to the terminal to inform the terminal that the configuration information fails to be configured on the first intelligent device. Therefore, the terminal determines whether the configuration information needs to be retransmitted or not according to the configuration result fed back by the first intelligent device.
Optionally, in step S904, after sending the second configuration information to the second smart device, the following steps may be further included:
step S905, receiving a second configuration result returned by the second intelligent device, where the second configuration result is used to notify whether the configuration information is successfully configured on the second intelligent device.
After receiving the configuration information from the terminal, the second intelligent device needs to configure the subscription address and the rule locally according to the configuration information. And if the configuration is successful, the second intelligent device returns a configuration result to the terminal to inform the terminal that the configuration information is successfully configured on the second intelligent device. If the configuration fails, the second intelligent device also needs to return a configuration result to the terminal to inform the terminal that the configuration information fails to be configured on the second intelligent device. Therefore, the terminal determines whether the configuration information needs to be retransmitted or not according to the configuration result fed back by the second intelligent device.
FIG. 10 is a flow diagram of a configuration local automation process according to an alternative embodiment of the invention, which may include the following execution steps, as shown in FIG. 10:
step S1002, a new multicast address is established on the APP, and the multicast address is configured as the release address of the trigger;
step S1004, the APP receives a configuration result returned by the trigger;
step S1006, the APP configures the multicast address as a subscription address of an executor, generates a set of rules and sends the rules to the executor;
step S1008, the APP receives a configuration result returned by the executor;
step S1010, the trigger issues own state data to the multicast address;
in step S1012, after receiving the status data of the trigger, the executor executes an operation corresponding to the status data by parsing the rule.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, an information processing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of which has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 11 is a block diagram of an information processing apparatus according to an embodiment of the present invention, as shown in fig. 11, the apparatus including: a receiving module 10, configured to receive configuration information from a terminal, where the configuration information includes: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal; an obtaining module 12, configured to obtain, based on the subscription address, a status message published by the first intelligent device, where information carried in the status message includes: status data of the first smart device; and the processing module 14 is used for analyzing the rule and executing the action corresponding to the state data.
Optionally, the rule comprises: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, the processing module 14 comprises: a first processing unit (not shown in the figure), configured to parse the rule, and obtain a first operation code corresponding to the status data and a trigger value corresponding to the first operation code; a second processing unit (not shown in the figure) for performing an action corresponding to the trigger value.
Alternatively, fig. 12 is a block diagram of an information processing apparatus according to an alternative embodiment of the present invention, and as shown in fig. 12, the apparatus further includes: and the feedback module 16 is configured to return a configuration result to the terminal, where the configuration result is used to notify whether the configuration information is successfully configured on the second intelligent device.
In this embodiment, another information processing apparatus is provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the description of the apparatus is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 13 is a block diagram of another information processing apparatus according to an embodiment of the present invention, as shown in fig. 13, the apparatus including: a receiving module 20, configured to receive configuration information from a terminal, where the configuration information includes: the issuing address is determined by a multicast address newly established by an application on the terminal; the publishing module 22 is configured to publish a status message to the second intelligent device based on the publishing address, so that the second intelligent device executes an action corresponding to the status message, where information carried in the status message includes: status data of the first smart device.
Optionally, the publishing module 22 comprises: a determination unit (not shown in the figure) for determining status data in response to a control operation acting on the first smart device; an issuing unit (not shown in the figure) for issuing a status message to the second smart device based on the issuing address and the status data.
Alternatively, fig. 14 is a block diagram of another information processing apparatus according to an alternative embodiment of the present invention, and as shown in fig. 14, the apparatus further includes: and the feedback module 24 is configured to return a configuration result to the terminal, where the configuration result is used to notify whether the configuration information is successfully configured on the first intelligent device.
In this embodiment, there is provided yet another information processing apparatus, which is used to implement the above-mentioned embodiments and preferred embodiments, and the description of the apparatus that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 15 is a block diagram of a configuration of still another information processing apparatus according to an embodiment of the present invention, as shown in fig. 15, the apparatus including: a first sending module 30, configured to send first configuration information to a first smart device, so that the first smart device issues a status message to a second smart device, where the first configuration information includes: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device; a second sending module 32, configured to send second configuration information to a second smart device, so that the second smart device obtains the status message and executes an action corresponding to the status data, where the configuration information includes: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Alternatively, fig. 16 is a block diagram of a structure of another information processing apparatus according to an alternative embodiment of the present invention, and as shown in fig. 16, the apparatus further includes: a generating module 34, configured to generate a rule, where the rule includes: at least one logic and a multicast address and a first opcode corresponding to each of the at least one logic, each of the at least one logic comprising at least one action and a trigger value corresponding to each of the at least one action, each of the at least one action comprising a second opcode and a corresponding value.
Optionally, as shown in fig. 16, the apparatus further includes: the first receiving module 36 is configured to receive a first configuration result returned by the first intelligent device, where the first configuration result is used to notify whether the configuration information is successfully configured on the first intelligent device.
Optionally, as shown in fig. 16, the apparatus further includes: a second receiving module 38, configured to receive a second configuration result returned by the second intelligent device, where the second configuration result is used to notify whether the configuration information is successfully configured on the second intelligent device.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving configuration information from the terminal, wherein the configuration information includes: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal;
s2, acquiring a status message published by the first smart device based on the subscription address, where the information carried in the status message includes: status data of the first smart device;
s3, the rule is analyzed, and the action corresponding to the status data is executed.
Optionally, in this embodiment, the storage medium may be further configured to store a computer program for executing the following steps:
s1, receiving configuration information from the terminal, wherein the configuration information includes: the issuing address is determined by a multicast address newly established by an application on the terminal;
s2, issuing a status message to the second smart device based on the issuing address, so that the second smart device executes an action corresponding to the status message, where the information carried in the status message includes: status data of the first smart device.
Optionally, in this embodiment, the storage medium may be further configured to store a computer program for executing the following steps:
s1, sending first configuration information to the first smart device, so that the first smart device issues a status message to the second smart device, where the first configuration information includes: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device;
s2, sending second configuration information to the second smart device, so that the second smart device obtains the status message and executes an action corresponding to the status data, where the configuration information includes: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving configuration information from the terminal, wherein the configuration information includes: the method comprises the steps of subscribing addresses and rules, wherein the subscribing addresses are determined by a multicast address newly established by an application on a terminal;
s2, acquiring a status message published by the first smart device based on the subscription address, where the information carried in the status message includes: status data of the first smart device;
s3, the rule is analyzed, and the action corresponding to the status data is executed.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
s1, receiving configuration information from the terminal, wherein the configuration information includes: the issuing address is determined by a multicast address newly established by an application on the terminal;
s2, issuing a status message to the second smart device based on the issuing address, so that the second smart device executes an action corresponding to the status message, where the information carried in the status message includes: status data of the first smart device.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
s1, sending first configuration information to the first smart device, so that the first smart device issues a status message to the second smart device, where the first configuration information includes: and the release address is determined by a multicast address newly established by an application on the terminal, and the information carried in the state message comprises: status data of the first smart device;
s2, sending second configuration information to the second smart device, so that the second smart device obtains the status message and executes an action corresponding to the status data, where the configuration information includes: and a subscription address and a rule, wherein the subscription address is determined by a multicast address newly established by an application on the terminal.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.