Graph database-based behavior data processing method and device, medium and product

By using directed graphs to store the association relationship between behavioral data of IoT devices in the graph database, the problem of difficulty in in-depth analysis of user behavior in the prior art is solved, and more efficient device optimization is achieved.

CN119988462APending Publication Date: 2025-05-13GUANGDONG KETYOO INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510225734.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When processing behavioral data of IoT devices, it is difficult for the prior art to mine and analyze the relationship between the data, resulting in relatively shallow user behavior analysis, inefficient, and difficult to accurately match user needs for equipment optimization.

Method used

The behavioral data processing method based on the graph database is adopted to obtain the behavioral data reported by the Internet of Things device, and the correlation relationship between the operations stored in the graph database is updated to form a directed graph. Each node in the directed graph corresponds to each operation in the behavior data, and the directed edge is determined based on the attribute information of the operation.

Benefits of technology

Through the directed graphical form of graph database storage relationships between operations, deeper user behavior can be analyzed, processing efficiency can be improved, and a better foundation for device optimization can be provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988462A_ABST
    Figure CN119988462A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a behavior data processing method and device based on a graph database, a medium and a product, and relates to the technical field of data processing. Specifically, the method comprises the following steps: acquiring behavior data reported by Internet of Things equipment; on the basis of the behavior data, the incidence relation among a plurality of operations stored in a graph database is updated, a directed graph is obtained, and the directed graph corresponds to the same Internet of Things device and / or different Internet of Things devices; wherein each node in the directed graph corresponds to each operation in the behavior data, and the directed edge in the directed graph is determined based on the attribute information of each operation in the behavior data. According to the method, the behavior data is stored through the graph database, the incidence relation among the multiple operations is stored in the graph database in the form of the directed graph, the data and the relation among the data can be stored, deeper user behaviors can be analyzed, the processing efficiency is improved, and the user experience is improved. And a better basis is provided for matching user requirements for equipment optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology. Specifically, the present disclosure relates to a behavior data processing method, device, medium and product based on a graph database. Background Art

[0002] In the application of intelligent devices, a large amount of behavioral data is generated as users use them. Mining and analyzing these behavioral data can better optimize the devices based on user usage.

[0003] However, in the prior art, behavioral data is generally stored and analyzed by writing it into a data warehouse. This processing only targets single operation data and is unable to mine and analyze the relationship between data. The user behavior that can be analyzed based on this processing is relatively shallow and inefficient, making it difficult to accurately match user needs for device optimization. Summary of the invention

[0004] In order to solve at least one of the above technical problems, the embodiments of the present disclosure provide a behavior data processing method, device, medium and product based on a graph database. The technical solution is as follows: In a first aspect, an embodiment of the present disclosure provides a behavior data processing method based on a graph database, including: Obtain behavioral data reported by IoT devices; Based on the behavior data, updating the association relationship between several operations stored in the graph database to obtain a directed graph, where the directed graph corresponds to the same IoT device and / or different IoT devices; Each node in the directed graph corresponds to each operation in the behavior data, and the directed edges in the directed graph are determined based on the attribute information of each operation in the behavior data.

[0005] In a feasible embodiment, the behavior data includes data reported by a number of IoT devices to the IoT platform and processed by a processing engine; The IoT platform sends the behavior data reported by the IoT device to a message queue, and the processing engine obtains the behavior data in the message queue, processes it, and writes it into the graph database.

[0006] In a feasible embodiment, the behavior data includes a device identifier and an operation identifier; the attribute information includes the operation occurrence time and the device component status corresponding to the operation; When the directed graph corresponds to the same IoT device, it is obtained by performing the following operations: Based on the device identifier and the operation identifier, respectively establish a first node for each operation in the behavior data belonging to the same device; Connecting first nodes corresponding to operations with continuous operation occurrence time and / or continuous device component status to generate a first directed edge, and determining the direction of the first directed edge between corresponding first nodes according to the operation occurrence time; For the two nodes connected by the first directed edge, the value of the first directed edge is determined based on the device component states corresponding to the corresponding operations of the two nodes and / or the corresponding operation occurrence times.

[0007] In a feasible embodiment, the behavior data includes a device identifier and an operation identifier; the attribute information includes the operation occurrence time and the operation function; the operation function is related to the changed device state and / or the changed environment state; When the directed graph corresponds to different IoT devices, it is obtained by performing the following operations: Based on the operation identifier, establishing a second node for each operation in the behavior data; Based on the device identifier, connecting the second nodes corresponding to the operations corresponding to different IoT devices and having consecutive operation occurrence times to generate a second directed edge, and determining the direction of the second directed edge between the corresponding second nodes according to the operation occurrence time; For the two nodes connected by the second directed edge, the value of the second directed edge is determined based on the operation occurrence times and / or the operation functions corresponding to the operations of the two nodes.

[0008] In a feasible embodiment, the value of the directed edge is related to the operation occurrence time and the device state; the device state includes the state of any component in the device and / or the state of the device itself; The directed graph also includes labels for identifying the start node and the end node of the state change, and the identification position of the label is determined based on the operation occurrence time and the device state.

[0009] In a feasible embodiment, each node is associated with behavior data of a corresponding operation; The method further comprises at least one of the following: receiving a first query request related to a target operation and / or an operation occurrence time, determining a node corresponding to the operation identifier and / or the time information carried in the first query request based on the directed graph, querying a first path related to the node based on the directed edge, and feeding back query data corresponding to the target operation and / or the operation occurrence time based on the first path; A second query request related to the target device state is received, at least one target node related to the device identifier carried by the second query request is determined in the directed graph, and a second path between the target nodes related to the target device state is queried based on the directed edge, and query data related to the target device state is fed back based on the second path.

[0010] In a second aspect, the present disclosure provides a behavior data processing method based on a graph database, including: In response to a viewing operation related to the behavior data, obtaining data corresponding to the viewing operation through the directed graph obtained by the method described in the first aspect and any embodiment thereof; Perform analysis based on the acquired data and display the analysis results.

[0011] In a feasible embodiment, the viewing operation includes an operation triggered by behavior data of the smart clothes drying machine, and the directed graph is obtained based on the behavior data reported by the smart clothes drying machine; and / or, the displayed analysis results include a chart configured with an interactive area; The method further comprises: In response to a trigger operation on any part of the displayed graph, the behavior data related to the part is displayed in the form of the directed graph.

[0012] In a feasible embodiment, the analysis result is displayed with information related to the time dimension in at least one chart; The display of the analysis result includes: in response to a trigger operation on a target time period in the displayed chart, acquiring behavior data corresponding to the target time period through the graph database and displaying it in the form of the directed graph.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the steps of the method described in the first aspect and any embodiment thereof or the second aspect and any embodiment thereof.

[0014] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in the first aspect and any embodiment thereof or the second aspect and any embodiment thereof are implemented.

[0015] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in the first aspect and any embodiment thereof or the second aspect and any embodiment thereof are implemented.

[0016] The technical solution provided by the embodiments of the present disclosure has the following beneficial effects: On the one hand, the embodiments of the present disclosure provide a method for processing behavioral data based on a graph database. Specifically, when the behavioral data reported by the IoT device is obtained, the association relationship between several operations stored in the graph database can be updated based on the behavioral data to obtain a directed graph, which can correspond to the same IoT device and / or to different IoT devices. Among them, each node in the directed graph corresponds to each operation in the behavioral data, and the directed edges in the directed graph are determined based on the attribute information of each operation in the behavioral data. The implementation of the present disclosure can store behavioral data through a graph database, and store the association relationship between several operations in the form of a directed graph in the graph database. The data itself and the relationship between the data can be stored, which is conducive to analyzing deeper user behaviors, improving processing efficiency, and providing a better basis for device optimization to match user needs.

[0017] On the other hand, the disclosed embodiment provides a behavior data processing method based on a graph database. Specifically, in response to a viewing operation related to behavior data, the data corresponding to the viewing operation can be obtained through the directed graph obtained by the above method, and then analysis is performed based on the obtained data, and the analysis results are displayed. The disclosed embodiment can quickly obtain and analyze data corresponding to the needs through the directed graph in the graph database. Combined with the relationship between the data, deeper user behaviors can be excavated, and processing efficiency can be effectively improved. The analysis results can also be displayed to improve the visualization of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for describing the embodiments of the present disclosure are briefly introduced below.

[0019] Figure 1 A flowchart of a behavior data processing method based on a graph database provided in an embodiment of the present disclosure; Figure 2 Another flowchart of behavior data processing based on a graph database provided in an embodiment of the present disclosure; Figure 3 A schematic diagram of a system framework provided for an embodiment of the present disclosure; Figure 4 A schematic diagram of a directed graph provided in an embodiment of the present disclosure; Figure 5 A schematic diagram of another directed graph provided in an embodiment of the present disclosure; Figure 6 A schematic diagram of an interactive interface of a visualization platform provided in an embodiment of the present disclosure; Figure 7A schematic diagram of an interactive interface of another visualization platform provided in an embodiment of the present disclosure; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The embodiments of the present disclosure are described below in conjunction with the drawings in the present disclosure. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions of the embodiments of the present disclosure.

[0021] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present disclosure refer to that the corresponding features can be implemented as the displayed features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".

[0022] The terms "based on" and "according to" used in various embodiments of the present disclosure can be interpreted as the premise, condition or information based on is not the only one, but at least one or part of it. That is, it indicates that there is at least one clear basis, and other possible bases are not excluded.

[0023] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0024] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present disclosure and the technical effects produced by the technical solutions of the present disclosure. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0025] The system provided by the embodiment of the present disclosure is described below.

[0026] Specifically, Figure 3As shown in the figure, the system includes IoT devices, IoT platform, message queue, processing engine, data warehouse, graph database and visualization platform.

[0027] Among them, the Internet of Things, or "Internet of Everything Connected", is an extended and expanded network based on the Internet. It combines various information sensing devices with the network to form a huge network, realizing the interconnection of people, machines and things at any time and any place.

[0028] IoT devices can be smart devices that connect and communicate with other devices through the Internet or other networks. They can be wirelessly connected to the network and have data transmission capabilities. IoT devices cover multiple industries, such as health, agriculture, home, industry, etc. For example, IoT devices can be smart lighting systems, smart door locks, smart clothes drying machines, smart curtains, etc.

[0029] The IoT (Internet of Things) platform can be a network system that connects various physical devices, sensors, software, and networks through the Internet to achieve communication and data exchange between each other. The IoT platform allows various devices to connect to the network and achieve interoperability between devices, such as various sensors, smart meters, and household appliances. The IoT platform can register, identify, and manage the corresponding devices to ensure their normal operation and communication.

[0030] Message Queue (MQ) is a mechanism for transmitting messages between applications, allowing applications to send messages to one or more queues, and other applications to retrieve messages from these queues for processing. As a first-in-first-out data structure, message queue provides a reliable asynchronous communication method between different systems and applications.

[0031] The processing engine can be an offline computing engine or a real-time computing engine, including but not limited to Hive, Spark, and Flink.

[0032] Graph databases belong to non-relational databases (NoSQL). The graph data structure used in graph databases directly stores the dependencies between nodes. Graph databases store the associations between data as part of the data, and labels, directions, and attributes can be added to the associations. In the disclosed embodiment, the graph used is a set of nodes and edges, "nodes" represent entities, and "edges" represent the relationships between entities. In a graph database, the relationships between data are as important as the data itself, and they are stored as part of the data. Such an architecture enables the graph database to quickly respond to complex association queries because the relationships between entities have been stored in the database in advance. Graph databases can visualize relationships intuitively and are a way to store, query, and analyze highly interconnected data. The disclosed embodiment can store the behavior data reported by IoT devices, solve the complex relationship storage of device states changing over time through the unique data representation and query methods of the graph database, and perform statistics and analysis on the state changes with previous and subsequent associations, so as to present the data to the data visual end for display in a more intuitive way.

[0033] A data warehouse (DW) is a data system used for storage, analysis, and reporting. Its purpose is to build an integrated data environment for analysis. The analysis results can provide decision support for equipment optimization.

[0034] A visualization platform is a software system that integrates data acquisition, data processing, data analysis, and data display functions. In the context of the system, the visualization platform can extract data from the graph database for corresponding data processing and analysis, and display the results in an intuitive and easy-to-understand visual form (such as charts and graphs).

[0035] The following is a detailed description of the behavior data processing method based on the graph database provided in the embodiment of the present disclosure.

[0036] Specifically, this method can be applied to graph databases, such as Figure 1 As shown, the method provided in the embodiment of the present disclosure includes S101 to S102: S101. Obtaining behavior data reported by IoT devices.

[0037] S102. Based on the behavior data, the association relationship between several operations stored in the graph database is updated to obtain a directed graph, where the directed graph corresponds to the same IoT device and / or different IoT devices.

[0038] Each node in the directed graph corresponds to each operation in the behavior data, and the directed edges in the directed graph are determined based on the attribute information of each operation in the behavior data.

[0039] Optionally, the behavior data reported by the IoT device may be data obtained when performing one or more operations. For example, when the smart clothes drying machine performs the operation of turning on the light, the behavior data of one operation is output, which may include data such as the time when the operation occurs (the time when the light is turned on), the brightness of the light, and the color temperature of the light; when the smart clothes drying machine performs the operation of turning off the light, the behavior data of another operation is output, which may include the time when the operation occurs (such as the time when the light is turned off).

[0040] Optionally, the graph database stores the data of the operation itself and the association between operations in the form of a directed graph. When storing data for a single IoT device, the directed graph can only record the behavior data of the device; when storing data for multiple IoT devices, such as when multiple smart devices in the home are linked through a gateway and user behavior can be better analyzed by analyzing the data of multiple IoT devices, the directed graph can record the behavior data of multiple devices.

[0041] Optionally, the directed graph includes nodes and directed edges. In the embodiment of the present disclosure, a node is generated for each operation performed by the IoT device, and the directed edges between the nodes are determined by attribute information of each operation.

[0042] Optionally, for each acquired behavior data, the graph database may separately create a directed graph for data storage, or may update the directed graph based on the original data to obtain a new directed graph.

[0043] The implementation of the present disclosure can store behavioral data through a graph database, in which the association relationship between several operations is stored in the form of a directed graph. The data itself and the relationship between the data can be stored, which is conducive to analyzing deeper user behaviors, improving processing efficiency, and providing a better basis for optimizing equipment to match user needs.

[0044] In a feasible embodiment, the behavior data includes data reported by several IoT devices to the IoT platform and then processed by a processing engine; wherein the IoT platform sends the behavior data reported by the IoT devices to a message queue, and the processing engine obtains the behavior data in the message queue, processes it, and writes it into a graph database.

[0045] Optional, such as Figure 3 As shown, after the IoT device generates behavior data after performing an operation, it can report it to the IoT platform. The IoT platform can send the behavior data to the message queue. The processing engine can obtain the behavior data from the message queue for processing, such as cleaning, and write the processed data into the graph database.

[0046] Optionally, the data processed by the processing engine can also be stored in a data warehouse. Compared with graph databases, data warehouses can use relational databases, column storage, and distributed storage to store data.

[0047] In a feasible embodiment, the behavior data includes a device identifier and an operation identifier; the attribute information includes the time when the operation occurs and the device component status corresponding to the operation.

[0048] Exemplarily, the device identifier is a unique identifier for each device, which can be used to distinguish the devices corresponding to each operation. The operation identifier is a unique identifier for each operation, which can be used to distinguish multiple operations. Attribute information can be data generated by the device during the execution of the operation. Among them, the operation occurrence time can be the start time, end time or time period of the device performing a certain operation. The device component status corresponding to the operation can be the status of a certain component in a certain device, such as the height of the drying rod in a smart clothes drying machine, whether the cat's eye module in a smart door lock is started, etc.

[0049] Optionally, when the directed graph corresponds to the same IoT device, the directed graph is obtained by performing the following operations from step A1 to step A3: Step A1: Based on the device identifier and the operation identifier, a first node is established for each operation in the behavior data belonging to the same device.

[0050] Step A2: Connect the first nodes corresponding to the operations with continuous operation occurrence time and / or continuous device component status to generate a first directed edge, and determine the direction of the first directed edge between the corresponding first nodes according to the operation occurrence time.

[0051] Step A3: for two nodes connected by the first directed edge, determine the value of the first directed edge based on the device component states corresponding to the corresponding operations of the two nodes and / or the corresponding operation occurrence times.

[0052] Exemplary, combined Figure 4 Explanation: The device ID can be used to distinguish whether the behavior data currently stored in the directed graph is for the same IoT device. Under the same IoT device, nodes can be established for each operation included in the currently acquired behavior data, such as Figure 4Operation 1 and Operation 2 in the table, and then, for nodes with continuous operation occurrence time, you can connect them. For example, the operation occurrence time of Operation 1 is 2024-12-12 14:41:14, and the operation occurrence time of Operation 2 is 2024-12-12 14:42:14. If there is no other operation during this time period, Operation 1 and Operation 2 can be connected. In addition, you can also connect the corresponding nodes of operations with continuous equipment component states, where the continuous equipment component state requires that operations are performed on the same equipment component and the states are continuous (regardless of whether the time is continuous). For example, in the smart clothes drying machine, the drying rod performs a lowering operation (such as Operation 1) and then a stopping operation (such as Operation 2). It can be regarded as a continuous equipment state and the corresponding nodes of Operation 1 and Operation 2 are connected.

[0053] Optionally, in determining the directed edge, regarding the direction, in the above Figure 4 In the corresponding example, since operation 2 occurs later, the arrow of the directed edge can point to operation 2, indicating that the order of operations is from operation 1 to operation 2. Regarding the value, in one example, it can be determined based on the operation occurrence time between the corresponding operations of the two nodes. For example, if the time difference between operation 1 and operation 2 is 1 minute, the value of the directed edge can be determined based on the duration of 1 minute; in another example, the value of the directed edge can be determined based on the state of the equipment components between the corresponding operations of the two nodes. For example, if the stroke of the drying rod is 10 when the drying rod is lowered in operation 1, and the stroke of the drying rod is 60 when the drying rod is stopped in operation 2, the value of the directed edge can be determined based on the change of the strokes of the two -50.

[0054] Optionally, when determining whether to connect the nodes of the corresponding operation based on whether the device component status is continuous, the connection of the nodes may not be based on the continuity of time, such as Figure 5 As shown, when the states of the device components between operation 4 and operation 1 are continuous, a connection relationship can be established between the nodes corresponding to operation 1 and operation 4 to generate a directed edge.

[0055] In a feasible embodiment, the behavior data includes a device identifier and an operation identifier; the attribute information includes the time when the operation occurs and the operation function; and the operation function is related to the changed device state and / or the changed environment state.

[0056] Exemplarily, the device identifier is a unique identifier for each device, which can be used to distinguish the devices corresponding to each operation. The operation identifier is a unique identifier for each operation, which can be used to distinguish multiple operations. Attribute information can be data generated by the device in the process of performing an operation. Among them, the operation occurrence time can be the start time, end time or time period of the device performing a certain operation. The operation function may refer to the operation performed when a certain function is implemented. For example, when the light chasing function is implemented, the smart clothes drying machine adjusts the height and direction of the clothes drying rod, and the smart blinds adjust the downward angle. It can be understood that the function implemented by executing the operation can change the state of the device and / or the state of the environment in which it is located. For example, when the light chasing function is implemented, the height of the clothes drying rod is adjusted to change the state of the clothes drying rod component of the device. After the height of the clothes drying rod changes, the detected light intensity changes, that is, the environmental state changes.

[0057] Optionally, when the directed graph corresponds to different IoT devices, the directed graph is obtained by performing the following operations from step B1 to step B3: Step B1: Based on the operation identifier, a second node is established for each operation in the behavior data.

[0058] Step B2: Based on the device identifier, connect the second nodes corresponding to the operations of different IoT devices and with consecutive operation occurrence times to generate a second directed edge, and determine the direction of the second directed edge between the corresponding second nodes according to the operation occurrence time.

[0059] Step B3: for the two nodes connected by the second directed edge, determine the value of the second directed edge based on the operation occurrence time and / or the operation functions corresponding to the corresponding operations of the two nodes.

[0060] Optionally, in the disclosed embodiment, different IoT devices are indicated as devices of different products, i.e., smart door locks and smart clothes drying machines, smart door locks and smart curtains, etc., or they may be devices installed in different locations in the same space, i.e., smart curtains 1 installed in the master bedroom and smart curtains 2 installed in the second bedroom; it is understandable that in a family living space, it is rare to install more than two identical devices, and storing the relationship between operations in different IoT devices through directed graphs is helpful to quickly analyze the linkage relationship, usage, etc. between different IoT devices. In addition, for multiple identical devices installed in the same family living space, behavioral data can also be stored through the above-mentioned steps A1 to A3.

[0061] Optionally, for the case where the directed graph corresponds to different IoT devices, nodes can be first established based on each operation in the behavioral data, and then the nodes corresponding to the operations with consecutive operation occurrence times can be connected to generate directed edges. The direction of the directed edge is determined by the operation occurrence time. For example, if the directed edge points to the operation node that occurs later, the order of execution of the operations can be quickly determined through the occurrence of the directed edge.

[0062] Optionally, when determining the value of each directed edge, it can be determined based on the time when the operation occurs, such as determining the duration of the directed edge based on the time difference between two operation times. For example, when the user enters the door, the time difference between the opening of the smart door lock and the lighting of the human body sensing trigger at the entrance can be the duration of the directed edge between the two operations. In addition, the value of the directed edge can also be determined based on the operation functions corresponding to the two operations. For example, during the period of the return of the south wind in the south, in order to reduce the indoor air humidity, the user will trigger the closing of the smart window. At this time, the change threshold of the indoor humidity between the two operations of closing the smart window installed in the master bedroom and closing the smart window installed in the second bedroom can be determined as the value of the directed edge.

[0063] For example, Figure 5 As shown, in the nodes corresponding to operation 1 and operation 5, the nodes corresponding to different IoT devices are distinguished by different display effects. In addition, when the operations between operation 1 and operation 5 occur continuously in time, a directed edge can be established between the two nodes. It can be understood that the association relationship between operation 1 and operation 5 does not affect the association relationship between operation 1 and operation 2. Operation 1 and operation 2 belong to the relationship between operations in the same IoT device, and operation 1 and operation 5 belong to the relationship between operations in different IoT devices. In one example, after executing operation 1, operation 5 is executed, and then operation 2 is executed. When storing behavior data for different IoT devices, an association relationship is established for operation 1 and operation 5. When storing behavior data for the same IoT device, operation 2 is executed after operation 1, and an association relationship between operation 1 and operation 2 can be established (that is, a corresponding directed edge is generated between the corresponding nodes).

[0064] In the disclosed embodiment, by storing the relationship between operations corresponding to different IoT devices in a directed graph, it is possible to quickly and effectively analyze the linkage between different devices and improve the efficiency of behavioral data processing.

[0065] In a feasible embodiment, the value of the directed edge is related to the time when the operation occurs and the device status; the device status includes the status of any component in the device and / or the status of the device itself.

[0066] For example, taking a smart clothes dryer as an example, the state of any component may refer to the descent height of the clothes drying rod, the air outlet temperature of the dryer, etc.; the state of the device itself may refer to the state of the clothes drying machine being turned on and off, and the state determined by the clothes drying machine as a whole when performing a certain operation function. For example, when implementing the light chasing function, only the clothes drying rod in the clothes drying machine triggers the corresponding operation, then the state of the clothes drying machine itself can be determined by the descent height of the clothes drying rod.

[0067] Optionally, the directed graph also includes labels for identifying the start node and the end node of the state change, and the identification position of the label is determined based on the operation occurrence time and the device state.

[0068] In the embodiment of the present disclosure, in order to improve the validity of the data of the relationship between operations stored in the directed graph and the rapid response to the subsequent data analysis, a label is also added to the directed graph. The label exists in the form of a pair, one for identifying the starting node of the state change, and the other for identifying the ending node of the state change. Exemplarily, corresponding labels are added to node 1 corresponding to the operation of starting the drying rod to descend and node 3 corresponding to the operation of stopping the drying rod to descend. When obtaining the corresponding behavior data of the drying rod descending operation in the corresponding time period, the behavior data between node 1 and node 3 can be quickly obtained through the label, without having to analyze the attribute information from the current node to the next node one by one.

[0069] In a feasible embodiment, each node is associated with behavior data of a corresponding operation.

[0070] The disclosed embodiment adds corresponding labels to a directed graph based on the operation occurrence time and device status, which can optimize the query algorithm of the directed graph, such as path search, node classification, relationship mining, etc., and improve the efficiency of behavior data query.

[0071] Optionally, the method provided in the embodiment of the present disclosure further includes at least one of the following steps C1 to C2: Step C1: receiving a first query request related to a target operation and / or the time when the operation occurs, determining a node corresponding to the operation identifier and / or the time information carried in the first query request based on a directed graph, querying a first path related to the node based on a directed edge, and feeding back query data corresponding to the target operation and / or the time when the operation occurs based on the first path.

[0072] Optionally, the query of the behavior data may be based on the executed operation and / or the time when the operation occurred. The executed operation may be a specific operation or a specific operation related to a device.

[0073] Exemplarily, when querying the behavioral data of operations related to the cat's eye module in the smart door lock, at least one node corresponding to the operation related to the cat's eye module can be determined in the directed graph through the operation identifier, and then the path related to the node can be queried based on the directed edge. When the opening operation of the cat's eye module is queried, the next node connected to the node of the opening operation is queried downward step by step until the node of the operation related to the cat's eye module ends, and the corresponding behavioral data can be fed back based on all the nodes involved in the path.

[0074] For example, to query the behavior data of related operations in the time period 2024-12-20 08:00:00 to 2024-12-20 9:00:00, the node corresponding to the time point 2024-12-20 08:00:00 can be queried in the directed graph by the operation occurrence time, and then the next node connected to the node is determined by the directed edge until the corresponding node with the operation occurrence time within 2024-12-20 9:00:00 is obtained, and then the corresponding behavior data is fed back based on all the nodes involved in the query path. It can be understood that the fed back behavior data may include the same device or different devices.

[0075] Step C2: Receive a second query request related to the target device state, determine at least one target node related to the device identifier carried in the second query request in the directed graph, query a second path between the target nodes related to the target device state based on the directed edges, and feed back query data related to the target device state based on the second path.

[0076] Optionally, the query of behavior data can also be based on the device status. When the query is based on the device status, there may be the following two situations: In one case, the queried device status corresponds to only one device. For example, when querying the behavior data related to the door opening status of a smart door lock, at least one node related to the smart door lock identifier can be determined in the directed graph, that is, the behavior data related to the smart door lock can be quickly screened out (this can be applicable to the case where the same directed graph stores the behavior data of different IoT devices. When only the behavior data of the same IoT device is stored in the same directed graph, this step can be ignored). Then, the path between the nodes related to the device status can be queried through the directed edges. For example, a node 1 corresponding to a door opening operation is determined. Then, the previous node 2 can be obtained based on the directed edge upward (the operation occurs earlier) (for example, before the smart door lock triggers the door opening, the fingerprint recognition module, cat's eye module, numeric keypad, etc. may be in a working state), and / or the next node 3 can be obtained based on the directed edge downward (the operation occurs later) (for example, after the smart door lock triggers the door opening, device status changes related to the door opening, such as the lock tongue rebounding, the password resetting, etc.), based on which the corresponding behavior data of each node involved in the path can be fed back.

[0077] In another case, the queried device status may correspond to at least two devices. For example, the on status of a smart light may involve smart light 1 in the living room, smart light 2 in the kitchen, smart light 3 in the bedroom, etc. In this case, at least one corresponding node may be determined by the device identification of each smart light, and then the previous node may be obtained upward through the directed edge (for example, if the target node is a node related to smart light 1, then the node corresponding to another smart light that has been turned on before is obtained), and / or the next node may be obtained downward (for example, the node corresponding to another smart light that has been turned on after is obtained), and then the behavior data is fed back based on the relevant nodes involved in the path.

[0078] In the disclosed embodiment, when the corresponding behavior data is queried through the corresponding path for feedback, the data feedback can be performed in the form of a directed graph, that is, the result obtained by introducing a graph database to store data in the form of a directed graph can also be referenced in subsequent operations. Exemplarily, when analyzing the results with behavior data, the directed graph can intuitively display the association and flow between the behavior data, making complex behavior data easier to understand and helping to quickly identify and analyze key information and trends in the data. In addition, when solving the optimal solution between operations, the shortest path algorithm can be used to solve the shortest path between two nodes, which helps to deeply analyze the hidden laws and patterns in the behavior data. Data feedback in the form of a directed graph can also support dynamic visualization in subsequent operations, showing changes in the behavior data process in real time, and improving interactivity.

[0079] The following is a detailed description of the behavior data processing method based on a graph database applied to a visualization platform provided in an embodiment of the present disclosure.

[0080] Specifically, Figure 2 As shown, the method provided in the embodiment of the present disclosure includes S201 to S202: S201. In response to a viewing operation related to behavior data, data corresponding to the viewing operation is obtained through the directed graph obtained by the method provided in the above embodiment.

[0081] S202: Analyze the acquired data and display the analysis results.

[0082] In the disclosed embodiment, on the basis of storing behavior data through a graph database, a data visualization solution is also provided, which introduces a visualization platform and builds a data channel between the visualization platform and the graph database. Users can trigger the viewing of behavior data through the visualization platform, and then quickly query and obtain corresponding data from the graph database based on a directed graph through the visualization platform for analysis, and display the results. The introduction of this solution can enable users to quickly and effectively know the analysis results of behavior data, and display them to users in a visualized form, which is conducive to improving the efficiency and perceptibility of behavior data analysis.

[0083] Optionally, data analysis can be performed by introducing tools into the visualization platform, such as Excel, Python, etc., or the corresponding artificial intelligence AI network can be adaptively trained for data analysis.

[0084] For example, based on the directed graph stored in the graph database in the above embodiment, the relationship between each user's operation before and after starting the lowering of the clothes drying rod when using the smart clothes drying machine model A (such as triggering the lowering of the clothes drying rod after turning on the light, triggering the stopping of the clothes drying rod after starting the lowering of the clothes drying rod, etc.) can be obtained. By analyzing the usage in the time dimension, it can be determined that, for example, starting at 19:00, 92% of the users turn on the light first and then trigger the lowering of the clothes drying rod; by analyzing the usage in the operation dimension, it can be obtained that Figure 7 The analysis results show that 11.46% of users adopt the "all-down" operation method.

[0085] In a feasible embodiment, the viewing operation may include an operation triggered by the behavior data of the smart clothes drying machine. Accordingly, the directed graph may be obtained based on the behavior data reported by the smart clothes drying machine.

[0086] For example, through the visualization platform, users can view the behavior data of different IoT devices, such as the results of analyzing the behavior data of an intelligent clothes drying machine through the visualization platform. During the operation, the user can select the IoT device as an intelligent clothes drying machine and the behavior data as the behavior data related to the lifting of the clothes drying rod. Then, the visualization platform can obtain the behavior data related to the lifting of the clothes drying rod through the directed graph related to the intelligent clothes drying machine stored in the graph database provided by the above embodiment, and perform data analysis and display the analysis results. Among them, the directed graph related to the intelligent clothes drying machine can be obtained based on the behavior data reported by the intelligent clothes drying machine in the above embodiment.

[0087] For example, in one viewing operation, the user can also select the behavior data of two or more IoT devices for viewing. For example, if the user selects the IoT devices as smart clothes drying machine and smart washing machine, and the behavior data is data within a certain time period, the visualization platform can obtain the behavior data within the corresponding time period through the directed graph corresponding to the smart clothes drying machine and smart washing machine stored in the database provided by the above embodiment, and perform data analysis and display the analysis results. The directed graph can be a single directed graph for the smart clothes drying machine and a single directed graph for the smart washing machine, or it can be a directed graph corresponding to the two devices.

[0088] In a possible embodiment, the displayed analysis result includes a chart configured with an interactive area.

[0089] Optional, such as Figure 6 and Figure 7 As shown, different chart types can be used to display results for different analysis purposes and data features, such as using a line chart to display the trend of sequential data, using a pie chart to display the proportion of classified data, and using a histogram to display the distribution of continuous data. In one example, each chart corresponds to a different interactive area, and the user can interact by triggering a part of the chart.

[0090] Optionally, the method further includes S203: in response to a trigger operation on any part of the displayed chart, displaying behavior data related to the part in the form of a directed graph.

[0091] In the embodiment of the present disclosure, in order to better perform data analysis and data tracking, a directed graph display function is also provided through a visualization platform. For example, a user can click on any part of the graph, such as Figure 7 The user can click on the position corresponding to the "middle docking type" part in the pie chart, and the behavior data of the corresponding part can be called up and displayed in the form of a directed graph.

[0092] Optionally, the analysis result displays information related to the time dimension in at least one chart. Displaying the behavior data includes S203a: in response to a trigger operation on a target time period in the displayed chart, acquiring behavior data corresponding to the target time period through a graph database and displaying it in the form of a directed graph.

[0093] In the embodiments of the present disclosure, the value of a directed edge can be determined based on the time when the operation occurs. Accordingly, the analysis of the behavioral data can be performed in the time dimension and displayed in the chart in a form related to the time dimension, such as a line chart, a bar chart, etc. When the user triggers the part of the chart corresponding to a certain time period, the behavioral data corresponding to the time period can be called up and displayed in the form of a directed graph, so that the user can quickly understand the various operations that occurred within the time period and the relationship between the operations.

[0094] It should be noted that in the optional embodiments of the present disclosure, the information involved (such as behavior data, operation occurrence time, device component status, etc.), when the above embodiments of the present disclosure are applied to specific products or technologies, needs to obtain permission or consent from the user, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present disclosure involve data related to the object, these data need to be obtained with the authorization and consent of the object and in compliance with the relevant laws, regulations and standards of the country and region.

[0095] An embodiment of the present disclosure provides a behavior data processing device based on a graph database, which may include: a first acquisition module and an update module.

[0096] Among them, the first acquisition module is used to obtain the behavior data reported by the Internet of Things device; the update module is used to update the relationship between several operations stored in the graph database based on the behavior data to obtain a directed graph, and the directed graph corresponds to the same Internet of Things device and / or different Internet of Things devices; wherein each node in the directed graph corresponds to each operation in the behavior data, and the directed edges in the directed graph are determined based on the attribute information of each operation in the behavior data.

[0097] The disclosed embodiment also provides another behavior data processing device based on a graph database, which may include: a second acquisition module and a display module.

[0098] Among them, the second acquisition module is used to respond to viewing operations related to behavioral data, and obtain data corresponding to the viewing operation through the directed graph obtained by the method applied to the graph database provided by the embodiment of the present disclosure; the display module is used to perform analysis based on the acquired data and display the analysis results.

[0099] The device of the embodiments of the present disclosure can execute the method provided by the embodiments of the present disclosure, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present disclosure correspond to the steps in the method of each embodiment of the present disclosure. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0100] The modules involved in the embodiments described in the present disclosure may be implemented by software. The name of the module does not limit the module itself in some cases. For example, the first acquisition module may also be described as a "module for acquiring behavior data reported by an IoT device", "a first module", etc.

[0101] An electronic device is provided in an embodiment of the present disclosure, which may be a drying device or a server. The host of the device includes a memory, a processor and a computer program stored in the memory. The processor executes the above computer program to implement the steps of a method for controlling a clothes drying machine. Compared with related technologies, the following can be achieved: The implementation of the present disclosure can store behavioral data through a graph database, and the association between several operations is stored in the form of a directed graph in the graph database. The data itself and the relationship between the data can be stored, which is conducive to analyzing deeper user behaviors, improving processing efficiency, and providing a better basis for optimizing equipment to match user needs.

[0102] In an alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present disclosure.

[0103] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0104] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0105] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0106] The memory 4003 is used to store the computer program for executing the embodiment of the present disclosure, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0107] Among them, electronic devices include but are not limited to: smart clothes drying machines and smart terminals.

[0108] An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0109] The embodiments of the present disclosure also provide a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiments when executed by a processor.

[0110] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than that shown or described in the text.

[0111] It should be understood that, although the flowchart of the embodiment of the present disclosure indicates each operation step by arrows, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present disclosure, the implementation steps in each flowchart can be executed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times. In scenarios with different execution times, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present disclosure does not limit this.

[0112] The above is only an optional implementation method for some implementation scenarios of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present disclosure, other similar implementation methods based on the technical ideas of the present disclosure are also within the protection scope of the embodiments of the present disclosure.

