Running log acquisition method and device, equipment, medium and product

By evaluating the log characteristic parameters and importance scores of IoT devices, only logs from high-importance gateway devices are retrieved, thus solving the problem of wasted processing device resources and achieving efficient log management.

CN121585568APending Publication Date: 2026-02-27CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511768046.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In existing technologies, processing devices need to periodically and proactively acquire the operating logs of IoT devices, resulting in a waste of computing and storage resources.

Method used

By receiving log feature parameters sent by the gateway device, the offset between the number of feature events and the reference number of IoT devices is evaluated. Based on the offset and preset weights, the importance score of the gateway device is determined, and when the score reaches the threshold, a log upload command is sent to obtain only the operation logs of high-importance gateway devices.

Benefits of technology

It effectively reduces the computing and storage pressure on processing devices, ensures that computing resources are concentrated on gateway devices with high processing importance, avoids the waste of resources caused by full log transmission, and improves the efficiency and timeliness of log management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585568A_ABST
    Figure CN121585568A_ABST
Patent Text Reader

Abstract

The invention discloses a running log obtaining method and device, equipment, a medium and a product, the method is applied to processing equipment, and the method comprises the steps that log feature parameters sent by gateway equipment are received, and the log feature parameters comprise the number of multiple preset type feature events; the characteristic parameters are determined based on operation logs sent by the plurality of Internet of Things devices to the gateway device; for each preset type of feature event, determining a deviation degree between the number of the feature events and a corresponding reference number, and determining an importance score of the gateway device based on the deviation degree corresponding to each preset type of feature event and a preset weight; when the importance score is greater than or equal to a preset value, sending a log uploading instruction to the gateway device, so that the gateway device sends the operation logs of the plurality of Internet of Things devices to the processing device based on the log uploading instruction; and receiving the running log of the Internet of Things equipment sent by the gateway equipment. The method can release the calculation and storage pressure of the processing equipment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of Internet of Things, and particularly relates to a method and device for acquiring running logs, equipment, media and products. BACKGROUND

[0002] With the rapid development of Internet of Things technology, the number of Internet of Things devices connected to a single gateway device is increasing, and the amount of running log data generated is growing exponentially. These logs are important basis for analyzing the running state of the device and troubleshooting. Therefore, the gateway device needs to upload the running logs of the Internet of Things devices to the processing device to realize the monitoring of the running state of the Internet of Things devices.

[0003] The prior art often sends a log acquisition request to the gateway device periodically and actively by the processing device to acquire the running logs of the Internet of Things devices, but the above-mentioned method makes the processing device need to analyze and process a large amount of running logs to determine the running state of the Internet of Things devices, which causes waste of the computing resources and storage resources of the processing device. SUMMARY

[0004] The embodiments of the application provide a method and device for acquiring running logs, equipment, media and products, which can reduce the waste of computing resources and storage resources of the processing device.

[0005] In a first aspect, the embodiments of the application provide a method for acquiring running logs, applied to a processing device, and the method comprises the following steps: receiving log characteristic parameters sent by a gateway device, wherein the log characteristic parameters are used to represent the running state of a plurality of Internet of Things devices connected to the gateway device, and the log characteristic parameters comprise the number of a plurality of preset type characteristic events; the characteristic parameters are determined based on the running logs sent by the plurality of Internet of Things devices to the gateway device; determining the offset degree of the number of the characteristic event and the corresponding reference number for each preset type of characteristic event, and determining the importance score of the gateway device based on the offset degree corresponding to each preset type of characteristic event and a preset weight; in the case where the importance score is greater than or equal to a preset value, sending a log uploading instruction to the gateway device, so that the gateway device sends the running logs of the plurality of Internet of Things devices to the processing device based on the log uploading instruction; receiving the running logs of the Internet of Things devices sent by the gateway device.

[0006] In a second aspect, the embodiments of the application provide a method for acquiring running logs, applied to a gateway device, and the method comprises the following steps: acquiring the running logs of a plurality of Internet of Things devices connected to the gateway device, wherein the running logs comprise a plurality of characteristic events of the plurality of Internet of Things devices when running and the number corresponding to each characteristic event; The quantity of the characteristic events of each preset type is determined based on the running logs of the plurality of Internet of Things devices, and a log characteristic parameter including the quantity of the characteristic events of each preset type is sent to the processing device, so that the processing device determines a deviation degree of the quantity of each preset type of characteristic event from a corresponding reference quantity, determines an importance score of the gateway device based on the deviation degree of each preset type of characteristic event and a preset weight, and generates a log uploading instruction in a case where the importance score is greater than or equal to a preset value; The log uploading instruction sent by the processing device is received, and the running logs of the plurality of Internet of Things devices are sent to the processing device based on the log uploading instruction.

[0007] In a third aspect, an embodiment of the present application provides an acquisition apparatus of a running log, applied to a processing device, and the apparatus comprises: A receiving module is configured to receive a log characteristic parameter sent by a gateway device, wherein the log characteristic parameter is used to represent a running state of a plurality of Internet of Things devices connected to the gateway device, and the log characteristic parameter includes a quantity of a plurality of preset types of characteristic events; and the characteristic parameter is determined based on running logs sent by the plurality of Internet of Things devices to the gateway device. A determining module is configured to determine, for each preset type of characteristic event, a deviation degree of the quantity of the characteristic event from a corresponding reference quantity, and determine an importance score of the gateway device based on the deviation degree of each preset type of characteristic event and a preset weight. A sending module is configured to send, in a case where the importance score is greater than or equal to a preset value, a log uploading instruction to the gateway device, so that the gateway device sends, based on the log uploading instruction, the running logs of the plurality of Internet of Things devices to the processing device. The receiving module is further configured to receive the running logs of the Internet of Things devices sent by the gateway device.

[0008] In a fourth aspect, an embodiment of the present application provides an acquisition apparatus of a running log, applied to a gateway device, and the gateway device is connected to a plurality of Internet of Things devices, and the apparatus comprises: An acquisition module is configured to acquire running logs of a plurality of Internet of Things devices connected to the gateway device, wherein the running logs include a plurality of characteristic events of the plurality of Internet of Things devices when running and a corresponding quantity of each characteristic event. A determining module is configured to determine, based on the running logs of the plurality of Internet of Things devices, a quantity of a plurality of preset types of characteristic events, and send, to a processing device, a log characteristic parameter including the quantity of the plurality of preset types of characteristic events, so that the processing device determines, for each preset type of characteristic event, a deviation degree of the quantity of the characteristic event from a corresponding reference quantity, determines an importance score of the gateway device based on the deviation degree of each preset type of characteristic event and a preset weight, and generates a log uploading instruction in a case where the importance score is greater than or equal to a preset value. The receiving module is configured to receive a log uploading instruction sent by the processing device, and send running logs of the plurality of Internet of Things devices to the processing device based on the log uploading instruction.

[0009] In a fifth aspect, an electronic device is provided, and the device includes: a processor and a memory storing computer program instructions; The processor, when executing the computer program instructions, is configured to execute the running log acquisition method of the first aspect or the second aspect.

[0010] In a sixth aspect, a computer storage medium is provided, and the computer storage medium stores computer program instructions. When the computer program instructions are executed by a processor, the running log acquisition method of the first aspect or the second aspect is implemented.

[0011] In a seventh aspect, a computer program product is provided, and the computer program product includes a computer program. When the computer program is processed by a processor, the running log acquisition method of the first aspect or the second aspect is implemented.

[0012] The running log acquisition method, device, equipment, medium and product provided by the embodiments of the present application can effectively identify the gateway device that needs to upload the log, greatly reduce the storage and computing pressure of the processing device, and make the resources of the processing device concentrate on processing the running log sent by the gateway device with high importance score, thereby effectively reducing the computing pressure and storage pressure of the processing device on the log. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. For those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0014] Figure 1 A flowchart of a running log acquisition method provided by some embodiments of the present application.

[0015] Figure 2 A flowchart of another running log acquisition method provided by some embodiments of the present application.

[0016] Figure 3 A flowchart of another method for obtaining a running log is provided for some embodiments of the present application.

[0017] Figure 4 A schematic diagram of an apparatus for obtaining a running log is provided for some embodiments of the present application.

[0018] Figure 5 A schematic diagram of another apparatus for obtaining a running log is provided for some embodiments of the present application.

[0019] Figure 6 A flowchart of a system for obtaining a running log is provided for some embodiments of the present application.

[0020] Figure 7 A schematic diagram of a hardware structure of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0021] The features and exemplary embodiments of various aspects of the present application will be described in detail below with reference to the drawings. To make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0022] It should be noted that, in this document, relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0023] Before the technical solutions provided by the embodiments of the present application are described, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art: Currently, when a processing device acquires the running logs of Internet of Things devices, it often needs to actively send an acquisition instruction to a gateway device connected to multiple Internet of Things devices to acquire the running logs of the Internet of Things devices. It can be imagined that sending acquisition instructions to multiple different gateway devices may cause the processing device to have a heavy workload. Moreover, the gateway device sends the running logs of all Internet of Things devices to the processing device, so that the processing device analyzes the running state of the Internet of Things devices based on the running logs, which causes the processing device to have a large computing and storage pressure.

[0024] Based on this, the embodiments of the present application provide a running log acquisition method, device, equipment, medium and product, which can solve the above problems. Next, a running log acquisition method provided by the embodiments of the present application will be described in detail.

[0025] In some embodiments, as shown in Figure 1 The embodiments of the present application provide a running log acquisition method, which can include: S110: The gateway device acquires the running logs of multiple Internet of Things devices connected to the gateway device, wherein the running logs include multiple characteristic events of the multiple Internet of Things devices when running and the number of each characteristic event.

