Cloud edge collaborative message tracking method, device, equipment, medium and product
By implementing a message tracking method on a cloud server, using the message log of the edge gateway for abnormal monitoring, the problem of low abnormal monitoring efficiency in the cloud-edge collaborative system is solved, and the ability to quickly locate link problems is realized.
Patent Information
- Application Number
- CN202311738977.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-03-25
AI Technical Summary
In cloud-edge collaboration systems, the prior art is less efficient for abnormal monitoring and cannot quickly locate link problems.
By implementing a message tracking method on a cloud server, the message logs sent by the edge gateway are used to monitor the abnormality of uplink and downlink message messages, reducing the dependence on the cloud and edge data flow logs.
It has achieved the improvement of abnormal monitoring efficiency under cloud-edge collaboration, reduced the time for link problem investigation, and can quickly locate link problems.
Smart Images

Figure CN119697057A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data processing technology, and in particular to a cloud-edge collaborative message tracking method, device, equipment, medium and product. Background Art
[0002] Cloud-edge collaboration is an architecture that closely integrates cloud computing and edge computing. It provides users with more flexible, efficient and comprehensive services by effectively and collaboratively utilizing cloud-side and edge-side resources.
[0003] In the cloud-edge collaborative system, data is transmitted between the cloud side and the edge side. When performing abnormality monitoring, it is usually necessary to check the data flow logs of the cloud side and the edge side respectively, and locate the abnormal points in the link by analyzing the data flow logs on both sides. However, this method is time-consuming and labor-intensive, and cannot quickly locate link problems, resulting in low efficiency of abnormality monitoring in cloud-edge collaboration. Summary of the invention
[0004] Based on this, it is necessary to provide a message tracking method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of abnormal monitoring under cloud-edge collaboration in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a message tracking method, which is applied to a cloud server, and the method includes:
[0006] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0007] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0008] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0009] In one embodiment, the message tracking configuration information includes message tracking function information and a message tracking threshold, and the tracking of uplink and downlink messages between the cloud server and the device based on the message tracking configuration information includes:
[0010] Obtaining a link node between the cloud server and the device;
[0011] If the link node is configured with the message tracking function information, the message to be tracked is screened out from the uplink and downlink message messages based on the message tracking threshold, and the message to be tracked is tracked.
[0012] In one embodiment, the filtering out the to-be-tracked messages in the uplink and downlink messages based on the message tracking threshold includes:
[0013] Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message;
[0014] If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0015] In one embodiment, the message tracking configuration information further includes message encoding and decoding configuration information, and the tracking process of the message to be tracked includes:
[0016] Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked;
[0017] If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information;
[0018] Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
[0019] In one embodiment, the performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes:
[0020] Extracting a target log corresponding to the message to be tracked in the uplink and downlink message from the message log;
[0021] Based on the encoding identifier and message encoding and decoding configuration information carried by the target log, obtaining a decoding method corresponding to the encoding identifier;
[0022] According to the decoding method, the target log is decoded to obtain a message processing result of the message to be tracked;
[0023] Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
[0024] In one embodiment, the message tracking configuration information further includes a preset alarm threshold, and the abnormal monitoring of the uplink and downlink message messages based on the message processing result includes:
[0025] Obtaining a second current parameter value corresponding to each message parameter in the message processing result;
[0026] Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0027] In one embodiment, after the step of performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log, the method further includes:
[0028] In response to a viewing instruction for the uplink and downlink message, a tracking link corresponding to the uplink and downlink message is obtained, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node;
[0029] Obtain message processing results of the uplink and downlink message messages in the tracking link, and display the message processing results.
[0030] In one embodiment, the receiving the message log sent by the edge gateway includes:
[0031] Receiving the message log sent by the edge gateway through a cloud-side receiving service;
[0032] The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes:
[0033] Sending the message log to a cloud-side monitoring device through the cloud-side receiving service;
[0034] The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
[0035] In a second aspect, the present application also provides a message tracking device, which is applied to a cloud server, and the device includes:
[0036] A message tracking module, used to track uplink and downlink message messages between the cloud server and the device based on message tracking configuration information; the uplink and downlink message messages are sent via an edge gateway;
[0037] A log receiving module, configured to receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0038] The abnormality monitoring module is used to perform abnormality monitoring on the tracked uplink and downlink message messages based on the message log.
[0039] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0040] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0041] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0042] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0044] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0045] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0046] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0047] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0049] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0050] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0051] The above-mentioned cloud-edge collaborative message tracking method, device, computer equipment, computer-readable storage medium and computer program product are applied to cloud servers. Based on the message tracking configuration information, the cloud server tracks the uplink and downlink message messages between the cloud server and the device. The uplink and downlink message messages are sent via the edge gateway, and the message log sent by the edge gateway is received. The message log includes the first downlink message log corresponding to the cloud server sending the downlink message message to the edge gateway, the second downlink message log of the edge gateway sending the downlink message message to the device, and the uplink message log of the device reporting the uplink message message to the cloud server. In this way, the cloud server can obtain the messages on the edge side and the device side where the edge gateway is located in real time, thereby realizing the uplink and downlink message tracking on the cloud side, edge side and device side. Further, according to the message log, the tracked uplink and downlink message messages are monitored for abnormalities, and there is no need to check the data flow logs of the cloud side and edge side one by one, which reduces the link problem troubleshooting time under cloud-edge collaboration, thereby quickly locating the link problem and improving the abnormal monitoring efficiency of cloud-edge collaboration. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of an application scenario of a cloud-edge collaborative message tracking method in an embodiment;
[0053] Figure 2 A flowchart of a cloud-edge collaborative message tracking method in one embodiment;
[0054] Figure 3 A schematic diagram of a process of message tracking function detection and to-be-tracked message screening in one embodiment;
[0055] Figure 4 A schematic diagram of a coding process of a message to be tracked in one embodiment;
[0056] Figure 5 A schematic diagram of a decoding process of a message log in an embodiment;
[0057] Figure 6 A schematic diagram of a flow chart showing a message processing result in one embodiment;
[0058] Figure 7A schematic diagram of another application scenario of a cloud-edge collaborative message tracking method in an embodiment;
[0059] Figure 8 Another flowchart of a cloud-edge collaborative message tracking method in one embodiment;
[0060] Fig. 9 is a structural block diagram of a message tracking device in an embodiment;
[0061] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] With the rapid development of information technology, cloud computing and edge computing have gradually become the pillars of modern society. However, simply viewing cloud computing and edge computing as two isolated fields can no longer meet the increasingly complex and diverse application needs. Therefore, the cloud-edge collaborative architecture has emerged and has become the key to achieving deeply integrated cross-level services. Cloud-edge collaboration is an architecture that closely combines cloud computing and edge computing. By effectively and collaboratively utilizing cloud-side and edge-side resources, it provides users with more flexible, efficient, and comprehensive services.
[0064] In the existing cloud-edge collaborative system, data can be flexibly transmitted on the cloud side, edge side, and device side. However, for the abnormal monitoring problem in the cloud-edge collaborative system, it is usually through viewing the data flow logs of the cloud side, edge side, or device side, and analyzing these data flow logs to locate the abnormal points in the link, so as to achieve abnormal monitoring. However, the abnormal point location process of this method is relatively long, and even requires the assistance of operation and maintenance personnel to troubleshoot, and it cannot quickly locate the link problem, which easily leads to low efficiency of abnormal monitoring in cloud-edge collaboration.
[0065] The cloud-edge collaborative message tracking method provided in the embodiments of the present disclosure can be applied to Figure 1In the application environment shown. Among them, the cloud server 102 is a server deployed on the cloud side. The cloud server 102 tracks the uplink and downlink message messages between the cloud server 102 and the device 104 according to the message tracking configuration information. The uplink and downlink message messages are sent via the edge gateway 106. The edge gateway 106 may refer to a gateway deployed on the edge side for edge-side message transmission. The cloud server 102 receives the message log sent by the edge gateway 106, and the message log includes the first downlink message log corresponding to the cloud server 102 sending the downlink message message to the edge gateway 106, the second downlink message log of the edge gateway 106 sending the downlink message message to the device 104, and the uplink message log of the device 104 reporting the uplink message message to the cloud server 102. The cloud server 102 performs abnormal monitoring on the tracked uplink and downlink message messages based on the message log.
[0066] In one embodiment, the cloud side is also deployed with a cloud side message agent 108, a cloud side receiving service 110 and a cloud side monitoring device 112, and the cloud side monitoring device 112 includes a message processing middleware and a message tracking service. Specifically, the cloud side message agent 108 is used to synchronize the message tracking configuration information of the cloud side to the edge side, and to serve as a transfer station for the cloud side to send messages, that is, all messages to be sent from the cloud side to the device 104 can be transmitted through the cloud side message agent 108, and the cloud server 102 can first send the message to be sent to the cloud side message agent 108, and control the cloud side message agent 108 to send the message to the edge gateway 106 first, and then the edge gateway 106 sends the message to the device 104. When the cloud-side message agent 108 receives the message log sent by the edge gateway 106, it sends the message log to the cloud-side receiving service 110, which parses the message log and sends the parsed message log to the message processing middleware in the cloud-side monitoring device 112. The message tracking service subscribes to the message processing middleware, that is, the message tracking service can obtain the message log stored in the message processing middleware, and decode the message log to obtain the message processing result, so as to perform abnormal monitoring based on the message processing result. The display interface pre-configured on the cloud side can also obtain the data in the message tracking service for display.
[0067] In one embodiment, the cloud-side receiving service 110 can be Flink middleware. Flink is an open source stream processing framework built for distributed, high-performance, readily available and accurate stream processing applications. The core idea of Flink is stream computing, which divides data into continuous data streams and then performs data processing on the data streams. Therefore, Flink middleware has efficient processing capabilities when processing large data streams. In this embodiment, considering that the edge side will generate massive data during the message tracking process, the use of Flink middleware can efficiently process a large number of log messages sent by the edge gateway 106, thereby improving the message processing efficiency, and then improving the abnormal monitoring efficiency of cloud-edge collaboration.
[0068] In one embodiment, the message processing middleware may be a Kafka system, which is essentially a message middleware. In this embodiment, the message tracking service subscribes to the message tracking topic in the Kafka system, so that the message tracking service can analyze and store the message logs in the Kafka system, thereby realizing abnormal monitoring, and providing the message processing results corresponding to the message logs to the display interface on the cloud side for users to view in real time.
[0069] In one embodiment, an edge side message agent 114 is also deployed on the edge side. The edge side message agent 114 can be understood as a transit station for message transmission between the edge side and the device 104. That is, the message reported by the device 104 to the cloud side and the message sent from the cloud side to the device 104 can both be transmitted through the edge side message agent 114.
[0070] The cloud server 102 may be implemented as an independent server or a server cluster consisting of multiple servers. The device 104 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, and IoT devices.
[0071] In one embodiment, if Figure 2 As shown, a cloud-edge collaborative message tracking method is provided, which is applied to Figure 1 Taking the cloud server 102 in the example as an example, the following steps are included:
[0072] Step S202: based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway.
[0073] Among them, the message tracking configuration information may refer to a predefined message tracking rule, which may include message tracking function information, message tracking threshold, message encoding and decoding configuration information, and preset alarm threshold. The message tracking function information may be information used to determine whether each link node has enabled the message tracking function, that is, a link node configured with the message tracking function information is a link node with the message tracking function enabled, and the uplink and downlink message flows can be tracked and processed when transferred to the link node. The message tracking threshold may be used to filter out the messages to be tracked in the uplink and downlink message messages. The message encoding and decoding configuration information may include a message encoding method and a message decoding method. The uplink and downlink message messages may include uplink messages and downlink messages. The uplink message may refer to an uplink message, such as a message reported by a device to the cloud side, or a message reported by an edge side to the cloud side. Similarly, the downlink message may refer to a downlink message, such as a message sent by the cloud side to the device, or a message sent by the cloud side to the edge side.
[0074] In one embodiment, message tracking function information may be configured for specific link nodes. For example, the message tracking function may be configured for certain link nodes between the cloud side and the edge side, or the message tracking function may be configured for certain link nodes between the edge side and the device side.
[0075] Specifically, the cloud server can pre-configure good message tracking function information, message tracking threshold, message encoding and decoding configuration information, and preset alarm threshold on the cloud side, and synchronize the message tracking function information, message tracking threshold, message encoding and decoding configuration information, and preset alarm threshold to the edge side through the cloud side message agent, so that both the cloud side and the edge side can track the uplink and downlink messages according to the message tracking configuration information. And both the uplink and downlink messages can be sent via the edge gateway.
[0076] Step S204, receiving the message log sent by the edge gateway; the message log includes the first downlink message log corresponding to the cloud server sending the downlink message message to the edge gateway, the second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and the uplink message log corresponding to the device reporting the uplink message message to the cloud server.
[0077] Among them, the message log may record the message processing results of the uplink and downlink message messages during the message transmission process. Downlink message messages refer to message messages sent from the cloud server to the device, including but not limited to attribute setting messages, event response messages, command messages, OTA (Over-the-Air Technology) messages, and custom messages. The first downlink message log may include the message processing results of the downlink message message during the transmission from the cloud side to the edge gateway. The second downlink message log may include the message processing results of the downlink message message during the transmission from the edge gateway to the device. The uplink message message may refer to the message message reported by the device to the cloud server.
[0078] Specifically, during the transmission process of uplink and downlink message between the cloud side, edge side and device, the message will be tracked and processed by each link node in the cloud side, edge side and device to obtain the message processing results, which will be recorded as message logs. The cloud server can control the cloud-side message agent to receive the message logs sent by the edge gateway. The cloud-side message agent can parse the message logs and send the parsed message logs to the message processing middleware, so that the message tracking service can obtain the message logs in the message processing middleware and decode them to obtain the message processing results, and perform abnormal monitoring on the uplink and downlink message messages based on the message processing results.
[0079] Step S206: performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log.
[0080] Specifically, the cloud server can send an exception monitoring instruction to the message tracking service to instruct the message tracking service to obtain the message log in the message processing middleware, and decode the message log to obtain the message processing result, so as to monitor the uplink and downlink message messages for exceptions based on the message processing result, and issue a monitoring alarm. When a viewing instruction for the uplink and downlink message messages is received, the message processing result is sent to the display interface on the cloud side for display.
[0081] In this embodiment, the cloud server tracks the uplink and downlink messages between the cloud server and the device based on the message tracking configuration information. The uplink and downlink messages are sent via the edge gateway, and the message log sent by the edge gateway is received. The message log includes the first downlink message log corresponding to the cloud server sending the downlink message message to the edge gateway, the second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and the uplink message log of the device reporting the uplink message message to the cloud server. In this way, the cloud server can obtain the messages on the edge side and the device side where the edge gateway is located in real time, thereby realizing the uplink and downlink message tracking on the cloud side, edge side and device side. Further, the tracked uplink and downlink message messages are monitored for abnormalities based on the message log, and there is no need to check the data flow logs of the cloud side and edge side one by one, which reduces the link problem troubleshooting time under cloud-edge collaboration, thereby quickly locating the link problem and improving the abnormal monitoring efficiency of cloud-edge collaboration.
[0082] In one embodiment, if Figure 3 As shown, based on the message tracking configuration information, the uplink and downlink messages between the cloud server and the device are tracked, including:
[0083] Step S302, obtaining the link node between the cloud server and the device.
[0084] Among them, the link node can refer to the node where the uplink and downlink message messages flow between the cloud server and the device, and the link node can track and encode the uplink and downlink message messages.
[0085] Specifically, the link node between the cloud server and the device can be a link node in the cloud side where the cloud server is located. The message flow between the cloud server and the device needs to pass through the edge side, so the link node can also be a link node in the edge side or a link node in the device.
[0086] Step S304: If the link node is configured with message tracking function information, based on the message tracking threshold, the messages to be tracked are screened out from the uplink and downlink message messages, and the messages to be tracked are tracked.
[0087] The message tracking threshold may be a preset message parameter critical value, and message tracking is required when the message parameter critical value is reached. The message to be tracked may refer to a message in the uplink and downlink message that needs to be tracked.
[0088] Specifically, if the link node is configured with message tracking function information, it means that the link node has enabled the message tracking function, so the uplink and downlink messages need to be tracked and processed at the link node. First, according to the message tracking threshold, that is, the critical value of the message parameter, the messages to be tracked that reach the critical value of the message parameter can be screened out from the uplink and downlink messages, and the messages to be tracked can be tracked.
[0089] In one embodiment, based on the message tracking threshold, the messages to be tracked are screened out in the uplink and downlink message messages, and it also includes: obtaining the first current parameter value corresponding to each message parameter in the uplink and downlink message messages; if the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0090] The message parameter may refer to each parameter in the uplink and downlink message. The first current parameter value may refer to the current parameter value of each message parameter.
[0091] Specifically, each message parameter in the uplink and downlink messages may be obtained, and the current parameter value of each message parameter may be obtained, target message parameters whose parameter values reach the message tracking threshold may be screened out, and these target message parameters may be tracked together as messages to be tracked.
[0092] In one embodiment, tracking the message to be tracked may include marking the message to be tracked, that is, marking the message to be tracked with a preset tracking identifier, or writing a tracking result, such as tracked, into the message to be tracked. The specific tracking method is not limited and can be set according to actual conditions.
[0093] In this embodiment, by filtering the link nodes that have enabled the message tracking function and filtering the messages to be tracked in the uplink and downlink message messages, the link nodes and message parameters that are unimportant or do not require message tracking are effectively filtered out, so as to achieve targeted message tracking and improve the efficiency of message tracking, thereby improving the efficiency of locating link problems in cloud-edge collaboration, and further improving the efficiency of abnormal monitoring of cloud-edge collaboration.
[0094] In one embodiment, if Figure 4 As shown, the tracking process of the message to be tracked also includes:
[0095] Step S402: perform tracking processing on the message to be tracked to obtain a message processing result corresponding to the message to be tracked.
[0096] The message processing result may refer to a result obtained after tracking the message to be tracked, and may be used to indicate whether the message to be tracked is successfully tracked.
[0097] Specifically, the tracking process for the message to be tracked may be to mark the message to be tracked with a tracking identifier, or to write a tracking result into the message to be tracked. The specific tracking process is not limited here and may be set according to actual conditions.
[0098] In one embodiment, after the message to be tracked is tracked, conventional processing may continue to be performed on the message to be tracked. Conventional processing may refer to normal processing operations on the message to be tracked, such as forwarding the message to be tracked to the next link node, or performing operations such as adding, deleting, modifying, and checking on the message to be tracked.
[0099] In one embodiment, the message processing result may include message status, message tracking status, message tracking time, message processing time, etc. The message processing status may include normal message and abnormal message, which can be used to perform abnormal monitoring on the message to be tracked. The message tracking status may include tracked and not tracked. The message tracking time may refer to the time for tracking the message to be tracked, and the message processing time may refer to the time for performing normal processing operations on the message to be tracked.
[0100] Step S404: If the message to be tracked carries a coding identifier, a coding method corresponding to the coding identifier is obtained based on the message coding and decoding configuration information.
[0101] The encoding identifier may be an identifier used to indicate that the message to be tracked needs to be encoded. The message encoding and decoding configuration information may include a message encoding method and a message decoding method.
[0102] Specifically, the uplink and downlink message messages can be marked with coding identifiers in advance according to their importance. In this way, the messages to be tracked screened out from the uplink and downlink message messages also carry the corresponding coding identifiers, and the encoding method corresponding to the coding identifier can be further queried according to the message encoding and decoding configuration information.
[0103] In one embodiment, coding identifiers may be configured for important uplink and downlink message messages, that is, important uplink and downlink message messages are coded to ensure the security of the messages to be tracked. The importance of the uplink and downlink message messages may be determined according to actual application conditions.
[0104] Step S406: Encode the message processing result based on the encoding method to obtain an encoding processing result.
[0105] The encoding processing result may refer to the result obtained after encoding the message processing result, and may include successful encoding and encoding failure.
[0106] Specifically, after obtaining the encoding method corresponding to the encoding identifier, the message processing result is encoded using the encoding method. The encoding methods include but are not limited to digital encoding, which is an encoding method that converts the message into digital form, symbolic encoding, which is an encoding method that converts the message into symbolic form, and encryption encoding, which is an encoding method that encrypts the message to ensure the security of the message.
[0107] In this embodiment, by tracking the message to be tracked, the corresponding message processing result is obtained. If the message to be tracked carries a coding identifier, the coding method corresponding to the coding identifier is further obtained according to the message coding and decoding configuration information, and the message processing result is encoded by the coding method. The security of the message to be tracked is guaranteed, thereby improving the security of message transmission in cloud-edge collaboration.
[0108] In one embodiment, if Figure 5 As shown in the figure, the tracked uplink and downlink messages are monitored for abnormalities based on the message logs, including:
[0109] Step S502: extracting a target log corresponding to a message to be tracked in the uplink and downlink message from the message log.
[0110] Among them, it can be understood that the cloud-side receiving service will not only receive the message log sent by the edge gateway from the message tracking channel, but also receive the message log sent by the upstream channel. The upstream channel sends all message transmission messages between the edge side and the cloud side, while the message tracking channel sends the target log corresponding to the message to be tracked between the edge side and the cloud side. Therefore, it is necessary to extract the target log corresponding to the message to be tracked from the received message log.
[0111] In one embodiment, the uplink channel may include a message log transmitted in the message tracking channel.
[0112] Specifically, the message log sent by the edge gateway is extracted to obtain the target log corresponding to the tracking message in the uplink and downlink message.
[0113] Step S504: based on the encoding identifier and message encoding and decoding configuration information carried in the target log, a decoding method corresponding to the encoding identifier is obtained.
[0114] The message to be tracked after the tracking and encoding processing will generate a target log to record all processing results. The target log will inherit the encoding identifier carried by the message to be tracked.
[0115] Specifically, after the cloud-side receiving service obtains the target log, it sends the target log to the message processing middleware. The message processing middleware stores the target log so that the message tracking service can obtain the target log, and based on the encoding identifier carried by the target log, query the decoding method corresponding to the encoding identifier in the message encoding and decoding configuration information to decode the target log.
[0116] Step S506: decoding the target log according to the decoding method to obtain a message processing result of the message to be tracked.
[0117] Specifically, through this decoding method, the target log is decoded and processed to obtain the message processing result of the message to be tracked, and the message processing result is the message processing result in step S402. The decoding method includes but is not limited to a digital decoding method corresponding to the digital code, a symbol decoding method corresponding to the symbol code, and an encryption decoding method corresponding to the encryption code.
[0118] Step S508: Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
[0119] Specifically, according to the message processing result obtained by decoding, that is, the message status, message tracking status, message tracking time, message processing time, etc. of the message to be tracked, the uplink and downlink message messages are monitored for abnormalities.
[0120] In one embodiment, based on the message processing result, the uplink and downlink message messages are monitored for abnormalities, including: obtaining the second current parameter value corresponding to each message parameter in the message processing result; based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0121] The second current parameter value refers to the current parameter value of the message to be tracked during the abnormal monitoring stage. The preset alarm threshold refers to the preset alarm critical value, that is, if the alarm critical value is exceeded, the system will issue an alarm.
[0122] Specifically, the current parameter value corresponding to each message parameter in the message to be tracked is obtained. If it is detected that the current parameter value exceeds the preset alarm threshold, it means that the corresponding message parameter is abnormal, and an alarm processing is performed. If it is detected that the current parameter value does not exceed the preset alarm threshold, it means that the corresponding message parameter is normal, and no alarm processing is performed.
[0123] In one embodiment, an alarm count threshold may be pre-set to control the alarm count, that is, if the alarm count for a certain message parameter reaches the alarm count threshold and the anomaly of the message parameter is still not resolved, the system will no longer trigger the alarm repeatedly.
[0124] In this embodiment, corresponding decoding processing is performed on the target log corresponding to the extracted message to be tracked to obtain the correct message processing result corresponding to the message to be tracked, thereby improving the accuracy of abnormal monitoring of uplink and downlink messages.
[0125] In one embodiment, if Figure 6 As shown in FIG. 1 , after the step of performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log, the message viewing process is also included:
[0126] Step S602: in response to a viewing instruction for uplink and downlink message messages, obtain a tracking link corresponding to the uplink and downlink message messages, wherein the tracking link refers to a link from a starting link node to a current link node of the uplink and downlink message messages.
[0127] Among them, the viewing instruction may refer to an instruction to view the tracking status of uplink and downlink message messages. Since the viewing instruction can be initiated at any time, the tracking status of the uplink and downlink message messages viewed also needs to be real-time. The starting link node refers to the initiating node of the uplink and downlink message messages, such as a cloud server, or a link node on the cloud side. The current link node refers to the link node where the uplink and downlink message messages are currently located when the viewing instruction is received, which can be a node on the cloud side, a node on the edge side, or a node on the device.
[0128] Specifically, in response to the viewing instruction for the uplink and downlink message, the tracking link of the uplink and downlink message is obtained, that is, the link between the uplink and downlink message from the initiating node to the current link node.
[0129] Step S604: Obtain the message processing results of the uplink and downlink messages in the traced link, and display the message processing results.
[0130] Specifically, obtaining the message processing result of the uplink and downlink message in the tracking link can be obtaining the message processing result of each link node in the tracking link for the uplink and downlink message, and displaying the message processing result of each link node for the uplink and downlink message in real time.
[0131] In this embodiment, by displaying the message processing status of uplink and downlink messages in real time, it is convenient to quickly locate link problems and improve the efficiency of abnormal monitoring under cloud-edge collaboration.
[0132] In a specific embodiment, if Figure 7 As shown, first, the cloud server on the cloud side configures the message tracking configuration information, and synchronizes the message tracking configuration information to the edge side through the edge gateway, so that both the cloud and edge sides can track the uplink and downlink messages. Figure 8As shown in the message tracking flow chart, when the uplink and downlink message flows between the cloud side and the device are transferred to any link node, it can be first determined whether the link node is configured with message tracking function information, that is, whether the link node has message tracking turned on. If not, no tracking is performed. If it is turned on, the first current parameter value corresponding to each message parameter in the uplink and downlink message is further obtained, and each first current parameter value is detected to see whether it reaches the configured message tracking threshold. If it does not reach, no tracking is performed. If it reaches, the corresponding message parameter is tracked as the message to be tracked. Then, the message to be tracked is identified by the coding identifier to determine whether the message to be tracked needs to be encoded. If the message to be tracked carries a coding identifier, the configured message encoding and decoding configuration information is queried to obtain the encoding method corresponding to the coding identifier. The message to be tracked is encoded based on the coding method, and the corresponding message log generated after the encoding process is sent to the cloud side receiving service, i.e., the Flink middleware. If the message to be tracked does not carry a coding identifier, the corresponding message log can be directly sent to Flink by the edge gateway. Flink parses the received message logs and sends the parsed message logs to the message processing middleware in the cloud-side monitoring device, namely the Kafka system. Kafka stores the message logs. The message tracking service subscribes to the message tracking topic in the Kafka system. In this way, the message tracking service can check the message logs in Kafka and determine whether the message logs need to be decoded. If decoding is required, the message logs are decoded. If decoding is not required, the second current parameter value corresponding to each message parameter in the message to be tracked can be directly obtained to detect whether each second current parameter value exceeds the preset alarm threshold. If so, a monitoring alarm is issued and stored in the message tracking database. If not, the message processing result can be directly stored in the message tracking database.
[0133] In this embodiment, the cloud server tracks the uplink and downlink messages between the cloud server and the device based on the message tracking configuration information. The uplink and downlink messages are sent via the edge gateway, and the message log sent by the edge gateway is received. The message log includes the first downlink message log corresponding to the cloud server sending the downlink message message to the edge gateway, the second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and the uplink message log of the device reporting the uplink message message to the cloud server. In this way, the cloud server can obtain the messages on the edge side and the device side where the edge gateway is located in real time, thereby realizing the uplink and downlink message tracking on the cloud side, edge side and device side. Further, the tracked uplink and downlink message messages are monitored for abnormalities based on the message log, and there is no need to check the data flow logs of the cloud side and edge side one by one, which reduces the link problem troubleshooting time under cloud-edge collaboration, thereby quickly locating the link problem and improving the abnormal monitoring efficiency of cloud-edge collaboration.
[0134] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0135] Based on the same inventive concept, the embodiment of the present application also provides a message tracking device for implementing the cloud-edge collaborative message tracking method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more cloud-edge collaborative message tracking devices provided below can refer to the limitations of the cloud-edge collaborative message tracking method above, and will not be repeated here.
[0136] In one embodiment, Fig. 9 As shown, a cloud-edge collaborative message tracking device is provided, which is applied to a cloud server, including: a message tracking acquisition module 902, a log receiving module 904, and an abnormality monitoring module 906, wherein:
[0137] A message tracking module 902 is used to track uplink and downlink messages between the cloud server and the device based on the message tracking configuration information; the uplink and downlink messages are sent via the edge gateway;
[0138] The log receiving module 904 is used to receive the message log sent by the edge gateway; the message log includes the first downlink message log corresponding to the cloud server sending the downlink message message to the edge gateway, the second downlink message log of the edge gateway sending the downlink message message to the device, and the uplink message log of the device reporting the uplink message message to the cloud server;
[0139] The abnormality monitoring module 906 is used to monitor the tracked uplink and downlink message messages for abnormalities based on the message log.
[0140] In one embodiment, the message tracking module 902 further includes:
[0141] A node acquisition unit, used to acquire a link node between the cloud server and the device;
[0142] A tracking unit is used to screen out the messages to be tracked from the uplink and downlink message messages based on the message tracking threshold if the link node is configured with the message tracking function information, and track the messages to be tracked.
[0143] In one embodiment, the tracking unit is further configured to:
[0144] Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message;
[0145] If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0146] In one embodiment, the tracking unit is further configured to:
[0147] Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked;
[0148] If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information;
[0149] Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
[0150] In one embodiment, the abnormality monitoring module 906 further includes:
[0151] An extraction unit, used to extract a target log corresponding to a message to be tracked in the uplink and downlink message from the message log;
[0152] A decoding method acquisition unit, configured to acquire a decoding method corresponding to the encoding identifier based on the encoding identifier and message encoding and decoding configuration information carried by the target log;
[0153] A decoding unit, configured to decode the target log according to the decoding method to obtain a message processing result of the message to be tracked;
[0154] The monitoring unit is used to perform abnormal monitoring on the uplink and downlink message messages based on the message processing result.
[0155] In one embodiment, the monitoring unit is further configured to:
[0156] Obtaining a second current parameter value corresponding to each message parameter in the message processing result;
[0157] Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0158] In one of the embodiments, the cloud-edge collaborative message tracking device further includes:
[0159] A link acquisition module, configured to acquire a tracking link corresponding to the uplink and downlink message in response to a viewing instruction for the uplink and downlink message, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node;
[0160] The display module is used to obtain the message processing results of the uplink and downlink message messages in the tracking link and display the message processing results.
[0161] In one of the embodiments, the cloud-edge collaborative message tracking device further includes:
[0162] Receiving the message log sent by the edge gateway through a cloud-side receiving service;
[0163] The abnormality monitoring module 906 further includes:
[0164] Sending the message log to a cloud-side monitoring device through the cloud-side receiving service;
[0165] The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
[0166] Each module in the above-mentioned cloud-edge collaborative message tracking device can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0167] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store item recommendation data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cloud-edge collaborative message tracking method is implemented.
[0168] Those skilled in the art will understand that Fig.10The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0170] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0171] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0172] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0174] Obtaining a link node between the cloud server and the device;
[0175] If the link node is configured with the message tracking function information, the message to be tracked is screened out from the uplink and downlink message messages based on the message tracking threshold, and the message to be tracked is tracked.
[0176] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0177] Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message;
[0178] If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0179] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0180] Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked;
[0181] If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information;
[0182] Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
[0183] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0184] Extracting a target log corresponding to the message to be tracked in the uplink and downlink message from the message log;
[0185] Based on the encoding identifier and message encoding and decoding configuration information carried by the target log, obtaining a decoding method corresponding to the encoding identifier;
[0186] According to the decoding method, the target log is decoded to obtain a message processing result of the message to be tracked;
[0187] Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
[0188] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0189] Obtaining a second current parameter value corresponding to each message parameter in the message processing result;
[0190] Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0191] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0192] In response to a viewing instruction for the uplink and downlink message, a tracking link corresponding to the uplink and downlink message is obtained, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node;
[0193] Obtain message processing results of the uplink and downlink message messages in the tracking link, and display the message processing results.
[0194] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0195] Receiving the message log sent by the edge gateway through a cloud-side receiving service;
[0196] The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes:
[0197] Sending the message log to a cloud-side monitoring device through the cloud-side receiving service;
[0198] The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
[0199] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0200] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0201] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0202] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0204] Obtaining a link node between the cloud server and the device;
[0205] If the link node is configured with the message tracking function information, the message to be tracked is screened out from the uplink and downlink message messages based on the message tracking threshold, and the message to be tracked is tracked.
[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0207] Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message;
[0208] If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0209] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0210] Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked;
[0211] If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information;
[0212] Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0214] Extracting a target log corresponding to the message to be tracked in the uplink and downlink message from the message log;
[0215] Based on the encoding identifier and message encoding and decoding configuration information carried by the target log, obtaining a decoding method corresponding to the encoding identifier;
[0216] According to the decoding method, the target log is decoded to obtain a message processing result of the message to be tracked;
[0217] Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
[0218] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0219] Obtaining a second current parameter value corresponding to each message parameter in the message processing result;
[0220] Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] In response to a viewing instruction for the uplink and downlink message, a tracking link corresponding to the uplink and downlink message is obtained, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node;
[0223] Obtain message processing results of the uplink and downlink message messages in the tracking link, and display the message processing results.
[0224] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0225] Receiving the message log sent by the edge gateway through a cloud-side receiving service;
[0226] The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes:
[0227] Sending the message log to a cloud-side monitoring device through the cloud-side receiving service;
[0228] The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
[0229] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0230] Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway;
[0231] Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server;
[0232] The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0234] Obtaining a link node between the cloud server and the device;
[0235] If the link node is configured with the message tracking function information, the message to be tracked is screened out from the uplink and downlink message messages based on the message tracking threshold, and the message to be tracked is tracked.
[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0237] Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message;
[0238] If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
[0239] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0240] Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked;
[0241] If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information;
[0242] Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0244] Extracting a target log corresponding to the message to be tracked in the uplink and downlink message from the message log;
[0245] Based on the encoding identifier and message encoding and decoding configuration information carried by the target log, obtaining a decoding method corresponding to the encoding identifier;
[0246] According to the decoding method, the target log is decoded to obtain a message processing result of the message to be tracked;
[0247] Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
[0248] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0249] Obtaining a second current parameter value corresponding to each message parameter in the message processing result;
[0250] Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
[0251] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0252] In response to a viewing instruction for the uplink and downlink message, a tracking link corresponding to the uplink and downlink message is obtained, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node;
[0253] Obtain message processing results of the uplink and downlink message messages in the tracking link, and display the message processing results.
[0254] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0255] Receiving the message log sent by the edge gateway through a cloud-side receiving service;
[0256] The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes:
[0257] Sending the message log to a cloud-side monitoring device through the cloud-side receiving service;
[0258] The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
[0259] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0260] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0261] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0262] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A cloud-edge collaborative message tracking method, characterized in that: Applied to a cloud server, the method comprises: Based on the message tracking configuration information, the uplink and downlink message messages between the cloud server and the device are tracked; the uplink and downlink message messages are sent via the edge gateway; Receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server; The tracked uplink and downlink message messages are monitored for abnormalities based on the message log.
2. The method according to claim 1, characterized in that The message tracking configuration information includes message tracking function information and a message tracking threshold, and the tracking of uplink and downlink messages between the cloud server and the device based on the message tracking configuration information includes: Obtaining a link node between the cloud server and the device; If the link node is configured with the message tracking function information, the message to be tracked is screened out from the uplink and downlink message messages based on the message tracking threshold, and the message to be tracked is tracked.
3. The method according to claim 2, characterized in that The filtering out the to-be-tracked messages in the uplink and downlink message messages based on the message tracking threshold includes: Obtaining first current parameter values respectively corresponding to each message parameter in the uplink and downlink message; If the first current parameter value reaches the message tracking threshold, the message parameter corresponding to the first current parameter value is used as the message to be tracked.
4. The method according to claim 2, characterized in that: The message tracking configuration information also includes message encoding and decoding configuration information, and the tracking process of the message to be tracked includes: Tracking the message to be tracked to obtain a message processing result corresponding to the message to be tracked; If the message to be tracked carries a coding identifier, obtaining a coding method corresponding to the coding identifier based on the message coding and decoding configuration information; Based on the encoding method, the message processing result is encoded to obtain an encoding processing result.
5. The method according to claim 1, characterized in that: The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes: Extracting a target log corresponding to the message to be tracked in the uplink and downlink message from the message log; Based on the encoding identifier and message encoding and decoding configuration information carried by the target log, obtaining a decoding method corresponding to the encoding identifier; According to the decoding method, the target log is decoded to obtain a message processing result of the message to be tracked; Based on the message processing result, the uplink and downlink message messages are monitored for abnormalities.
6. The method according to claim 5, characterized in that The message tracking configuration information also includes a preset alarm threshold, and the abnormal monitoring of the uplink and downlink message messages based on the message processing result includes: Obtaining a second current parameter value corresponding to each message parameter in the message processing result; Based on the second current parameter value and the preset alarm threshold, the uplink and downlink message messages are monitored for abnormalities.
7. The method according to claim 1, characterized in that After the step of performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log, the method further includes: In response to a viewing instruction for the uplink and downlink message, a tracking link corresponding to the uplink and downlink message is obtained, wherein the tracking link refers to a link of the uplink and downlink message from a starting link node to a current link node; Obtain message processing results of the uplink and downlink message messages in the tracking link, and display the message processing results.
8. The method according to claim 1, characterized in that: The receiving the message log sent by the edge gateway includes: Receiving the message log sent by the edge gateway through a cloud-side receiving service; The performing abnormal monitoring on the tracked uplink and downlink message messages based on the message log includes: Sending the message log to a cloud-side monitoring device through the cloud-side receiving service; The cloud-side monitoring device is used to perform abnormal monitoring on the uplink and downlink message messages.
9. A cloud-edge collaborative message tracking device, characterized in that: Applied to a cloud server, the device comprises: A message tracking module, used to track uplink and downlink message messages between the cloud server and the device based on message tracking configuration information; the uplink and downlink message messages are sent via an edge gateway; A log receiving module, configured to receive a message log sent by the edge gateway; the message log includes a first downlink message log corresponding to the cloud server sending a downlink message message to the edge gateway, a second downlink message log corresponding to the edge gateway sending the downlink message message to the device, and an uplink message log corresponding to the device reporting an uplink message message to the cloud server; The abnormality monitoring module is used to perform abnormality monitoring on the tracked uplink and downlink message messages based on the message log.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
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 8 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 8 are implemented.