Claims

1. A behavior data processing method based on a graph database, characterized in that: include: Obtain behavioral data reported by IoT devices; Based on the behavior data, updating the association relationship between several operations stored in the graph database to obtain a directed graph, where the directed graph corresponds to the same IoT device and / or different IoT devices; Each node in the directed graph corresponds to each operation in the behavior data, and the directed edges in the directed graph are determined based on the attribute information of each operation in the behavior data.

2. The method according to claim 1, characterized in that The behavior data includes data reported by several IoT devices to the IoT platform and processed by the processing engine; The IoT platform sends the behavior data reported by the IoT device to a message queue, and the processing engine obtains the behavior data in the message queue, processes it, and writes it into the graph database.

3. The method according to claim 1, characterized in that The behavior data includes a device identifier and an operation identifier; the attribute information includes the time when the operation occurred and the device component status corresponding to the operation; When the directed graph corresponds to the same IoT device, it is obtained by performing the following operations: Based on the device identifier and the operation identifier, respectively establish a first node for each operation in the behavior data belonging to the same device; Connecting first nodes corresponding to operations with continuous operation occurrence time and / or continuous device component status to generate a first directed edge, and determining the direction of the first directed edge between corresponding first nodes according to the operation occurrence time; For the two nodes connected by the first directed edge, the value of the first directed edge is determined based on the device component states corresponding to the corresponding operations of the two nodes and / or the corresponding operation occurrence times.

4. The method according to claim 1 or 3, characterized in that: The behavior data includes a device identifier and an operation identifier; the attribute information includes the operation occurrence time and the operation function; the operation function is related to the changed device state and / or the changed environment state; When the directed graph corresponds to different IoT devices, it is obtained by performing the following operations: Based on the operation identifier, establishing a second node for each operation in the behavior data; Based on the device identifier, connecting the second nodes corresponding to the operations corresponding to different IoT devices and having consecutive operation occurrence times to generate a second directed edge, and determining the direction of the second directed edge between the corresponding second nodes according to the operation occurrence time; For the two nodes connected by the second directed edge, the value of the second directed edge is determined based on the operation occurrence times and / or the operation functions corresponding to the operations of the two nodes.

5. The method according to claim 1, characterized in that The value of the directed edge is related to the operation occurrence time and the device state; the device state includes the state of any component in the device and / or the state of the device itself; The directed graph also includes labels for identifying the start node and the end node of the state change, and the identification position of the label is determined based on the operation occurrence time and the device state.

6. The method according to claim 1 or 5, characterized in that: Each node is associated with behavioral data of the corresponding operation; The method further comprises at least one of the following: receiving a first query request related to a target operation and / or an operation occurrence time, determining a node corresponding to the operation identifier and / or the time information carried in the first query request based on the directed graph, querying a first path related to the node based on the directed edge, and feeding back query data corresponding to the target operation and / or the operation occurrence time based on the first path; A second query request related to the target device state is received, at least one target node related to the device identifier carried by the second query request is determined in the directed graph, and a second path between the target nodes related to the target device state is queried based on the directed edge, and query data related to the target device state is fed back based on the second path.

7. A behavior data processing method based on a graph database, characterized in that: include: In response to a viewing operation related to the behavior data, obtaining data corresponding to the viewing operation through the directed graph obtained by the method of any one of claims 1 to 6; Perform analysis based on the acquired data and display the analysis results.

8. The method according to claim 7, characterized in that The viewing operation includes an operation triggered by the behavior data of the smart clothes drying machine, and the directed graph is obtained based on the behavior data reported by the smart clothes drying machine; and / or, the displayed analysis results include a chart configured with an interactive area; The method further comprises: In response to a trigger operation on any part of the displayed graph, the behavior data related to the part is displayed in the form of the directed graph.

9. The method according to claim 7 or 8, characterized in that: The analysis result is displayed in at least one chart with information related to the time dimension; The display of the analysis result includes: in response to a trigger operation on a target time period in the displayed chart, acquiring behavior data corresponding to the target time period through the graph database and displaying it in the form of the directed graph.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Clothes airing machine data processing method and device, computer equipment and storage medium

    CN121278444A