[0026] One gateway device can be connected to multiple Internet of Things devices at the same time, and acquire the running logs of the multiple Internet of Things devices. Here, the running logs can include multiple characteristic events of the Internet of Things devices when running and the number of each characteristic event, for example, the characteristic events can include target parameters or abnormal parameters of the Internet of Things devices, version numbers of target firmware of the Internet of Things devices, execution results of target instructions of the Internet of Things devices, and information interaction results of the Internet of Things devices and preset Internet of Things devices, etc.

[0027] S120: The gateway device determines the number of multiple preset types of characteristic events based on the running logs of the multiple Internet of Things devices, and generates a log characteristic parameter including the number of multiple preset types of characteristic events.

[0028] The gateway device can classify multiple characteristic events recorded in the running logs of the multiple Internet of Things devices, for example, into different types of characteristic events such as device failure type, communication interruption type, and firmware version check type, and further determine the number of each preset type of characteristic event to generate a log characteristic parameter.

[0029] In some examples, the log feature parameter can include a quantity sequence corresponding to each importance level of the preset feature event in descending order, for example, the log feature parameter is: Gm=[fm(A), fm(B), …, fm(N)], where fm(A)-fm(N) represents the number of different preset types of feature events.

[0030] S130: The gateway device sends the log feature parameter to the processing device.

[0031] Here, the processing device can be a server or a device that deploys the log management platform system.

[0032] After the gateway device generates the log feature parameter, it can actively send the above-mentioned log feature parameter to the processing device.

[0033] S140: The processing device determines the offset degree of the number of feature events of each preset type of feature event and the corresponding reference number, and determines the importance score of the gateway device based on the offset degree of each preset type of feature event and the preset weight.

[0034] The processing device stores the reference number of feature events of each preset type, and the processing device can determine the offset degree of each preset type of feature event based on the number of feature events of each preset type and the corresponding reference number. Then, the offset degree of each type of feature event is weighted and summed to obtain the importance score of the gateway device.

[0035] Here, the processing device can construct an offset degree sequence Q=[Q1, Q2, …, QN] based on the offset degree corresponding to each feature event, and determine the importance score of the gateway device based on the pre-stored weight matrix K=[K1, K2, …, KN] including the preset weight of each feature event.

[0036] S150: The processing device sends a log upload instruction to the gateway device if the importance score is greater than or equal to a preset value.

[0037] The processing device compares the importance score with the preset value to obtain a comparison result. If the comparison result includes the case that the importance score is less than the preset value, it indicates that the running state of the Internet of Things device connected to the gateway device is normal, and there is no need to obtain the running log of the Internet of Things device. If the comparison result includes the case that the importance score is greater than or equal to the preset value, the processing device sends a log upload instruction to the gateway device.

[0038] In some embodiments, the processing device can connect a plurality of gateway devices, each of which connects a plurality of Internet of Things devices, and the processing device can receive log feature parameters sent by the plurality of gateway devices. The processing device can determine a sequence of offsets corresponding to each gateway device based on the log feature parameters of each gateway device, determine an importance score of each gateway device based on the sequence of offsets corresponding to each gateway device and the weight matrix, and sort the importance scores of the plurality of gateway devices in descending order, and send a log upload instruction to the top M gateway devices. In this way, the gateway devices that need to be focused on can be quickly identified, and the running logs of the corresponding Internet of Things devices can be obtained, greatly reducing the computing, storage and bandwidth pressure of the processing device, and avoiding resource waste.

[0039] S160: The gateway device sends the running log of the Internet of Things device to the processing device based on the log upload instruction.

[0040] After receiving the log upload instruction, the gateway device can send the running log of the Internet of Things device to the processing device.

[0041] In some examples, the gateway device can send the running log to the processing device in the order of generation time of different logs, or in the preset device order of different Internet of Things devices.

[0042] The embodiments of the present application generate log feature parameters based on the obtained running logs of the Internet of Things devices through the gateway device, and actively send the log feature parameters to the processing device. The processing device evaluates the offset of the number of preset types of feature events of the Internet of Things device from the reference number based on the log feature parameters, and then determines the importance score of the gateway device based on a plurality of offsets and a preset weight. When the importance score is greater than or equal to a threshold value, the processing device sends a log upload instruction to the gateway device to obtain the running log sent by the gateway device. The above-mentioned way enables the processing device to intelligently filter the target gateway that needs to be focused on only by the log feature parameters, realizes the priority upload of important logs, and ensures that the computing resources of the processing device can be quickly concentrated on processing potential abnormalities. At the same time, this scheme greatly reduces the burden of the processing device, and only needs to process light feature parameters in ordinary times, avoiding the storage and computing pressure brought by full-amount log transmission, thereby being conducive to improving the efficiency and timeliness of log management.

