CN115499333A - Method, system, storage medium and electronic device for determining association relationship - Google Patents

Method, system, storage medium and electronic device for determining association relationship Download PDF

Info

Publication number
CN115499333A
CN115499333A CN202211123924.1A CN202211123924A CN115499333A CN 115499333 A CN115499333 A CN 115499333A CN 202211123924 A CN202211123924 A CN 202211123924A CN 115499333 A CN115499333 A CN 115499333A
Authority
CN
China
Prior art keywords
edge gateway
scene
unique identifier
log
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211123924.1A
Other languages
Chinese (zh)
Inventor
解鹏程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211123924.1A priority Critical patent/CN115499333A/en
Publication of CN115499333A publication Critical patent/CN115499333A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/065Generation of reports related to network devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application discloses a method, a system, a storage medium and an electronic device for determining an incidence relation, which relate to the technical field of smart families, and the method for determining the incidence relation comprises the following steps: setting a unique identifier for an edge gateway scene successfully created on a cloud server, and sending the edge gateway scene carrying the unique identifier to a target edge gateway; acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log; and determining the incidence relation between the first operation log and the second operation log according to the unique identifier, and solving the problem of how to realize the process monitoring of the edge gateway scene by adopting the technical scheme.

Description

Method, system, storage medium and electronic device for determining association relationship
Technical Field
The application relates to the technical field of smart homes, in particular to a method, a system, a storage medium and an electronic device for determining an incidence relation.
Background
At present, in the process of using a border gateway scene by a user, a scene on an operating border gateway often cannot be normally viewed, or trigger operation, execution operation and the like cannot be realized.
Therefore, in the related art, there is a problem how to implement flow monitoring of an edge gateway scenario.
Aiming at the problem of how to realize the process monitoring of the edge gateway scene in the related technology, an effective solution is not provided yet.
Disclosure of Invention
The embodiment of the application provides a method, a system, a storage medium and an electronic device for determining an association relationship, so as to at least solve the problem of how to realize process monitoring of an edge gateway scene in the related art.
According to an embodiment of the present application, there is provided a method for determining an association relationship, including: setting a unique identifier for an edge gateway scene successfully created on a cloud server, and sending the edge gateway scene carrying the unique identifier to a target edge gateway; acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log; and determining the incidence relation between the first operation log and the second operation log according to the unique identifier.
In an exemplary embodiment, the sending the edge gateway scene carrying the unique identifier to the target edge gateway includes: sending the edge gateway scene carrying the unique identifier and a target operation instruction to an equipment access gateway, wherein the target operation instruction is used for representing the operation instruction of the edge gateway scene carrying the unique identifier corresponding to different service scenes; acquiring a plurality of edge gateways corresponding to the equipment access gateway; and determining a target edge gateway from the plurality of edge gateways, and sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway through the equipment access gateway.
In an exemplary embodiment, before sending the edge gateway scenario and the target operation instruction carrying the unique identifier to the device access gateway, the method further includes: sending the edge gateway scene carrying the unique identifier to a cloud scene management service to instruct the cloud scene management service to execute the following operations: determining an operation type of a first operation of the server on the edge gateway scene carrying the unique identifier and a service processing instruction corresponding to the operation type of the first operation; and performing scene service processing on the edge gateway scene carrying the unique identifier according to a service processing instruction in the cloud scene management service to obtain the target operation instruction.
In an exemplary embodiment, before obtaining a second operation log of the target edge gateway on the edge gateway scenario carrying the unique identifier, the method further includes: determining a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier at least comprises the following steps: acquiring an operation type corresponding to the target operation instruction, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction; and determining a device control instruction according to the scene information and the target operation instruction, and sending the device control instruction and the edge gateway scene carrying the unique identifier to a terminal device, so that the terminal device executes the device control instruction on the edge gateway scene carrying the unique identifier.
In one exemplary embodiment, the method further comprises: sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway to instruct the target edge gateway to acquire the scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction, including: under the condition that the operation type corresponding to the target operation instruction comprises scene creation or scene editing, acquiring scene basic information and scene script information corresponding to the edge gateway scene carrying the unique identifier; and updating the scene basic information and the scene script information according to the target operation instruction to obtain the scene information of the edge gateway scene carrying the unique identifier.
In an exemplary embodiment, before determining the association relationship between the first operation log and the second operation log according to the unique identifier, the method further includes: collecting the first operation log and the second operation log by: under the condition that the target edge gateway is determined to be in an online state, acquiring the first operation log and the second operation log in a real-time asynchronous mode; under the condition that the target edge gateway is determined to be in an off-line state, if the target edge gateway is monitored to be changed from the off-line state to an on-line state, acquiring a third operation on an edge gateway scene carrying the unique identifier when the target edge gateway is in the off-line state, acquiring a third operation log, and acquiring the first operation log, the second operation log and the third operation log; determining a fourth operation log for representing a failure operation of the edge gateway scene carrying the unique identifier from the first operation log and the second operation log, and collecting the first operation log, the second operation log and the fourth operation log according to a preset time period.
In an exemplary embodiment, after determining the association relationship between the first operation log and the second operation log according to the unique identifier, the method further includes: responding to a query instruction, and querying all operation logs for operating the edge gateway scene carrying the unique identifier; and generating a query result corresponding to the query instruction according to the incidence relation and all the operation logs.
According to another embodiment of the present application, there is also provided a system for determining an association relationship, including: the cloud server is used for creating an edge gateway scene, performing first operation on the edge gateway scene carrying the unique identifier and generating a first operation log; the target edge gateway is used for carrying out second operation on the received edge gateway scene carrying the unique identifier to generate a second operation log; and the log acquisition system is used for setting the unique identifier for the edge gateway scene successfully created on the cloud server and determining the association relationship between the first operation log and the second operation log according to the unique identifier.
In an exemplary embodiment, the log collection system is further configured to: determining a first buried point of the cloud server and a second buried point of the target edge gateway; monitoring first log information corresponding to the first embedding point through a log acquisition system, and monitoring second log information corresponding to the second embedding point through the log acquisition system; the first log information and the second log information both carry the unique identifier; and determining all operation logs of the edge gateway scene carrying the unique identifier based on the first log information and the second log information.
According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method for determining the association relationship when the computer program runs.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the association relationship through the computer program.
In the embodiment of the application, a unique identifier is set for an edge gateway scene which is successfully created on a cloud server, and the edge gateway scene carrying the unique identifier is sent to a target edge gateway; acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log; determining the incidence relation between the first operation log and the second operation log according to the unique identifier; by adopting the technical scheme, the problem of how to realize the process monitoring of the edge gateway scene is solved, and the process state of the edge gateway scene can be monitored.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a hardware environment diagram of a method for determining an association relationship according to an embodiment of the present application;
fig. 2 is a flowchart of a method for determining an association relationship according to an embodiment of the present application;
fig. 3 is a schematic architectural diagram of a method for determining an association relationship according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for determining an association relationship according to an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram illustrating log collection and integration according to an embodiment of the present disclosure;
fig. 6 is a block diagram of a system for determining an association relationship according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a method for determining an association relationship is provided. The method for determining the incidence relation is widely applied to full-house intelligent digital control application scenes such as Smart Home (Smart Home), smart Home equipment ecology, smart Home (Intelligent House) ecology and the like. Alternatively, in this embodiment, the method for determining the association relationship may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for determining an association relationship is provided, and is applied to the computer terminal, and fig. 2 is a flowchart of a method for determining an association relationship according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, a unique identifier is set for an edge gateway scene successfully created on a cloud server, and the edge gateway scene carrying the unique identifier is sent to a target edge gateway;
it should be noted that the object for setting the unique identifier for the successfully created edge gateway scene may further include other execution main bodies such as a device, a device access gateway, and the like.
Step S204, acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log;
step S206, determining the incidence relation between the first operation log and the second operation log according to the unique identifier.
Through the steps, a unique identifier is set for the edge gateway scene successfully created on the cloud server, and the edge gateway scene carrying the unique identifier is sent to a target edge gateway; acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log; and determining the incidence relation between the first operation log and the second operation log according to the unique identifier, so that the problem of how to realize the process monitoring of the edge gateway scene in the related technology is solved, and the process state of the edge gateway scene can be monitored.
In an exemplary embodiment, in order to better understand how to send the edge gateway scene carrying the unique identifier to the target edge gateway in step S202, a technical solution is further provided, which specifically includes: sending the edge gateway scene carrying the unique identifier and a target operation instruction to an equipment access gateway, wherein the target operation instruction is used for representing operation instructions of different service scenes corresponding to the edge gateway scene carrying the unique identifier; acquiring a plurality of edge gateways corresponding to the equipment access gateway; and determining a target edge gateway from the plurality of edge gateways, and sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway through the equipment access gateway.
In an exemplary embodiment, further, before sending the edge gateway scenario and the target operation instruction carrying the unique identifier to the device access gateway, the following implementation scheme is proposed: sending the edge gateway scene carrying the unique identifier to a cloud scene management service to instruct the cloud scene management service to execute the following operations: determining an operation type of a first operation of the server on the edge gateway scene carrying the unique identifier and a service processing instruction corresponding to the operation type of the first operation; and performing scene service processing on the edge gateway scene carrying the unique identifier in the cloud scene management service according to a service processing instruction to obtain the target operation instruction.
In an exemplary embodiment, before obtaining a second operation log of a second operation of the target edge gateway on the edge gateway scenario carrying the unique identifier, a process of how to determine the second operation is described, which is specifically as follows: the second operation of the target edge gateway on the edge gateway scene carrying the unique identifier at least comprises the following steps: acquiring an operation type corresponding to the target operation instruction, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction; and determining a device control instruction according to the scene information and the target operation instruction, and sending the device control instruction and the edge gateway scene carrying the unique identifier to a terminal device, so that the terminal device executes the device control instruction on the edge gateway scene carrying the unique identifier.
In one embodiment, the target edge gateway includes at least a smart device unit, a scenario software development kit, and other software development tools: in the target edge gateway, sending the edge gateway scene carrying the unique identifier to the scene software development kit through an intelligent equipment unit; acquiring an operation type corresponding to the target operation instruction by using the scene software development kit, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction; and determining an equipment control instruction according to the scene information and the target operation instruction, and sending the equipment control instruction and the edge gateway scene carrying the unique identifier to terminal equipment through the other software development kits, so that the terminal equipment executes the equipment control instruction on the edge gateway scene carrying the unique identifier.
In an exemplary embodiment, a method for how to obtain scene information of an edge gateway carrying the unique identifier is provided, and the specific steps include: sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway to instruct the target edge gateway to acquire the scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction, including: under the condition that the operation type corresponding to the target operation instruction comprises scene creation or scene editing, acquiring scene basic information and scene script information corresponding to the edge gateway scene carrying the unique identifier; and updating the scene basic information and the scene script information according to the target operation instruction to obtain the scene information of the edge gateway scene carrying the unique identifier.
In an exemplary embodiment, before determining the association relationship between the first operation log and the second operation log according to the unique identifier, further, the first operation log and the second operation log may be collected by: under the condition that the target edge gateway is determined to be in an online state, acquiring the first operation log and the second operation log in a real-time asynchronous mode; under the condition that the target edge gateway is determined to be in an off-line state, if the target edge gateway is monitored to be changed from the off-line state to an on-line state, acquiring a third operation on an edge gateway scene carrying the unique identifier when the target edge gateway is in the off-line state, acquiring a third operation log, and acquiring the first operation log, the second operation log and the third operation log; determining a fourth operation log for representing a failure operation of the edge gateway scene carrying the unique identifier from the first operation log and the second operation log, and collecting the first operation log, the second operation log and the fourth operation log according to a preset time period.
In an exemplary embodiment, after determining the association relationship between the first operation log and the second operation log according to the unique identifier, a technical solution for obtaining a query result is provided, which is specifically as follows: responding to a query instruction, and querying all operation logs for operating the edge gateway scene carrying the unique identifier; and generating a query result corresponding to the query instruction according to the incidence relation and all the operation logs.
Further, in an embodiment, after configuring the edge scenario at the cloud, the creating, starting, and executing of the edge gateway scenario are all associated with the triggering of the edge gateway scenario, so that an operation log obtained by the operation performed on the edge gateway scenario may be synchronized to the edge gateway, and scenario information of the edge gateway scenario, such as a scenario script and scenario configuration, is also stored on the edge gateway. Once the operation on the edge gateway scene is triggered in an automatic or manual mode, the corresponding operation log can be uploaded to the cloud, for example, the operation log on the edge scene on the edge gateway is uploaded to the cloud to monitor the process change process of the edge scene, and meanwhile, the operation log is displayed to a user, so that the user can conveniently check the execution record. In addition, developers can perform problem troubleshooting analysis and monitoring on different gateways on the cloud, a high-efficiency and quick problem positioning and analyzing method is provided, and user experience is improved.
In order to better understand the process of the method for determining the association relationship, the following describes a flow of a method for implementing the determination of the association relationship with an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
Fig. 3 is a schematic architecture diagram of a method for determining an association relationship according to an embodiment of the present application, and as shown in fig. 3, an architecture structure for implementing the method for determining an association relationship includes:
smart APP: the system is used for displaying the edge gateway scene and the operation log of the edge gateway scene to a user, receiving the operations of the user on the creation, editing, opening, closing, execution and the like of the edge gateway scene, and feeding back the operations to the cloud scene management service.
Cloud scene management service: the method is used for carrying out relevant service processing such as edge gateway scene service inspection, scene configuration change processing and the like, and simultaneously sending an operation instruction of a user to an edge gateway scene to the equipment access gateway. The APP Server and the cloud scene management service jointly realize the functions of the cloud Server.
The equipment access gateway: and the system is used for converting the instruction issued by the cloud scene management service into an instruction which can be identified by the edge gateway, transmitting the instruction to the edge gateway and determining a target edge gateway from the edge gateways.
Edge gateway: the gateway with the capability of executing the scene is used for running an edge gateway scene, performing device control, log reporting and the like, and comprises a SmartDevice (equivalent to the intelligent device unit), a uSDK (equivalent to the other software development kit) and a scene SDK (equivalent to the scene software development kit).
The log collection system comprises: the method is specially used for storing and displaying the log buried point information of the cloud scene management service, the edge gateway and the like, and can determine the association relationship between the first operation log and the second operation log according to a unique utraceId (equivalent to the unique identifier), namely, the operation logs of each link are globally associated according to the unique utraceId of each link.
The device, i.e. the terminal device, is configured to execute a device control instruction on the edge gateway scene carrying the unique identifier.
And the device APP is used for providing an input interface of the device control command for the user.
Based on the architecture structure of the determination method for realizing the incidence relation, full-flow log collection of the edge scene can be realized, and the operation process of the edge scene is monitored through a cloud terminal, specifically, the operation of the edge scene by the cloud terminal server (or equipment) and the operation of the edge gateway on the edge scene are configured through the operations of establishing, starting, executing and the like of the edge gateway scene, a unique identifier is configured for the edge gateway scene, the operation of the edge scene by the cloud terminal server and the operation of the edge scene by the edge gateway are connected through the unique identifier, the log information on the cloud terminal server and the edge gateway is continuously monitored through a log collection system, the full flow of the operation of the edge gateway can be monitored based on the log information with the unique identifier, so that the operation problems occurring in the full flow are checked and analyzed, the problem position is quickly positioned, the monitoring degree of the full flow of the operation of the edge gateway is increased, and the use experience of a user is improved.
The method for determining the incidence relation based on the architecture can comprise the following steps:
under the condition that the unique identification is set for the edge scene successfully created on the cloud server, executing the steps A1 to A9:
step A1: completing operations of scene, opening/closing, execution and the like of an edge scene (equivalent to the edge gateway scene) by an intelligent APP, and carrying a unique utraceId through a header part in an http request;
step A2: the APPserver forwards an edge scene request carrying the unique utraceId;
step A3: the cloud scene management service issues an edge scene request carrying the unique utraceId;
step A4: the equipment access gateway issues an edge scene request carrying the unique utraceId;
step A5: in an edge gateway (namely the target edge gateway), an edge scene request carrying a unique utraceId is issued by SmartDevice;
step A6: acquiring edge scene information from a scene SDK to a cloud end, wherein the script information carries a unique utraceId;
step A7: sending a device control request carrying the unique utraceId to the uSDK by the scene SDK;
step A8: the control of the equipment is realized by the uSDK, and the unique utraceId is recorded;
step A9: and reporting the log carrying the unique utraceId and the execution result information by the scene SDK.
In the case that a unique identifier is set for an edge scene that has been created successfully on the device APP, steps B1 to B3 are performed:
b1: operating an edge scene on an edge gateway panel of the equipment, and generating an execution instruction carrying a unique utraceId;
and step B2: sending a device control request carrying the unique utraceId to the uSDK by the scene SDK;
and step B3: the control of the equipment is realized by the uSDK, and the unique utraceId is recorded;
and step B4: and reporting the log carrying the unique utraceId and the execution result information by the scene SDK.
In this embodiment, a method for determining an association relationship is provided, and fig. 4 is a schematic flowchart of a method for determining an association relationship according to an embodiment of the present application, as shown in fig. 4, the following steps are specifically provided:
step 1: creating an edge scene (namely the edge gateway scene), configuring on/off, executing and the like;
step 2: sending the created edge scene to the APP Server through an http request;
step 2.1: the APP Server sends the edge scene carrying the unique identifier to a cloud scene management service;
step 2.2: the cloud scene management service sends the edge scene to the equipment access gateway;
step 2.2.1: the device access gateway sends the edge scene to the edge gateway, wherein the edge gateway includes SmartDevice (equivalent to the smart device unit), ussdk (equivalent to the other software development kit), and scene SDK (equivalent to the scene software development kit).
Step 2.2.2: returning a response;
step 2.2.2.1: returning a response;
step 2.2.1.1: local service scenario operation:
step 2.2.1.1.1: judging the type of the instruction, for example, creating an instruction or editing an instruction for a scene;
step 2.2.1.1.2: acquiring scene information and script information;
step 2.2.1.1.3: returning scene information and script information;
step 2.2.1.1.4: updating scene information and script information;
step 2.2.1.1.5: if the instruction execution type is judged, equipment control is issued;
step 2.2.1.1.5.1: controlling equipment;
step 2.2.1.1.5.2: the equipment responds;
step 2.2.1.1.6: a device control reply;
step 2.2.1.1.7: reporting an edge scene operation result;
in one embodiment, in the edge gateway, the SmartDevice sends the edge scene to the scene SDK, the scene SDK determines a device control instruction based on the scene information of the edge scene acquired from the cloud and the edge scene request, and sends the device control instruction to the ussdk, and the ussdk sends the device control instruction and the edge scene to the device to instruct the device to execute the device control instruction.
In other embodiments, an operation instruction of a user on an operation panel of the edge gateway may also be obtained from the device APP, and the operation instruction is sent to the scenario SDK, so that the operation instruction is sent to the device through the scenario SDK and the ussdk, and the device is instructed to execute the operation instruction.
Step 2.2.1.1.8: returning a request result;
step 2.2.1.1.7: reporting and collecting a dotting log;
step 2.2.1.1.9: reporting and collecting a dotting log;
step 2.2.1.2: reporting and collecting a dotting log;
step 2.2.3: reporting and collecting a dotting log;
step 2.2.2.1.9: reporting and collecting a dotting log;
step 2.2.2.1.9.1: and log integration.
In one embodiment, a result of the device executing the device control instruction and an operation log corresponding to the edge scene are sent to the cloud scene management service by a scene SDK in the device access gateway.
In one embodiment, the CS: client initiates request, CR: client receives the request, SS: the server side initiates a request, SR: the server receives the request, and DI: asynchronous messaging.
Wherein, the dotting log is reported to the log system in an HTTP mode.
The local scene log reporting strategy is as follows:
1. and (5) real-time asynchronous reporting. And uploading the relevant operation instructions of the local scene sent by the cloud to a log system in real time and asynchronously.
2. And after offline network disconnection, the network resumes reporting. And aiming at the off-line edge scene control, monitoring the on-line notification of the gateway after the network is recovered, and reporting the operation log of the edge scene of the gateway to the cloud.
3. And (6) polling and reporting. And collecting logs of which the edge reporting operation fails once every 10 minutes, and sending the operation logs to a log collection system.
The log reporting format is shown in table 1:
TABLE 1
Figure BDA0003848231410000141
Fig. 5 is a schematic flowchart of log collection and integration according to an embodiment of the present application, and as shown in fig. 5, a process of collecting logs is as follows:
step 1: and a developer or a manager checks the link log information from the utraceId to the log collection system.
Step 1.1: the log collection system searches all log information of the link and returns the log information to the management system for display;
step 1.2: returning a result;
and 2, step: and checking the log details according to the returned result and carrying out subsequent analysis.
Through the embodiment, development and management personnel can associate all different operations of the edge scene from the whole cloud to the edge gateway for analysis and monitoring according to the full link log unique identifier utraceId. The edge gateway can be expanded and dotted according to a log reporting strategy, the edge scene business operation on the edge gateway is completely collected to the cloud, and the scene operation condition and the problem investigation on the edge gateway are searched and analyzed through the cloud.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 6 is a block diagram of an association relation determining system according to an embodiment of the present application; as shown in fig. 6, includes:
the cloud server 62 is configured to create an edge gateway scene, perform a first operation on the edge gateway scene with the unique identifier, and generate a first operation log;
it should be noted that the object for setting the unique identifier for the successfully created edge gateway scene may further include other execution main bodies such as a device, a device access gateway, and the like.
The target edge gateway 66 is configured to perform a second operation on the received edge gateway scene with the unique identifier, and generate a second operation log;
and the log acquisition system 64 is configured to set the unique identifier for the edge gateway scene that has been successfully created on the cloud server, and determine an association relationship between the first operation log and the second operation log according to the unique identifier.
Through the system, a unique identifier is set for an edge gateway scene successfully created on a cloud server, and the edge gateway scene carrying the unique identifier is sent to a target edge gateway; acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log; and determining the incidence relation between the first operation log and the second operation log according to the unique identifier, so that the problem of how to realize the process monitoring of the edge gateway scene in the related technology is solved, and the process state of the edge gateway scene can be monitored.
In an exemplary embodiment, the system for determining the association relationship is further configured to send the edge gateway scene carrying the unique identifier to a target edge gateway, specifically: sending the edge gateway scene carrying the unique identifier and a target operation instruction to an equipment access gateway, wherein the target operation instruction is used for representing the operation instruction of the edge gateway scene carrying the unique identifier corresponding to different service scenes; acquiring a plurality of edge gateways corresponding to the equipment access gateway; and determining a target edge gateway from the plurality of edge gateways, and sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway through the equipment access gateway.
In an exemplary embodiment, before sending the edge gateway scenario with the unique identifier and the target operation instruction to the device access gateway, the association determination system is further configured to send the edge gateway scenario with the unique identifier to a cloud scenario management service, so as to instruct the cloud scenario management service to perform the following operations: determining an operation type of a first operation of the server on the edge gateway scene carrying the unique identifier and a service processing instruction corresponding to the operation type of the first operation; and performing scene service processing on the edge gateway scene carrying the unique identifier according to a service processing instruction in the cloud scene management service to obtain the target operation instruction.
In an exemplary embodiment, before obtaining a second operation log by the target edge gateway on the edge gateway scenario carrying the unique identifier, the system for determining an association is further configured to determine that the second operation on the edge gateway scenario carrying the unique identifier by the target edge gateway at least includes the following steps: acquiring an operation type corresponding to the target operation instruction, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction; and determining a device control instruction according to the scene information and the target operation instruction, and sending the device control instruction and the edge gateway scene carrying the unique identifier to a terminal device, so that the terminal device executes the device control instruction on the edge gateway scene carrying the unique identifier.
In one embodiment, the target edge gateway includes at least a smart device unit, a scenario software development kit, and other software development tools: in the target edge gateway, sending the edge gateway scene carrying the unique identifier to the scene software development kit through an intelligent equipment unit; acquiring an operation type corresponding to the target operation instruction by using the scene software development kit, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction; and determining an equipment control instruction according to the scene information and the target operation instruction, and sending the equipment control instruction and the edge gateway scene carrying the unique identifier to terminal equipment through the other software development kits, so that the terminal equipment executes the equipment control instruction on the edge gateway scene carrying the unique identifier.
In an exemplary embodiment, the system for determining an association relationship is further configured to send the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway, so as to instruct the target edge gateway to obtain scene information of the edge gateway scene carrying the unique identifier based on an operation type corresponding to the target operation instruction, and includes: under the condition that the operation type corresponding to the target operation instruction comprises scene creation or scene editing, acquiring scene basic information and scene script information corresponding to the edge gateway scene carrying the unique identifier; and updating the scene basic information and the scene script information according to the target operation instruction to obtain the scene information of the edge gateway scene with the unique identifier.
In an exemplary embodiment, before determining the association relationship between the first operation log and the second operation log according to the unique identifier, the above-mentioned association relationship determining system is further configured to collect the first operation log and the second operation log by: under the condition that the target edge gateway is determined to be in an online state, acquiring the first operation log and the second operation log in a real-time asynchronous mode; under the condition that the target edge gateway is determined to be in an off-line state, if the target edge gateway is monitored to be changed from the off-line state to an on-line state, acquiring a third operation on an edge gateway scene carrying the unique identifier when the target edge gateway is in the off-line state, acquiring a third operation log, and acquiring the first operation log, the second operation log and the third operation log; determining a fourth operation log used for representing a failure operation of operating the edge gateway scene carrying the unique identifier from the first operation log and the second operation log, and collecting the first operation log, the second operation log and the fourth operation log according to a preset time period.
In an exemplary embodiment, after determining the association relationship between the first operation log and the second operation log according to the unique identifier, the association relationship determining system is further configured to respond to a query instruction to query all operation logs for operating an edge gateway scene carrying the unique identifier; and generating a query result corresponding to the query instruction according to the incidence relation and all the operation logs.
In an exemplary embodiment, the log collection system 64 is further configured to: determining a first buried point of the cloud server and a second buried point of the target edge gateway; monitoring first log information corresponding to the first embedding point through a log acquisition system, and monitoring second log information corresponding to the second embedding point through the log acquisition system; the first log information and the second log information both carry the unique identifier; and determining all operation logs of the edge gateway scene carrying the unique identifier based on the first log information and the second log information.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, setting a unique identifier for an edge gateway scene successfully created on a cloud server, and sending the edge gateway scene carrying the unique identifier to a target edge gateway;
s2, acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log;
and S3, determining the incidence relation between the first operation log and the second operation log according to the unique identifier.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, setting a unique identifier for an edge gateway scene successfully created on a cloud server, and sending the edge gateway scene carrying the unique identifier to a target edge gateway;
s2, acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log;
and S3, determining the incidence relation between the first operation log and the second operation log according to the unique identifier.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A method for determining an association relationship is characterized by comprising the following steps:
setting a unique identifier for an edge gateway scene successfully created on a cloud server, and sending the edge gateway scene carrying the unique identifier to a target edge gateway;
acquiring a first operation of the cloud server on the edge gateway scene carrying the unique identifier to obtain a first operation log, and acquiring a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier to obtain a second operation log;
and determining the incidence relation between the first operation log and the second operation log according to the unique identifier.
2. The method for determining association relationship according to claim 1, wherein sending the edge gateway scenario carrying the unique identifier to a target edge gateway includes:
sending the edge gateway scene carrying the unique identifier and a target operation instruction to an equipment access gateway, wherein the target operation instruction is used for representing the operation instruction of the edge gateway scene carrying the unique identifier corresponding to different service scenes;
acquiring a plurality of edge gateways corresponding to the equipment access gateway;
and determining a target edge gateway from the plurality of edge gateways, and sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway through the equipment access gateway.
3. The method for determining association relationship according to claim 2, wherein before sending the edge gateway scenario carrying the unique identifier and the target operation instruction to the device access gateway, the method further comprises:
sending the edge gateway scene carrying the unique identifier to a cloud scene management service to instruct the cloud scene management service to execute the following operations:
determining an operation type of a first operation of the server on the edge gateway scene carrying the unique identifier and a service processing instruction corresponding to the operation type of the first operation;
and performing scene service processing on the edge gateway scene carrying the unique identifier in the cloud scene management service according to a service processing instruction to obtain the target operation instruction.
4. The method for determining association relationship according to claim 2, wherein before obtaining a second operation log of a second operation performed by the target edge gateway on an edge gateway scenario that carries the unique identifier, the method further includes:
determining a second operation of the target edge gateway on the edge gateway scene carrying the unique identifier at least comprises the following steps:
acquiring an operation type corresponding to the target operation instruction, and acquiring scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction;
and determining a device control instruction according to the scene information and the target operation instruction, and sending the device control instruction and the edge gateway scene carrying the unique identifier to a terminal device, so that the terminal device executes the device control instruction on the edge gateway scene carrying the unique identifier.
5. The method for determining association relationship according to claim 4, further comprising:
sending the edge gateway scene carrying the unique identifier and the target operation instruction to the target edge gateway to instruct the target edge gateway to acquire the scene information of the edge gateway scene carrying the unique identifier based on the operation type corresponding to the target operation instruction, including:
under the condition that the operation type corresponding to the target operation instruction comprises scene creation or scene editing, acquiring scene basic information and scene script information corresponding to the edge gateway scene carrying the unique identifier;
and updating the scene basic information and the scene script information according to the target operation instruction to obtain the scene information of the edge gateway scene carrying the unique identifier.
6. The method for determining association relationship according to claim 1, wherein before determining the association relationship between the first operation log and the second operation log according to the unique identifier, the method further comprises:
collecting the first operation log and the second operation log by:
under the condition that the target edge gateway is determined to be in an online state, acquiring the first operation log and the second operation log in a real-time asynchronous mode;
under the condition that the target edge gateway is determined to be in an off-line state, if the target edge gateway is monitored to be changed from the off-line state to an on-line state, acquiring a third operation on an edge gateway scene carrying the unique identifier when the target edge gateway is in the off-line state, acquiring a third operation log, and acquiring the first operation log, the second operation log and the third operation log;
determining a fourth operation log for representing a failure operation of the edge gateway scene carrying the unique identifier from the first operation log and the second operation log, and collecting the first operation log, the second operation log and the fourth operation log according to a preset time period.
7. The method for determining association relationship according to claim 1, wherein after determining the association relationship between the first operation log and the second operation log according to the unique identifier, the method further comprises:
responding to a query instruction, and querying all operation logs for operating the edge gateway scene carrying the unique identifier;
and generating a query result corresponding to the query instruction according to the incidence relation and all the operation logs.
8. A system for determining an association relationship, comprising:
the cloud server is used for creating an edge gateway scene, performing first operation on the edge gateway scene carrying the unique identifier and generating a first operation log;
the target edge gateway is used for carrying out second operation on the received edge gateway scene carrying the unique identifier to generate a second operation log;
and the log acquisition system is used for setting the unique identifier for the edge gateway scene successfully created on the cloud server and determining the association relationship between the first operation log and the second operation log according to the unique identifier.
9. The system for determining associations according to claim 8, wherein said log collection system is further configured to:
determining a first buried point of the cloud server and a second buried point of the target edge gateway;
monitoring first log information corresponding to the first embedding point through a log acquisition system, and monitoring second log information corresponding to the second embedding point through the log acquisition system; the first log information and the second log information both carry the unique identifier;
and determining all operation logs of the edge gateway scene carrying the unique identifier based on the first log information and the second log information.
10. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202211123924.1A 2022-09-15 2022-09-15 Method, system, storage medium and electronic device for determining association relationship Pending CN115499333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211123924.1A CN115499333A (en) 2022-09-15 2022-09-15 Method, system, storage medium and electronic device for determining association relationship

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211123924.1A CN115499333A (en) 2022-09-15 2022-09-15 Method, system, storage medium and electronic device for determining association relationship

