Information processing method, apparatus, and storage medium
By using directed graphs and graphical programming interfaces in the IoT training platform to display the execution node logic and state switching effects, the problem of poor readability of application software is solved, and the training effect of IoT technology is improved.
Patent Information
- Application Number
- CN202111467602.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-01-30
AI Technical Summary
In existing IoT technology training platforms, the program code of the application software is poorly readable, which makes it difficult for trainees to intuitively understand the data acquisition or remote control process of sensor devices, thus affecting the training effect.
This invention provides an information processing method and apparatus that displays the execution logic of execution nodes and the state switching effects of controlled nodes through a directed graph. Combined with a graphical programming interface, it allows trainees to intuitively observe the operating principles of the Internet of Things and control the controlled objects through a gateway.
This improved the effectiveness of IoT technology training, enabling trainees to understand the operating principles of IoT more intuitively and enhancing the visualization and operability of the training.
Smart Images

Figure CN114385276B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to an information processing method and device and storage medium. BACKGROUND
[0002] With the continuous popularization and application of Internet of Things technology, it has been widely used in the fields of logistics industry, intelligent agriculture and home security, and the demand for talents has also been increasing, and it is necessary to cultivate professional technical talents in this field.
[0003] At present, Internet of Things technology training is mainly carried out through various Internet of Things training platforms, but in platforms such as smart home training platform and intelligent agriculture training platform, the hardware is basically sensor equipment, and the software is application software, which realizes data collection or remote control of sensor equipment through application software. Since the application software realizes the function by program code, the program code has poor readability, so pure use of application software for Internet of Things technology training cannot enable trainees to intuitively understand how the application software realizes data collection or remote control of sensor equipment, thereby resulting in poor training effect of Internet of Things technology and being not conducive to the cultivation of Internet of Things technology talents. SUMMARY
[0004] The present disclosure provides an information processing method, device and storage medium.
[0005] The technical solution of the present disclosure is implemented as follows:
[0006] In a first aspect, an information processing method is provided, which comprises:
[0007] obtaining an execution result of a controlled object according to a control instruction;
[0008] displaying a directed graph containing execution logic of an execution node and state switching effect of a controlled node on a display interface according to the execution result and execution of a predetermined program, wherein the controlled node is an execution node corresponding to the controlled object in the execution node.
[0009] In the above solution, the method further comprises:
[0010] detecting a control operation acting on a trigger node in the execution node when in an execution state, wherein the trigger node is the execution node corresponding to the control device controlling the controlled object;
[0011] generating a control instruction according to the control operation and the execution logic, wherein the control instruction is used to control the state of the controlled object.
[0012] In the scheme, the method further comprises:
[0013] When in the editing state, detecting an editing operation acting on the directed graph;
[0014] According to the editing operation, updating the directed graph, wherein the directed graph is used for execution of the predetermined program.
[0015] In the scheme, the predetermined program comprises:
[0016] A node program, which is a program associated with the execution node;
[0017] A calling program, which is used to call a node program corresponding to the execution node according to a data flow direction of the directed graph.
[0018] In the scheme, a directed edge connecting two execution nodes in the directed graph represents a data flow relationship between the two execution nodes.
[0019] In the scheme, the method further comprises:
[0020] Sending the control instruction to the controlled object through the gateway; wherein the control instruction is used to control the target state to which the controlled object switches.
[0021] In the scheme, the method further comprises:
[0022] According to a device binding request sent by the perception layer terminal, determining an execution node corresponding to the perception layer terminal from the execution nodes;
[0023] Generating binding information between the perception layer terminal and the determined execution node;
[0024] Sending the binding information to the perception layer terminal through the gateway, wherein the binding information is used for the perception layer terminal to update a binding state of the perception layer terminal.
[0025] In the scheme, the method further comprises:
[0026] Sending the predetermined program to the gateway; wherein the predetermined program is used for the gateway to send a control instruction for controlling the controlled object according to execution of the predetermined program when in an offline state.
[0027] In a second aspect, an information processing device is provided, and the device comprises:
[0028] An acquisition module, which is used to acquire an execution result of a controlled object according to a control instruction;
[0029] A display module is configured to display a directed graph including execution logic of the execution node and state switching effect of the controlled node on a display interface according to the execution result and execution of the predetermined program, wherein the controlled node is an execution node corresponding to the controlled object in the execution node.
[0030] In the above scheme, the apparatus further includes:
[0031] A first detection module is configured to detect a control operation acting on a trigger node in the execution node when in the execution state, wherein the trigger node is the execution node corresponding to the control device controlling the controlled object.
[0032] A generation module is configured to generate a control instruction according to the control operation and the execution logic, wherein the control instruction is used to control the state of the controlled object.
[0033] In the above scheme, the apparatus further includes:
[0034] A second detection module is configured to detect an editing operation acting on the directed graph when in the editing state.
[0035] An update module is configured to update the directed graph according to the editing operation, wherein the directed graph is used for execution of the predetermined program.
[0036] In the above scheme, the predetermined program includes:
[0037] A node program is a program associated with the execution node.
[0038] A calling program is configured to call a node program corresponding to the execution node according to a data flow direction of the directed graph.
[0039] In the above scheme, a directed edge connecting two execution nodes in the directed graph represents a data flow relationship between the two execution nodes.
[0040] In the above scheme, the apparatus further includes:
[0041] A first sending module is configured to send the control instruction to the controlled object through a gateway, wherein the control instruction is used to control a target state to which the controlled object switches.
[0042] In the above scheme, the apparatus further includes:
[0043] A determination module is configured to determine an execution node corresponding to a perception layer terminal from the execution nodes according to a device binding request sent by the perception layer terminal.
[0044] The generating module is configured to generate binding information between the perception layer terminal and the determined execution node.
[0045] The second sending module is configured to send the binding information to the perception layer terminal through the gateway, where the binding information is used for the perception layer terminal to update a binding state of the perception layer terminal.
[0046] In the above scheme, the apparatus further includes:
[0047] The third sending module is configured to send the predetermined program to the gateway, where the predetermined program is used for the gateway to send a control instruction for controlling the controlled object according to execution of the predetermined program when the gateway is in an offline state.
[0048] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the information processing method of any one of the first aspect when executing the program.
[0049] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executable on a processor to implement the steps of the information processing method of any one of the first aspect.
[0050] The information processing method, apparatus and storage medium provided by the present disclosure, the method includes: obtaining an execution result of a controlled object according to a control instruction; and displaying a directed graph including execution logic of an execution node and state switching effect of a controlled node on a display interface according to the execution result and execution of a predetermined program, where the controlled node is an execution node corresponding to the controlled object in the execution node. Compared with using application software for practical training of Internet of Things technology, the present disclosure can enable trainees to intuitively observe the execution logic of the execution node and the state change of the controlled node from the display interface, so that the trainees can more easily understand the operation principle of the Internet of Things, and the practical training effect of the Internet of Things technology can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 An application environment architecture diagram of the information processing method provided by the present disclosure;
[0052] Figure 2 A flowchart of the information processing method provided by the present disclosure;
[0053] Figure 3 A flowchart of another information processing method provided by the present disclosure;
[0054] Figure 4A flowchart of another information processing method provided by an embodiment of the present disclosure is shown in FIG. 6;
[0055] Figure 5 A flowchart of another information processing method provided by an embodiment of the present disclosure is shown in FIG. 6;
[0056] Figure 6 A schematic diagram of a directed graph example provided by an embodiment of the present disclosure is shown in FIG. 7;
[0057] Figure 7 A schematic diagram of a group control lamp topology provided by an embodiment of the present disclosure is shown in FIG. 8;
[0058] Figure 8 A structural schematic diagram of an information processing apparatus provided by an embodiment of the present disclosure is shown in FIG. 9;
[0059] Figure 9 A structural schematic diagram of a computer device provided by an embodiment of the present disclosure is shown in FIG. 10. DETAILED DESCRIPTION
[0060] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure. The embodiments in the present disclosure and the features in the embodiments can be combined with each other arbitrarily without conflict. The steps shown in the flowchart of the drawings can be executed in a computer system such as a group of computer executable instructions. Moreover, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0061] It can be understood that the description of the present disclosure for each embodiment emphasizes the differences between each embodiment, and the same or similar parts can be referred to each other, and for the sake of brevity, will not be repeated.
[0062] Figure 1 An application environment architecture diagram of the information processing method provided by an embodiment of the present disclosure is shown in FIG. 11. As shown in FIG. 11, the application environment architecture diagram of the information processing method provided by an embodiment of the present disclosure includes a user terminal 1101, a network 1102, a server 1103, and a database 1104. Figure 1As shown, the long-range LoRa wireless communication training system comprises: a sensing layer (i.e., the perception layer), a network layer, a platform layer, and an application layer. The sensing layer deploys LoRa terminals, including sensors and actuators. Sensors detect and collect environmental information, while actuators perform corresponding actions. The network layer deploys LoRa gateways and is responsible for data transmission from the sensors. The platform layer manages devices and data, allowing users to view device information and data flow. The application layer is responsible for specific application functions and serves as a graphical training platform (the platform layer and application layer can be combined into a single layer, referred to as a "cloud platform"). This combination of four layers allows for application in various IoT scenarios.
[0063] LoRa terminals include: smart buttons, lighting controllers, temperature and humidity sensors, and air conditioning controllers. Smart buttons and temperature and humidity sensors are sensing devices used to collect environmental or external information and then transmit the corresponding data. Lighting controllers and air conditioning controllers are actuators used to control lighting and air conditioning, respectively.
[0064] Understandable Figure 1 This disclosure is intended to more clearly illustrate the technical solutions of the embodiments herein and does not constitute a limitation on the technical solutions provided in the embodiments herein.
[0065] This disclosure provides an information processing method, to Figure 1 The graphical training platform shown is used as an example to illustrate this method; see [link / reference]. Figure 2 As shown, the method may include:
[0066] S21, Obtain the execution result of the controlled object according to the control instructions.
[0067] Here, the controlled object can be an IoT device that needs to be controlled, such as smart lights, smart curtains and / or smart air conditioners, etc.
[0068] In one example, the implementation process of step S21 may include:
[0069] Based on the calculation results of the controlled node corresponding to the controlled object, the execution result of the controlled object according to the control command is determined, wherein the execution result is used to indicate the target state to which the controlled object switches.
[0070] A directed graph consists of nodes and directed edges. Directed edges represent the relationships or data flow between two types of nodes.
[0071] The nodes include: the controlled node corresponding to the controlled object, the trigger node that triggers the data flow, the logic node that executes the relevant logical relationship, and / or the input node that inputs the data.
[0072] From another dimension, the plurality of execution nodes can be divided into entity nodes and virtual nodes. The entity node refers to an execution node that can be bound with a perception layer terminal of a controlled object. The virtual node is a node that does not have a corresponding entity device but will be used during the execution of a predetermined program, for example, a logical node, an input node of a preset constant parameter.
[0073] Exemplarily, a node that can flow trigger data between two nodes can be referred to as a trigger node, and an entity node corresponding to a controlled object can be referred to as a controlled node. Among them, the sensing device includes various sensors, such as smart keys (or pressure sensors), temperature sensors, light sensors, and the like. The corresponding entity node can be the aforementioned trigger node, and the controlled object can be, for example, a lamp, an air conditioner, a smart curtain, a smart TV, a smart sound box, and the like.
[0074] The operation result of the controlled node can be obtained by performing logical operation on the data generated by the trigger node and / or the data of the input node.
[0075] Exemplarily, taking a smart lamp as an example, an "or" logical operation can be performed on the switch data and the brightness comparison result to obtain the operation result of the controlled node corresponding to the smart lamp.
[0076] Exemplarily, the trigger node described above can generate data based on a trigger operation. For example, taking a smart switch as an example, after the smart switch is pressed, the trigger node corresponding to the smart switch generates first switch data, and after the smart switch is pressed again, the trigger node corresponding to the smart switch generates second switch data. For example, the first switch data is used to indicate that the smart switch is in a closed state, and the second value can be used to indicate that the smart switch is in an open state.
[0077] S22, according to the execution result and the execution of the predetermined program, a directed graph including execution logic of the execution node and state switching effect of the controlled node is displayed on the display interface, wherein the controlled node is an execution node corresponding to a controlled object in the execution node.
[0078] The predetermined program can be represented by a directed graph, and the directed graph is composed of execution nodes and directed edges of the execution nodes. The execution node is a graphical module used for executing operation.
[0079] In one example, the predetermined program includes a node program and a calling program.
[0080] The node program is a program associated with the execution node. Different execution nodes correspond to different node programs and have different execution logic. Here, the execution node can be understood as a graphical component encapsulating node program code.
[0081] The calling program is used to call the node program corresponding to the corresponding execution node according to the data flow direction of the directed graph.
[0082] The predetermined program adopts the composition, and the calling program can call different node programs according to the directed graph by updating the directed graph without modifying the calling program, so that the execution code of the whole predetermined program is different, different control effects and execution effects are generated, the code coupling degree is low, and the predetermined program generating the different control effects is simple.
[0083] The data flow conversion direction of the directed graph determines the execution order of the execution nodes. When any execution node is activated, the execution node performs logical operation. The activation rule of the execution node determines whether the execution node can be activated and when the operation is performed.
[0084] In an example, the directed edge connecting two execution nodes in the directed graph represents the data flow conversion relationship between the two execution nodes. The edge in the directed graph is a directed edge between the execution nodes, which is used as a path for data flow. The edge leading from the execution node represents the output of the node after data processing, that is, the content flowing on the edge is the data processed by the execution node.
[0085] In an example, the implementation process of step S22 can include:
[0086] The target state to which the controlled object is switched is determined according to the execution result, the target state of the controlled node is determined according to the target state, the execution logic of the plurality of execution nodes is determined according to the execution of the predetermined program, and the execution logic of each execution node and the state switching effect of switching to the target state are displayed on the directed graph.
[0087] The controlled node can present different display states to represent different states of the controlled node.
[0088] The embodiment of the disclosure provides an information processing method. By obtaining the execution result of the controlled object according to the control instruction, and displaying the directed graph containing the execution logic of the execution node and the state switching effect of the controlled node on the display interface according to the execution result and the execution of the predetermined program, compared with the practical training of the Internet of Things technology using application software, the trainee can intuitively observe the execution logic of the execution node and the state change of the controlled node from the display interface, so that the trainee can more easily understand the operation principle of the Internet of Things, and the practical training effect of the Internet of Things technology can be effectively improved.
[0089] In an embodiment, as shown in Figure 3 The method can further include:
[0090] S31, when in an execution state, detecting a control operation acting on a trigger node in the execution node; wherein the trigger node is: an execution node corresponding to a control device that controls the controlled object.
[0091] S32, generate a control instruction according to the control operation and the execution logic, wherein the control instruction is used to control the state of the controlled object.
[0092] In this embodiment, when in the execution state, the directed graph is displayed on the display interface, the user input operation can be detected, and when the control operation on the trigger node in the execution node is detected, a control instruction can be generated according to the control operation and the execution logic, and the state of the controlled object is controlled by using the control instruction.
[0093] In one embodiment, as shown in Figure 4 the method can further include:
[0094] S41, when in the editing state, detecting an editing operation acting on the directed graph.
[0095] S42, updating the directed graph according to the editing operation, wherein the directed graph is used for execution of the predetermined program.
[0096] The editing operation acting on the directed graph includes but is not limited to deletion, addition and modification of the nodes and / or edges in the directed graph.
[0097] In this embodiment, the graphical training platform provides a graphical programming interface to support the user to perform editing operations on the directed graph. For example, the user can add an execution node in the preset program module library to the directed graph according to the self-defined functional requirements, and connect the added execution node through the node directed edge; or modify the attribute information of the execution node in the directed graph, etc. It can be understood that when the program module library does not save the execution node required by the user, the user can add the graphical node to the program module library by writing program code and encapsulating it as a graphical node through the interface provided by the graphical training platform.
[0098] The attribute information of the node can include node name, port name, node block graph, port graph, and device identifier bound to the node, wherein the port graph includes output port graph and / or at least one input port graph.
[0099] In this embodiment, by detecting the editing operation acting on the directed graph when in the editing state, and updating the directed graph according to the editing operation, for the trainee, the editing operation of the directed graph can be performed according to his own ideas, so that the trainee can flexibly build various Internet of Things engineering application scenarios, which is not only easy to use, but also practical, and can meet the training needs of various Internet of Things engineering application scenarios, and helps to improve the effect of Internet of Things technology training.
[0100] In one embodiment, the method further includes:
[0101] The control instruction is sent to the controlled object through the gateway; wherein the control instruction is used to control the target state to which the controlled object switches.
[0102] Specifically, the binding information of the controlled node and the execution device of the controlled object can be queried from the pre-stored binding relationship table, and the control instruction is sent to the execution device through the gateway based on the binding information. Wherein the binding relationship table saves the binding information of the execution device and the controlled node, and the binding relationship table can also save the binding information of the sensing device and the trigger node.
[0103] In this embodiment, by sending the control instruction to the execution device of the controlled object through the gateway, the execution device can perform the corresponding action, and the state control of the real controlled object is realized.
[0104] In one embodiment, as shown in Figure 5 The method can further include:
[0105] S51, determining the execution node corresponding to the perception layer terminal from the execution nodes according to the device binding request sent by the perception layer terminal.
[0106] S52, generating the binding information between the perception layer terminal and the determined execution node.
[0107] S53, sending the binding information to the perception layer terminal through the gateway, wherein the binding information is used for the perception layer terminal to update the binding state of the perception layer terminal.
[0108] The device binding request can be a binding request broadcasted by the perception layer terminal to multiple gateways when powered on, and forwarded to the graphical practical training platform through the gateways. The device binding request contains: device type and device identifier, which can be device number.
[0109] In this embodiment, after receiving the device binding request forwarded by the perception layer terminal through the gateway, the graphical practical training platform displays the device type and device identifier in the device binding request on the visual interface to the user, so that the user selects the node to be bound with the perception layer terminal from multiple nodes of the graphical program. The graphical practical training platform generates binding information according to the binding operation of the perception layer terminal and the selected node detected by the visual interface, and sends the binding information to the perception layer terminal through the gateway, so that the terminal stores the binding information and updates its own device state, and completes the device binding.
[0110] In one example, the binding information can include: the network identifier to be joined by the perception layer terminal and the communication network address allocated to the perception layer terminal; the network identifier is generated based on the identifier of the gateway and the identifier of the node bound with the perception layer terminal. Here, the identifier of the gateway can be the gateway number, and the identifier of the node can be the node number.
[0111] The communication network address assigned to the perception layer terminal can be an address in a preset address range assigned to the perception layer terminal in the order of the device binding request. Here, the preset address range has a correspondence with the device type, that is, the communication network address can be assigned to the perception layer terminal in the preset address range corresponding to the device type of the perception layer terminal in the order of the device binding request of the perception layer terminal. The communication network address assigned to the perception layer terminal can be the smallest address in the preset address range corresponding to the device type of the perception layer terminal that has not been assigned.
[0112] In this embodiment, by binding the execution node and the perception layer terminal, the control function of the perception layer terminal can be realized by using the binding information between the perception layer terminal and the execution node. For example, during data collection, the state data reported by the sensing device of the controlled object to the graphical training platform can be processed by using the execution node bound to the sensing device of the controlled object, and the state of the controlled object can be displayed on the display interface; and / or, during downlink control, the control instruction can be sent to the execution device based on the operation result obtained by the execution node bound to the execution device of the controlled object, so as to control the state of the controlled object.
[0113] In one embodiment, the method can further include:
[0114] The predetermined program is sent to the gateway, and the predetermined program is used for the gateway to send the control instruction for controlling the controlled object according to the execution of the predetermined program when the gateway is in an offline state.
[0115] The gateway is located in the network layer and is used for realizing data relay between the perception layer and the platform layer and realizing device management and remote control. The gateway can support a predetermined wireless networking mode, and the wireless networking mode includes but is not limited to LoRa, ZigBee and Bluetooth wireless networking.
[0116] In one example, the gateway can be a LoRa gateway. LoRa is a kind of super-long-distance wireless transmission technology based on spread spectrum technology in low-power wide-area network communication technology. In a LoRa network, a star network structure is generally used.
[0117] It can be understood that the gateway can also be a ZigBee gateway or a Bluetooth gateway. ZigBee (also known as “purple bee”) is a kind of low-speed short-distance transmission wireless network protocol, and the bottom layer is a media access layer and a physical layer using IEEE 802.15.4 standard specification.
[0118] Specifically, based on the application protocol adopted by the execution device of the controlled object, control commands and the device identifier of the execution device are sent to the gateway. The control commands are used by the gateway to forward them to the execution device upon receipt. Upon receiving the control commands, the execution device parses them according to its application protocol to obtain control signals, and then performs corresponding actions to control the state of the controlled object. The device identifier is used to identify the target IoT device; for example, it can be the device number of a sensing layer terminal. The application protocol adopted by the execution device defines the signal format for communication between the graphical training platform and the execution device.
[0119] In this embodiment, by sending the graphical program to the gateway of the perception layer terminal, control of the controlled object can still be achieved even when the gateway is offline, such as when communication between the gateway and the graphical training platform is interrupted. That is, the gateway can use the execution of a predetermined program to send control commands to the execution device of the controlled object to control the state of the controlled object.
[0120] Furthermore, during data uplink, the sensor only needs to send its collected status data to the gateway. The gateway, through the execution of a pre-defined program, generates control commands to be sent to the corresponding actuators, thereby controlling the actions of those actuators. During this control process, the sensor does not need to be aware of the actuator's existence, and the actuator does not need to know which sensor's status data is being used to control it; thus, decoupling the sensor and actuator is achieved.
[0121] The information processing method provided in this disclosure will be described below with reference to specific embodiments.
[0122] by Figure 1 Taking the IoT application scenario shown as an example, according to the types of IoT communication content, the entire communication process can be divided into: device binding, data acquisition, and downlink control.
[0123] Device binding: LoRa terminal will report to all LoRa gateway when power on and send a binding request to request to join the LoRa gateway network. The terminal stops sending binding requests once it is bound. LoRa gateway receives the binding request of the terminal and sends the specific request information to the cloud platform. The cloud platform can select the corresponding program node according to the device type and device number through the graphical programming interface, and click to bind to send the corresponding binding command to the LoRa gateway. LoRa gateway sends various binding information (including the network ID number that the terminal wants to join and the communication network address allocated to the terminal) to the LoRa terminal to realize real binding and store the binding table. After receiving the binding command, the LoRa terminal will store the corresponding binding related information and update its own device state. At this time, the device is truly bound, and the entire binding process can be called "cloud binding".
[0124] Data collection: After the sensor collects data, it will directly report to the LoRa gateway through the configured LoRa protocol. After receiving the data, the LoRa gateway will perform intermediate processing on the data, and then send the data to the cloud platform through 4G or Ethernet. The data stream of the device can be seen in the cloud platform, and the corresponding sensor value can also be seen in the graphical training platform. When the sensor collects the value changes, the value displayed in the graphical training platform will also be updated. In the design of the communication training system, the sensor will collect data in real time, and when the data collected every two times exceeds the set change threshold, it will report the latest data, otherwise it will be reported according to a set reporting period. Through this strategy, the real-time data collection is guaranteed, and the amount of data in the air communication is reduced as much as possible, thereby improving the load of the device in the network.
[0125] Downlink control: Downlink control is mainly initiated by the cloud platform. In the graphical programming interface, devices can be controlled by clicking software icons. The cloud platform will issue corresponding control instructions to the LoRa gateway according to the specific operation. After receiving the control instruction, the LoRa gateway will relay the instruction, and then send it to the actuator through the LoRa protocol. After receiving the command, the actuator will parse the instruction, and then control the output according to the parsing result to perform the corresponding action.
[0126] The graphical program is based on the data flow principle and is represented by a directed graph. The directed graph is composed of nodes and edges. The node, which can also be referred to as an operator, is a place where an operation is performed, and the node can be understood as a graphical module, and the node includes a real module and a virtual module. The edge is a connecting line between nodes and is a path for data flow. The data processed by the node flows on the edge, and the activation rule determines whether a node can be activated and when the operation is performed. The sensor module generates data to the output edge, the intermediate module consumes data on the input edge and generates data on the output edge, and the actuator module only receives data, and the data is transmitted to the actuator module.
[0127] After the graphical program is edited, the associated logic program can be downloaded and saved to the LoRa gateway on the cloud platform, so that even if the gateway is disconnected, the associated control can be realized. At this time, the sensor only needs to send the data collected by itself to the LoRa gateway at a fixed time, and the LoRa gateway can find the corresponding actuator according to the saved logic relationship and control it by sending a control command. In the whole control process, the sensor does not need to know the existence of the actuator, and the actuator does not need to know which sensor data is used to control it, and the control of the two is realized through the LoRa gateway.
[0128] Figure 6 A schematic diagram of a directed graph example provided by the embodiment of the present disclosure. The function implemented by the graphical program is to turn on the colored lamp when the key is pressed once or the light intensity is less than a certain threshold. Figure 6 In the above, the nodes with the names of the key, the light sensor and the colored lamp are entity nodes in the graphical program, which are bound to real physical modules, wherein the "key" is bound to an intelligent key, the "light sensor" node is bound to a light sensor, and the "colored lamp" is bound to a real lamp to be controlled. The nodes with the names of "constant", "toggle", "compare" and "or" are virtual nodes in the graphical program. The nodes bound to real devices in the graphical program are displayed in the form of small software icons, and the association and binding of the icons and the real devices are realized through cloud binding.
[0129] Figure 6In the shown directed graph, when a smart button is pressed, the smart button reports data to the cloud platform, the button (smart button) in the graphical software executes the corresponding processing function, displays the corresponding button state, and generates data on the corresponding output edge. The "toggle" module can be prepared for execution. The role of the "toggle" module is to keep the output state unchanged when the button returns to the state (note: normal control is that the button is pressed and the light is on, and the button is released and the light is off. Through the "toggle" module, the light can be switched once by pressing the button once, that is, the light is on once, then the light is off once, and then the light is on again). Then, the "or" module and the "color light" module are executed in turn, and the corresponding control instructions are issued to the real light controller according to the execution result, so as to realize the control of the light. According to the same principle, the program of the middle light control lamp part can be analyzed, which will not be repeated here. Figure 6
[0130] Figure 7 A topology structure diagram for group control lamps is provided in the embodiments of the present disclosure. Using one smart button and multiple light controllers, after editing the program in the graphical training platform, the program is downloaded to the LoRa gateway through the one-key download function. The gateway records the device information and associated logic in the program. When the device is powered on again, the device is bound according to the recorded information. Then, when the smart button is triggered, the smart button reports data to the LoRa gateway, and the LoRa gateway finds the corresponding color lamp that needs to be controlled according to the stored device information and associated logic, and sends control instructions in turn, thereby realizing the control of the real light.
[0131] The embodiments of the present disclosure can realize device networking by establishing a LoRa private protocol, establish a star network, which can realize long-distance wireless transmission and has good real-time performance. The user can bind the device on the cloud platform, realize the logical control of the LoRa device through the combination of various real modules and virtual modules, which is intuitive and easy to use. In addition, the training platform supports saving the control logic programming to the LoRa gateway, which can realize one-to-one or one-to-many control of the device, and is convenient for students to build a real Internet of Things engineering application scene, and has strong practicality.
[0132] Based on the above method embodiments, the present disclosure further provides an information processing apparatus, as shown in the figure, which can include: Figure 8
[0133] The acquisition module 81 is configured to acquire an execution result of the controlled object according to the control instruction.
[0134] The display module 82 is configured to display, on a display interface, a directed graph including an execution logic of an execution node and a state switching effect of a controlled node according to the execution result and execution of a predetermined program, wherein the controlled node is an execution node corresponding to the controlled object in the execution node.
[0135] In an embodiment, the apparatus further comprises:
[0136] a first detecting module, configured to detect a control operation acting on a trigger node in an execution node when in an execution state; wherein the trigger node is an execution node corresponding to a control device controlling a controlled object;
[0137] a generating module, configured to generate a control instruction according to the control operation and an execution logic; wherein the control instruction is used to control a state of the controlled object.
[0138] In an embodiment, the apparatus further comprises:
[0139] a second detecting module, configured to detect an editing operation acting on the directed graph when in an editing state;
[0140] an updating module, configured to update the directed graph according to the editing operation, wherein the directed graph is used for execution of a predetermined program.
[0141] In an embodiment, the predetermined program comprises:
[0142] a node program, used for a program associated with an execution node;
[0143] a calling program, used for calling a node program corresponding to an execution node according to a data flow direction of the directed graph.
[0144] In an embodiment, a directed edge connecting two execution nodes in the directed graph represents a data flow relationship between the two execution nodes.
[0145] In an embodiment, the controlled node is pre-bound with an execution device of the controlled object, and the apparatus further comprises:
[0146] a first sending module, configured to send the control instruction to the controlled object through a gateway; wherein the control instruction is used to control a target state to which the controlled object switches.
[0147] In an embodiment, the apparatus further comprises:
[0148] a determining module, configured to determine an execution node corresponding to a perception layer terminal from the execution nodes according to a device binding request sent by the perception layer terminal;
[0149] a generating module, configured to generate binding information between the perception layer terminal and the determined execution node;
[0150] a second sending module, configured to send the binding information to the perception layer terminal through a gateway, wherein the binding information is used for the perception layer terminal to update a binding state of the perception layer terminal.
[0151] In one embodiment, the apparatus further comprises:
[0152] The third sending module is configured to send the predetermined program to the gateway, and the predetermined program is configured to be used by the gateway to send the control instruction for controlling the execution device of the controlled object according to execution of the predetermined program when the gateway is in the offline state.
[0153] It should be noted that the information processing apparatus provided in the above embodiments is only used for example to illustrate the division of the above program modules, and in actual application, the above processing can be completed by different program modules according to needs, that is, the internal structure of the information processing apparatus is divided into different program modules to complete all or part of the above processing. In addition, the embodiments of the information processing apparatus and the information processing method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0154] Figure 9 A structural schematic diagram of a computer device provided in the embodiments of the present disclosure is shown in FIG. 9. Figure 9 As shown in FIG. 9, the computer device 900 includes a processor 901 and a memory 902 for storing computer programs capable of running on the processor; wherein the processor 901 is configured to run the computer programs to perform the following operations:
[0155] obtain an execution result of the controlled object according to the control instruction;
[0156] display a directed graph including execution logic of the execution node and state switching effect of the controlled node on the display interface according to the execution result and execution of the predetermined program, wherein the controlled node is an execution node corresponding to the controlled object in the execution node.
[0157] The processor runs the computer programs to implement the corresponding processes in each method of the embodiments of the present disclosure. For brevity, details are not repeated here.
[0158] In actual application, the computer device 900 can further include at least one network interface 903. The various components in the computer device 900 are coupled together through a bus system 904. It can be understood that the bus system 904 is used to realize the connection and communication between the components. The bus system 904 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 904 in the figures. The number of the processor 901 can be at least one. The network interface 903 is used for wired or wireless communication between the computer device 900 and other devices. Figure 9
[0159] The memory 902 in the embodiments of the present disclosure is used to store various types of data to support the operation of the computer device 900.
[0160] The method disclosed in the embodiments of the present disclosure can be applied to the processor 901 or implemented by the processor 901. The processor 901 can be an integrated circuit chip having a signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 901 or an instruction in the form of software. The processor 901 described above can be a general processor, a digital signal processor (DSP, DiGital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 901 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present disclosure, the execution can be directly completed by a hardware decoding processor or a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 902, and the processor 901 reads the information in the memory 902 to complete the steps of the above method in combination with the hardware thereof.
[0161] In the exemplary embodiments, the computer device 900 can be implemented by one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, programmable logic device (PLD, Programmable Logic Device), complex programmable logic device (CPLD, Complex Programmable Logic Device), field programmable gate array (FPGA, Field-Programmable Gate Array), general processor, controller, microcontroller (MCU, Micro Controller Unit), microprocessor, or other electronic elements, for executing the above method.
[0162] The embodiments of the present disclosure further provide a computer readable storage medium, and the computer readable storage medium stores a computer program; when the computer readable storage medium is applied to an information processing method, the computer program is run by a processor, and the following operations are performed:
[0163] Obtaining an execution result of the controlled object according to the control instruction;
[0164] According to the execution result and the execution of the predetermined program, a directed graph including execution logic of the execution node and state switching effects of the controlled node is displayed on the display interface, wherein the controlled node is an execution node corresponding to the controlled object in the execution node.
[0165] The computer program is run by the processor to implement the corresponding flow in each method of the embodiments of the present disclosure. For brevity, details are not repeated here.
[0166] In several embodiments provided by the present disclosure, it should be understood that the disclosed apparatus and method can be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the division of units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each component part shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0167] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of network units; part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0168] In addition, each functional unit in each embodiment of the present disclosure can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0169] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the above-mentioned program can be stored in a computer readable storage medium, and the program is executed to perform steps including the above-mentioned method embodiments; and the above-mentioned storage medium includes mobile storage device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and various storage program codes.
[0170] Alternatively, the above-mentioned integrated units of the present disclosure, if implemented in the form of software function modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the embodiments of the present disclosure. The aforementioned storage medium includes: a mobile storage device, a ROM, a RAM, a magnetic disk, or an optical disk, and various media that can store program codes.
[0171] It should be noted that "first", "second", and the like are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. In addition, the technical solutions described in the embodiments of the present disclosure can be combined arbitrarily without conflict.
[0172] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. An information processing method characterized by comprising: The directed graph comprises nodes and directed edges; a plurality of execution nodes are divided into entity nodes and virtual nodes; the entity nodes are execution nodes bound to perception layer terminals of controlled objects; the virtual nodes are nodes without corresponding entity devices but used in predetermined program execution; and the controlled objects are Internet of Things devices that need to be controlled; The method comprises: performing logical operation on data generated by a trigger node and / or data of an input node through a logic node to obtain an operation result of a controlled node, wherein the logic node is an execution node for executing a relevant logical relationship in the execution nodes; the trigger node is an execution node for executing trigger data flow in the execution nodes; the input node is an execution node for executing input data in the execution nodes; and the controlled node is an execution node corresponding to the controlled object in the execution nodes; obtaining an execution result of the controlled object according to a control instruction based on the operation result of the controlled node; determining a target state to which the controlled object switches according to the execution result, and determining a target state of the controlled node according to the target state to which the controlled object switches; determining execution logic of a plurality of the execution nodes according to predetermined program execution, wherein the predetermined program comprises node programs and calling programs, the node programs are programs associated with the execution nodes, and the calling programs are used to call node programs corresponding to the corresponding execution nodes according to the data flow direction of the directed graph; displaying the execution logic of each of the execution nodes and the state switching effect of the target state of each of the controlled nodes on the directed graph.
2. The method of claim 1, wherein, The method further comprises: detecting a control operation acting on a trigger node in the execution nodes when in an execution state, wherein the trigger node is the execution node corresponding to the control device that controls the controlled object; generating the control instruction according to the control operation and the execution logic, wherein the control instruction is used to control the state of the controlled object.
3. The method of claim 1, wherein, The method further comprises: detecting an editing operation acting on the directed graph when in an editing state; updating the directed graph according to the editing operation, wherein the directed graph is used for execution of the predetermined program.
4. The method of any one of claims 1 to 3, wherein a directed edge connecting two of the execution nodes in the directed graph represents a data flow relationship between the two execution nodes.
5. The method of claim 1, wherein, The method further comprises: sending the control instruction to the controlled object through a gateway, wherein the control instruction is used to control the target state to which the controlled object switches.
6. The method of claim 1, wherein, The method further comprises: determining, from the execution nodes, an execution node corresponding to a perception layer terminal according to a device binding request sent by the perception layer terminal; generating binding information between the perception layer terminal and the determined execution node; sending the binding information to the perception layer terminal through a gateway, wherein the binding information is used for the perception layer terminal to update the binding state of the perception layer terminal.
7. The method of claim 5, wherein, The method further comprises: The predetermined program is sent to the gateway; wherein the predetermined program is used for the gateway to send a control instruction for controlling the controlled object according to execution of the predetermined program when the gateway is in an offline state.
8. An information processing apparatus, characterized by comprising: The apparatus for implementing the method of any one of claims 1 to 7 comprises: An acquisition module, configured to perform logical operation on data generated by a trigger node and / or data of an input node through a logical node to obtain an operation result of a controlled node, wherein the logical node is an execution node in the execution nodes and is used to execute a relevant logical relationship; the trigger node is an execution node in the execution nodes and is used to execute a trigger data flow conversion; the input node is an execution node in the execution nodes and is used to execute input data; the controlled node is an execution node in the execution nodes and corresponds to the controlled object; and an execution result of the controlled object according to a control instruction is acquired according to the operation result of the controlled node; A display module, configured to determine a target state to which the controlled object is switched according to the execution result, to determine a target state of a controlled node according to the target state to which the controlled object is switched, to determine execution logic of a plurality of execution nodes according to execution of a predetermined program, wherein the predetermined program comprises a node program and a calling program, the node program is a program associated with an execution node, and the calling program is used to call a node program corresponding to a corresponding execution node according to a data flow conversion direction of a directed graph; and to display execution logic of each execution node and state switching effects of a target state of each controlled node on the directed graph.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the information processing method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the information processing method of any one of claims 1 to 7.
Citation Information
Patent Citations
Internet of Things device management method, device and system
CN113381880A
Device state display method and device, terminal and storage medium
CN113419483A