[0043] In some embodiments, for each feature event, the offset of the number of feature events from the corresponding reference number is determined, comprising: For each preset type of feature event, a deviation value of the number of feature events from the corresponding reference number is determined, and a maximum deviation value and a minimum deviation value are determined among the plurality of deviation values. Based on the deviation value corresponding to each preset type of feature event, the maximum deviation value, the minimum deviation value, and a preset adjustment coefficient, a shift degree of each preset type of feature event is determined.

[0044] The above deviation value can be determined based on an absolute value of a difference between the number of each preset type of feature event and the reference number.

[0045] The maximum deviation value and the minimum deviation value can be determined based on the following expression: (1) Wherein, CS1 is the minimum deviation value; CS2 is the maximum deviation value; fm(X) is the number of each preset type of feature event, B X is the reference number of each preset type of feature event.

[0046] The shift degree can be determined based on the following expression: (2) Wherein, Q xm is the shift degree of each preset type of feature event, CS1 is the minimum deviation value; CS2 is the maximum deviation value; fm(X) is the number of each preset type of feature event, B X is the reference number of each preset type of feature event, p is an adjustment coefficient.

[0047] The embodiments of the present application can determine the shift degree by introducing the maximum deviation value, the minimum deviation value, the deviation value and the adjustment coefficient, so that the deviation of the number of feature events of different preset types from the reference number can be placed under the same standard, so as to subsequently perform weighted summation of the shift degree and the weight, and improve the scientificity and accuracy of the importance score result.

[0048] In some embodiments, as Figure 2 shown, the log feature parameter is a parameter sent by the gateway device to the processing device based on the corresponding target reporting period; the gateway device sending the log feature parameter to the processing device can include: S210: The processing device obtains device information of a plurality of Internet of Things devices, and the device information includes at least one of the following: a device type parameter, an installation environment parameter, and a monitoring index number.

[0049] The processing device can acquire device information of a plurality of Internet of Things devices through the gateway device, the device type parameter represents a device type of the Internet of Things device, for example, including a sensor type, an actuator type, or a communication transmission, and the installation environment parameter represents an environment in which the Internet of Things device is located, for example, including a traffic environment, a factory environment, or a home environment, and the monitoring index quantity represents a total number of different characteristic event monitoring dimensions that need to be monitored and recorded for one Internet of Things device.

[0050] In S220, the processing device inputs the device information into the preset model, and determines the target reporting period of the gateway device based on a correspondence between the device information included in the preset model and the reporting period.

[0051] The processing device can input the device information into the preset model to obtain the target reporting period of the gateway device.

[0052] In some examples, for different gateway devices, the processing device can determine a target reporting period corresponding to each gateway device based on device information corresponding to each gateway device. For example, it is determined that the target reporting period of the N1 gateway device is 2 periods, that is, the N1 gateway device performs log characteristic parameter reporting based on 2 of the standard period, it is determined that the target reporting period of the N2 gateway device is 3 periods, and the N2 gateway device performs log characteristic parameter reporting based on 3 of the standard period.

[0053] In S230, the processing device sends the target reporting period to the gateway device.

[0054] In S240, the gateway device periodically sends the log characteristic parameter to the processing device based on the target reporting period.

[0055] The processing device sends the target reporting period to the gateway device, and the gateway device performs periodic reporting of the log characteristic parameter based on the reporting period indicated by the target reporting period.

[0056] The embodiments of the present application can determine different reporting periods for different gateway devices, so that different gateway devices periodically report log characteristic parameters based on different target reporting periods, which directly reduces the pressure of the bandwidth required by the gateway device to upload log characteristic parameters, and also reduces the frequency of data that needs to be received and processed by the processing device, thereby releasing processing resources.

[0057] In some embodiments, the preset model includes a convolutional neural network model; before the device information is input into the preset model, the method can further include: The sample device information is input into an initial convolutional neural network model, and a predicted period corresponding to each sample gateway device is obtained through calculation of the model. The initial convolutional neural network model is trained based on a deviation between the predicted period and a sample reporting period corresponding to each sample gateway device, and a convolutional neural network model is obtained.

[0058] The processing device can obtain historical data in a plurality of Internet of Things devices to form a sample set, and the sample set can include sample device information and a sample reporting period. Each sample device information includes device type, installation environment, and monitoring index quantity of the sample Internet of Things device, and the like. Here, the sample reporting period is a best reporting period set by a human.

[0059] The sample device information is input into an initial convolutional neural network model, and a predicted period corresponding to each sample gateway device is obtained through calculation of the model. The initial convolutional neural network model is trained based on a deviation between the predicted period and a sample reporting period corresponding to each sample gateway device, and a convolutional neural network model is obtained.

[0060] The convolutional neural network model is obtained by training based on the sample device information and the sample reporting period, so that the processing device can automatically calculate the reporting period of different gateway devices based on the convolutional neural network model, which is beneficial to reduce the pressure of data receiving and processing of the processing device.

[0061] In some embodiments, as shown in Figure 3 The method can further include: S310: The gateway device obtains a plurality of logs of a plurality of Internet of Things devices.

[0062] Here, the plurality of logs of the plurality of Internet of Things devices obtained by the gateway device are mixed logs including time stamps and device identifiers.

[0063] S320: The gateway device classifies the plurality of logs according to time sequence to obtain a plurality of sub-logs, and classifies the plurality of logs according to device sequence to obtain a plurality of sub-logs.

[0064] The gateway device can classify the logs according to time sequence based on the time stamps of the logs to obtain a plurality of sub-logs, and can also classify the logs according to device sequence based on the device identifiers corresponding to the logs to obtain a plurality of sub-logs.

[0065] S330: The gateway device determines the variance of the plurality of sub-logs classified in time sequence based on the occupied memory of each sub-log obtained by classification in time sequence, and determines the variance of the plurality of sub-logs classified in device sequence based on the occupied memory of each sub-log obtained by classification in device sequence.

[0066] According to the two different classification manners, the variance can be determined based on the occupied memory of the plurality of sub-logs corresponding to the time sequence, and the variance can be determined based on the occupied memory of the plurality of sub-logs corresponding to the device sequence.

[0067] S340: The gateway device determines the target uploading sequence based on the variance of the plurality of sub-logs classified in time sequence and the variance of the plurality of sub-logs classified in device sequence.

[0068] The target sequence corresponding to the smaller variance can be determined as the target uploading sequence from the variance corresponding to the time sequence and the variance corresponding to the space sequence.

[0069] S350: The gateway device sends the plurality of sub-logs to the processing device in the target uploading sequence.

[0070] S360: The processing device stores the plurality of sub-logs in the storage classification manner corresponding to the target uploading sequence.

[0071] When the processing device receives the plurality of sub-logs uploaded by the gateway device based on the target uploading sequence, the processing device can store the plurality of sub-logs in a manner more suitable for query according to the built-in index mechanism. For example, when the target uploading sequence is the time sequence, the processing device generates an index corresponding to the time sequence so that the user can query the log according to the time index; or when the target uploading sequence is the device sequence, the processing device generates an index corresponding to the device identifier so that the user can query the log according to the device identifier.

[0072] The embodiment of the present application selects the sequence, i.e., the target uploading sequence, with smaller variance of sub-log size by the gateway device, so that the data packet size of the sub-log transmitted each time is relatively uniform, which avoids the risk of network congestion, transmission timeout or failure caused by a single excessively large data packet, and ensures the stability and reliability of the entire uploading process.

[0073] Based on the same inventive concept, the embodiment of the present application also provides an acquisition device of a running log.

[0074] In some embodiments, as shown in Figure 4 The embodiment of the present application provides an acquisition device of a running log, which is applied to a processing device and includes: The receiving module 401 is configured to receive log feature parameters sent by the gateway device, wherein the log feature parameters are used to represent running states of the plurality of Internet of Things devices connected to the gateway device, and the log feature parameters include quantities of a plurality of preset type feature events; and the feature parameters are determined based on running logs sent by the plurality of Internet of Things devices to the gateway device. The determining module 402 is configured to determine, for each preset type of feature event, a deviation degree of the quantity of the feature event from a corresponding reference quantity, and determine, based on the corresponding deviation degree of each preset type of feature event and a preset weight, an importance score of the gateway device. The sending module 403 is configured to send, in a case where the importance score is greater than or equal to a preset value, a log uploading instruction to the gateway device, so that the gateway device sends, based on the log uploading instruction, the running logs of the plurality of Internet of Things devices to the processing device. The receiving module 401 is further configured to receive running logs of the Internet of Things devices sent by the gateway device.

[0075] In some embodiments, the determining module is configured to: determine, for each preset type of feature event, a deviation value of the quantity of the feature event from a corresponding reference quantity, and determine a maximum deviation value and a minimum deviation value in the plurality of deviation values; determine, based on the corresponding deviation value of each preset type of feature event, the maximum deviation value, the minimum deviation value, and a preset adjustment coefficient, the corresponding deviation degree of each preset type of feature event.

[0076] In some embodiments, the log feature parameters are parameters sent by the gateway device to the processing device based on a corresponding target reporting period; and the receiving module is configured to: obtain device information of the plurality of Internet of Things devices, the device information including at least one of a device type parameter, an installation environment parameter, and a monitoring index quantity; input the device information into a preset model, determine a target reporting period of the gateway device based on a corresponding relationship between device information included in the preset model and a reporting period, and send the target reporting period to the gateway device, so that the gateway device periodically sends the log feature parameters to the processing device based on the target reporting period.

[0077] In some embodiments, the sending module is configured to: obtain sample device information and a sample reporting period corresponding to a plurality of sample gateway devices; input each sample device information into an initial convolutional neural network model to obtain a predicted period corresponding to each sample gateway device; train the initial convolutional neural network model based on a deviation of the predicted period corresponding to each sample gateway device from the sample reporting period to obtain a convolutional neural network model.

[0078] In some embodiments, the receiving module is configured to: receive a plurality of sub-logs sent by the gateway device in a target uploading order, wherein the plurality of sub-logs are logs obtained by classifying a plurality of logs of a plurality of Internet of Things devices by the gateway device according to a time sequence or according to a device sequence; and the target uploading order is determined based on a variance of occupied memory of the plurality of sub-logs classified according to the time sequence and a size of a variance of occupied memory of the plurality of sub-logs classified according to the device sequence. store the plurality of sub-logs according to a storage classification manner corresponding to the target uploading order.

[0079] In some embodiments, as shown in Figure 5 the embodiments of the present application provide an acquisition device of a running log, applied to a gateway device connected with a plurality of Internet of Things devices, and the device comprises: an acquisition module 501 configured to acquire running logs of the plurality of Internet of Things devices connected with the gateway device, wherein the running logs comprise a plurality of characteristic events of the plurality of Internet of Things devices in running and a corresponding quantity of each characteristic event; a determination module 502 configured to determine quantities of a plurality of preset types of characteristic events based on the running logs of the plurality of Internet of Things devices, and send a log characteristic parameter comprising the quantities of the plurality of preset types of characteristic events to a processing device, so that the processing device determines a deviation degree for the quantity of each preset type of characteristic event and a corresponding reference quantity, determines an importance score of the gateway device based on the deviation degree of each preset type of characteristic event and a preset weight, and generates a log uploading instruction in a case where the importance score is greater than or equal to a preset value; a receiving module 503 configured to receive the log uploading instruction sent by the processing device, and send the running logs of the plurality of Internet of Things devices to the processing device based on the log uploading instruction.

[0080] In some embodiments, the log characteristic parameter is a parameter sent by the gateway device to the processing device based on a corresponding target reporting period; and the receiving module is configured to: receive the target reporting period sent by the processing device, and periodically send the log characteristic parameter to the processing device based on the target reporting period, wherein the target reporting period is determined by the processing device by inputting device information of the plurality of Internet of Things devices into a preset model, based on a corresponding relationship between the device information included in the preset model and the reporting period, and the device information comprises at least one of the following: a device type parameter, an installation environment parameter, and a monitoring index quantity.

[0081] In some embodiments, the acquisition module is configured to: acquire a plurality of logs of a plurality of Internet of Things devices; The plurality of logs are classified in time sequence to obtain a plurality of sub-logs, and the plurality of logs are classified in device sequence to obtain a plurality of sub-logs; Based on the occupied memory of each sub-log obtained by classification in time sequence, the variance of the plurality of sub-logs obtained by classification in time sequence is determined, and based on the occupied memory of each sub-log obtained by classification in device sequence, the variance of the plurality of sub-logs obtained by classification in device sequence is determined; Based on the variance of the plurality of sub-logs obtained by classification in time sequence and the variance of the plurality of sub-logs obtained by classification in device sequence, the target upload sequence is determined; The plurality of sub-logs are sent to the gateway device in the target upload sequence, so that the processing device stores the plurality of sub-logs in the storage classification mode corresponding to the target upload sequence.

[0082] The device of the above embodiment is used to implement the corresponding running log acquisition method in any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0083] In some embodiments, as Figure 6 The application embodiment provides a running log acquisition system, which comprises: The Internet of Things device 601 is configured to send a running log to a gateway device.

[0084] The gateway device 602 is configured to determine the number of characteristic events of a plurality of preset types based on the running logs of the plurality of Internet of Things devices, and send a log feature parameter comprising the number of characteristic events of the plurality of preset types to a processing device.

[0085] The processing device 603 is configured to determine a deviation degree for each preset type of characteristic event based on the number of characteristic events and a corresponding reference number, determine an importance score of the gateway device based on the deviation degree of each preset type of characteristic event and a preset weight, and generate a log upload instruction in a case where the importance score is greater than or equal to a preset value.

[0086] The gateway device 602 is further configured to receive the log upload instruction sent by the processing device, and send the running logs of the plurality of Internet of Things devices to the processing device based on the log upload instruction.

[0087] The running log acquisition system provided by the application embodiment can send the running logs to the processing device only when the importance score of the gateway device is high, which is beneficial to release the computing resources and storage resources of the processing device.

[0088] Figure 7 The application embodiment provides a hardware structure schematic diagram of an electronic device.

[0089] The electronic device 700 may include a processor 701 and a memory 702 storing computer program instructions.

[0090] Specifically, the processor 701 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0091] Memory 702 may include mass storage for data or instructions. For example, and not limitingly, memory 702 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 702 may include removable or non-removable (or fixed) media. Where appropriate, memory 702 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 702 is non-volatile solid-state memory.

[0092] In a particular embodiment, memory 702 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0093] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this application.

[0094] The processor 701 reads and executes computer program instructions stored in the memory 702 to implement any of the above-described methods for obtaining runtime logs.

[0095] In one example, the electronic device may also include a communication interface 703 and a bus 704. Wherein, as... Figure 7 The processor 701, memory 702, and communication interface 703 are connected through bus 704 and complete communication with each other.

[0096] The communication interface 703 is mainly configured to implement the communication between the modules, devices, units and / or equipment in the embodiments of the present application.

[0097] The bus 704 includes hardware, software, or both, that couples components of the online data traffic billing device to each other in a known manner. Although the bus is shown as a single component in the example of FIG. 7, the bus can include a plurality of buses, and / or other interconnects, that communicate data between components in the online data traffic billing device. In some embodiments, the bus 704 includes an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infiniband interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, the bus 704 can include one or more buses. Although the present application is described and shown with respect to a particular bus, the present application contemplates any suitable bus or interconnect.

[0098] The electronic device of the above embodiments is used to implement the method for acquiring the running log in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described here.

[0099] In addition, in combination with the method for acquiring the running log in the above embodiments, the embodiments of the present application can provide a computer storage medium for implementation. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any of the above embodiments of the method for acquiring the running log.

[0100] In addition, in combination with the method for acquiring the running log in the above embodiments, the embodiments of the present application can provide a computer program product for implementation. The computer program product instructions are executed by the processor of the electronic device to implement any of the above embodiments of the method for acquiring the running log.

[0101] Those skilled in the art will understand that the above discussion of any of the embodiments is merely exemplary and is not intended to suggest the scope of the present application (including the claims) is limited to these examples; under the idea of the present application, the above embodiments or technical features between different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.

[0102] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0103] It should also be noted that the exemplary embodiments mentioned in this application describe methods or apparatuses based on a series of steps or devices. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0104] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0105] The above describes only a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application.

Claims

1. A method for obtaining runtime logs, characterized in that, Applied to a processing device, the method includes: The system receives log feature parameters sent by a gateway device, wherein the log feature parameters are used to characterize the operating status of multiple IoT devices connected to the gateway device, and the log feature parameters include the number of feature events of various preset types; the feature parameters are determined based on the operating logs sent by the multiple IoT devices to the gateway device. For each preset type of feature event, the offset between the number of the feature events and the corresponding reference number is determined, and based on the offset and preset weight corresponding to the feature events of each preset type, the importance score of the gateway device is determined; If the importance score is greater than or equal to a preset value, a log upload instruction is sent to the gateway device, so that the gateway device can send the operation logs of multiple IoT devices to the processing device based on the log upload instruction; Receive the operation logs of the IoT device sent by the gateway device.

2. The method for obtaining runtime logs according to claim 1, characterized in that, For each feature event, determining the offset between the number of feature events and the corresponding reference number includes: For each of the preset types of feature events, determine the deviation value between the number of feature events and the corresponding reference number, and determine the maximum and minimum deviation values ​​among the multiple deviation values; Based on the deviation value, maximum deviation value, minimum deviation value, and preset adjustment coefficient corresponding to the feature event of each preset type, the offset corresponding to the feature event of each preset type is determined.

3. The method for obtaining runtime logs according to claim 1, characterized in that, The log feature parameters are parameters sent by the gateway device to the processing device based on the corresponding target reporting cycle; Before receiving the log feature parameters sent by the gateway device, the method further includes: Obtain device information for multiple IoT devices, wherein the device information includes at least one of the following: device type parameters, installation environment parameters, and number of monitoring indicators; The device information is input into a preset model. Based on the correspondence between the device information and the reporting period included in the preset model, the target reporting period of the gateway device is determined, and the target reporting period is sent to the gateway device so that the gateway device can periodically send the log feature parameters to the processing device based on the target reporting period.

4. The method for obtaining operation logs according to claim 3, characterized in that, The preset model includes a convolutional neural network model; before inputting the device information into the preset model, the method further includes: Obtain sample device information and sample reporting cycle for multiple sample gateway devices; The information of each sample device is input into the initial convolutional neural network model to obtain the prediction period corresponding to each sample gateway device; The initial convolutional neural network model is trained based on the deviation between the prediction period and the sample reporting period corresponding to each sample gateway device to obtain the convolutional neural network model.

5. The method for obtaining runtime logs according to claim 1, characterized in that, The runtime log includes multiple sub-logs, and the method further includes: The gateway device receives multiple sub-logs sent in a target upload order, wherein the multiple sub-logs are logs obtained by the gateway device by classifying multiple logs of multiple IoT devices in chronological order or device order; the target upload order is determined based on the variance of the memory occupied by the multiple sub-logs obtained by classifying in chronological order and the variance of the memory occupied by the multiple sub-logs obtained by classifying in device order. Multiple sub-logs are stored according to the storage classification method corresponding to the upload order of the target.

6. A method for obtaining runtime logs, characterized in that, Applied to a gateway device that is connected to multiple Internet of Things (IoT) devices, the method includes: Obtain the operation logs of multiple IoT devices connected to the gateway device, wherein the operation logs include multiple characteristic events of the multiple IoT devices during operation and the number corresponding to each characteristic event; Based on the operation logs of multiple IoT devices, the quantity of feature events of various preset types is determined, and log feature parameters including the quantity of feature events of various preset types are sent to the processing device. The processing device determines the offset between the quantity of feature events of each preset type and the corresponding reference quantity. Based on the offset and preset weight of feature events of each preset type, the importance score of the gateway device is determined. If the importance score is greater than or equal to a preset value, a log upload instruction is generated. The system receives the log upload instruction sent by the processing device and sends the operation logs of multiple IoT devices to the processing device based on the log upload instruction.

7. The method for obtaining operation logs according to claim 6, characterized in that, The log feature parameters are parameters sent by the gateway device to the processing device based on the corresponding target reporting period; the sending of log feature parameters to the processing device includes a number of log feature parameters corresponding to various preset types of feature events, including: The system receives the target reporting period sent by the processing device and periodically sends the log feature parameters to the processing device based on the target reporting period. The target reporting period is the reporting period determined by the processing device by inputting the device information of multiple IoT devices into a preset model and based on the correspondence between the device information and the reporting period included in the preset model. The device information includes at least one of the following: device type parameters, installation environment parameters, and the number of monitoring indicators.

8. The method for obtaining operation logs according to claim 6, characterized in that, The operation log includes multiple sub-logs, and sending the operation logs of multiple IoT devices to the processing device includes: Obtain multiple logs from multiple IoT devices; Multiple logs are classified into multiple sub-logs according to time order, and multiple logs are classified into multiple sub-logs according to device order; Based on the memory usage of each sub-log obtained by classifying according to time order, the variance of multiple sub-logs obtained by classifying according to time order is determined; and based on the memory usage of each sub-log obtained by classifying according to device order, the variance of multiple sub-logs obtained by classifying according to device order is determined. The target upload order is determined based on the variance of multiple sub-logs obtained by classifying them according to time order and the variance of multiple sub-logs obtained by classifying them according to device order. Multiple sub-logs are sent to the gateway device in the target upload order, so that the processing device can store the multiple sub-logs in a storage classification method corresponding to the target upload order.

9. A device for acquiring operation logs, characterized in that, Applied to a processing device, the device includes: A receiving module is used to receive log feature parameters sent by a gateway device, wherein the log feature parameters are used to characterize the operating status of multiple IoT devices connected to the gateway device, and the log feature parameters include the number of feature events of various preset types; the feature parameters are determined based on the operating logs sent by the multiple IoT devices to the gateway device; The determination module is used to determine the offset between the number of feature events and the corresponding reference number for each preset type of feature event, and to determine the importance score of the gateway device based on the offset and preset weight corresponding to the feature events of each preset type; The sending module is used to send a log upload instruction to the gateway device when the importance score is greater than or equal to a preset value, so that the gateway device can send the operation logs of multiple IoT devices to the processing device based on the log upload instruction; The receiving module is also used to receive the operation logs of the IoT device sent by the gateway device.

10. A device for acquiring operation logs, characterized in that, Applied to a gateway device, the gateway device being connected to multiple Internet of Things (IoT) devices, the device includes: The acquisition module is used to acquire the operation logs of multiple IoT devices connected to the gateway device, wherein the operation logs include multiple characteristic events of the multiple IoT devices during operation and the number corresponding to each characteristic event; The determination module is used to determine the quantity of feature events of various preset types based on the operation logs of multiple IoT devices, and send log feature parameters including the quantity of feature events of various preset types to the processing device, so that the processing device can determine the offset between the quantity of feature events of each preset type and the corresponding reference quantity, determine the importance score of the gateway device based on the offset corresponding to the feature events of each preset type and the preset weight, and generate a log upload instruction if the importance score is greater than or equal to a preset value; The receiving module is used to receive the log upload instruction sent by the processing device, and send the operation logs of multiple IoT devices to the processing device based on the log upload instruction.

11. An electronic device, characterized in that, The device includes: a processor, and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the method for obtaining the runtime log as described in any one of claims 1 to 8.

12. A readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when executed by a processor, implement the method for obtaining the runtime log as described in any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is processed by a processor, it implements the method for obtaining the runtime log as described in any one of claims 1 to 8.