Publications (1)

Publication Number Publication Date
CN115499333A true CN115499333A (en) 2022-12-20

Family

ID=84468364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211123924.1A Pending CN115499333A (en) 2022-09-15 2022-09-15 Method, system, storage medium and electronic device for determining association relationship

Country Status (1)

Country Link
CN (1) CN115499333A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801855A (en) * 2023-02-06 2023-03-14 广东金朋科技有限公司 Device control method, device, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801855A (en) * 2023-02-06 2023-03-14 广东金朋科技有限公司 Device control method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN112596937A (en) Fault processing method and device, storage medium and electronic device
CN114679378A (en) Log monitoring and analyzing method and system, storage medium and electronic device
CN113154644A (en) Equipment information display method and device, storage medium and terminal
CN116048467A (en) Micro-service development platform and business system development method
CN115499333A (en) Method, system, storage medium and electronic device for determining association relationship
CN115065508A (en) Method and apparatus for processing device twin data, storage medium, and electronic apparatus
CN116955232A (en) Hardware identification method and device based on control system
CN115494737A (en) Control method of intelligent household appliance, storage medium and electronic device
CN116225834A (en) Alarm information sending method and device, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN116033006A (en) Data processing method, system, storage medium and electronic device
CN112328438A (en) Self-checking method and device of terminal equipment and computer storage medium
CN114760235B (en) Method and device for executing dial testing task, storage medium and electronic device
CN116346686A (en) Information transmission method and device, storage medium and electronic device
CN116301767A (en) Interface file generation method and device, storage medium and electronic device
CN115373958A (en) Method and device for determining abnormal information, storage medium and electronic device
CN114756348A (en) Execution method and device of dial testing task, storage medium and electronic device
CN117240874A (en) Equipment linkage method and device, storage medium and electronic device
CN117527459A (en) Control method and device of intelligent equipment, storage medium and electronic device
CN107306291B (en) Terminal operation method and device
CN114826899A (en) Debugging method and device of equipment control service, storage medium and electronic device
CN114999494A (en) Voice interaction function testing method and device, storage medium and electronic device
CN115145615A (en) Memory data refreshing method and device, storage medium and electronic device
CN115629961A (en) Method and device for determining debugging result, storage medium and electronic device
CN117221517A (en) Method and device for testing long stability of camera device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination